Jump to content

Hardcore Needs & Timescale Mod (WIP)


GamerRick

Recommended Posts

I am starting my second FNV character now and want to try HC, but I like to play with a TimeScale of 12.

 

So, I reasoned that the way around the problem is a script that will change the three needs factors depending on the timescale.

 

Here is what I came up with::

scn RFHardcoreRatesVTimescaleQuestScript
short TSNow
float pct
float rate

begin gamemode
if GetGameLoaded || TSNow != TimeScale
  set TSnow to TimeScale
  set pct to TimeScale / 30

  set rate to 10 * pct
  SetNumericGameSetting fHCDehydrationRate rate
  PrintC "fHCDehydrationRate set to: %2.2f" rate

  set rate to 50 * pct
  SetNumericGameSetting fHCSleepDeprivationRate rate
  PrintC "fHCSleepDeprivationRate set to: %2.2f" rate

  set rate to 25 * pct
  SetNumericGameSetting fHCStarvationRate rate
  PrintC "fHCStarvationRate set to: %2.2f" rate

endif
end

Will this work? Is there anything else that doesn't work right with different timescales? I am wondering how no one else thought of this. I am not that smart. I figure I must be missing something others already figured out.

 

Got it working, but it will take a while to test it to see if the way I am setting those three game settings works as expected.

 

So, I appreciate any feedback and insights anyone can give. Is there anything else with Hardcore mode that needs fixin'?

 

EDIT: Looks like I got it backwards and need to increase those game settings when the TimeScale decreases.

Edited by GamerRick
Link to comment
Share on other sites

I got it working and tested it to be sure that the three needs increased at the same rate regardless of TimeScale.

 

Final code for anyone that gives a mole rat's hairy one:

scn RFHardcoreRatesVTimescaleQuestScript
int   TSNow
float pct
float ThirstRate
float HungerRate
float SleepRate
;float timer
;float timer2
;short once
;float secs
;float tod
begin gamemode
if GetgameLoaded == 1 || TSNow != TimeScale
  set TSnow to TimeScale
  set pct to 30.0 / TSNow
  ;set tod to GetCurrentTime
  ;PrintC "------------ STARTUP STATS at %2.2f -----" tod
  set ThirstRate to pct * 10.0
  SetNumericGameSetting fHCDehydrationRate ThirstRate
  ;PrintC "fHCDehydrationRate set to: %2.2f" ThirstRate
  set SleepRate to 50.0 * pct
  SetNumericGameSetting fHCSleepDeprivationRate SleepRate
  ;PrintC "fHCSleepDeprivationRate set to: %2.2f" SleepRate
  set HungerRate to 25.0 * pct
  SetNumericGameSetting fHCStarvationRate HungerRate
  ;PrintC "fHCStarvationRate set to: %2.2f" HungerRate
  return
endif
; if RFHCTS > 0
; if timer <= 0.0
;  set timer to 1800 ; 30 minutes
;  set ThirstRate to player.GetAV Dehydration
;  set HungerRate to player.getAV Hunger
;  set SleepRate to player.getAV sleepdeprevation
;
;  set tod to GetCurrentTime
;  PrintC "------ 30 MINUTE INTERVAL STATS at %2.2f -----" tod
;  PrintC "fHCDehydrationRate set to: %2.2f" ThirstRate
;  PrintC "fHCSleepDeprivationRate set to: %2.2f" SleepRate
;  PrintC "fHCStarvationRate set to: %2.2f" HungerRate
;  PrintC "-----------------------------------------------------------"
; else
;  set secs to GetSecondsPassed * TSnow
;  set timer to timer - secs
;  if timer2 <= 0.0
;   set timer2 to 600
;   set tod to GetCurrentTime
;   Printc "==== Seconds Passed = %.0f at %2.2f =====" timer tod
;  else
;   set timer2 to timer2 - secs
;  endif
;
; endif
; endif
if IsKeyPressed 35
  ;Printc "==== Seconds Passed = %.0f =====" timer
  set ThirstRate to player.GetAV Dehydration
  set HungerRate to player.getAV Hunger
  set SleepRate to player.getAV sleepdeprevation
  ShowMessage RFNeedsStatsMsg ThirstRate HungerRate SleepRate  
endif
end
Link to comment
Share on other sites

The only other thing I know doesn't work right with Timescale in FO3 and FNV is the Well Rested spell. I changed its duration from 1440 to 3600 for my TS of 12. That equates to around 12 hours of game-time.

 

I don't know of anything else where you want the duration to equate to game time, versus those that heal or damage you over time.

 

Can you think of anything else that should be looked at?

Link to comment
Share on other sites

Not something I have had to dig into, so your knowledge is superior to mine. If I come across something, I'll drop back here with it. Hopefully someone more knowledgeable of timing concerns (like Roy Batterian or Jazzisparis) will see this.

 

-Dubious-

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...