DayZ
Heroes And Bandits
 Chủ đề này đã được ghim, thế nên nó có thể quan trọng
DaemonForge  [nhà phát triển] 12 Thg06, 2020 @ 3:27pm
Developer Help
This section is for help developing Add On Mods

I know its poorly documented Ill work on that LOL
Source Code[github.com]

Compiler Definition "HEROESANDBANDITSMOD"
Lần sửa cuối bởi DaemonForge; 14 Thg06, 2020 @ 7:41pm
< >
Đang hiển thị 1-8 trong 8 bình luận
DaemonForge  [nhà phát triển] 12 Thg06, 2020 @ 3:39pm 
Coding Example
This is the code for adding humanity through the CPR Action
modded class ActionCPR { override void OnFinishProgressServer( ActionData action_data ) { super.OnFinishProgressServer(action_data); PlayerBase tagetPlayer = PlayerBase.Cast(action_data.m_Target.GetObject()); float shock = tagetPlayer.GetHealth("","Shock"); //Gets the players shock value // Make sure that they are now Conscious before giving player rewarded Humanity if ( shock >= PlayerConstants.UNCONSCIOUS_THRESHOLD ) { //Get the Player's ID that providing the CPR PlayerBase sourcePlayer = PlayerBase.Cast(action_data.m_Player); string sourcePlayerID = sourcePlayer.GetIdentity().GetPlainId(); // Add Action to the player (My mod will now handle the rest) GetHeroesAndBandits().NewPlayerAction(sourcePlayerID, "GivePlayerCPR"); } } }
Lần sửa cuối bởi DaemonForge; 12 Thg06, 2020 @ 7:09pm
Raigeki 13 Thg09, 2020 @ 10:07am 
Hi i have a problem, when i trynna do second zone in simple.cfg for bandits only with -50 till -50001, guard start shoot to me and trader dont trade with me.
DaemonForge  [nhà phát triển] 13 Thg09, 2020 @ 3:46pm 
Can you send me your simple.json? You can join the discord on the mod page or DM via Discord DaemonForge#5454
Liven 16 Thg04, 2021 @ 11:42pm 
Hi,
I’m the PvZmoD Dark Horde author and I would like to link it to your mod.

I modified my code, made tests and if I add this code in the "Actions" section of the simple.json it works as attended :
{ "Name": "DarkHordeDefeated_DayTime", "Humanity": 100.0 },

But I looked at your « Add On Mods » thread and I see there is different informations like this.
{ "Name": "CodeLockFenceRaid", "Affinity": "bandit", "SecondaryAffinity": "none", "Points": 200, "NotifiyPlayer": 1 },
I looked at your github and see the profile folder with « actions.json » that contains such informations, but when I load your mod only simple.json is created, so I’m confused, I would like to write a little tutorial about DH/H&B link but I don’t know what is the good practice.

Note that I didn’t make a separate addon, I use #ifdef instead and it works fine.
DaemonForge  [nhà phát triển] 17 Thg04, 2021 @ 9:36am 
Nguyên văn bởi Liven:
Hi,
I’m the PvZmoD Dark Horde author and I would like to link it to your mod.

I modified my code, made tests and if I add this code in the "Actions" section of the simple.json it works as attended :
{ "Name": "DarkHordeDefeated_DayTime", "Humanity": 100.0 },

But I looked at your « Add On Mods » thread and I see there is different informations like this.
{ "Name": "CodeLockFenceRaid", "Affinity": "bandit", "SecondaryAffinity": "none", "Points": 200, "NotifiyPlayer": 1 },
I looked at your github and see the profile folder with « actions.json » that contains such informations, but when I load your mod only simple.json is created, so I’m confused, I would like to write a little tutorial about DH/H&B link but I don’t know what is the good practice.

Note that I didn’t make a separate addon, I use #ifdef instead and it works fine.
The difference is in the configs the simple.json uses a slightly different format than the actions.json to simplify the settings for new people

For the addon with simple it would be

{ "Name": "CodeLockFenceRaid", "Humanity": -200.0 },
Lần sửa cuối bởi DaemonForge; 17 Thg04, 2021 @ 9:36am
Liven 17 Thg04, 2021 @ 10:07am 
So the admins can choose to use the simple.json (that is automatically created in the profile folder) with the simplified values.
Or they can choose to download the actions.json (and the other files) on your githud, manually copy them in the profile folder and use the extended values.
Correct?

Does it change something for me?
Do the same code (for example GetHeroesAndBandits().NewPlayerAction(hordeKillerID, "DarkHordeDefeated_DayTime");) is able to work with the two possibility?
Rustybongz81 28 Thg01, 2023 @ 9:11am 
Nguyên văn bởi DaemonForge:
Can you send me your simple.json? You can join the discord on the mod page or DM via Discord DaemonForge#5454

Couldn't find a link, can you add me please. :-)
Rustybongz81 28 Thg01, 2023 @ 12:00pm 
Could we add Growing weed to effect humanity?
< >
Đang hiển thị 1-8 trong 8 bình luận
Mỗi trang: 1530 50