Jump to content

definiteintegral

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About definiteintegral

  • Rank
    On the Coast
  1. Hello, I am trying to create a mod that will modify constants.c and playerconstants.c. I would like to pack this as a PBO and not modify the original files on server side. At this stage I am trying to modify metabolic speed and stamina drain. But, no matter what I do, it seems to have no effect. I have followed the instructions here on basic mod setup: https://community.bistudio.com/wiki/DayZ:Modding_Basics Also this about modifying constants: https://community.bistudio.com/wiki/DayZ:Enforce_Script_Syntax#Modded_constants Also I have looked at various mods that alter these files, for example this one which alters the health regen constant: https://gitlab.desolationredux.com/DayZ/DayZBR-Mod/BattleRoyale It seems like my setup is the same as the examples, but for some reason, it won't work. My folder structure is: scripts config.cpp 3_game constants.c playerconstants.c Config.cpp looks like this: class CfgPatches { class NAMServerCustom { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = { "DZ_Data" }; }; }; class CfgMods { class NAMServerCustom { type = "mod"; dir = "NAMServerCustom"; author = "DeliciousWhales"; name = "NAMServerCustom"; url = ""; version="0.1"; dependencies[] = { "Game" }; class defs { class gameScriptModule { value = ""; files[] = {"NAMServerCustom/Scripts/3_Game"}; }; }; }; }; playerconstants.c: modded class PlayerConstants { static const float METABOLIC_SPEED_ENERGY_BASAL = 0.005; //energy loss per second while idle static const float METABOLIC_SPEED_ENERGY_WALK = 0.05; //energy loss per second static const float METABOLIC_SPEED_ENERGY_JOG = 0.15; //energy loss per second static const float METABOLIC_SPEED_ENERGY_SPRINT = 0.3; //energy loss per second static const float METABOLIC_SPEED_WATER_BASAL = 0.005; //water loss per second while idle static const float METABOLIC_SPEED_WATER_WALK = 0.05; //water loss per second static const float METABOLIC_SPEED_WATER_JOG = 0.15; //water loss per second static const float METABOLIC_SPEED_WATER_SPRINT = 0.3; //water loss per second } constants.c: modded class GameConstants { // unit = currently percent (stamina max is 100) const int STAMINA_DRAIN_STANDING_SPRINT_PER_SEC = 1.3; //in units (how much sprint depletes stamina) const int STAMINA_DRAIN_CROUCHED_SPRINT_PER_SEC = 0.33; //in units (how much sprint in crouch depletes stamina) const int STAMINA_DRAIN_PRONE_SPRINT_PER_SEC = 1; //in units (how much sprint in prone depletes stamina) const int STAMINA_DRAIN_SWIM_FAST_PER_SEC = 1.6; //in units (how much fast swimming depletes stamina) const int STAMINA_DRAIN_LADDER_FAST_PER_SEC = 2.6; //in units (how much fast ladder climb depletes stamina) } With this setting, it should be possible to sprint for 75 seconds, instead of the usual 25. I pack from the root folder, so my packed PBO has files in it in the same structure as listed at the top. The folder I use to publish to Workshop is like so: Addons NAMServerCustom.pbo NAMServerCustom.pbo.DeliciousWhales.bisign Keys DeliciousWhales.bikey mod.cpp After publishing to Workshop, I update the mod via the launcher, as well as uploading the @NAMServerCustom folder to the server, and restart the server. The mod is added to @mod= on the server, and is the last mod in the list. It does get listed first in the launcher when joining the server. Server starts up just fine. But..... there is no change to the game behaviour. I can still only sprint for 25 seconds. Does anyone know what I am missing.. ?
×