User Tools

Site Tools


create_the_playermodifier_mod

Create the PlayerModifier mod

Now we will create a new tiny mod focused on modifying all of the player stats, to tweak and rebalance the gameplay!

Create a new mod folder

Lets create a new mod folder just inside the mods folder of your steam hard times install folder:

 C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods

This is the location where all your game mods reside.
So lets create a new folder and call it PlayerModifier_MODPKG:

 C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\PlayerModifier_MODPKG

It's important to note that the suffix “_MODPKG” to the name is mandatory and required for the engine to locate and recognize it as a mod package.

Create the mod descriptor file

Now you will have to create a proper mod descriptor file in the newly created mod folder.
Let's create a text file and name it Descriptor.json:

 C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\PlayerModifier_MODPKG\Descriptor.json

It will contain the mod declaration data. Let's edit it and fill with the following code:

{
  "modName": "PlayerModifier_MODPKG",
  "author": "RadicalFiction",
  "gameVersion": ""
}

Please go to Starting out modding in Hard Times for more info on those properties

Create the PlayerModifier descriptor file

Now its time to create the proper PlayerModifier json file. Let's make it like this:

 C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\PlayerModifier_MODPKG\PlayerModifier.json

So now let's edit and copy this code in it (we will analyze it afterwards):

{
  "startingScene": "Zero",
  "playerBaseSpeed": 8,
  "startingMoneyAmount": 10,
  
  "maxHealthValue": 150,
  "minHealthValue": 0,
  "startingHealthValue": 150,
  "stepHealthValue": 50,
  "intervalHealthValue": 30,
  "moderatelyEffectHealthThreshold": 145,
  "definitelyEffectHealthThreshold": 130,
  "extremeEffectHealthThreshold": 120,
  "moderatelyEffectHealthValue": "",
  "definitelyEffectHealthValue": "",
  "extremeEffectHealthValue": "",
  
  "startingHungerValue": 150,
  "maxHungerValue": 150,
  "minHungerValue": 0,
  "stepHungerValue": 1,
  "intervalHungerValue": 10,  
  "moderatelyEffectHungerThreshold": 145,
  "definitelyEffectHungerThreshold": 130,
  "extremeEffectHungerThreshold": 120,
  "moderatelyEffectHungerValue": "hunger_moderately_effect",
  "definitelyEffectHungerValue": "hunger_definitely_effect",
  "extremeEffectHungerValue": "hunger_extreme_effect",
  
  "startingStaminaValue": 150,
  "maxStaminaValue": 150,
  "minStaminaValue": 0,
  "stepStaminaValue": 1,
  "intervalStaminaValue": 10,
  "moderatelyEffectStaminaThreshold": 145,
  "definitelyEffectStaminaThreshold": 130,
  "extremeEffectStaminaThreshold": 120,
  "moderatelyEffectStaminaValue": "stamina_moderately_effect",
  "definitelyEffectStaminaValue": "stamina_definitely_effect",
  "extremeEffectStaminaValue": "stamina_extreme_effect",
  
  "startingCleanValue": 150,
  "maxCleanValue": 150,
  "minCleanValue": 0,
  "stepCleanValue": 1,
  "intervalCleanValue": 10,
  "moderatelyEffectCleanThreshold": 145,
  "definitelyEffectCleanThreshold": 130,
  "extremeEffectCleanThreshold": 120,
  "moderatelyEffectCleanValue": "clean_moderately_effect",
  "definitelyEffectCleanValue": "clean_definitely_effect",
  "extremeEffectCleanValue": "clean_extreme_effect",
  
  "maxShittingTime": 9,
  "maxBowelsDamage": 10,
  "startingBowelsValue": 150,
  "maxBowelsValue": 150,
  "minBowelsValue": 0,
  "stepBowelsValue": 0,
  "intervalBowelsValue": 60,
  "moderatelyEffectBowelsThreshold": 145,
  "definitelyEffectBowelsThreshold": 130,
  "extremeEffectBowelsThreshold": 120,
  "moderatelyEffectBowelsValue": "bowels_full_effect",
  "definitelyEffectBowelsValue": "bowels_alert_effect",
  "extremeEffectBowelsValue": "bowels_exploding_effect",
  
  "freezingPerceivedTemperature": 5,
  "coldPerceivedTemperature": 14,
  "comfortPerceivedTemperature": 30,
  "hotPerceivedTemperature": 45,
  "freezingBodyTemperature": 35,
  "hypothermiaBodyTemperature": 36,
  "normalBodyTemperature": 37.5,
  "feverBodyTemperature": 38.5,
  "temperatureUpdateStep": 0.05,
  
  "startingItems": [
	{
		"questItemId": "umbrella",
		"questItemType": "BaseItem",
		"questItemQuality": 5,
		"questItemAmount": 3
	}
  ],
  "startingClothing": {
	"questItemId": "snowboard_jacket",
	"questItemType": "ClothingItem",
	"questItemQuality": 5
  },
  "startingHat": {
	"questItemId": "Skeleton Skate Cap",
	"questItemType": "HatItem",
	"questItemQuality": 5
  },
  "startingEquip": {
	"questItemId": "crowbar",
	"questItemType": "BaseItem",
	"questItemQuality": 5
  }
}

PlayerModifier properties

startingScene

This indicates the starting scene the game will load at the beginning of a new game.

playerBaseSpeed

The base speed the player can move on. The vanilla value is: 5.5.

startingMoneyAmount

The amount of money the player starts with.

maxHealthValue

The maximum health the player can achieve.

minHealthValue

The minimum health the player can fall to.

startingHealthValue

The starting health the player has at the beginning of a game

stepHealthValue

The step health is lowered at each check iteration (used for stamina, food etc)

intervalHealthValue

The interval step in game time minutes between each check iteration (used for stamina, food etc)

moderatelyEffectHealthThreshold

The value you want the stat to enter in moderately dangerous status. It will fire the corresponding effect!

definitelyEffectHealthThreshold

The value you want the stat to enter in definitely dangerous status. It will fire the corresponding effect!

extremeEffectHealthThreshold

The value you want the stat to enter in extremely dangerous status. It will fire the corresponding effect!

moderatelyEffectHealthValue

The effect to apply to the player when health is moderately low.

definitelyEffectHealthValue

The effect to apply to the player when health is definitely low.

extremeEffectHealthValue

The effect to apply to the player when health is extremely low.

maxShittingTime

The maximum amount of minutes the shitting action can take.

maxBowelsDamage

The maximum amount of damage a player ca take from full bowels.

freezingPerceivedTemperature

The perceived temperature is under this value you are freezing.

coldPerceivedTemperature

The perceived temperature is under this value you are cold.

comfortPerceivedTemperature

The perceived temperature is under this value you are in comfort.

hotPerceivedTemperature

The perceived temperature is under this value you are hot.

freezingBodyTemperature

The body temperature under which you are freezing

hypothermiaBodyTemperature

The body temperature under which you are in hypotermia.

normalBodyTemperature

The body temperature under which you are ok.

feverBodyTemperature

The body temperature under which you are too hot.

temperatureUpdateStep

The step at which temperatures can variate each single iteration check.

startingItems

A list of items the player will start with. In the QuestItem format.

startingClothing

A Clothing Item the player will wear at startup.

startingHat

A Hat Item the player will wear at startup.

startingEquip

An Item the player will have equipped at startup.



Please note that many properties are repeated for any stat. As I mentioned the health related properties you can assume any other stat related property bearing the same name works in the same manner.

Test it out

If everything went well you should now be able to start again the game with no errors(!).
You should now find the new mod in the Mods panel of the main menu: Click it to let it go in the active mods list and be sure to put it last, like in the image. Now you will have to restart your game to let it load correcly the new mod.
So start a new game and check the player stats: Your character is now stronger, faster, fully modded.

You can download this mod file at Hard Times mods repository on mod.io \\
If you have problems or find errors in this guide please get in touch at info@tempi-duri.net.

You could leave a comment if you were logged in.
create_the_playermodifier_mod.txt · Last modified: 2019/03/15 13:08 by thorfinio