Jump to content

How to Make Another Meter For A Custom Stat on a Custom Character?


Kimdstb

Recommended Posts

So I programmed a stat for a custom character I'm making by smashing together the beaverness.lua and the hunger.lua and tweaking it until it worked!

I could tell because I also used wolfgang's applymightiness function to adjust the character's run speed based on the current custom stat, which drains like hunger.  And when custom stat's current becomes half or below, health decreases at the rate of starvation.  That's all working fine, since my character is draining health seemingly out of nowhere because of the invisible stat.  But my problem is this:

I want the custom stat to show in its own meter.  Like the beaver meter that Woodie has, except all the time on that custom character.  There's no transformations or anything.  I've looked into a bunch of the game's code, including the widget.lua and the widgetutil.lua  trying to figure out where in the code it links to Woodie's beaver meter, how it works, how it displays, SOMETHING, but I haven't found anything that could help me.  

So I tried working off other forum posts that have asked about custom stats, appending widgets to the game's HUD and such, but the game just crashes when I try saying it couldn't find the customwidget.lua file.  I think I would understand what I was doing much better if I could look at some more sample codes.

Could someone explain to me where or how Woodie's beaver meter HUD was implemented in the code?  I know it would be a lot of work to explain it to me, but just pointing me to a certain file in the code to examine would go a long way.

Thanks, Kim

Link to comment
Share on other sites

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.

×
  • Create New...