Help converting global script to work with Fo1 engine

Discussion in 'Fallout General Modding' started by gustarballs1983, May 16, 2018.

  1. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    So I've been recently fooling around with Fo2 Modders Pack, and stumbled upon some really cool mods in there, wich i would also like to use in Fo1. However simply grabbing the source and trying to compile it with sslc_f1.exe from dobrovik's archive renders some functions incompatible. Does anybody have an idea how to change the code to work with Fo1 and Crafty's Sfall1?

    Code:
    procedure start;
    // adjust include paths if needed
    #include "..\..\scripting_docs\headers\sfall.h"
    
    #define RESULT_SUCCESS  (1)
    #define RESULT_FAIL     (0)
    
    procedure start begin
       if game_loaded then begin
          register_hook(HOOK_STEAL);
       end else begin
          variable
             thief := get_sfall_arg,
             target := get_sfall_arg,
             item := get_sfall_arg,
             action := get_sfall_arg,
             result := RESULT_SUCCESS;
    
          if (thief == dude_obj) then begin
             display_msg(sprintf(mstr_skill(570 + result + action*2), obj_name(item)));
             set_sfall_return(result);
          end
       end
    end
    
    Forgot to mention sslc_f1.exe fails at game_loaded..
     
    • [Like] [Like] x 1
  2. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    you're trying to mix apples and oranges AFAIK the 2 games sfall is completely different,and global scripts do not work for fo1 at all (again AFAIK)

    Nirran
     
  3. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Yes, Sfall for Fo1 is very bare bones and not the same as Sfall for Fo2.

    Crafty does lots of hardcodet stuff as well, so you can't really change that.
     
  4. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    ekhm.. I *might* have improperly both titled the thread and improperly described my issue..

    the thing is I have problem compiling this script with sslc_f1.exe when i simply try to compile it sslc_f1.exe throws an error that "game_loaded" is an unregistered command.

    I was hopeing that somebody could help me tackle or go around the issue to compile this script for fo1 engine. Possibly by giving some ideas on how to modify the script so that it does compile with sslc_f1.exe I would try it out wether it works or not.

    Besides sfall1 v1.8 fixes a lot of stuff in Fo1 (even including ammo modifiers) so as @Nirran said sfall1 is so specific thing it is unknown wether global scripts work or not. However Sduibek made couple of things in Fixt 0.81a that i assume are controlled by global script(s) like the hidden function to create rat/dog/deathclaw/etc. meat on corpses of slain enemies of the apropriate type based on outdorsmann skill roll. This is disabled by default. In order for this to work one has to set proper settings in VAULT13.GAM textfile, as Sduibek made several modificatins to this file.

    Anybody willing to help me?
     
  5. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Any example script from Sduibek around? Can't find any right now.

    What he did with the deathclaws, etc. is easily done with editing the critter scripts, just as it was done in Fallout 2. And the "settings" in the Vault13.gam are just global variables.
     
  6. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    Me either. There's just too many scripts to plow through to search for this, it's like a needle in a hay stack. Besides I wouldn't know where to look first.

    So anyway, can i get any help on adjustments to the script above so that it would be possible compile it with sslc_f1.exe?
     
  7. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Global scripts always start with gl... so if there aren't any, then there are no global scripts.
     
  8. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    There are a few scripts starting with GL.., however I'm afraid they are tied to "the Glow" location.
    but that does not guarantee global scripts would not work for Fo1 provided one has latest sfall1.

    Fixt 0.81a was released with one of the earliest editions of Crafty's sfall1 since then Crafty made a lot of additions. It's hard to say without checking wether it works or not.
    So eigther we ask @Crafty or We could finally start brainstorming on this script and do what it takes to be able to compile it under sslc_f1.exe. Because as of present it is not possible because sslc_f1.exe throws an error "unregistered command" for "game_loaded". So i think in order to check wether it would work or not it'd have to be compiled first, before trying to run it with the game.

    Obviously the script needs to be modified before compileing as some commands from F2 are not backwards compatible with Fo1.
     
  9. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Crafty used the base version of v1.14a sfall source code for Fallout 1.
    He did not add any Hook scripts there (for example, written above).
    See the documentation for sfall v1.14a Fallout 1.
     
  10. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Code:
    sfall v1.9
    >Added some extra scripting functions. (game_loaded...
    Apparently you use the wrong compiler, use the one that comes with sfall for Fallout2
    But the script that is written above will not work anyway!!!
     
  11. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    So it is clear now.:(( too bad.. i was hopieing that i'd finally get rid of that constant reloading 10x times in a row when some stubborn npc won't let itself robbed..
    Anyway thank You for clarifying..
     
  12. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    I think it'd make more sense resource-wise to focus on converting FO1 to FO2 engine rather than continuing to hack sfall1.
     
    • [Like] [Like] x 1
  13. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Use a cheat tool or hex editor to give you a 200% stealing skill?
     
  14. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    Lexx Please don't troll U know better than Me that this won't guarantee 100% succes steal rate. Pickpocket perk does way better than having 200% steal as 1/10 attempts usually fails anyway. With global script from fo2 sfall modder's pack, stealing proces goes smooth. It helps with my tablet's read/write cycles (with measly 32GB SSD) and a 64GB MicroSD card wich fallout is installed to (intel BayTrail Chineese knockoff).
     
    Last edited: Jun 5, 2018
  15. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    It won't guarantee 100% success rate, but obviously it is still better than having to reload after every try.

    You wanted help and that's all the help you can get. Rest is up to you. :shrug:
     
  16. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    Well thanks but "no thanks" as using Sduibek's custom made fallout character with evrything set to max is already a thing that i do, and I seem to have constant issue of stealing two items in a row wich is kind of stupid when one has maximum stats allowed by the engine isn't it...

    Hence why i asked if it's possible to go around the issue by scripting. Mr.Stalin however made it crystal clear that it can't be done, at least until Crafty adds global scripting support to sfall 1 ( if ever ).

    and as for @burn yeah fallout 1 in fo2 engine would be cool however I'm probably not the one You're looking for to do it. You need someone who blister runs through scripting while i'm begining to learning how to crowl on the flor, and those constant failiures makes me wanna quit learning.
     
  17. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    Well, I'm too not great at that. But I believe it's easier than dive into assember.