Improved Scripting Tools (SSL+ and Script Editor)

I have working except for compiling, that requires using the command line.
You need to run it with a 32 bit WINEPREFIX and in winecgf set the windows mode to XP.
However I get some random crashes so save often.
Compiling works fine for me without mcpp or any command line editing, see attachment.

I don't really have crashes, but exceptions, hover and hidpi issues are really getting me on edge... I got a proof of concept vscode extension and if it works out well enough, will probably switch from SFSE.
 

Attachments

  • Captura de pantalla de 2018-10-05 13-16-34.png
    Captura de pantalla de 2018-10-05 13-16-34.png
    53.2 KB · Views: 586
set_critter_skill_points(obj, skill, get_critter_skill_points(obj, skill) - 10)


What to add?
Never mind, Burn told me how to fix my problem.

One other thing, supporting .txt files would allow opening documentation inside the editor.
 
I have a problem with Fallout sFall Script Editor_v4.1.4
In the previous version (4.1.3) I was able to click on a “node” on the right side and it would jump to that part of the script. This worked under the (Procedure and Variables tab). Only when I clicked on a command in the (Functions) tab would it add that command to the script.
Now, in 4.1.4 all three tabs (Procedure, Variables and Functions) add to the script when clicking on them.
However, this only happens in 4.1.4 when I click on anything in the script first. Only then does a click on “procedure or variables” insert whatever I clicked on to the script.
Consequently this “issue” is kind of avoidable (don't click on anything), until I use (ctrl+f) because searching for anything in the script “selects” the part I searched for. And from then on instead of navigating the script it will insert any command from the right tab I click on. I don't know how to get out of this (deselect script) so that I can continue to navigate (i.e. jump from node to node)?

Am I missing something? I tried double-click, right-click and looking through the options I can't find anything that switches this “command” on/off. I also tried a few buttons (ctrl) in addition to left-click, but zippo.
Currently I have to search, note down the line, close, reopen and then navigate. Rinse & repeat each time I use the search function.

I'm not a modder I only look at scripts to figure out rules or bugs (grunt). But for both cases navigating the script was very useful (nodes are not always in order). In fact I had to switch back to 4.1.3 as checking scripts has been a pain with 4.1.4.

4.1.3 was better in this regard (i.e. I can click on anything in the script itself, use ctrl+f, and a single click on anything in the right tab took me to the node clicked on. Which was handy.)
Is it possible to make this an option (i.e. to switch from 4.1.4 (scripting style) to 4.1.3 (navigating style)?)
Or the search function can't select what it searches for when used (which is probably inconvenient).
Or an ability to deselect the script by clicking somewhere (like the top), although that is probably inconvenient, too.

Anyway, it's probably a bug that ctrl+f basically disables that “navigate option”.
 
When I open .int files with this, or I try to open the exe. It just says that it will now associate .ssl and .int files with the program. How do I use the script editor?
 
*.int files are compiled scripts. What you want to open and edit are .ssl files which are uncompiled scripts.
 
Regarding Script Editor 4.1.7,


Is it updated with the new additions to sfall 4.2.8? like the new functions and the variable declaration mid-procedure features?


Also, does it have the short-circuit parsing for OR and AND. Cause right now I'm avoiding long OR and AND statements. I'm wondering if I don't need to do that?
 
Also, does it have the short-circuit parsing for OR and AND. Cause right now I'm avoiding long OR and AND statements. I'm wondering if I don't need to do that?
You can use -s compiler switch (short-circuit evaluation checkbox in the settings) to force all OR and AND be short-circuited, or just use newer AndAlso and OrElse syntax for logical expressions.
 
Regarding Script Editor 4.1.7,
Is it updated with the new additions to sfall 4.2.8? like the new functions and the variable declaration mid-procedure features?
The latest functions from 4.2.8/4.2.6 haven't been added yet, everything else is supported.

If anyone has a desire, please add all the missing descriptions to the functions in the file descriptions/opcodes.txt, to include it in the editor.
Because I don't pay much attention to descriptions in English for obvious reasons.
 
or just use newer AndAlso and OrElse syntax for logical expressions
Thanks again.

Are there any downsides to always using short-circuit operations? I tried to look it up on the internet, didn't find a definitive answer. I'm thinking why even use AND and OR when you can just use AndAlso and OrElse? Are the latter always better?

The latest functions from 4.2.8/4.2.6 haven't been added yet, everything else is supported.
So how can I compile using those new functions? Cause this editor gives me error. What can I do?

If anyone has a desire, please add all the missing descriptions to the functions in the file descriptions/opcodes.txt, to include it in the editor.
I'm willing. If I can find the right descriptions, I'll try to do it when I get some time. I've gotten rather busy lately.
 
I meant descriptions for new functions, the compiler and parser have been updated to the latest versions.
what error do you have?
 
what error do you have?

I'm using 4.1.6 currently and compiler gives me syntax error if I try to declare variables mid-procedure, also doesn't have the new functions (ex: combat data). I was wondering if by updating to 4.1.7 it would bring the features. From what you explained seems like answer is yes.


Well put, thanks. I should really be using andalso and orelse instead of and and or.
 
I'm using “Fallout sFall Script Editor v4.1.7.RC1”
And I have a few "minor" points and suggestions.

-When I compile a script that has an error (example; missing starting/ending brackets on “critter_state(dude_obj) != 64” then the editor adds those automatically. Plus some other auto-corrections, it seems. It would be nice if I could get a message about these auto-corrections (compile-report), so I can see what I do wrong and learn from it. Currently, I keep repeating the same mistakes as all my compiled scripts work, but I'm actually making errors.

-Search: The default is “search in all open scripts”. When I use the “mouse” and click the search button, it works. But when I use the “enter key” on the keyboard then it skips out of searching the moment I enter the next script and it starts to add new lines instead.

-Search: When searching in more than one script (example; two) and I enter a keyword that only exists in one of the two (example; 900), then it stops with a “search string not found” message at the end of the current script rather than continue cycling through the two open scripts. When the keyword exists in both scripts (example; 999) then it keeps cycling through them.

-Comment: I sometimes open the same script twice (example; AcEric of 1.02d and AcEric of RP Mod 2.3.3) to check if there are any changes made in regard to bugs. In these cases, I usually only decompile them and don't save the ssl. When I do that it throws up an error message saying “scrtemp, script was changed outside of editor, do you want to update yes/no” However, by saying “no” it continues on just fine. So not really a problem. It also just works fine to save the decompiled script under a slightly different name, like “AcEricTEST”. So the problem here is probably mainly me not saving the ssl but just decompiling two scripts quickly for comparison. Still, maybe room for optimization, as the editor could realize that these files are two instances from different sources (i.e. “1.02d” folder and “RP” folder), maybe?

-Comment: Some scripts seem to require a “start” proc. If they don't have it then they seem to execute the first proc over and over again. The editor mentions something similar in regard to “critter” proc. Anyway, I had this issue (“first encountered procedure constantly executed”) and solved it by adding a “start” proc. Not entirely sure I understand everything behind it, but I thought it may be interesting to mention that it's not only a missing critter proc causing this behaviour.

-Last, the one real problem I have, but can't figure out (well, see EDITS below) is: Sometimes it throws up an error message saying something like “index, outside of expected range 0 to X” and then it allows me to “continue” or “kill app”, and then it's this old spiel of hitting continue until it goes away (hopefully). But I can't reproduce it... It usually happens when I open too many scripts and jump around too much. Then it suddenly goes haywire. Most problematic was when I opened about 30 scripts or so, searching for all instances of the town rep global. In that case, I had to “killap” and worst of all couldn't remember anymore which scripts I already checked and which I didn't. Since then I only open batches of ten, and make searches more controlled. Not sure what the issue is... search cycling being a bit wonky (as I use keyboard), only decompiling the scripts but not saving them (as I only want to look through them), too many scripts changes and temps at the same time (?), not being competent and doing stuff rather unorthodoxly (like decompiling scripts without any proper set-up), not sure... I may update this point when I can reproduce it reliably.
...
Edit: Just had it again “index should be between 0 and 380”. I think what happened was I opened/decompiled two scripts, one was a long NPC script the other a short door script. The short one wasn't the droid I was looking for, so I closed it, and opened another door script, and then it triggered the error...
index should be between 0 and 380
Parametername: index
The actual value was 404.
Guess: the first door script was on line 0-380, I closed it, jumped too the opened long NPC script, opened the other short door script and it triggers the error as I'm on line 404 (longer NPC script) but expected to still be between 0 and 380 (shorter door script)... Does that make sense?
...
EDIT II: I can reproduce it now... The problem is I open scripts using “ctrl” so I selected the door script, pressed ctrl and selected the NPC script to decompile/open both. Works fine. Then I closed the door script, opened the other door script and then “I'm outside the expected index”. So the confusion appears to be caused by “mass selecting scripts to open/decompile” using ctrl AND then opening another script.
Hope this helps.

Anyway, really helpful editor. For someone like me who had zero experience with komputas before 2017, your script editor is really helping me along, with info, auto-correction and what not. I'm moderately competent now. Even started to mod a little. Not full blown, but when I throw something together it usually works (well, after auto-correction... ;) ).
 
thank you for the feedback.
Yes, there are many problems that I can not overcome, there are more and more new ones.
I also recently found this problem with the index.
 
thank you for the feedback.
Yes, there are many problems that I can not overcome, there are more and more new ones.
I also recently found this problem with the index.
You're doing great, just keep at it.

The search thing would be nice for bug-hunts, but once figured out not to use the keyboard, it's all managable.

[P.S.: Today I was testing saving & loading while in combat... and to my surprise that seems to save temporary variables. I did not try to shut down the game, but saving/loading did work fine. Every critter on the map remembered the temp [prisoner_attacked], was really surprised about this... normally loading wipes all temps, but not while in combat apparently.]
 
I've been doing some testing and
Sfall script editor says:
map_update_p_proc<d>Called when the map is updated (every 250 game ticks).
However, I did some testing and it may be more accurate to say:
map_update_p_proc<d>Called when the map is updated (by anything that may progress time, else every 250 game ticks).
Here is a list of things I found that trigger a map_update:
-opening/closing the pip-boy
-ending a rest in pip-boy
-loading a save (edit: nvm, it does trigger one after all)
-entering a map
-using an object on someone/something
-talking to someone (floats and dialogue window)
-using a skill that progresses time, like First Aid or Doctors (and I believe they trigger not one but several map_updates each time... bit weird)
-reading skill books
-ending combat
and there may be more.
Some of these I tested by having a counter in map_update (gvar reduced by 1 whenever map_update is called), which made it clear that some of the above trigger a map_update (e.g. I can deplete that gvar simply by opening/closing pip-boy or talking to someone repeatedly). And, secondly, by seeing day/night adjustments (at the end of resting, for example). Which is probably the main reason why all these trigger a map_update (i.e. it's probably a hardcoded failsafe to make sure day/night always adjusts properly).
Anyway, point being, “every 250 game ticks” sounds as if it checks regularly, but is by no means are reliable timer but only the default if nothing else triggers it first (and that is very likely), which makes map_update highly irregular.
Just a detail... but I just had to look into it.
 
Last edited:
map_update_p_proc - updated every 30000ms (30-sec, for the game it is 300 ticks).
If you opened-closed the pip-boy when 15 seconds have passed, then map_update_p_proc will still be updated after 15 seconds again.
30000ms does not mean that it will necessarily update at this value, it can be 30100ms.
 
Last edited:
Back
Top