What script is used for healing character?

What script is used for healing character?

Postby LiamM32 » 21 Oct 2015, 07:01

I have started looking into this game again recently. Although I haven't used Lua before (and little experience programming in general), I have been figuring out how things work by looking over the Lua scripts. I'm playing around with modifying the game.

I'm trying to figure out which script causes the health to gradually increase until reaching maximum. I assume that mana/willpower would work the same way. Could someone please tell me which script causes this?

I want to try making another variable for hunger, but it will be connected to healing. Maybe stamina as well. I also want to make factors that effect the healing speed. If it works well, then I could offer it for the official repository of the game.
Posts: 54
Joined: 26 May 2014, 08:09

Re: What script is used for healing character?

Postby xenodora » 25 Sep 2016, 15:40

The script you're interested in is:
{l Code}: {l Select All Code}
which is a Lua class for a creature's stats.

By default, the Stats.new() constructor creates a health and willpower stat, both with a 20 max and a regeneration rate of 0.5 per second.

The actual regeneration happens in Stats.update()

From a cursory inspection, I can't see any examples of the regen rate being modified, so overriding it may require new features.
User avatar
Posts: 27
Joined: 05 Jun 2016, 15:11

Who is online

Users browsing this forum: No registered users and 1 guest