Script Troubleshooting

Discussion in 'Fallout General Modding' started by Lexx, Jul 1, 2015.

  1. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Here is another one, folks. I need brainstorming.

    Trying to add a new script. In the mapper the script appears twice and the script also doesn't work. Obvious conclusion: Something is fucked up.

    I can't figure out what exactly. Scripts.lst only has one entry and it has a correct newline at the end. Scrname.msg also is ok, though even if I don't add any entry there, the script appears twice in the mapper.

    What is it I have overlooked? I feel like doing this for the very first time ever...


    /edit: Ok, whatever that was, I fixed it. Removed all traces of the script, then - instead of the Sfall script editor - I used FSE to register the script. After that everything worked as usual...
     
    Last edited: Jul 1, 2015
  2. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Here is something new:



    Anyone knows what is causing this? Commented out pretty much everything I could in that script, and yet whenever I switch into barter mode, the above happens. I know that I fixed such a thing already years ago, but... that was years ago.

    /Edit: Thanks for the rubber ducking, guys. Fixed it. The proto had barter flag set to no... Ofc it doesn't work then.
     
    Last edited: Jul 6, 2015
    • [Like] [Like] x 1
  3. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    There's a bug that makes people speak German? Incredible!
     
    • [Like] [Like] x 2
  4. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Ok, this one is a question I really can't answer by myself. Question is... Is the following possible?

    I want to spawn a text message in the log window *once* when the game is started / you load a savegame. If you load a savegame again, the text message will *not* appear again. BUT if you close the game, start it again, then load a savegame... the text message appears again.

    So I would need a variable that starts at 0, will be set to 1 when the game runs / a savegame has been loaded the first time, and then will be set to 0 again when the game gets closed in whatever kind of way.

    Possible or not? Come on, sfall scripters.
     
  5. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    Fairly sure you can't differentiate between regular loads and startups.
     
    • [Like] [Like] x 1
  6. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    It'd still help to know why exactly you want to be able to do this, so we can try and help think of possible workarounds. For instance, get_uptime keeps "running" after you exit the game, so could in theory be used to give someone who restarts the game after some period a certain message.
     
  7. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Just a little fluff, nothing super fancy. A kind of "welcome"-message on startup to greet the player.
     
  8. Magnus

    Magnus Water Chip? Been There, Done That
    Modder

    953
    Dec 6, 2007
    Can't be done without using dirty hacks and AllowUnsafeScripting=1, which may be deprecated in the future, so not recommended.
     
  9. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    I am not 100% sure right now, but I think AllowUnsafeScripting=1 is required for my mod anyway. /Edit: Or maybe not. Just tried it and some of the important features are all still working.. strange

    In any case, as soon as I am using the lates ddraw.dll my sleep menu doesn't work anymore. Therefore, I'll have to use some older version anyway...
     
  10. JimTheDinosaur

    JimTheDinosaur Vault Dweller
    Modder

    736
    Mar 17, 2013
    AllowUnsafeScripting is only needed if you want to add your own functions to sfall (read_byte, etc. you can check the sfall function list doc for more info). You won't need it for any of the existing ones.
     
  11. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    I think it was used for editing the worldmap travelscreen. Years ago, a friend helped me to change the Fo2 worldmap interface to the look of the Fo1 worldmap interface. That means, changing it to this:



    At some point there came an sfall update and it stopped working, though... Kinda sucks, because I would still love to use that one instead of the Fo2 interface. I simply don't have that many town locations.

    /Edit: I think it was done via disabling the scrollbuttons, changing the interface positions and then simply replacing the existing graphics to match the new positions.
     
    Last edited: Jul 9, 2015