Improved Scripting Tools (SSL+ and Script Editor)

Discussion in 'Fallout General Modding' started by phobos2077, Feb 7, 2015.

  1. Muttie

    Muttie It Wandered In From the Wastes

    Oct 9, 2017
    What I meant was: I can trigger repeatedly map_update by opening/closing pipboy.
    The situation is: there is gvar in map_update which gets reduced each time the proc triggers (normally every 30 seconds, roughly). So it should take some time until the gvar (of 100 units) is completely gone. But when I open and close the pipboy about 20 times in a row, the gvar is completely reduced after that, (which is roughly within 20 seconds; as long as it takes to click "p" and "esc" 20 times in a row) because each time I open/close the pipboy I trigger a map_update.
    I do get the "every 30 seconds" in addition, I just found that there are many actions (as listed) that trigger additional map_updates (i.e. in addition to those 30 seconds intervals).
    Making map_update very irregular, but also one of the most tight procs in the game. It basically gets triggered by everything but map_exit.
    The 30 seconds even trigger during combat.
  2. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Maybe use timer event (or sfall global script) instead of map_update if you need a certain GVAR to only be changed by a fixed time interval?
  3. Muttie

    Muttie It Wandered In From the Wastes

    Oct 9, 2017
    if (global_var(16) > 0) then begin
       set_global_var(16, global_var(16) - 1);
       display_msg("You're at " + global_var(16) + ". Praise Muttie!");
    You can put this in map_update of obj_dude. Set gvar 16 to 600 and see how and when you can trigger it. Makes the amount of additional map_updates fairly obvious.
    [You can also remove the check of > 0, then you won't have to set the gvar. But I haven't tested what the engine does when it goes in the negative.]

    Index error addition
    While experimenting I kept the same script in various states like “obj_dude, obj_dudePROTO and obj_dudePROTOtest”.
    When I open “obj_dudePROTOtest” then “obj_dudePROTO”, copy and paste something from “obj_dudePROTOtest”, close it, then paste it into “obj_dudePROTO” and try to save that one under the name of the just closed “obj_dudePROTOtest” then I did get the same “out of index” error.

    Otherwise the sfall script editor is very solid. For example, I haven't yet discovered a single compiling or decompiling error. Always worked smoothly so far (and I sometimes compile and decompile and absurd amount of times when testing a bug or potential fixes for it). Never had an issue yet.

    Yes, I'm already testing that :)... this is more sharing my experiences so far.
  4. Muttie

    Muttie It Wandered In From the Wastes

    Oct 9, 2017
    One thing I find bizarre is the use of Doctor's bag (and the amount of map_updates they seem to trigger). Even varies when used “inside inventory” compared to “outside inventory”.
    I had not tested the following with the code but during a “screen flicker” bug which seemed to trigger a flicker each time there was a map_update.

    Doctor's Bag (inventory):
    fade (use, skipped if not injured), fade/flicker (heal and used up), flicker (closing inventory).

    Doctor's Bag (outside inventory):
    fade (use, skipped if not injured), fade/flicker (heal), flicker (used up), flicker (end of use_obj_on).

    [The fade to fade/flicker is a single fade (in normal game) but it seems longer when healing triggers.
    However, they should trigger separate map_updates. At least the “stutter bug” I had triggered (when injured) 3 flickers (inventory) and 4 flickers (outside inventory) and if (not injured) it was 2 flickers (inventory) and 3 flickers (outside inventory).]

    Skill book (inventory):
    fade (use & used up), flicker (closing inventory).

    Skill book (outside inventory):
    fade (use), flicker (used up), flicker (end of use_obj_on).

    P.S. The whole addition to the code was just a silly joke, I hope no one took that serious. Just a bit o fun.

    Anyway, I'm probably in the wrong forum, this has gone a bit too far off from the original point of the definition of map_update_proc that can be found in the sfall script editor. Still, I find it interesting when and how procs trigger.