help with health regen mod

Kothyxaan

First time out of the vault
i want to make a script so that all living creatures (might include robots as well to make things easier) regenerate health
i was thinking 1hp every 24sec / heal rate
id like to add it into combat as well... but im not sure thats possible, then itd be heal rate / 2 or something
i have this so far, but i really am stabbing in the dark, im not a scripter, i cant make my own script, i can edit a little other peoples scripts, and then only if its simple enough

procedure start;
//procedure map_enter_p_proc;
procedure health_regen;
//procedure timed_event_p_proc;//
//procedure critter_heal;//
//#define STAT_heal_rate;//
//#define STAT_max_hit_points;//
//#define STAT_current_hp;//

procedure start
begin
end

//procedure map_enter_p_proc;

procedure health_regen
begin
if (get_critter_stat (dude.obj, STAT_current_hp)) > 0 then begin
add_timer_event (dude.obj, 240 / (get_critter_stat (dude.obj, STAT_heal_rate))) then begin
critter_heal (dude.obj, 1);
end
end
end



any help will be a ppreciated
 
This idea will make the game pretty difficult. Critters will eventually overwhelm you if they are constantly healing, especially early in the game, by the end game game it wouldn't make much difference.

How to make it work, no idea sorry.
 
Thanks for your reply .Pixote. I am not so sure it would have too much of an effect on the game, usually the focussed on one enemy at a time... but you may be right. I would still like to try it out anyway :D I know the fonline games (or at least the one i played for a bit - fonline 2) had a regen based on time in it... I just dont know how they did it (i looked through their filles and foline re-loaded - couldnt find the scripts... maybe their server side).

Actually fonline 2 had something else i liked. There were two skills that went up through use (barter and scavange) I liked that idea, I would love to implement it also for all skills. It would be a tiresome task though if it replaced the skill points on level system (which i originally thought would be a good idea). I think itd work best if you got some skill points on levelling and skill points based on use. Help with that would be amazing, I definetly have no idea how to even start that.
 
Ps. thos links of yours seem to be redundant (although a google search works, thank you kindly for the artwork uploads! another pet project of mine is to increase the weapon type usage for followers... even if i have to just cheat and make an smg image look like a pistol image etc).
 
@Kothyxaan
If you "...want to make a script so that all living creatures...regenerate health", wouldn't that have to be a sfall script? I'm not sure if it can be done in one script, but if it can you will need to learn how to use sfall. The other option is to add your regen code into all the critter scripts.
Then your regen code needs to go into the crittter_p_proc procedure (or at least you have to call your regen procedure from there).
If you want regeneration while in combat you probably have to put code for that in combat_p_proc (only valid while it's the critter's turn) as critter_p_proc is not checked in combat..
 
@Darek, ahhhh damn, so i am missing a step (or two). I was hoping it would be as simple as making the script and leaving it in the appropriate folder. Thanks for the reply.
Eh... looks like it may remain a pipe dream. On the plus side I was able to make my followers use pistols and smg's by copying and renamin frm's :D
Now I am debating expanding it into more choices, but itd look silly if i had to use the animations of an smg/pistol/rifle for a big gun type weapon... pfeh. I still want to make the buggers use spiked knuckle dusters though...
 
Back
Top