Jump to content

[Outdated] ZSC for Epoch 1.0.6.2 (And OverWatch 0.25)


Recommended Posts

4 hours ago, salival said:

I'll have a look and see what's involved, I haven't messed with any of the global based coin stuff.

I took a look, but when the scripts start accessing the database and such, its way beyond me lol. 

I would love to help to be honest. But you'd have to show me a few things, the more i learn, the more i can contribute back also.

I love helping others, but i can only help with what i know lol. Anyways the offer is there. if you feel for it pm me :)

Duke

Link to comment
Share on other sites

Thank you for this release,

I am however experiencing an issue with safes. I have a fresh 1.0.6.1 server installed and the latest Github release of this coins script.

Whenever I disconnect from the server then relog, the deposited coins are not in the safe.

I can see on the database that the safe has coins in the "StorageCoins" column. 

Traders are all working great :)

Any guidance on where I may have gone wrong would be greatly welcomed.

Thanks, Steve. 

Link to comment
Share on other sites

2 hours ago, dcgsteve said:

Thank you for this release,

I am however experiencing an issue with safes. I have a fresh 1.0.6.1 server installed and the latest Github release of this coins script.

Whenever I disconnect from the server then relog, the deposited coins are not in the safe.

I can see on the database that the safe has coins in the "StorageCoins" column. 

Traders are all working great :)

Any guidance on where I may have gone wrong would be greatly welcomed.

Thanks, Steve. 

Hello,

This can happen if you didn't merge the server_handleGear changes or if you don't have dze_moneyStorageClasses set as per the variables file I supplied

Link to comment
Share on other sites

I have got the functionality for global banking working but the server side file named bankinit.sqf needs to be updated to reflect the new database structure and DLL. I can get the bankers to appear and interact with them but I get error message, "[Error] Invalid method id: 299" in the console. Obviously 299 is not the correct "Child." I see that the coins for global banking are stored under a column named "bankcoins" in the playerdata table. The file just needs to reflect this.

https://gist.github.com/worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a

Any help would be appreciated.

Link to comment
Share on other sites

1 minute ago, JasonTM said:

I have got the functionality for global banking working but the server side file named bankinit.sqf needs to be updated to reflect the new database structure and DLL. I can get the bankers to appear and interact with them but I get error message, "[Error] Invalid method id: 299" in the console. Obviously 299 is not the correct "Child." I see that the coins for global banking are stored under a column named "bankcoins" in the playerdata table. The file just needs to reflect this.

https://gist.github.com/worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a

Any help would be appreciated.

This was my biggest fear, which is why i didnt attempt to go too far with it. I do remember the devs mentioning something about the DLL being ready for coins and banking...

Link to comment
Share on other sites

13 hours ago, JasonTM said:

I have got the functionality for global banking working but the server side file named bankinit.sqf needs to be updated to reflect the new database structure and DLL. I can get the bankers to appear and interact with them but I get error message, "[Error] Invalid method id: 299" in the console. Obviously 299 is not the correct "Child." I see that the coins for global banking are stored under a column named "bankcoins" in the playerdata table. The file just needs to reflect this.

https://gist.github.com/worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a

Any help would be appreciated.

I didn't read up on the previous convo's but here a quick sit down of what i think is going on:

 

Epoch has the saving stuff implemented already:

Getting variables from player object

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_playerSync.sqf#L39-L41

Saving it to DB with DLL child 205

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_playerSync.sqf#L224-L227

 

On player login all variables are also set ( even when one doesn't use Single Currency)

(Search for 'coins' in the following file to see what happens)

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_playerLogin.sqf#L91-L114

Link to comment
Share on other sites

Thank you so much Zupa! I got it to work.

The coins are successfully being saved to the "bankcoins" field in the player_data table and with no errors in the RPTs.

Since you pointed out that the saving stuff was already implemented in 1.0.6, I was able to eliminate the bankinit.sqf file altogether.

I replaced the following:
 

Spoiler

 

PVDZE_plr_Save = [player,(magazines player),true,true] ;
publicVariableServer "PVDZE_plr_Save";

PVDZE_bank_Save = [player];
publicVariableServer "PVDZE_bank_Save";

 

With the simple line that salival used: call player_forceSave;

The console shows that this forces Childs 201 (character data) and 205 (player data) to run.

Lastly, I replaced the "bankMoney" variable with the " MoneySpecial " as you pointed out above.

Thanks again, and thanks to salival and the rest of the Epoch dev team for making this work so well.

Link to comment
Share on other sites

4 minutes ago, JasonTM said:

Thank you so much Zupa! I got it to work.

The coins are successfully being saved to the "bankcoins" field in the player_data table and with no errors in the RPTs.

Since you pointed out that the saving stuff was already implemented in 1.0.6, I was able to eliminate the bankinit.sqf file altogether.

I replaced the following:
 

  Hide contents

 

PVDZE_plr_Save = [player,(magazines player),true,true] ;
publicVariableServer "PVDZE_plr_Save";

PVDZE_bank_Save = [player];
publicVariableServer "PVDZE_bank_Save";

 

With the simple line that salival used: call player_forceSave;

The console shows that this forces Childs 201 (character data) and 205 (player data) to run.

Lastly, I replaced the "bankMoney" variable with the " MoneySpecial " as you pointed out above.

Thanks again, and thanks to salival and the rest of the Epoch dev team for making this work so well.

Feel free to submit me a pull request on github with your changes

Link to comment
Share on other sites

Added to my test server, seems to be working great.

I removed the banker bots and added my own atm machines dotted around the map away from traders.

I also left the safe storage active for now for people to transfer money out of the safes into the bank, although having the two systems seems to be a good idea, as other people can acsess your money if they have accsess to the safe. Good for groups etc.

Excelent work.All I need to do is add the bank icon nto the HUD. Shouldnt be too hard.

Link to comment
Share on other sites

Ok found a big issue.

If you change clothes your bank balance is deleted.

If you relog it comes back.. HOWEVER

If you change clothes, then add to your bank, it wipes the orginal amount and sets it to whatever you put in after clothes change.

ASLO

If you die, your bank balance is wiped.

 

Im guessing its something to do with player_switchmodel not having the coin/money variables in it? Mine doesnt anyhow.mmaybe other files that come into play when creating a new character?

*edit* I appear to have fixed it with a new player_switchmodel file with the money and bank variables..

Also got the HUD working.

Quite a productive day for me :D

Link to comment
Share on other sites

1 hour ago, lwbuk said:

Ok found a big issue.

If you change clothes your bank balance is deleted.

If you relog it comes back.. HOWEVER

If you change clothes, then add to your bank, it wipes the orginal amount and sets it to whatever you put in after clothes change.

ASLO

If you die, your bank balance is wiped.

 

Im guessing its something to do with player_switchmodel not having the coin/money variables in it? Mine doesnt anyhow.mmaybe other files that come into play when creating a new character?

*edit* I appear to have fixed it with a new player_switchmodel file with the money and bank variables..

Also got the HUD working.

Quite a productive day for me :D

could you maybe post the fix?

Link to comment
Share on other sites

@lwbuk Dont use the  player_switchmodel.sqf  it is redundant. Use the player_humanityMorph.sqf, there is already a player getVariable [Z_moneyVariable,0] Switch your "cashMoney" to Z_moneyVariable to keep it integrativly. Add in the player_humanityMorph.sqf in if (Z_SingleCurrency) then { your special money like that:

At the beginning:

if (Z_SingleCurrency) then {
	_coins = player getVariable [Z_moneyVariable,0];
	_bankMoney = player getVariable["MoneySpecial",0];
};

At the end

if (Z_SingleCurrency) then {
	player setVariable [Z_moneyVariable,_coins,true];
	player setVariable ["MoneySpecial",_bankMoney,true];
};

If you have wiped your coins, make sure that you call the right player_humanityMorph.sqf in your compiles. Bank coins getting wiped because there is not defines for bank money in the player_humanityMorph.sqf but for the normal player coins.

Link to comment
Share on other sites

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...