Page 1 of 1

Various questions

Posted: Fri Sep 04, 2020 4:52 am
by Cyrus
Hi. Have questions that will be coming up 1 by 1 which I'd like to ask you burn, if you don't mind.

Gonna make this thread so I post them in 1 place as not to pollute the forum.

what is the \n for? anyhting important? or just a personal marker string?

Code: Select all

#define ndebug(message) debug_msg(SCRIPT_REALNAME + ": " + message + "\n")
Thanks in advance.

Re: Various questions

Posted: Fri Sep 04, 2020 5:44 am
by Magus
it's a line break

Re: Various questions

Posted: Fri Sep 11, 2020 7:38 am
by Cyrus
Thanks for above.

Burn I want to create a damage mod script that would run side by side with you mod files active, such that for example when I set "fo2tweaks.ini|main|damage_mod" to "2" my gl_cy_damage_mod script would be executed.

Inside this script I would be just doing some testing. the idea is that by assigning "2" to "main|damage_mod" only your damage mod script would not run and my script will run instead (after checking for "2") while all other components of fo2tweaks are still working.

Now, because you have placed your scripts inside a dat file, I don't know where I should place my script file for it to be loaded. I don't think altering your dat file is a good idea so I don't want to do that. I want this to work as a "mod mod" in the future on top of your mod, so when I install FO2 and then your mod, then I can place a few files on top of that and by just asigning "2" to "fo2tweaks.ini\main\damage_mod=" then my script can run instead of

How do you recommend that I go about this?

I hope my explanation is clear. If not let me know so I clarify more.

Re: Various questions

Posted: Fri Sep 11, 2020 4:26 pm
by Magus
Cyrus wrote:
Fri Sep 11, 2020 7:38 am
I don't know where I should place my script file for it to be loaded.

Anywhere you like, see DataLoadOrderPatch for available places. If you change the name of the script, it doesn't matter where to put it. Only if it's the same, then load order matters.
Generally, local patches should go to "data" dir (and scripts specifically to data/scripts), which has the highest priority with DataLoadOrderPatch enabled.

Re: Various questions

Posted: Sun Sep 13, 2020 8:04 am
by Cyrus
Got it, thanks man.

Burn I'm trying to run the debugger, but running into complications. I want to read the debug messages sent by fo2tweaks scripts through the ndebug function. I tried setting up the debugger to send messages to screen, well I got a grey box that did show messages but was very small and hard to read and couldn't scroll up. was rather useless. I also tried setting up a button to run the sfall-debugger. It would run but it would lockup the game, and my mouse would disappear and freeze even when alt-tabbing out to desktop. so I couldn't do anything with it, and saw no messages there.

I did the following:

Code: Select all

In fallout2.cfg:

Code: Select all

and in ddraw.ini:

Code: Select all


I just want to see the hookscript messages, don't need the rest. What am I doing wrong? Do I have to send to log file to get best results? Should I even call the sfall-debugger?

I did also update the falloutclient from modder'spack 4.2.7.

Re: Various questions

Posted: Sun Sep 13, 2020 8:25 am
by Magus
I only ever use the log file, so you'll have to experiment yourself with debugger. (And you're welcome to submit any findings that aren't in sfall doc yet to
I think you'll want Hook=1, Script=1 and show_script_messages=1, but I'm not 100% sure.
If you have issues with alt-tabbing, probably worth trying windowed mode.

Re: Various questions

Posted: Thu Sep 17, 2020 3:36 am
by Cyrus
Thanks for the above again.

I just ended using display_msgs to get instant feedback.

Burn I'm having a bit of a hard time using the switch/case condition in SSL. Are you familiar with it?

When using a "switch" what is the syntax to execute multiple statements in one case?  in C++ you just put them in a  { }, separated by ";". for example: case 1 : { statement; statement, ...etc }. what is the syntax in SSL?


Re: Various questions

Posted: Thu Sep 17, 2020 4:21 am
by Magus
Switch in SSL is a shorthand for

Code: Select all

if then else if...
, as noted in the docs.
For usage examples, feel free to refer to FO2tweaks code.
I don't think default is required, but you can easily test yourself. If it compiles, it's fine.

Re: Various questions

Posted: Thu Sep 17, 2020 4:26 am
by Cyrus
Oh sorry about that I totally forgot about this page with all the documentation. I should have read that first.

Much appreciated.

BTW, I am making good headway with my coding ability, I wrote a whole script for AP cost and its working nicely.

Edit**: Damn, I wish I had found the search feature of github before! So freakin useful!