I didn't know it's possible to level up in the demo at all.
;To use a patch file other than patch000.dat, uncomment the next line and add your new file name
;If you want to check for multiple patch files, you can include a %d in the file name (sprintf syntax)
;By default, only the first patch file found will be used.
;If you want to load multiple patch files (up to 1000) at once, uncomment the MultiPatches line and set it to 1
PatchFile=demo.dat
;MultiPatches=0
If you are using official BIS header files in your project, there are two places which should be fixed: GetReaction macro in modreact.h and obj_sex_rating in command.h. All checks for the Sex Appeal are included from there. OFC everything should be recompiled after that. If you are not using BIS header files then it's not a problem at all.As far as I can tell Sex Appeal is not hardcoded and only checked through scripts so this shouldn't cause any problems.
And, well, there is one, since you are using SFall. Just add the following code into the Perk.ini:the Empathy perk would have the Night Person image now. That's not really a problem for the demo (no way to get to level 6 really), but would be nice to have a cleaner way.
;Night Person
[t13]
NoHardcode=0
Name=Night Person
Desc=As a night-time person, you are more awake when the sun goes down. Your Intelligence and Perception are improved at night, but dulled during the day.
Image=68
StatMod=
SkillMod=
Precisely. Short story: the only thing you should do is to add +1 modifier to PE an IN if(night) and -1 modifier if(day). Everything else does the game engine. day and night are defined in the command.h.Edit: Hmm... how does Night Person work with skill points per level? Are they affected by the change in intelligence?
Try to set_global_script_type(3) and set_global_script_repeat() with some reasonable value. ImplementI thought setting set_global_script_type(1); should do it since type 1 is supposed to run all the time. But it doesn't do it.
procedure start
begin
if (metarule(22, 0)) then begin
return 0;
end
if (game_loaded) then begin
if (get_ini_setting("ddraw.ini|NPmod|Debug") > 0) then
np_debug := 1;
if (get_ini_setting("ddraw.ini|NPmod|Midlight") > 0) then
np_midlight := 1;
DEBUG_MSG("Game loaded.")
set_global_script_type(3);
set_global_script_repeat(25);
end
else begin
call on_global_repeat();
end
end
procedure on_global_repeat
begin
call check_trait_nightperson();
end