Jump to content

Galactygon

Modders
  • Content Count

    725
  • Joined

  • Last visited

About Galactygon

  • Rank
    Nostradoctopus

Profile Information

  • Gender
    Male
  • Location
    Sweden

Recent Profile Visitors

7,575 profile views
  1. Oh right, forgot to mention this as well. Yeah, auto-pause on spell cast can do two fairly bad things--one, as you've already mentioned, is that it can re-roll the probabilities so that not every effect gets the same roll (for further reading, any old thread about the duration of the Friends spell in the Fixpack). Another, but lesser known problem, is that it can sometimes cause the engine to apply spell effects out of order, which can cause all sorts of bad things for spells like Otiluke's where the order is necessary for the proper functioning of the spell. edit: I should note that while auto-pause on spell cast is the most common way to experience these bugs, *any* pause at the critical moment can produce the same result. Yes, many of the EE spells and especially the ones in IWD:EE are dependant on immunity effects placed at the beginning of the effects list. They are negated if you use autopause on hit or happen to pause the game at the wrong time.
  2. This. I couldn't have said it any better.
  3. Something I just remembered to mention now is when cloning spells as different filenames, instances of immunity spell opcodes (318/324) need to be updated so that they self-block the effects of the new spell rather than the original copied spell. SCS liberally clones spells, so I would integrate this change into the clone spells macros or whatever they are called.
  4. I've updated/clarified the differences between bit0 and bit3. I can confirm that bit3 is the noncumulative version of hp transfer in that if the recipient carries any instance of opcode 18 with special set to 1, then no current and maximum hitpoints are added.
  5. Is there anything similar for delayed and delayed/duration timing modes i.e. using AI frames instead of seconds? PST:EE uses AI frames instead of seconds for its delayed timing mode while the rest of the IE uses seconds.
  6. There are a limited number of splstates (255) so I would only use new slots sparingly.
  7. I believe you need a caster and a target creature for a scorcher-type projectile whose two endpoints move with the caster & target.
  8. I went ahead and wrote a function that can handle .ssl => .baf => .bcs compilation in one go. The modder has to specify the following 3 things: 1. The path of SSL.exe (default is %MOD_FOLDER%/SSL/ssl.exe) 2. The name of the array with a list of .ssl libraries with their file paths specified (valid format either .slb or .ssl). Default value is "SSL_LIB". 3. The name of the associative array with of individual .ssl files compiled as .bcs files in the override folder. Default value is "SSL_LIST". 4. (optional) Any ssl variables can be defined in STR_VAR ssl_variables. Default value is "". All filepaths are relative to Setup-MyMod.exe, including any INCLUDE() syntaxes within any of the .ssl files. The code generates a valid list of .ssl files and libraries, runs ssl.exe, and compiles the resulting .baf files into the override folder. See the full code below with an example application: // Compile a list of .ssl files into .baf format and then proceed to .bcs format in the override folder // Example usage: //ACTION_DEFINE_ARRAY "SSL_LIB" BEGIN // list of .slb files // "%MOD_FOLDER%/SSL/testlib" // list of .ssl files (i.e. to define actions) // "%MOD_FOLDER%/SSL/testactions" //END //ACTION_DEFINE_ASSOCIATIVE_ARRAY "SSL_LIST" BEGIN // Compiles test1.ssl into override/testssl.bcs // "%MOD_FOLDER%/SSL/test1.ssl" => "testssl" // Compiles test2.ssl into override/testtwo.bcs // "%MOD_FOLDER%/SSL/test2" => "testtwo.bcs" // Compiles test3.ssl into %MOD_FOLDER%/SSL/ssl_out/test3.baf without compiling into the override as a .bcs // useful for patching (i.e. EXTEND_TOP) // "%MOD_FOLDER%/SSL/test3" => "" //END //LAF "SSL" // STR_VAR ssl_lib = "SSL_LIB" // List of arrays // ssl_files = "SSL_LIST" // List of associative arrays // ssl_exe = EVAL "%MOD_FOLDER%/SSL/ssl.exe" // directory to where ssl.exe is located //END DEFINE_ACTION_FUNCTION "SSL" STR_VAR ssl_lib = "SSL_LIB" // name of the array array (default: "SSL_LIB") ssl_files = "SSL_LIST" // name of the associative array (default: "SSL_LIST") ssl_variables = "" // List of variables ssl_exe = EVAL "%MOD_FOLDER%/SSL/ssl.exe" // directory to where ssl.exe is located (default is in an ssl folder within %MOD_FOLDER%) BEGIN OUTER_SPRINT ssl_execute_ssl "" OUTER_SPRINT ssl_execute_lib "" ACTION_IF "%ssl_variables%" STRING_CONTAINS_REGEXP "[0-9A-Za-z]+=[0-9A-Za-z]+" = 0 BEGIN OUTER_PATCH_SAVE ssl_variables "%ssl_variables%" BEGIN REPLACE_TEXTUALLY "[ %TAB%,;|]*=[ %TAB%,;|]*" "=" REPLACE_TEXTUALLY "[ %TAB%,;|]*" "&" REPLACE_TEXTUALLY "^&" "" REPLACE_TEXTUALLY "&$" "" END OUTER_SPRINT ssl_variables " %ssl_variables%" END ELSE BEGIN OUTER_SPRINT ssl_variables "" END ACTION_IF FILE_EXISTS "%ssl_exe%" AND "%ssl_exe%" STRING_MATCHES_REGEXP "^.*ssl\.exe$" = 0 BEGIN // If ssl.exe exists // Record information ACTION_PHP_EACH "%ssl_lib%" AS ssl_lib_index => ssl_lib_src BEGIN // Add .slb or .ssl at the end if no file extension is given (attempt to find .slb file first then do the same for .ssl) ACTION_IF NOT "%ssl_lib_src%" STRING_MATCHES_REGEXP "^.+\.[0-9A-Za-z]+$" = 0 AND NOT "%ssl_lib_src%" STRING_MATCHES_REGEXP "^.+\.\(slb\|ssl\)$" = 0 BEGIN ACTION_IF FILE_EXISTS "%ssl_lib_src%.slb" BEGIN OUTER_SPRINT ssl_lib_src "%ssl_lib_src%.slb" END ELSE ACTION_IF FILE_EXISTS "%ssl_lib_src%.ssl" BEGIN OUTER_SPRINT ssl_lib_src "%ssl_lib_src%.ssl" END END ACTION_IF FILE_EXISTS "%ssl_lib_src%" AND "%ssl_lib_src%" STRING_MATCHES_REGEXP "^.+\.slb$" = 0 BEGIN // If valid .slb file // Append %ssl_execute_lib% with file path ACTION_IF "%ssl_execute_lib%" STRING_EQUAL_CASE "" BEGIN // If first item in list OUTER_SPRINT ssl_execute_lib "%ssl_lib_src%" END ELSE BEGIN // If not first item in list OUTER_SPRINT ssl_execute_lib "%ssl_lib_src% %ssl_execute_lib%" END END ACTION_IF FILE_EXISTS "%ssl_lib_src%" AND "%ssl_lib_src%" STRING_MATCHES_REGEXP "^.+\.ssl$" = 0 BEGIN // If valid .ssl file // Append %ssl_execute_ssl% with file path ACTION_IF "%ssl_execute_ssl%" STRING_EQUAL_CASE "" BEGIN // If first item in list OUTER_SPRINT ssl_execute_ssl "%ssl_lib_src%" END ELSE BEGIN // If not first item in list OUTER_SPRINT ssl_execute_ssl "%ssl_execute_ssl% %ssl_lib_src%" END // Make directory "ssl_out" in same folder as .ssl file & copy blank .baf file to destination OUTER_PATCH_SAVE ssl_out "%ssl_lib_src%" BEGIN REPLACE_TEXTUALLY "^\(.+\)/[^/]+\.ssl$" "\1/ssl_out" END MKDIR ~%ssl_out%/~ OUTER_PATCH_SAVE ssl_out_res "%ssl_lib_src%" BEGIN REPLACE_TEXTUALLY "^\(.+\)/\([^/]+\)\.ssl$" "\2" END <<<<<<<< .../%MOD_FOLDER%-Inlined/blank.txt >>>>>>>> COPY ".../%MOD_FOLDER%-Inlined/blank.txt" "%ssl_out%/%ssl_out_res%.baf" END END ACTION_PHP_EACH "%ssl_files%" AS ssl_src => ssl_dest BEGIN // Add .ssl at the end if no file extension is given ACTION_IF NOT "%ssl_src%" STRING_MATCHES_REGEXP "^.+\.[0-9A-Za-z]+$" = 0 AND NOT "%ssl_src%" STRING_MATCHES_REGEXP "^.+\.ssl$" = 0 BEGIN OUTER_SPRINT ssl_src "%ssl_src%.ssl" END ACTION_IF FILE_EXISTS EVAL "%ssl_src%" AND "%ssl_src%" STRING_MATCHES_REGEXP "^.+\.ssl$" = 0 BEGIN // If valid .ssl file // Append %ssl_execute_ssl% with file path ACTION_IF "%ssl_execute_ssl%" STRING_EQUAL_CASE "" BEGIN // If first item in list OUTER_SPRINT ssl_execute_ssl "%ssl_src%" END ELSE BEGIN // If not first item in list OUTER_SPRINT ssl_execute_ssl "%ssl_execute_ssl% %ssl_src%" END // Make directory "ssl_out" in same folder as .ssl file & copy blank .baf file to destination OUTER_PATCH_SAVE ssl_out "%ssl_src%" BEGIN REPLACE_TEXTUALLY "^\(.+\)/[^/]+\.ssl$" "\1/ssl_out" END MKDIR ~%ssl_out%/~ OUTER_PATCH_SAVE ssl_out_res "%ssl_src%" BEGIN REPLACE_TEXTUALLY "^\(.+\)/\([^/]+\)\.ssl$" "\2" END <<<<<<<< .../%MOD_FOLDER%-Inlined/blank.txt >>>>>>>> COPY ".../%MOD_FOLDER%-Inlined/blank.txt" "%ssl_out%/%ssl_out_res%.baf" END END // Launch ssl.exe if there are valid library and ssl files & generate .baf files ACTION_IF NOT "%ssl_execute_ssl%" STRING_EQUAL_CASE "" AND NOT "%ssl_execute_lib%" STRING_EQUAL_CASE "" BEGIN AT_NOW ~%ssl_exe% "%ssl_execute_ssl% -l %ssl_execute_lib%%ssl_variables%"~ END // Compile generated .baf files ACTION_PHP_EACH "%ssl_files%" AS ssl_src => ssl_dest BEGIN // Get ssl_out/xxx.baf path // Add .ssl at the end if no file extension is given ACTION_IF NOT "%ssl_src%" STRING_MATCHES_REGEXP "^.+\.[0-9A-Za-z]+$" = 0 AND NOT "%ssl_src%" STRING_MATCHES_REGEXP "^.+\.ssl$" = 0 BEGIN OUTER_SPRINT ssl_src "%ssl_src%.ssl" END // Get location of resulting .baf file OUTER_PATCH_SAVE ssl_out "%ssl_src%" BEGIN REPLACE_TEXTUALLY "^\(.+\)/[^/]+\.ssl$" "\1/ssl_out" END OUTER_PATCH_SAVE ssl_out_res "%ssl_src%" BEGIN REPLACE_TEXTUALLY "^\(.+\)/\([^/]+\)\.ssl$" "\2" END // Generate new .bcs if valid input at => "%ssl_dest%" ACTION_IF "%ssl_dest%" STRING_MATCHES_REGEXP "^[-_!@#a-zA-Z0-9]+\(\.baf\|\.bcs\)?$" = 0 BEGIN ACTION_IF FILE_EXISTS "%ssl_out%/%ssl_out_res%.baf" BEGIN // Record contents of resulting .baf file in %ssl_out_contents% COPY - "%ssl_out%/%ssl_out_res%.baf" "" READ_ASCII 0 ssl_out_contents (BUFFER_LENGTH) // truncate file extensions OUTER_PATCH_SAVE ssl_dest "%ssl_dest%" BEGIN REPLACE_TEXTUALLY "^\(.+\)\..+$" "\1" END // Generate temporary .baf file (in case original .ssl/.baf and destination .bcs resnames do not match) <<<<<<<< .../%MOD_FOLDER%-Inlined/SSL_DEST/%ssl_dest%.baf %ssl_out_contents% >>>>>>>> COMPILE EVAL ".../%MOD_FOLDER%-Inlined/SSL_DEST/%ssl_dest%.baf" END END END END END
  9. When I try to compile ssl scripts from a .bat file run from the main game directory I am unable to specify a directory if ssl.exe is located somewhere else relative to the .bat file in the manner of: LCTests/SSL/ssl.exe "LCTests/SSL/testactions.ssl LCTests/SSL/testssl.ssl -l LCTests/SSL/testlib.slb IsLich=True&CreType=Undead" I get the message "LCTests is not recognized as an internal or external command" I do manage to compile them if ssl.exe is located in the same folder as the .bat file and use the following instead. ssl.exe "LCTests/SSL/testactions.ssl LCTests/SSL/testssl.ssl -l LCTests/SSL/testlib.slb IsLich=True&CreType=Undead" Is this intentional or is it an oversight? I guess one could either COPY ssl.exe to the main (game) directory or generate the .bat file in the folder where ssl.exe is located. EDIT: Using AT_NOW in the manner below works: AT_NOW ~LCTests/SSL/ssl.exe "LCTests/SSL/testactions.ssl LCTests/SSL/testssl.ssl -l LCTests/SSL/testlib.slb IsLich=True&CreType=Undead"~
  10. Thanks for the help, Wisp. That was the issue. I was now able to generate the desired .baf file. Now I've got yet even more questions to ask you: 1. Why did you choose not to run ssl.exe? Is it a hassle to account for the different operating systems? 2. You have written a python script make_baf.pl which I couldn't find in any of the SCS folders. What does it do? Is it something specific for aTweaks rather than ssl?
  11. Thanks for your reply, Wisp. I've been looking into pregenerating .baf blocks but you do not seem to have ssl.exe in aTweaks; I am speculating that the scripts distributed in aTweaks are already "ready-made" complete .baf files and the .ssl blocks are there for reference. SCS pregenerates so much with different scripts that it's difficult to boil it down to a simple example of a .tph launching an .ssl compiler with the most basic features and libraries. I've been trying to generate one .baf file from the single block of .ssl code above by running ssl.exe via a .bat but keep getting the error Input file is testssl.ssl Error near line 7: Spell is not a recognised action type at <directory>\ssl.exe line 634. Can someone with experience in ssl look at this? Simply run the .bat after downloading the folder: https://drive.google.com/open?id=0ByYA3DEzP-QMUWZnVFU3ZlI3WUU
  12. Note that there are different implementations of HIDESPL.2da; the ToBEx/Taimon implementation uses one less column than the EE implementation. I would do a COUNT_2DA_COLS check first i.e. COPY_EXISTING "HIDESPL.2da" "override" COUNT_2DA_COLS hidespl_col_num PATCH_IF hidespl_col_num = 3 BEGIN // If EE version is used INSERT_2DA_ROW 0 3 ~myspell 1 0~ END ELSE PATCH_IF hidespl_col_num = 2 BEGIN // If ToBEx version is used INSERT_2DA_ROW 0 2 ~myspell ****~ END PRETTY_PRINT_2DA IF_EXISTS This will add your spell as the first row of HIDESPL.2da.
  13. Question: what does Combine() do? Here's an example from aTweaks/ssl/mage/chaos.ssl: IF TRIGGER TargetBlock(PCsInOrder) TriggerBlock(Disabled|Enemy|MR50|Confusion|SIEnc) THEN DO Combine() Action(Spell,WIZARD_CHAOS|100|50) END My initial guess is that it generates a series of False() targeting blocks with all the "scstarget"s followed up by a LastSeenBy(Myself) block but I could be wrong.
  14. Happy birthday Mike! Thanks for your contributions after all these years!
  15. There are some peculiarities with 321 if you place it in a spell other than where your noncumulative effect is. i.e. if you place 321 that dispels "spell b" in "spell a" that casts "spell b" (via opcodes 146/326) then the effects of "spell b" will not be properly applied. You have to place 321 in "spell b" where the rest of your effects are.
×
×
  • Create New...