Limiting resting

There is a way, with Near Infinity, to limit the possibility of resting to, like, once every 24h?

(For roleplay porpuse, 16h of adventure or more, but being fatigued, and 8h of sleep, making the spells more valuable, the temple services, the wands, the scrolls, the potions).

(Attached the WeiDUs .log if needed)

Tks


Comments

  • edited September 15
    There is a mod called Rough World which has a component "Sparse Resting". It is not exactly working as you describe but makes resting harder.

    Otherwise, you may install such a logic into the player's dream script, which is the file player1d.bcs.
    When PartyRested() you set a timer, e.g. 16h. If party tries to rest again, player1d is checked - you put a code block that checks if the timer has expired - if not, you create a message or whatever you want that you cannot yet rest and block the resting. If timer has expired, do nothing and let it run.
    Should be pretty easy to code such a thing...
  • edited September 16
    Here is a quick "mini-tweak" that you can test with Near Infinity.
    1. Open baldur.bcs in NI, add this code to the top of the file, compile and save
    IF
    Global("Lim_Rest_Switch","Global",0)
    PartyRested()
    THEN
    RESPONSE #100
    SetGlobal("Lim_Rest_Switch","Global",1)
    SetGlobalTimer("Lim_Rest_Time","Global",SIXTEEN_HOURS)
    Continue()
    END
    2. Open player1d.bcs and add/compile/save this to the top of the file
    IF
    Global("Lim_Rest_Switch","Global",1)
    GlobalTimerExpired("Lim_Rest_Time","Global")
    THEN
    RESPONSE #100
    SetGlobal("Lim_Rest_Switch","Global",0)
    Continue()
    END

    IF
    Global("Lim_Rest_Switch","Global",1)
    !GlobalTimerExpired("Lim_Rest_Time","Global")
    THEN
    RESPONSE #100
    CreateCreatureObjectOffset("ffsleep",Player1,[25.25])
    END
    When you attempt to rest less than 16 hours after the previous rest, a watcher appears and scares you away. If enough time has passed, normal resting or dreams or encounters will be performed.
    Note - if you want this to work in other parts of EET, not just BG1, just add the first block to the baldur-files used in the other campaigns.

    Test it - if it works I can make a mini-mod out of it to install like any decent mod.

  • Yeah, it work perfectly, tks for help!
  • Maybe I will make some refinements to it, like taking into account other campaigns and non-EET games and make a tweak mod out of it...
  • edited September 16
    For anyone interested to test it, here is a small mod package for BGEE, BG2EE and EET.
    Install it at the end of your game to test it so you can easily uninstall it if you have problems with it or do not like it.
    Unpack to game directory (BG2EE for EET games) and run setup.exe to install. Run setup.exe again if you want to uninstall.
  • edited September 15
    I have make a little change for now:

    Created a stringref flagged "has text" (numbered 341075), and swapped the "CreateCreatureObjectOffset" with:
    DisplayString(Myself,341075)  // You can't sleep, it's been too little time since you slept.


    (what is the "code" cormat in this forum? [code]text[/code] not work)
  • Cere said:
    I have make a little change for now:

    Created a stringref flagged "has text" (numbered 341075), and swapped the "CreateCreatureObjectOffset" with:
    DisplayString(Myself,341075)  // You can't sleep, it's been too little time since you slept.


    (what is the "code" cormat in this forum? [code]text[/code] not work)
    The "format" symbol left of the smiley opens a pulldown menu where you can select code. You get a yellow entry line. Other option there is "spoiler".

    Yes, text display is another option, I selected the watcher because it already existed in the game.
    The text explains better why you cannot rest, the watcher is less immersion breaking.
  • PS - If you want to use it in BG2, add Continue() to the end (last action) of the baldur block.
Sign In or Register to comment.