Okay so, I made this item as an example.
{
"type" : "TOOL_ARMOR",
"id" : "gameboy",
"name" : "gameboy",
"name_plural": "gameboys",
"category" : "tools",
"weight" : 2300,
"color" : "green",
"covers" : ["HANDS"],
"to_hit" : -2,
"max_charges": 100,
"initial_charges": 100,
"charges_per_use": 1,
"turns_per_charge": 1,
"ammo": "battery",
"use_action": {
"type": "musical_instrument",
"speed_penalty": 15,
"volume": 10,
"fun": 2,
"fun_bonus": 2,
"description_frequency": 20,
"descriptions": [
"The game character jumps over an enemy.",
"The game character collects a coin.",
"You beat a level."
]
}
I know a game-pad item exists already, but if I did add this item into the json file it would give a moral boost called music. I simply propose (if possible) to pull the moral boost defining method out of the hard code. Something like this.
"use_action": {
"type": "moral_device",
"moral_boost_name": "gaming",
"speed_penalty": 15,
"volume": 10,
"fun": 2,
"fun_bonus": 2,
"description_frequency": 20,
This would allow for different and unique items to be made without needing to compile for every different item type. The “fun” and “fun_bonus” variables could still handle the math of the moral boost you receive. As far as I know anyway.
I never could compile the code so sadly all I can do is post the idea. I have a lack of understanding on how to do it, but I won’t bother anyone further. However if there is an in depth tutorial on the matter please send it my way. I had used a program called code:blocks I think, but the code would not compile even if I changed nothing.