Is there a way to make an NPC regenerate health? I'm digging around in the friendlyguard.npctype file, and at the bottom I see a line saying: "energyReplenishmentRate" : 10.0 I suppose that is the NPC's Enery regen rate. Is there a way for adding a 'Health Regen'? I tried adding "healthReplenishmentRate" but the NPC didn't regenerate health after I attacked it. Hmm... Anyone with any ideas?
After some experimentation I found a line in the .npctyp file at the beginning: "inateStatusEffects" : I just added this from the 'sitStatusEffects' when using a bed: { "kind" : "Health", "amount" : 1.0 } Now the NPC actully has a HP regen, but it also constantly has the red healing '+' effect around it... Now to find a healing effect that dosn't have it... hmmm...
Make your own custom status effect with only Code: { "kind" : "health" } give a different name then health. The reason the + is coming is because the status effect Health - uses the effect source. Just make the same status effect without that effect source and your gravy
Should I replace 'health' in the code to something else? As Starbound crashes due to duplicate status effects... But what should I put there? :s
Yes in order to use the new status effect you need to put it in the mod folder first [ I am hoping you have a basic understanding of modding ] You cannot use the same name as health - just change the file name to something else.statuseffect Then call that file name. For example look at bandage.statuseffect as an example
Okay, this is what i've done: I copied the 'health.statuseffect' and put it into a 'statuseffects' folder inside the mod folder. I renamed the file to 'health1.statuseffect' and changed the code to just: Code: { "kind" : "health" } and to assign the NPC with the status effect, should it look like this? Code: "inateStatusEffects" : [ { "kind" : "Protection", "amount" : 1.0 }, { "kind" : "health", "amount" : 1 } ] But now I wonder how am I supposed to tell the game to use MY status effect and not the original one. :s Edit: I tried starting the game, still complains about duplicate statuseffects...
I looked at bandage.statuseffect. It has a different code buildup. Code: { "kind" : "bandage", "duration" : 5, "primitives" : [ { "name" : "Health", "mode" : "max", //don't stack "amount" : 0.1450 } ], "effectSources" : [ "health" ], "mainInterfaceIcon" : "/interface/statuses/heal.png" } Heck, even if I made a copy and renamed bandage.statuseffect to something else I think it would still complain about duplicate 'kinds' :/
The reason it is complaining about duplicates is because you are not following the same directory structure http://starbounder.org/Basic_Property_Modification
okay this is my folder structure starbound/mods/betterguards*(modinfo file is here)/statuseffects/regen.statuseffect (i renamed it from health.statuseffect to regen.statuseffect) (* I did not make this mod, I just wanted to add something to it for personal use.) and the regen.statuseffect file contains this code: Code: { "kind" : "health" } that should remove the "red cross" particles around the character but still give the healing buff. and then in the NPC file I put it like this: Code: "inateStatusEffects" : [ { "kind" : "Protection", "amount" : 1.0 }, { "kind" : "statuseffects/regen.statuseffect", "amount" : 1 } ], I have tried just using 'health' and 'statueffects/regen.statuseffect. It still complains about duplicates
Code: Info: Preparing Star::Root... Info: Loading Star::Configuration from '..\starbound.config' Info: Done preparing Star::Root. Info: Client version 'Beta v. Enraged Koala - Update 6' Protocol: 642 Info: Running from : D:\Program Files (x86)\Steam\steamapps\common\Starbound\win32\starbound.exe Info: Starting from the title screen Info: Initialized SDL Info: Initialized SDL Video Info: Initialized SDL Joystick Info: Initialized SDL Sound Info: Opened default audio device with 44khz / 16 bit stereo audio, 2048 sample size buffer Info: Initializing SDL Window Info: Loading Star::Root... Info: Loading Star::Configuration from '..\starbound.config' Error: Exception raised during Root finishInitialization: StarException: Duplicate status effect asset kind Name health. configfile /statuseffects/regen.statuseffect StatusEffectDatabase::load() Root::reload() _Function_handler<void (), _Bind<ClientApplication::preSplashInitialization()::{lambda()#1} ()> >::(_Any_data) ThreadImpl::runThread(void*) BaseThreadInitThunk RtlInitializeExceptionChain RtlInitializeExceptionChain Info: Created initial window 1016x714 Info: Initializing SDL Window Info: Re-created window 1016x714 Info: Shutting down Star::Root Error: StarException: An error occurred during loading: StarException: Duplicate status effect asset kind Name health. configfile /statuseffects/regen.statuseffect StatusEffectDatabase::load() Root::reload() _Function_handler<void (), _Bind<ClientApplication::preSplashInitialization()::{lambda()#1} ()> >::(_Any_data) ThreadImpl::runThread(void*) BaseThreadInitThunk RtlInitializeExceptionChain RtlInitializeExceptionChain ClientApplication::postSplashInitialization() ClientApplication::update() StarApplicationBase::run() _SDL_main _console_main The thing I noticed it is complaining that there is a duplicate kind name "health". So how do I make my own "kind" that has the same effects as health? '
The zip file is the wrong way to do it [right way is through a merge as shown below], but I don't know how you keep getting duplicate Code: { "__merge" : [ ["delete", "effectSources" ] ], "kind" : "health" } But merging requires you first to know how to create a proper directory structure before hand. http://community.playstarbound.com/...iding-and-merging-config-files-in-mods.53775/ Either way the zip file should work fine. Remove what ever mod you made and status effects before hand
should I add the 'merge' code to the statuseffect file? and I have made a proper mod folder structure, heck I even triple check that link you gave me... :s EDIT: Agh, I give up. Thanks for your help though. I'll just give the NPCs the "redstim" effect, basically what mini bosses use.
Sorry for the late answer. Though nowadays for NPCs it's much easier; you can do that by editing the HealthRegen Stat. { "op": "replace", "path": "/statusControllerSettings/stats/healthRegen/baseValue", "value": 3.0 } We used this approach for the Tougher NPCs and Creatures mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2887613624