Help Altering Script

Post » Fri Aug 14, 2015 12:59 pm

I have been trying to alter the sleep script in The Bare Necessities mod for some time now. It should all be very simple, but I cannot get it into effect. All I am trying to do is alter the light sleep penalty from every 8 hours, to every 12 hours. This way I don't basically have a constant debuff.

This is the relevant part of the script:

FATIGUE SCRIPT
; when player is awake
if ( GetPCSleep != 1 )

; set the hour
if ( TimerSet != 1 )
set GameHourLocal to GameHour
set TimerSet to 1
endif

; count hours passed since recorded time
set HoursPassed to ( GameHour - GameHourLocal )

; if midnight passes, GameHour will become zero, time passed will become negative. Adds 24 to correct.
if ( HoursPassed < 0 )
set HoursPassed to ( HoursPassed + 24 )
endif

; if more than 8 hours passed since GameHour set, adds 1 to tired global and applies penalties
if ( HoursPassed >= 8 )

set BN_TiredGlobal to ( BN_TiredGlobal + 1 )
set BN_TiredPenaltyApply to 1
set TimerSet to 0
endif
endif

I changed it from 8 to 12 in the script. Yet when I go ingame, it's every 8 hours...

Am i missing something?

User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm

Post » Fri Aug 14, 2015 3:52 pm

It still says 8 in the script here...

User avatar
Jennifer Munroe
 
Posts: 3411
Joined: Sun Aug 26, 2007 12:57 am

Post » Fri Aug 14, 2015 2:45 pm

Right, well I copy/pasted the original code. Rest assured it says 12 in the mod I currently have installed

User avatar
Brooke Turner
 
Posts: 3319
Joined: Wed Nov 01, 2006 11:13 am

Post » Fri Aug 14, 2015 5:06 am

zip the whole .esp you changed (not the original) , post a link for it, and possibly move the thread to the CS forum
User avatar
chinadoll
 
Posts: 3401
Joined: Tue Aug 22, 2006 5:09 am

Post » Fri Aug 14, 2015 10:56 am

Will do

User avatar
Ashley Clifft
 
Posts: 3468
Joined: Thu Jul 26, 2007 5:56 am

Post » Fri Aug 14, 2015 8:33 am

Okay, I have uploaded it but I cannot post links.

www filedropper com / barenecessitiesalteredscript_1 (add dots and remove spaces)

...Also, I don't think I can move the thread on my own.

Sorry about the doublepost. I meant to edit the last one

User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Fri Aug 14, 2015 5:45 pm

You can PM a moderator to move the thread, but maybe it is easier for author to stumble here as I think only author has scripts logic fully clear


I see no evident problems with your minimal script change, I tried https://drive.google.com/open?id=0Bywrx4WHfGJJTGFjanh2OXhaOEk all the scripts in MWEdit just in case.

I'd try the "Toggle Needs", "Reset Needs" in game configuration options first, and see what happens.

If it still does not work after "Toggle Needs" off , "Reset Needs", "Toggle Needs" on, try the "Uninstall" option, save game,
remove the mod from loading list, load, save (and eventually clean the save), re-add the mod to loading list, load and see what happens.

No other ideas, sorry

[EDIT]note that mod is not MWEdit strong syntax checking compliant as it uses e.g. );comment instead of ) ; comment, so it's difficult to automatically check for possible bad spacing (e.g. >=2 instead of >= 2 ) problems
User avatar
Sarah Edmunds
 
Posts: 3461
Joined: Sat Jul 08, 2006 8:03 pm

Post » Fri Aug 14, 2015 8:02 pm

I will try those suggestions. Thanks for the help, Abot.

User avatar
saharen beauty
 
Posts: 3456
Joined: Wed Nov 22, 2006 12:54 am


Return to III - Morrowind