Jump to content

[Outdated] [Release] Single Currency & Banking 1.1


Recommended Posts

Damnit. Banksaldo is not updating in database, where do I start? RPTs are clean and nothing money related shows up in hive log except:

 

2015-07-24 23:18:25 HiveExt: [Information] Method: 201 Params: 5:[176,[6816.71,13695.9,0.001]]:[[Binocular_Vector,NVGoggles,RH_m1911sd,ItemGPS,ItemToolbox,ItemRadio,ItemHatchet_DZE,ItemEtool,ItemCrowbar,ItemMatchbox_DZE,ItemSledge,ItemKeyYellow285,RH_hk417sdeotech],[ItemBandage,ItemBandage,ItemBandage,ItemBandage,ItemBandage,ItemBandage,RH_8Rnd_45cal_m1911,RH_8Rnd_45cal_m1911,5Rnd_127x99_as50,ItemGoldBar7oz,RH_20Rnd_762x51_SD_hk417,ItemSilverBar2oz]]:[DZ_LargeGunBag_EP1,[[BAF_AS50_scoped],[1]],[[],[]]]:[false,false,false,false,false,false,false,12000,[],[0,0],0,[559.602,240.805]]:false:false:0:0:2:1:[RH_hk417sdeotech,amovpknlmstpsraswrfldnon,42,[]]:0:0::0:-100000:

 

Which is the game telling DB to substract 100k from money player's wallet (which does save in DB) but nothing happens in banking_data table. Went through install and upgrade with a friend TWICE, we could not spot any errors in install process so I'm stumped.

 

1.1 upped to Souls 2.0 and variant 4 hiveext.dll

Link to comment
Share on other sites

  • 3 weeks later...

Hi

 

Is there any chance you might right up a more detailed version of how to implement this on a already established server. I had a fair amount of difficulty in putting this together when i first started out. However i did end up getting it to work and well, its fantastic and was well worth the effort. I prefer safes being independent although atms around the map are great, i considered creating additional "banks" around the map that way players are forced to risk their funds to bank it & again to purchase at a later date. More action :P

 

Also, is there any chance you might do a release that is just ATM's / global banking that people can use with most releases of the single currency system. Something a little more raw and playable ? Or a way that i can turn of all other storage methods accept for bank/atm ?

Link to comment
Share on other sites

Hi

 

Is there any chance you might right up a more detailed version of how to implement this on a already established server. I had a fair amount of difficulty in putting this together when i first started out. However i did end up getting it to work and well, its fantastic and was well worth the effort. I prefer safes being independent although atms around the map are great, i considered creating additional "banks" around the map that way players are forced to risk their funds to bank it & again to purchase at a later date. More action :P

 

Well some information.

 

This 1.1 is actually deprecated. Me and soul released an 2.0 version which is a better version of this.

So 1.1 and 2.0 are global banks.

 

3.0 is a fully rewritten version with only storage. No global bank. So the money is saved and based on gear cappacity of the object.

 

The instructions can be found on my old website as the topic tells you. It is pretty detailed on how to do it.

 

 

 

Also, is there any chance you might do a release that is just ATM's / global banking that people can use with most releases of the single currency system. Something a little more raw and playable ? Or a way that i can turn of all other storage methods accept for bank/atm ?
DZE_ATM = ["Laptop_EP1"]; // objects where u can bank, add them here if u want extra's.

This should be in your variables. That array are the objects where u can bank.

 

 

 

To disable safe as global bank, remove the following of your selfactions:

//banking FROM HERE

	if(_typeOfCursorTarget in DZE_UnLockedStorage and (player distance _cursorTarget < 3)) then {
		if (s_bank_dialog < 0) then {
				s_bank_dialog = player addAction ["Online Banking", "gold\bank_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
		};
	} else {
     	player removeAction s_bank_dialog;
		s_bank_dialog = -1;
	};

Now it will only bank on the DZE_ATM objects.

Link to comment
Share on other sites

  • 1 month later...

This is probably a question with a simple answer, but I can't figure it out! I have a Overpoch Namalsk server already setup. I want to add single currency 2.0 to my server (1.1 then update to 2.0). I went to the link to zupa's website and it had very detailed instructions. the only problem is at step 0 it says "Drop the content of the "Zupa" zip file in the root of your missions pbo." I cannot figure out where this zip file is! I clicked the download and it had a mission file and server pbo but this zupa file is no where to be found. Can someone please help me out here.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Ok need a little help here, I'm almost certain I didn't make a mistake when adding this but I keep getting a already defined error in the log. I have a feeling it's coming from the advanced trader but I'd like to have both it and the single currency added.

 

This is the only error that stands out in the log the issue I'm having getting in game is the black "wait or host" screen.

 

ErrorMessage: File mpmissions\__cur_mp.chernarus\ZSC\config\cfgServerTrader.hpp, line 68: .CfgTraderCategory: Member already defined.

 

 

EDIT: So I've tried to figure this out myself and I'm of just going sideways on the problem, I get rid of one error but yet another one starts up.

 

Ok so I added the advanced trader menu a while back and it was working great but I noticed it has some of the same files as the single currency such as cfgservertraders. After installing the single currency on top of this I was getting a already defined error in the log

ErrorMessage: File mpmissions\__cur_mp.chernarus\ZSC\config\cfgServerTrader.hpp, line 68: .CfgTraderCategory: Member already defined.

I then started going through the init.sqf and description.ext and commenting out any similar lines that called the cfgservertrader.hpp and now I am receiving another error.

ErrorMessage: File mpmissions\__cur_mp.chernarus\description.ext, line 203: .RscTitles: Member already defined.

If you have any idea on how to get it situated please let me know.

Link to comment
Share on other sites

  • 4 months later...

Maybe stupid questoin, but I tried reinstalling script twice without succes.

I'm stuck at the following error:

File mpmission\_cur.mp.Chernarus\addons\playerhud\hup.hpp, line 10: /RscTitles/ArSeMixhud/controlsBackground.ASReMixhud_Status: Undefined base class 'Hw_RscText'

What did I do wrong, and how to solve it?

Thanks for responding :)

Link to comment
Share on other sites

  • 2 months later...

Would it be possible to add i little gold icon in your gear that has a little number overlay that increases or decreases as you collect or drop gold ? 

If possible it would be great to also have  it so a player has to look in the players gear to take there gold instead of the right click option :) 

This was just a thought :) And thought i would mention :) 

Link to comment
Share on other sites

1 hour ago, EagerBeaver said:

Would it be possible to add i little gold icon in your gear that has a little number overlay that increases or decreases as you collect or drop gold ? 

If possible it would be great to also have  it so a player has to look in the players gear to take there gold instead of the right click option :) 

This was just a thought :) And thought i would mention :) 

mm i think no... but you can made something using text... you can create a scroll menu option to "count his money" or something like this.. (through fn_selfactions.sqf (this is easy)   and execute an script to say... "eagerbeaver had $3000" for example.

 

for example when you extract some cash from safes, vehicles . the structure text is:

cutText [format["You have withdrawn %1 %2 out of the %3", [_amount] call BIS_fnc_numberText, CurrencyName,_displayName], "PLAIN DOWN"];

so you need to find a way to display the player name, and the amount he have.

 

heres an example: ( but you need define _theotherplayername , _coinsamount  variables.)

cutText [format["Player %1 had %2 in his wallets", _theotherplayername , _coinsamount], "PLAIN DOWN"];

 

for the _theotherplayername variable maybe u can use player setVariable["DZE_display_name",true,true];  (not sure)

or maybe for _theotherplayername variable find ... do you remember the body check.. when you put check -- a lil text appear and says "hes name was....... and he die...." 

Link to comment
Share on other sites

Hey :) 

So i am having a little problem that i only recently noticed on my server...

After i head shot a Z i get 1 gold coin ( yippee) but for some reason the coins i get from head-shotting a Z are not getting saved to my player on server restarts ? 

Any idea's or should i go through the whole installation process again ? 

Link to comment
Share on other sites

Hey :) 

Is there a way to remove the name ( asremix-hud )  from the top of the hud ? 

I understand it is there most likely for credit to the maker of the script but if its not a issue i would like to remove it :) 

This is a copy of the hud.hpp do i just remove the text that is in bold ? If so do i have to remove anything from the other few files ? 

 

Thanx :D 

 

#define hud_status_idc 4900


class AsReMixhud {
    idd = -1;
    fadeout=0;
    fadein=0;
    duration = 20;
    name= "AsReMixhud";
    onLoad = "uiNamespace setVariable ['AsReMixhud', _this select 0]";
    
    class controlsBackground {

        class AsReMixhud_Status:Hw_RscText
        {
            idc = hud_status_idc;
            type = CT_STRUCTURED_TEXT;
            size = 0.040;
    x = safezoneX + (safezoneW -0.35) ;
    y = safezoneY + 0.10 * safezoneW;
            w = 0.35; h = 0.35;
            colorText[] = {1,1,1,1};
            lineSpacing = 3;
            colorBackground[] = {0,0,0,0};
            text = "";
            shadow = 2;
            class Attributes {
                align = "right";
            };

Link to comment
Share on other sites

  • 1 month later...

I've been trying. But with my limited knowledge and the time i have to put on it, its not feasible. Maybe one hour a night now, compared to 4, 5 before. I was willing to share my host for a test server and learn at the same time. But no one was interested so i let it go.  Still have my dedi though.

Link to comment
Share on other sites

man do i wish i had the time to help you guys :(

41 minutes ago, lwbuk said:

Well I cant get it to work. The coins work, sort of, but I cant transfer to bank. The coins are being stored in Character data and not player data though. Not sure if thats how it should be.

In 1051 it was stored in the character_data table.  As for 106 i havnt looked. But i would assume character data table

Link to comment
Share on other sites

There is a row for it in char data, but then in player data is also a playercoins and bankcoins row, so not sure. My coins are saving to Character data. I tried making a new table for bankingdata like I did on my old server, but no joy yet.

Link to comment
Share on other sites

47 minutes ago, lwbuk said:

There is a row for it in char data, but then in player data is also a playercoins and bankcoins row, so not sure. My coins are saving to Character data. I tried making a new table for bankingdata like I did on my old server, but no joy yet.

There is a spare row in the player_data table, it has no purpose, and is only there because a use may eventually be found for it (Mostly because I was too lazy to remove it, since it was pointed out to me too close to release).

Use Child 205 to update coins in the player_data, these coins exist across characters ( bankcoins is unused, and the idea behind keeping both columns would be to use one to say spawn a player with coins, or some other special feature)

_key = format["CHILD:205:%1:%2:%3:%4:",(getPlayerUID _character),dayZ_instance,_globalCoins,_bankCoins];

 

Some assistance on updating coins, since there's some of the necessary framework already in the server pbo

 

object coins are loaded in server_monitor.sqf from the DB (_storageMoney = _x select 9;)

https://github.com/EpochModTeam/DayZ-Epoch/blob/7e341739ee2e9226016b24d19f1a605d20445901/SQF/dayz_server/system/server_monitor.sqf#L223-L225

Object coins are saved in server_updateObject.sqf

 

https://github.com/EpochModTeam/DayZ-Epoch/blob/75243933b47a523f0a6b92eb7951265aabe42aad/SQF/dayz_server/compile/server_updateObject.sqf#L101-L104

https://github.com/EpochModTeam/DayZ-Epoch/blob/75243933b47a523f0a6b92eb7951265aabe42aad/SQF/dayz_server/compile/server_updateObject.sqf#L241-L244

 

Player coins are updated in server_playerSync.sqf

https://github.com/EpochModTeam/DayZ-Epoch/blob/638c7dd8b8ff1bbc9c661b9924b10f8fa72f669b/SQF/dayz_server/compile/server_playerSync.sqf#L43-L45

https://github.com/EpochModTeam/DayZ-Epoch/blob/638c7dd8b8ff1bbc9c661b9924b10f8fa72f669b/SQF/dayz_server/compile/server_playerSync.sqf#L228-L231

 

 

Edit: Preliminary support was added in server_playerLogin.sqf and Player_monitor.fsm for coin sync upon login, but removed prior to release. you may see it here and reference for examples on how to load coins into character/players. Additionally, this commit may have unnecessary saving that is not present in the above files, I can't comment on the extent of saving necessary.

https://github.com/EpochModTeam/DayZ-Epoch/commit/ae78fde0675241b91fed7acd6fc46d9c701b99d4

Link to comment
Share on other sites

On 13/01/2017 at 8:34 AM, icomrade said:

There is a spare row in the player_data table, it has no purpose, and is only there because a use may eventually be found for it (Mostly because I was too lazy to remove it, since it was pointed out to me too close to release).

I think you should leave the spare row in future releases, it allows for servers owners to customise on there own system and have persistent custom variables without having to use external programs (ExtDB, arma2net ect) or having to compile there own hive. It also doesn't affect the game when it is not being used :)

Link to comment
Share on other sites

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