Truebluehero Posted September 29, 2014 Share Posted September 29, 2014 I wanted to make a mod character with certain scripts, but don't want to take a really long time to learn about script just for this one character. If someone could either recommend a good guide for some basic scripting or just help me make this mod would be great. I want my character to heal 2x as much health and 1.5x as much hunger from food. (Only from food cooked from a crockpot if possible.) I also want tamed creatures to follow the character for longer, maybe 2x as long. I already know how to change things like Max HP and attack strength. Thanks. Link to comment Share on other sites More sharing options...
QuickShot010 Posted September 29, 2014 Share Posted September 29, 2014 If you look inside your prefab lua you'll see multipliers (or not if you have not yet added them)This is an example: inst.components.combat.damagemultiplier = 2This means that the damage your character does is 2. Wilsons damage is 1 (for scale)If you want to heal your character you have to add some things...first you want to declare this in your prefab lua: YOURCHARACTER_HEALTH_REGEN_AMOUNT = (wilson_health*3) * 3/60, YOURCHARACTER_HEALTH_REGEN_PERIOD = 3,Then you want to tune your character stats in the same lua. inst.components.health:StartRegen(TUNING.YOURCHARACTER_HEALTH_REGEN_AMOUNT, TUNING.YOURCHARACTER_HEALTH_REGEN_PERIOD)This will heal your character over time. I am not really sure how to do the hunger thing since that code is in the food's prefab itself. If you change that it will be for all characters and not just yours. Maybe it is possible but not in my range of knowledge. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.