NikMik Posted February 16, 2014 Share Posted February 16, 2014 Ho-ho-ho, yet another thread by me! Anyways.For my custom character, I want the sanity badge to be a claw instead of a brain. While I could do a reskin, I want it to still be the brain for the rest of the characters. The Always on Status mod only changes it's position, and the RPG Hud didn't seem to quite have what I was looking for. Any help? Link to comment Share on other sites More sharing options...
Rosten Posted February 16, 2014 Share Posted February 16, 2014 I'm not exactly a great modder but here's a sort of idea,Maybe you could make a tag, add it to your char., and have the game search for that tag on loading a world, and if said tag is found, reskin the sanity meter to the claw Link to comment Share on other sites More sharing options...
Dryicefox Posted February 16, 2014 Share Posted February 16, 2014 Check out the waverly mod, they have something of the sort in there!Good luck! Link to comment Share on other sites More sharing options...
NikMik Posted February 16, 2014 Author Share Posted February 16, 2014 Check out the waverly mod, they have something of the sort in there!Good luck!It doesn't. Link to comment Share on other sites More sharing options...
kraken121 Posted February 16, 2014 Share Posted February 16, 2014 did you try something like this, " AddClassPostConstruct("widgets/statusdisplays",fn) then set inst.brain.anim to point somewhere else AddClassPostContruct sets code to execute after 'original' costructor is set so in its function you'd have to check for GetPlayer()=="charname" or GetPlayer().prefab=="charname" or something like that, then something like inst.brain.anim:GetAnimState():SetBank("claw") inst.brain.anim:GetAnimState():SetBuild("claw) " and make sure that claw is defined in some anim zip in an appropriate way and declared within the scope That might work or you could do what we are doing in the "Hero in the Dark" mod and dont code it into main but do what we do, define postconstruct on the level of a char.lua and just check if it exists/call it from there Link to comment Share on other sites More sharing options...
TheDanaAddams Posted February 16, 2014 Share Posted February 16, 2014 did you try something like this, " AddClassPostConstruct("widgets/statusdisplays",fn) then set inst.brain.anim to point somewhere else AddClassPostContruct sets code to execute after 'original' costructor is set so in its function you'd have to check for GetPlayer()=="charname" or GetPlayer().prefab=="charname" or something like that, then something like inst.brain.anim:GetAnimState():SetBank("claw") inst.brain.anim:GetAnimState():SetBuild("claw) " and make sure that claw is defined in some anim zip in an appropriate way and declared within the scope That might work or you could do what we are doing in the "Hero in the Dark" mod and dont code it into main but do what we do, define postconstruct on the level of a char.lua and just check if it exists/call it from there You can run a bit of code that would otherwise affect all characters on only one with this: AddSimPostInit(function(inst) if inst.prefab == "MYCHARACTER" then ClawPostInit(inst) endend) if you then used the prefab post-init ClawPostInit, to change the build (just the build) as mentioned above to your reskinned and buildname-altered new art... I think that might work! (And possibly be a little simpler.) Link to comment Share on other sites More sharing options...
NikMik Posted February 17, 2014 Author Share Posted February 17, 2014 Neither of these methods worked for me, unfortunately. Link to comment Share on other sites More sharing options...
KidneyBeanBoy Posted February 17, 2014 Share Posted February 17, 2014 Check out the waverly mod, they have something of the sort in there!Good luck!No, that's just inverted/constantly draining sanity. Link to comment Share on other sites More sharing options...
TheDanaAddams Posted February 17, 2014 Share Posted February 17, 2014 This would be very fiddly... but if neither of those work... you may have to try making a whole new badge, hiding the original sanity badge, and then hooking it up so it displays the sanity value. My Link mod has a hidden sanity badge, and a made-from-scratch badge. Unfortunately, that was all done by CJB, who seems to have disappeared, so I don't have the greatest grasp of how it works.For reasons he didn't understand, there were difficulties in making a reskin-based meter work... so we had to do one from scratch in Spriter.I uploaded the Spriter Project for this, but as I said in the post... I'm not sure if this was the one that worked perfectly, or if the animation had to be altered to make it function correctly.http://forums.kleientertainment.com/topic/28828-asset-template-request/#entry345498 Link to comment Share on other sites More sharing options...
NikMik Posted February 17, 2014 Author Share Posted February 17, 2014 This would be very fiddly... but if neither of those work... you may have to try making a whole new badge, hiding the original sanity badge, and then hooking it up so it displays the sanity value. My Link mod has a hidden sanity badge, and a made-from-scratch badge. Unfortunately, that was all done by CJB, who seems to have disappeared, so I don't have the greatest grasp of how it works.For reasons he didn't understand, there were difficulties in making a reskin-based meter work... so we had to do one from scratch in Spriter.I uploaded the Spriter Project for this, but as I said in the post... I'm not sure if this was the one that worked perfectly, or if the animation had to be altered to make it function correctly.http://forums.kleientertainment.com/topic/28828-asset-template-request/#entry345498I'll take a look at that. Thank you very much! I have the claw done, just need to put it on. I'll put up a screenshot shortly. EDIT: There we are. It shrivels up as the sanity lowers. Link to comment Share on other sites More sharing options...
NikMik Posted February 17, 2014 Author Share Posted February 17, 2014 OK, I've got. AddSimPostInit(function(inst)if GetPlayer().prefab == "grag" theninst.HUD.controls.status.heart:SetPosition( inst.HUD.controls.status.stomach:GetPosition() )inst.HUD.controls.status.brain:SetPosition( inst.HUD.controls.status.brain:GetPosition() )inst.HUD.controls.status.stomach:Hide()endend)I may be getting close to finding a way of making it a different build. inst.HUD.controls.status.brain:SetBuild("saneclaw") didn't work, just as I expected. But I'll come up with somethin'! EDIT: Adding inst.HUD.controls.status.brain.anim:GetAnimState():SetBuild("saneclaw") worked! Thank you, Kraken! Link to comment Share on other sites More sharing options...
Mr. Hastings Posted June 26, 2014 Share Posted June 26, 2014 I wonder Is it even possible to do the same, when I want to change anim.zip file of some creatures like spider or rabbit, but I want, that it could be visible only using one custom character.. 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.