Jump to content

[PROJECT] Gold Coin based Single Currency & Banking System


Recommended Posts

that is no fix for your problem but a second topic in the same reply as to where your problem lies

double check the player_wearClothes file either you are missing it in your mission pbo or its not overwritten in the compiles.sqf

 

I assume this is about the swapping outfit and then not making bank ammounts showing up thing. i have everything in place also used some one elses instance of the player_wearClothes.sqf (Zupa's one but then from another person) didnt work. still not showing bank gold on HUD after changing. only pops back up after a relog

Link to comment
Share on other sites

Force update money on disconnect:

Potential for decreasing amount of communication gameserver <-> hive <-> database

 

in: variables.sqf

Find:

if(isNil "DZE_maintainRange") then {
	DZE_maintainRange = ((DZE_PlotPole select 0)+35);
};

Add below:

if(isNil "DZE_fUpdateMoney") then {
	DZE_fUpdateMoney = false;
};

Note: you can set it here to true or use the variable in init.sqf

In: server_onPlayerDisconnect.sqf

Find:

[_playerObj,_magazines,true,true,_isplayernearby] call server_playerSync;

Replace with:

[_playerObj,_magazines,true,true,_isplayernearby,DZE_fUpdateMoney] call server_playerSync;

in: server_playerSync.sqf

Find:

if( isNil "_headShotsZupa") then{
	_headShotsZupa = 0;
};

Add below:

_fUpdateMoney = false;
if ((count _this) > 5) then {
	_fUpdateMoney = _this select 5;
};

Find:

if(_isChanged  > 0)then{		
_key = format["CHILD:999:UPDATE `character_data` SET `HeadshotsZ` = %1 WHERE `CharacterID` = %2:[0]:",_headShotsZupa,_characterID];			
_result = _key call server_hiveReadWrite;		
_character setVariable ["moneychanged",0,true];			
};

Replace with:

if((_isChanged  > 0) || _fUpdateMoney)then{	
_key = format["CHILD:999:UPDATE `character_data` SET `HeadshotsZ` = %1 WHERE `CharacterID` = %2:[0]:",_headShotsZupa,_characterID];			
_result = _key call server_hiveReadWrite;		
_character setVariable ["moneychanged",0,true];			
};

Link to comment
Share on other sites

so you file is in the "gold" folder inside the " custom" folder?

 

 

Hi Zupa, yes I am a bit of a neat freak so I moved the gold, playerhud etc into a custom folder, I then opened all the files in Notepad ++ and searched for various directory names and changed them to my folder structure. I've rolled back at the moment to work on other things as far as I can tell though everything looked OK, other than getting gold for shooting zombies in the head :D

 

The only other issue was a conflict with the defines.hpp and admin tools dialog.hpp, someone did post a fix but using that through an error and stopped the server starting up. 

Link to comment
Share on other sites

Hi Zupa, yes I am a bit of a neat freak so I moved the gold, playerhud etc into a custom folder, I then opened all the files in Notepad ++ and searched for various directory names and changed them to my folder structure. I've rolled back at the moment to work on other things as far as I can tell though everything looked OK, other than getting gold for shooting zombies in the head :D

 

The only other issue was a conflict with the defines.hpp and admin tools dialog.hpp, someone did post a fix but using that through an error and stopped the server starting up. 

 

The error should say which line and file there is an error @, i hate those dialog errors, they come 1 by 1, so very slow solving progress ^^

Link to comment
Share on other sites

Can anyone tell me how I can revert my trader cities back to the way I previously had them or just remove the current ones so I can use my custom code for them?

 

Thats in the server sided pbo in missions folder.

 

Also change the link in the init.qsf to this file ofcourse

Link to comment
Share on other sites

I'm having lots of reports of maintenance not saving to the DB. and I can confirm it. I maintained my base this morning. Came back home from work and it still said all the same parts needed maintenance. Also when updating all my files including for the dupe fix, I've been having an extreme amount of reports of not being able to log in. I'll go to check the char in the db and their character will look like this:

InNXCtY.png

 

Only thing is I didn't update the DLL's if I was supposed to.

 

Also wondering if your planning on making it actually say 1,000,000 instead of 1e006 when you have 1 mil coins.

Link to comment
Share on other sites

I'm having lots of reports of maintenance not saving to the DB. and I can confirm it. I maintained my base this morning. Came back home from work and it still said all the same parts needed maintenance. Also when updating all my files including for the dupe fix, I've been having an extreme amount of reports of not being able to log in. I'll go to check the char in the db and their character will look like this:

InNXCtY.png

 

Only thing is I didn't update the DLL's if I was supposed to.

 

Also wondering if your planning on making it actually say 1,000,000 instead of 1e006 when you have 1 mil coins.

It's in the know issues, it's been clear that it doesnt support the current maintain, we need to make new dll's or import axes old maintain for th e999 give.

Link to comment
Share on other sites

Just found thread on google search (don't run epoch server anymore)

 

If whoever is coding this needs a hand to figure out extDB.. give me a shout...

Documentation isn't the best in places...

 

As far security goes

From low -> better

 

1) You can either randomize the DB_RAW interface name used @ initalize (its not perfect).

    Just prevents scripts from calling extDB directly if they don't know the randomize variable

 

2) You can use procedure protocol only & lock/disable rest of the extension...

    That way extDB can only call procedures (i.e no raw sql commands) more info on github wiki

https://github.com/Torndeco/extdb/wiki/Calls:-DB_PROCEDURE

 

3) Or write your own protocol for extDB, its abstracted a nice bit... so its really not much work if u know c++.

I have been too busy some other projects just playing catchup now, I saw this message in small letters at about 5 AM (all nighter) and had  to re-read to make sure I'm not dreaming.

 

Torndeco,

I really appreciate someone with external DB access knowledge coming forward to offer his help. In the beginning we looked so hard for someone like you with no luck.

 

Zupa,

Could you please shed  some light on the technical end - does this mean we now can ditch Arma2NET and use Torndeco's solution? (I hope you haven't done much on that yet?)

If so, does it mean the final SC&B addon (using the new DLL files) will be able to support ALL hosts and not only the VPS ones?  If I understand correctly this will mean 100% coverage of all Epoch servers out there which multiplies the effect of your hard & brilliant work, isn't it?

 

Thanks both

Link to comment
Share on other sites

I have been too busy some other projects just playing catchup now, I saw this message in small letters at about 5 AM (all nighter) and had  to re-read to make sure I'm not dreaming.

 

Torndeco,

I really appreciate someone with external DB access knowledge coming forward to offer his help. In the beginning we looked so hard for someone like you with no luck.

 

Zupa,

Could you please shed  some light on the technical end - does this mean we now can ditch Arma2NET and use Torndeco's solution? (I hope you haven't done much on that yet?)

If so, does it mean the final SC&B addon (using the new DLL files) will be able to support ALL hosts and not only the VPS ones?  If I understand correctly this will mean 100% coverage of all Epoch servers out there which multiplies the effect of your hard & brilliant work, isn't it?

 

Thanks both

I planned on a release with this.

But, the answer on your univresal question is no. This requires adding an external dll to your arma folder ( correct me if i'm wrong).

But it should be abit safer and easier then arma2net.

It's alraedy planned

Sidenote: we are also working on an OWN dll, which will cover all functionality.

Link to comment
Share on other sites

just finished a custom hiveext.dll. (based on the latest build)

 

no extdb.dll or arma2net required. will release to zupa for testing if he wishes. will require additional columns in Character_DATA.

Thanks for the offer!

Link to comment
Share on other sites

just finished a custom hiveext.dll. (based on the latest build)

 

no extdb.dll or arma2net required. will release to zupa for testing if he wishes. will require additional columns in Character_DATA.

Sounds good. The additional columns are easy to do since all you have to do is use sql query to update the data.

Link to comment
Share on other sites

Seeing as the coins are stored as headShots, it's directly affected. Basically what you're asking is to increase the number that its incremented by for each headshot you get on a zed. Which is in the fn_damageHandlerZ.sqf file. On line 20 it sets the headshots variable to headshots + 1, surely if you change the + 1 to another value it will cause you to get more coins per headshot. Pretty simple, remember to redirect the file back into the mission file though as this file is located in dayz_code and will need to be changed.

 
case "head_hit": {
if (!(_zed getVariable["hitRegistered",false])) then {
_headShots = _hitter getVariable["headShots",0];
_hitter setVariable["headShots",(_headShots + 1),true];
_zed setVariable["hitRegistered",true];
};
};
 

hope this helps as this is all theoretical.

Yeah that worked for the zeds thanks man. Another question is how could i set it up for Hero to gain more coins from zeds than survivors? Also how to set it up for getting coins from AI? or do AI just come under bandit?

Link to comment
Share on other sites

The first version with the 999 Dll is released.

 

Instructions can be found on github and my personal website:

 

 

 

Arma2Net will follower later this week. (Maybe tomorrow).

 

Thank to all of you for your patience. I'll try keeping it up-to-date.

 

Performance en security updates will come later to.

Is this for dedicated or will it work on privately hosted?

Link to comment
Share on other sites

Yeah that worked for the zeds thanks man. Another question is how could i set it up for Hero to gain more coins from zeds than survivors? Also how to set it up for getting coins from AI? or do AI just come under bandit?

U can make it so, that when the AI wrapper spawn an AI, you set his Headshotz variable to whatever money you want to be on his body. You'll have to walk over to him and press check wallet.

For the killing zeds cash for different humanity, do a check for humanity in the if statement and make a 3way case of the ammount of cash that should be added.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...