Help setting up SSL scripting properly

Cyrus

It Wandered In From the Wastes
Hey guys.

I wanna get setup to do SSL scripting but have forgotten how to do it properly, and things may have been updated.

How do I get setup properly in 2020?

I have found the Sfall Script Editor v4.1.6 here , is this what I should use (latest)?

I remember having to get a bunch of other files from Sfall and elsewhere too, but can't recall.

How can I setup properly and get started?

Thank you kindly.
 
Yes, use that one if you need a GUI editor for scripting.
The one included in sfall modders pack is rather old and unmaintained (only compiler/decompiler got updated on regular basis).
 
Thanks for that NovaRain.

As for the header files, in his recent post and video QuantumApprentice explains to get the headers from the BISmapper.

Is this the best source to get all the needed and most updated header files from?

Also do I need to grab anything from sfall or sfall modder's pack? I am gonna be modding Burn's scripts, and for example his fo2tweaks.h file makes reference to:
Code:
#include "../rp/define.h"
#include "../rp/command.h"
#include "../sfall/sfall.h"
#include "../sfall/lib.arrays.h"
#include "../sfall/lib.strings.h"
#include "../sfall/lib.misc.h"
#include "../sfall/lib.inven.h"
#include "../sfall/define_extra.h"
#include "../sfall/dik.h"

I suppose those files make further references to yet other files. what sources should I get all the necessary header files from? Github RP and sfall?
 
Last edited:
get the headers from the BISmapper.
Is this the best source to get all the needed and most updated header files from?
No. The header files in the official script source are old and have some incorrect defines that will give you error/warning during compilation.
It's better to get the game header files from UPU or RPU, and update sfall related ones from the modderspack.
 
No. The header files in the official script source are old and have some incorrect defines that will give you error/warning during compilation.
It's better to get the game header files from UPU or RPU, and update sfall related ones from the modderspack.

Thanks for the info!
Which one is better for new modders? The Unofficial Patch headers or the RP mod headers?
Also, how do I know which ones are "sfall related"? And where can I find the modderspack to update them?
 
Thanks for the info!
Which one is better for new modders? The Unofficial Patch headers or the RP mod headers?
Also, how do I know which ones are "sfall related"? And where can I find the modderspack to update them?
It depends on what you're going to do. RP's should cover most of the cases.
For the modders pack, I guess people usually just click the big green download button on SourceForge page instead of checking the "Files":
https://sourceforge.net/projects/sfall/files/Modders pack/
 
Last edited:
It depends on what you're going to do. RP's should cover most of the cases.
For the modders pack, I guess people usually just click the big green download button on SourceForge page instead of checking the "Files":
https://sourceforge.net/projects/sfall/files/Modders pack/

Haha yes that is exactly what I did ... :(

Thank you, and sorry about that, I bet it's even stickied somewhere up at the top of the forum (or it should be if not).

When you say it depends on what I'm going to do...what do you mean? Let me be clear, I don't know what I'm going to do yet, but I also don't know what's possible. What cases would the UP headers be better than RP's? and vice versa? Also, in the description for the RP mod it says the Unofficial Patch is included...
And am I just copying all the headers from RPU/UPU "...\scripts_src\headers\"?
...and the same question for the modderspack "...\scripting_docs\headers\"?

Thank you for the reply! I appreciate your taking the time to post a link I should have known about :P
 
Last edited:
My programming understanding is no where as good as some of the other guys here, so you should still wait for someone else's answer, but I'll tell you what I know.

When you are programming you write everything in blocks which are called functions (in fallout scripts they are called procedures). Each function does something.

Your program might have many functions. you may not want to write them all in 1 file, and you may want to distribute them in different files for organization's sake. In order for the functions of 1 file to have access to and be able to use functions of another file they need to reference each other. That way a file can read the other files too. That's what headers are for. Header files contain references as well as common functions that may be used all files. So by referencing a header file you gain access to everything thats been written in that file, so you don't have to write it again. Header files can also reference other header files. So by referencing 1 header file you are also loading any other header file that has been referenced in the first header file and so on and so forth. for things to run right you need to have all the referenced files. Otherwise errors follow.

So by referencing "relevant" header files you get access to all the functions available in them. You many not need all of them. Also having extra header files that you don't doesn't actually hurt your work,but you have to be careful about function names you create because those names may already be used in other "referenced" files.

You need to read and learn basic C++ and you will learn and understand this. Its not hard. Takes a day or 2.

Now For example I am working with Burn's Fo2Tweaks mod, and since his mod references RP headers, I need to also make sure I have those headers in my computer otherwise my script editor will give error cause it can't load things that have been referenced.

If you want to have access to Sfall functions then you need to have Sfall headers. If you wanna use some functions from RP then you need to have RP headers. That's the "depending on what you wanna do" part. Having access to those function is, more than nice. It's essential. They have very useful and significant functions. Having them makes your life immeasurably easier.


As for which header files, well you should definitely have sfall headers. modder's pack is sfall headers. I personally would always have RP headers as well. But again it depends on if you use any functions in them. RP headers are quite comprehensive. Have a look at them to see whats inside. Particularly having define.h from RP is very useful.
 
Last edited:
When you say it depends on what I'm going to do...what do you mean? Let me be clear, I don't know what I'm going to do yet,

You should probably first think about what you want to do in the first place. If your mod is based on the RPU, you use the RPU headers, if it is based on some other mod, you use the headers from that mod, etc.. There is no universal "use X and it will always work perfect"-approach here.

Fallout is using a fuckton of macros for everything so you don't have to write the same lines twice. These macros are all #defined in the headers. Now if you use the wrong headers in the wrong script, the game will compile your shit differently and thus it can lead to incompatibility with the mod(s).

tl;dr - you use the header files of the mod you want to work with.
 
ok, I've been saving this thread for when I started making a video explaining the scripter...and I've finally started making that video.

When you are programming you write everything in blocks which are called functions (in fallout scripts they are called procedures). Each function does something.

I have a basic understanding of functions now, thanks for taking the time to explain them.



You need to read and learn basic C++ and you will learn and understand this. Its not hard. Takes a day or 2.

Can you recommend a link to something I can read? or a youtube video or something? I may have a basic understanding of functions and header files, but I'm always open to better understanding the process.



Now For example I am working with Burn's Fo2Tweaks mod, and since his mod references RP headers, I need to also make sure I have those headers in my computer otherwise my script editor will give error cause it can't load things that have been referenced.

I'm not trying to make a mod using other people's mods, I'm trying to make a mod from scratch and documenting the process for future mod makers to reference. I may make a video explaining the concept of using other people's mods to make your mod, but since the header files are just a collection of shortcuts using basic commands anyway, there is no real point in using someone else's...
unless there is a list explaining what those shortcuts are and how they work to begin with...which I haven't seen yet, and nobody has bothered to provide links to anything like that.



If you want to have access to Sfall functions then you need to have Sfall headers. If you wanna use some functions from RP then you need to have RP headers. That's the "depending on what you wanna do" part. Having access to those function is, more than nice. It's essential. They have very useful and significant functions. Having them makes your life immeasurably easier.

This does not appear to be the case, as I've used Sfall functions without installing any of the Sfall headers from the modders pack, I've only used what came with the mapper. Check this clip to see an example:
That being said, all but one of the sfall headers from the sfall modderspack don't come with the mapper, and sfall.h (the only one that does) only has a few new lines of easily identifiable code added, so it seems pretty simple to copy over these files with minimal confusion.
Again, a link to something explaining what the RP headers actually add is more useful than just claiming they make life easier.



As for which header files, well you should definitely have sfall headers. modder's pack is sfall headers. I personally would always have RP headers as well. But again it depends on if you use any functions in them. RP headers are quite comprehensive. Have a look at them to see whats inside. Particularly having define.h from RP is very useful.

A cursory comparison of the default mapper headers to the RPU mod's headers reveals only a bunch of new headers that are specific to the new areas added in the RP mod (EPA, Abbey, Slaver Camp, etc...). This does not seem all that useful to have for making a new mod.

A text comparison of define.h between the mapper's and the RP mod's reveals minimal changes:

  1. 3 lines defining traits have been moved to another file (why? I don't know, doesn't seem to be any point in moving 3 lines to another file, but then I'm not a high level programmer)
  2. STAT_max_hit_points has been deleted
  3. SKILL_CONVERSANT has been changed to SKILL_SPEECH, this seems useful for readability, but not much else
  4. A section on combat damage that was already commented out in the original was deleted in RP's
  5. 3 new METARULE's were added covering: CHEM_USE_LEVEL, CAR_OUT_OF_FUEL, and MAP_GET_LOAD_AREA (whatever this does)
  6. 2 new #define's, covering fade-ins and fade-outs
  7. A section on barter that was already commented out in the original was also deleted in RP's
  8. 3 new #include's were added (upu.h, rpu.h, and party2.h)

That's it, those are all the changes made. I will try to look into upu.h, rpu.h and party2.h, but unless someone can explain how these other changes are at all helpful, I don't yet see any reason to replace what already comes with the mapper with RP or UP mod's.


You should probably first think about what you want to do in the first place. If your mod is based on the RPU, you use the RPU headers, if it is based on some other mod, you use the headers from that mod, etc.. There is no universal "use X and it will always work perfect"-approach here.

Fallout is using a fuckton of macros for everything so you don't have to write the same lines twice. These macros are all #defined in the headers. Now if you use the wrong headers in the wrong script, the game will compile your shit differently and thus it can lead to incompatibility with the mod(s).

tl;dr - you use the header files of the mod you want to work with.

I'm not trying to make a mod based on other people's mods, even if they are pretty impressive. I'm trying to make a mod from scratch and documenting the process so other's will have a useful guide to mod making for fallout 2.

NovaRain said:
No. The header files in the official script source are old and have some incorrect defines that will give you error/warning during compilation.
It's better to get the game header files from UPU or RPU, and update sfall related ones from the modderspack.

I have noticed at least one consistent error when compiling with the scripter:
Code:
End of file with no newline, supplemented newline: #endif // _GLOBAL_H_DEFINED2 O0)  (1O9 )_ _ LI ( DW1O  (
So it seemed prudent to fix possible future errors (and thereby making it easier for future modders to create mods) by providing directions to replace buggy headers with fixed ones...however, actually replacing global.h (along with the rest of the headers) did not remove that repeating error.
Further, comparing the actual text of the default mapper's global.h and the RP mod's global.h reveals a bunch of superficial changes that mostly apply to bug fixes for the official game and a lot of new variables for the extra maps added in the restoration process...nothing that would help new modders to make a new mod. But then global.h is supposed to be a list of global variables, not a list of new functions, so whatevs.


tl;dr
Nobody answered this question:
Am I just copying all the headers from RPU/UPU "...\scripts_src\headers\"?
...and the same question for the modderspack "...\scripting_docs\headers\"?

And the deeper I dive into these files the more it seems like the sfall modderspack might be the only useful set to include when making a mod.
Can anybody provide me with a list of functions that the UPU or RPU header's add?
My understanding is that these mod's headers aren't even necessary to make a script that's compatible with them, since the compiler simply reduces the scripted code to binary, and as such should be usable by the game engine regardless of what the header's are.
RPU and UPU headers may add more easily accessible functions...but I don't yet see what those functions are, or why I should replace these headers.
 
This does not appear to be the case, as I've used Sfall functions without installing any of the Sfall headers from the modders pack, I've only used what came with the mapper.
The headers are just to make advanced features easier to use due to its defines, etc. Of course you don't have to use them, and most of the time for generic stuff you likely won't need them.

You need to look at them to see what they cover.

End of file with no newline, supplemented newline: #endif // _GLOBAL_H_DEFINED2 O0) (1O9 )_ _ LI ( DW1O (
That's not an error, just a warning.


The reason why you should use the updated scripts is mostly for compatibility with other mods / patches and to not re-introduce old bugs.
If you make a total conversion, you actually don't have to bother with most of this stuff because you will overwrite it anyways.
 
Searching google for "learn C++" gives:
http://www.cplusplus.com/doc/tutorial/
https://www.learncpp.com/
https://www.learn-cpp.org/
https://www.w3schools.com/cpp/default.asp
https://www.learncpponline.com/

1. Take your pick. OR you can learn C. It doesn't matter. You need to know basic programming, like: variables, variable types, functions, control flow, if conditions, basic loops, logical operators, purpose of headers and libraries, and a few other things. Basic understanding of arrays will also help. If you know basic programming then you are fine as SSL is not C, its a made up language between c and maybe java and maybe something else. Seems like you already know a bit from that video.


2. When it comes to headers and libraries, you don't have to use any. You use them because they make your life easier. Having extra headers doesn't hurt (except in some cases). Not having enough does. Extra defines help you find values as you type in the editor. They also help find values you didn't know about and short functions for longer functions.


3. There is no documentation to tell everything. We all learned the hard way. And if we were lucky then some nice guy helped us along.


4. To know what's in the headers and whether they are useful, you have to have a look at each one and see if it helps your understanding or useful to include in your project. You have to get an understanding of what is. To get that understanding you basically have to skim through all the files. Well that's what I had to do. You find a better way you let me know.


5. You need to read all of Sfall's documentation. You need this to know what functions exist. Not that that's enough.
https://sfall.bgforge.net/
https://github.com/phobos2077/sfall


6. RP is too big, and not everything in it is relevant. But you may need a bunch of its headers for compiling. Also important to have define.h and command.h and important to know whats in them.
https://github.com/BGforgeNet/Fallout2_Restoration_Project


7. After having learned all of that you still won't know how to write scripts. You need to look at some sample ones and then you can get started. RPs and specially Burns's fo2tweaks are good source. Phobos has apparently made a llot of scripts but I don't know where the source code is, perhaps others can point out. Also @Lexx might know some good sources to point out. (*edit: seems like you are somewhat familiar already from video.)
https://github.com/BGforgeNet


8. Reading through the Sfall thread's history has some random gems but its a chore-some ask.


Uh... anybody else please point out other things that I've missed or am mistaken about.

I found these resources very useful:
https://falloutmods.fandom.com/wiki/Fallout_2_tutorials
https://falloutmods.fandom.com/wiki/Category:Fallout_2_documentation
 
Last edited:
Also @Lexx might know some good sources to point out.
Honestly, it's all really just about reading and understanding the vanilla scripts.

Before I was able to do cool stuff, I had to read them A LOT. It of course also helps if you know Fo2 very well - if you want to do something, you think of where something similar happened in Fo2 and then look at its scripts to figure out how it works.

With time you will learn how to use the macros, best techniques, and all the big no-no's. There is no, and never was a fast way to understand the game.

The only other thing I can think of right now are the old tutorials made by Lich for his Black Steel(?) mod. He wrote lots of small mini-tutorials that only covered small things. Simple, easy to read, and easy to understand.
 
Back
Top