RP 2.3.3 modernized

Muttie

Still Mildly Glowing
Modder
RP 2.3.3 modernized
[2500 words, plus a copy & paste of the full changelog (set in spoiler) which can be skipped (it's not that interesting, only if you really want to get into it]

I wanted to play RP mod but found that the sfall from 2014 is too out of date (missing features etc). So I looked into updating it. While doing that, I also thought I may mod a bit (maybe), which in turn required to check if the source code is up to it – and that became a much bigger job. I have not yet updated sfall or played RP (-.-) [just should have pressed play, really...] – but I cleaned up the source code to an acceptable base level:

If interested:
this link is the updated source that I will use to mod RP (if).

That said, I'm not sure if this is interesting for 2 reasons:
1. Some may say RP 2.3.3 is outdated – although it's perfectly playable, so I don't agree with it.
2. This updated source has seen so many changes that you really only got two choices: either you check every change if it's sound (which by my estimate may take 2 to 4 weeks), or you trust me... which is not really optimal in either case.

Anyway, I did the following: (all based on the RP 2.3.3 source included in the BiS Mapper)
1. I checked if every script compiles. There were a handful that wouldn't and I needed to fix them up a bit.
2. I tried to eliminate as many warnings as possible. This was necessary as in some cases you've got flooded with 500 warnings which made going through them basically impossible. This fixing of warnings often made no change to the script, but in some cases it resulted in bug fixes (false arguments or falsely named standard procs etc.). [Note: I did not fix warnings for unreferenced nodes, that would be another step of checking if those are truly unused, bugs or cut content (that could be restored). So there are still cases that may flood warnings, most typically for unreferenced node999 & node998, but it should be much less than it was.] During this step I also got rid of several global procs which I've changed into a macro and added them to those scripts that needed them. In general this made the source much cleaner (less warnings, less complications). This step of removing warnings (especially redefines of variables and names) may also prevent compiler errors (see points of interest below).
3. Then I decompiled the 2.3.3 int files and compared them to a decompiled output of the 2.3.3 source. This helped to find errors I've made and it checked if the 2.3.3 game (aka int) and 2.3.3 source output (aka from ssl to int) are identical – and they are not. So I also needed to check which version is more up to date. It was usually the source but in some cases (using the doctor's bag on Bess, for example) the int turned out to be better.
4. Last, I've tried to keep changes and fixes to a minimum as I wanted to focus on building a better foundation first, however, I occasionally went beyond that and updated some sections to proper macro and so on. Although that does not make any changes to the int, the ssl can be quite different now. As part of this step I've also decided to get rid of the global pickup proc, it didn't trigger any warnings but caused several complications (see points of interest below), however, this makes comparing decompiled int files a bit more difficult now (-.-). And again, after all that, I checked everything by comparing the output to the 2.3.3 int to make sure it all compiles correctly and I haven't made a mistake. As a final touch I've created a mod folder with copies of the scripts that enable/disable a mod (like changing armour etc.), and added a more thorough documentation (i.e. comments to the ssl), which should help with enabling/disabling the expansion/installer options more easily.
And that's basically it.


Here is a full changelog (which you may read if really interested):
This set compiles to the same int files as 2.3.3

However, do note that many int files (about 600) had outdated headers (see notes below). And some int files (about 45) had a different binary after compiling, but are actually identical when decompiled (possibly very old scripts). [edit: this was before removing global procs, by now every single int will be different...]
Then there are a handful of (actual) differences, some as the 2.3.3 source was actually different, while some as my fixes (of warnings) caused changes. I've listed all those at the end of the changelog (see Compiling Notes). Edit: tbh I'm not entirely sure which version (2.3.3 int or 2.3.3 ssl) is more up to date... usually the sll, it seemed, but there were a few exceptions (see McBess etc.).

Note: comparing decompiled int files should be cleaner than comparing ssl files. It removes all comments, only shows actually used code, shows any macro inside another (or changes to it) and so on. Even more importantly, should your design tool re-define differently or compile differently (which can both happen), is something you won't be able to tell in the ssl. Only the int files will show that.
I usually try to make sure the files compile in identical proc order, if possible, to make comparing easier, however, eventually the changes (like removing global procs) mount up and neither is particularly easy to compare anymore. No matter what you do.


SOURCE: ::changelog::

Fixes to allow compiling:
-Headers - Condtion : removed the spaces at the end of the "((obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_WORN)) != PID_BRIDGEKEEPERS_ROBE) and /*added by killap*/ \ )" line
-Path to (included headers) changed in : Abbey (a lot; 17 files), EPA (a lot; 56 files), Klamath (KIVICDOR.SSL), Maps (epa3.ssl), Modoc (MIJOBOX.SSL), Navarro (CICMDWCH.SSL, CIDOCWCH.SSL, CIQUNWCH.SSL, CIRULWCH.SSL), New Reno (NITRYLK.SSL, NIBIGJLK.SSL), Vault City (VICGWCH2.SSL, VIWALWCH.SSL) and Villout (ZclVillRat).
-BrokHill - hichaddr.ssl : rebuild the source based on the int in RP 2.3.3 (note: I deleted rather than commenting out; was all default code from door.ssl) - I believe that was correct, the int looked better than the ssl... however, normally the source code is more up to date... looked at it again and, still, the int seems better, anyway, the original 2.3.3 ssl is not lost, see BiS Mapper Updated Source Codes for a copy - but I wouldn't use it.
-Den - DCTHUG.SSL : I commented out the line in (destroy proc) that prevented compiling, the removed MVAR when killed does not exist anymore (see gam file of DenRes1), also the RP header has commented it out, so removing it seemed best - this script should apply to Joey's gang only
-EPA - epas9.ssl : changed the GVAR (name) to the one used in the int of 2.3.3 (GVAR 755) however that may be a bug - not sure what this was supposed to check (?) : is this script even used (yes, seems to be a spatial) - anyway it compiles (identically) now... [bug: EPAi33 needs to set a variable when the luck check comes out bad and export it to the spatial (EPAs9)... probably needs another MVAR.]
-EPA - epai9a.ssl : a decompiled (and old) version of epai9.ssl : removed the ssl from source : added one missing part of EPAi9a to EPAi9 (but commented out)
-Generic - ZISTONER.SSL : fixed order, compiles now, however, not tested, may need improving (UI disable etc), script does not exist in RP/(no lst)/unused (see obj_dude)
-Modoc - MCBALWIF.SSL : commented out the addition in talk_proc (was not in the 2.3.3 int; gave_jonny_gun is a local of McBaltha and can't be used with her... may need checking if this needs enabling/fixing)
-Modoc - MCKARL.SSL : put the negative amounts in brackets to allow compiling
-NCR - SCCOP.SSL : only way I could get it to compile was to remove the variable from getArmedPartyMember - behaves the same, tested both versions (w/ Vic & Sulik) and couldn't tell a difference - that said it may also add the variable (in critter proc) and define it (maybe it's supposed to be used w/ LVAR 9?) but either way I don't know what this (variable last) is supposed to check or do... so I removed it
-NewReno - NCFIGHTR.SSL - changed the old define (FID_BOXER) to the new RP one (FID_NMBOXX)
[Note: each time I saved a ssl it automatically removed unnecessary spaces - not a problem, just mentioning. Another thing that makes "comparing" ssl more difficult than decompiled.]

Don't compile:
-Abbey - abgrave3.ssl : does not compile (error script_name define) : script does not exist in RP/(no lst)/unused : has a msg
-Generic - ZCCORPSE.SSL : does not compile (error script_name define) : script does not exist in RP/(no lst)/unused : has a msg
-NCR - WAYPNT.SSL : does not compile (it's an include file only)
-RndEnctr - ESTRMIBB.ssl : does not compile (error script_name define) : script does not exist in RP/(no lst)/unused : has no msg
-Template - GENERIC.SSL, GENFFLD.SSL, PEASANT.SSL, SPRTRP0.SSL, TALK.SSL : all templates only, missing defines
-Vault13 - WAYPNT.SSL : does not compile (it's an include file only)
-ANIMTEST.SSL - the msg seems missing, would have been interesting to try [note: fire continuously may require a flamer]

Warning fixes:
-Abbey - abhank.ssl : commented out two dupe LVARs that were unused (i.e. the RP int used the same LVAR (4) for two different checks) - edit: actually this was working correctly (fluke; the LVAR (4) was never 0 so it always called 101), so I also swapped the lines around (101 when LVAR 0, 100 when not, after this it's set up correctly (description when 0 (101), name when 1 (100)) and there is no change in behaviour) [tested & works]
-Abbey - abhealer.ssl : fixed some Low IN options
-Abbey - abtom.ssl : commented out the dupe define for LVAR_Flags that was unused
-Arroyo - ATSRTRPC.SSL : removed (CUR_SCRIPT) from (create trap after a companion failed to disarm critically) [edit: funny enough the 2.3.3 int did not had this bug, only the ssl...] and changed (disarmed to depressed) when (the player failed to disarm critically) - after this (use_skill_on) of (ATSRTRPC) is now identical to (ATSRTRPA & ATSRTRPB, plus all other arroyo traps) which should be correct (also a bug fix)
-Den - DCORPHN2.SSL : fixed floater to float_rand (twice) : could also have used floater(random(x,y)) (also a bug fix)
-Den - DCPETEY.SSL - script redefines two timers from Den.h : RP 2.3.3 int used the header defines, so I changed the script to do the same (skips warning) - bit messy though, could also rename the defines (Petey_float/Petey_wander) or comment the two out (only use header), but the latter would still be a break in sequence - detail anyway
-Den - DCSLAVE.SSL : fixed a Low IN options
-Enclave - QIPZLDOR.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Enclave - QITURTRM.SSL : replaced look_p_proc with the correct one (also a bug fix)
-EPA - EPAc19.ssl : fixed the attack command (twice)
-EPA - (several) : replaced drp_proc with the correct one [this may have been disabled on purpose...although I'm not aware of any issue this can cause, still the scripts in question are: (EPAc14, EPAi4, EPAi6, EPAi7, EPAi8, EPAi10, EPAi11, EPAi12, EPAi16, EPAi17, EPAi19, EPAi22, EPAi25, EPAi27, EPAi28, EPAi34), in case the drop_p_proc needs to be removed, but it's an empty proc in all cases and if the object doesn't call it, it just doesn't call it]
-EPA - (EPAi15, EPAi18, EPAi24) : replaced enter_p_proc & update_p_proc with the correct one (also a bug fix), may need to check, especially EPAi24 which is now triggering timed event (edit: is EPAi24 even used?)
-Gecko - gcenc.ssl : fixed the attack command (twice)
-Gecko - gcenc2.ssl : fixed the attack command (twice)
-Headers - ArtFid : disabled the first define for (FID_MACYBR) as scripts should default to the second one... however, this is a legitimate dupe in critters.lst (prototypes use either - cyberdog stage 1 to 4 uses the first (286) the others the second (291))
-Headers - define.H : put the defines for dude hair in brackets so even when commenting them back in (NCSTULIT, FCDRAGON, FCLOPAN) it won't trigger a warning
-Headers - ExpPoint : disabled the second define for (EXP_CURED_FANNIE), note: the RP 2.3.3 int file assigned 1000 XP
-Headers - DepoLvA.H : Added three MVARs (210,212) from DepoLvB to allow Sierra scripts to compile using only either header*
-Headers - DepoLvB.H : Added a long list of MVARs, Defines and Macros from DepoLvA to allow Sierra scripts to compile using only either header*
*Notes: the current fix removes the spam of 500 warnings and also avoids that a script compiles with the wrong MVARs (which happened in 4 cases; and the repair feature
started to fail when using compiled 2.3.3 source). These fixes may seem scary but I double-checked the decompiled int files and they are identical. I also tested it a
bit in-game, worked fine. Still, this could be cleaned up more - but it's a start [see "RP_Mod_2.3.3x" for notes]
-Maps - epa1.ssl : commented out the re-define of create_car
-Maps - DEPOLVB.SSL : removed the included DepoLvA header (see headers fix for DepoLvB.H)
-Modoc - MIJERKY.SSL - had no start proc...? Int does exist in RP, but not listed in lst. Added one (to skip a warning)...
-Modoc - MIJOSHLF.SSL - had no start proc...? Int does exist in RP, but not listed in lst. Added one (to skip a warning)...
-Modoc - (midavdor.ssl, midoor.ssl, mimirdor.ssl) : commented out the TIMER_CLOSE define, as all three 2.3.3 int files used the header define, although it really could remove the header define (modoc.h) and let the scripts be
-NCR - SCWESGRD.SSL : removed self_object from animate_rotation (twice) (also a bug fix)
-NewReno - NCBAND.SSL : slightly adjusted the commenting out (in timed event & map enter) as not to mess with the editor
-NewReno - NCPITBOS.SSL : commented out the dupe define for LVAR_Family that was unused (in the 2.3.3 int)
-NewReno - NCSTULIT.SSL : commented out the re-defines for dude hair (all dupes of define.h)
-Umbra - tribec1.ssl : fixed (several) Low IN options
-Redding - RCFITRAT.SSL : replaced look_p_proc with the correct one
-Redding - RTCAVN1.SSL : had no start proc, added one
-SanFran - FCDRAGON.SSL : slightly adjusted the commenting out (in safedestroy) as not to mess with the editor & commented out the dude hair re-defines (all dupes of define.h)
-SanFran - FCKENLEE.SSL : fixed a Low IN options
-SanFran - FCLOPAN.SSL : slightly adjusted the commenting out (in safedestroy) as not to mess with the editor & commented out the dude hair re-defines (all dupes of define.h)
-SanFran - FSCHESTA.SSL : slightly adjusted the commenting out (in node005) as not to mess with the editor
-Sierra - WCBRNBOT.SSL : removed the included DepoLvA header (see headers fix for DepoLvB.H)
-Sierra - WCREPBOT.SSL : removed the included DepoLvB header (see headers fix for DepoLvA.H)
-Sierra - wcrpbot2.SSL : removed the included DepoLvA header (see headers fix for DepoLvB.H)
-Sierra - WCSCBOT2.SSL : removed the included DepoLvA header (see headers fix for DepoLvB.H)
-Sierra - WIELVDOR.SSL : replaced look_p_proc & use_skill_p_proc with the correct one (also a bug fix) and removed the included DepoLvA header (see headers fix for DepoLvB.H)
-Sierra - WIHOWITZ.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Sierra - WIRETSCN.SSL : removed the included DepoLvA header (see headers fix for DepoLvB.H)
-Sierra - WISCRTDR.SSL : removed the included DepoLvA header (see headers fix for DepoLvB.H)
-Sierra - WSTERM2B.SSL : slightly adjusted the commenting out (in declare procs, define of LVAR 1 & 2 and node001a & node001b) as not to mess with the editor
-Sierra - WSTERM2C.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Sierra - WSTERM3A.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Sierra - WSTERM3B.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Sierra - WSTERM3C.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Sierra - WSTERM4A.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Sierra - WSTERM4B.SSL : replaced look_p_proc with the correct one (also a bug fix) and added a check that allows to use the global.h defines for the brains [tested]
Note: this has still bugs, though (i.e. the change from "in party" to "pid" has problems as it detects dead bodies), but not because of my added check.
-Sierra - WSTERM4C.SSL : replaced look_p_proc with the correct one (also a bug fix)
-Vault City - VCCURTIS.SSL : slightly adjusted the commenting out (in destroy proc) as not to mess with the editor
-Vault City - VCSTARK.SSL : slightly adjusted the commenting out (of node 58 & 59) as not to mess with the editor
-Vault City - VIALOCOM.SSL : replaced look_p_proc with the correct one (also a bug fix)
-General: Removed (party background) from scripts that don't use it (Abbey.ssl, HiChaddr.ssl, Abbey folder (several) and EPA folder (several))
-General: Turned (checkPartyMembersNearDoor) from a global proc into a macro (in party.h) and added it to the scripts that needed it: Generic (ZILCKDOR.SSL, ZIMTLDOR.SSL, ZIWODDOR.SSL), Modoc (MiDavDor.SSL, MIDOOR.SSL, MiGate.SSL, MiMirDor.SSL), NCR (SIVDOR.SSL), Raiders (IILOCKDR.SSL), Redding (RIJALDOR.SSL, RIVLTDOR.SSL), SanFran (FcShngD2.SSL, FcShngDr.SSL), Sierra (WIBAYDOR.SSL, WIBAYDR2.SSL, WIBNKDOR.SSL, WILV1DOR.SSL), Template (DOOR.SSL), Vault City (VIVLTDR2.SSL, VIVLTDR3.SSL).
-General: Turned (getTimeBit) from a global proc into a macro (in V13.H & V15.H) and added it to the scripts that needed it: Vault13 (OCARIEL.SSL), Vault 15 (BcJohn.SSL, BcRebecc (set up only), BcSara.SSL).
-General: minor fix to the commented out top line in : Abbey (abjunk.ssl), Broken Hill (hicdshlf.ssl), Enclave (QINUKE.SSL), EPA (epai3.ssl, epai29.ssl to epai33.ssl, epai35.ssl to epai44.ssl, eplkr.ssl), Gecko (GIWELL.ssl), generic (itmnodrp.ssl, PATCHINF.ssl, PEEING.SSL, ZISMOKE.SSL), hubstash (hicontnr.ssl), klamath (KIVICDOR.SSL), Maps (epa2.ssl), Navarro (CISACTRL.SSL, CIVERTI.SSL), NCR (SIMRKSTR.SSL, SIRNGMAP.SSL), New Reno (NCVERTI.SSL), Umbra (tribei1.ssl, tribei2.ssl), SF (FCSUBHAT.SSL, FCSUBPWR.SSL, FCSUBTAR.SSL, FCSUBTCO.SSL, FCSUBTOR.SSL, FSSUBDR.SSL, SFMBOAT.ssl), SlvCamp (slvco1.ssl, slvco2.ssl, slvco3.ssl), ValtCity (VIWELL.SSL). Detail, but... [Note: if not wanting the editor to include the info box, then extend the first comment to include it.]
-General: Added a supplemented line (end of input) in every script the editor complained about - basically all 1700 of them -.-

NOTE: the fixes of "redefines" is often cosmetic (just removes a warning) but occasionally helps with bugs/errors. For example, RP scripts usually used the first define listed (and ignored the following redefines), while the editor I used did it the other way round (only used the last define), which in several cases resulted in bugs and errors (e.g. the XP for curing Fannie or the repair function in the SAD). So removing those warnings for redefines (see above) should also help to get better consistency when compiling (no matter the tool used). edit: in the case of declared procs (duplicates) it seems to be the other way round, RP uses the last, the editor (I used) the first.
NOTE: removing global procs also removes issues with finding lines or including new declared procs correctly. Seems included (global) procs create a conflict with lines, like an overlap, and the editor cannot determine exactly anymore where something is or not. Scripts w/o included (global) procs behave generally better. Anyway, if you see strange behaviour, like a declared proc popping up at a weird place, or a highlight function (right panel) not working, it's usually caused by included (global) procs. The only exception I found to this is the NewReno global proc (not sure why... could be the way it declares the proc?).

Other:
-Abbey - Abbey.ssl : map script, got moved to Maps folder : also updated code to proper macro (this (setting proper macros) made a change to the light levels as RP changed the defines), and I commented out the includes and locals not needed in a map script
-Abbey - atribal.ssl : commented out a dupe LVAR
-Abbey - general : minor updates to proper macro (mostly naming items), in one case I changed a check to "Dude_is_Stupid" (ACompu) which changes a check from <4 to <=3 which is identical but will show a difference (rest checked if it still compiles identically)
-EPA - EPAc10 : removed the included header dupe (EPAsl), order is now the same as in EPAc11 & EPAc12 : removed the double calling of the msg string in node18 & node45 (two lines each), was probably fine either way..., anyway, will show up as a difference.
-EPA - general : updated several scripts to proper macro, in the case of (inc_good_critter) I had to comment out the Town Rep GVAR (but it wasn't set anyway, so no change) (checked if it all still compiles identically) : note, the update to (inc_good_critter) will now take macro changes into account (karma beacon etc.)
-Gecko - GcBrain : changed some of the code into proper macro (checked if it compiled identical)
-Generic - ANIMFRV2.SSL : removed as it was an unused test version
-Generic - ZiWodDor.ssl : added a ifndef to allow KIVICDOR to redefine the Lock_Bonus.
Note: this Wood Door script is a bit of a mess and could get fixed more... see map_enter which is missing setting the locked status (just unlocks) etc...
-Headers - ItemPID.h : adjusted item 499 to its correct name - just as a test to see if any script complains - edit: one macro (set_compartment) used it
-Headers - NewReno : adjusted "PID_DERMAL_PIP_BOY_DISK" to "PID_PIP_BOY_LINGUAL_ENHANCER" in the "set_compartment" macro (see ItemPID.h adjustment/experiment)
-Headers - UpDatMap.h : changed the define for the Abbey Car Hex to the one used in abbey.ssl
-Hubstash - hubstash.ssl : map script, moved to Maps folder
-Klamath - KIVICDOR.ssl : added a Lock_Bonus to emulate the 2.3.3 int (required a fix to ZiWodDor)
-Maps - EPA2 & EPA3 - removed a \ at the end of the GVAR 27 check (both scripts) - which in the case of EPA3 also removed (erroneously) the override when compiling.
-Maps - general : minor updates to proper macro (checked if set still compiles identically)
-Modoc - McBess : I commented out the use obj on fix (for Doctor's Bag) and emulated instead the 2.3.3 int file, as it seemed to work better - tested & works
-NCR - ScWestin : the DoExplosiveSequence proc was declared twice (since 1.02d), disabled the dupe
-NCR - siptbox2.SSL : rebuild the script based on (SIPTBOX.SSL), which makes an addition (super lockpick), else it's identical, script is used on NCR Entrance and existed as int but was missing in source - should be functional, not tested if anything uses the box
-SanFran - FSEMPEMT.ssl : changed the force field tile to 17448 and elevation to 0, same as in the 2.3.3 int : this is used on sfchina2, and the change occurred as RP changed the map, 17468 & 1 is 1.02d
-SanFran - removed (FEMP_FCOZ7, FEMP_FCSUZE, FEMP_FIGUNTBL and FEMP_FSEMPEMT) as they were old and unused versions
-Template - Talk.ssl : expanded the critter proc check as not to render the Hostile states (1 & 2) irrelevant
-Vault City - VcConnar, VcHarry, VcMcLure, VcStark : changed some of the code into proper macro (all compiled identically, checked)
-VillOut - general : minor updates to proper macro (checked if it still compiles identically)
-Commented out unreferenced imported variables from : (HCMANSON, HSPURIFY, DCRUNSLV, epai23, MCKILDOG, MCFARREL, SCCGTGRD, SCDTHCLA, SCGGCAP, SCHENRY, SCMERK, SCVORTIS, NCHSGSAL, NCHSPOW1, NCHSPOW2, NCHSSAL1, NCHSSAL2, NCJIMMYJ, NCRNGGRL, NIHSCRAT, NITRYBOX, NSVERTIB, ECSPAMMR, FCBADPEA, FCDRSHNG, FCGUDPEA, FCKENLEE, FSEMPTER, slvcc4, VCSTEVE, BCKARLA). [Note: this is a detail but unreferenced imported variables mess with decompiled scripts; it can't name the variables]
-General: After removing (party background) (see warning section) added it [but commented out] to every script listed in party.txt (CCFAK9.ssl (probably superfluous; only needs one bg), CCK9.ssl, DCVIC.ssl, ECDOGMET.ssl, ECPARIAH.ssl, ECPDOG.ssl (probably unused), epac10.ssl, epac11.ssl, epac12.ssl, GCLENNY.ssl, HCMARCUS.ssl (no change), KCSULIK.ssl (no change), MCBESS.ssl (currently superfluous), MCDAVIN.ssl, MCDTHCLW.ssl (probably superfluous), MCJONNY.ssl (currently superfluous), MCKARL.ssl (currently superfluous), MCLADDIE.ssl, MCMIRIA.ssl, NCLLOYD.ssl, NHMYRON.ssl (no change), OCGORIS.ssl (no change), SCROBO.ssl, VCCASIDY.ssl (no change), WCBRNBOT.ssl : excluded: CCXARN.SSL, ZICRTRNK.SSL), not sure this was necessary, but I liked to mark the companion scripts as such - makes no difference anyway (to the compiled script), so no harm done - still, changing background based on area only makes sense in these (companion) scripts.
-Removed the pickup proc global and replaced it with a macro in the scripts that used it: Broken Hills (HcChuck, HcElmo, HcHench, HcLumpy, HcMicky, HcOldGhl, HcProf, HcScorp, HcSeymor, HcSulvan, HcTyphon), Den (DcAnan), Gecko (GcPercy), NCR (ScBGrd, ScCarGrd (fixed typo in LVAR), ScCarKid, ScCGtGrd, ScCop, ScPeaon, ScWesGrd), Random (EcBdyGrd, EcMel, EcSpammr, EcTinWod, EcWash), San Fran (FcChip, FcDaveH, FcDJosh, FCDocKid, FcDocSqa, FcDrWong, FcFMatt, FcKenLee, FcLaoCho, FcMarc (this also changed the local for "NPC_REACTION_VAR" from (8) to the correct one (7)), FcNLuke, FcRocMan, FCRonMey, FcSuze), Sierra (WcDedBot; commented out), Template (Talk; template), Vault13 (OcAriel, OcBabdth, OcDalia, OcDar, OcDave, OcGordon, OcGrunt, OcGrutha, OcJimmy, OcJoseph, OcJul, OcKerith, OcMatt, OcSandy, OcThearn, OcValdis (fixed typo in LVAR)), Vault15 (BcBill, BcBrahmn, BcCrissy, BcDalia, BcDarDog, BcDarion, BcGenGrd, BcJohn, BcJones, BcKarla, BcPhil, BcRebecc, BcRobert, BcSara, BcZeke). See NOTE below.

[Basic clean-up, no point in listing every (cosmetic) detail (i.e. automatically/manually removed spaces). As long as it compiles identically (within reason) to the 2.3.3 int files, and it does (main code that is, see compiling notes below for a full run down of differences and header adjustments). Anyway I tried to resists "cleaning" but did it here and there. Mind that the removing of spaces was done automatically by the editor.
EDIT: I moved all the "begin" of procs, this is how the original Fo2 scripts did it, besides, it caused a problem with the editor who couldn't always tell where a proc begins or ends. Not sure this was necessary, but it seemed cleaner this way.
NOTE: the removal of the pickup proc global (into a macro) does not remove any warnings but made the scripts cleaner. Some editors wouldn't declare a pickup proc (as define.h had already declared one) and worse, the moment I tried to code anything in these scripts it instantly crashed the parser. I also took the opportunity to make the defines a bit cleaner, there could be more done, but that's another step. NOTES: if enabling (LVAR_Hostile) make sure it does not set the critter to attack as that should only be handled by the macro (caught_pickpocket), especially critter that warn or flee should not be made to attack at the same time. Still it probably needs to decide from script to script how the critter should "remember" a pickpocket attempt and react to it.]

MOD FOLDER
[Errors I found between the auto-installer versions (full & compact)]
-HcLiz (full) was just an outdated script (missing moving inventory and outdated header), while HcLiz (compact) did not disable Dogmeat's armour
-AbBill (full) was just an outdated script (missing pickup proc), while AbBill (compact) did not disable Marcus's armour
-Others were outdated (EPAc11, EPAc12) (both missing game_time advance) and/or had outdated headers (EPAc11, NcStuLit, NhMyron) but enabled/disabled correctly.
[Next, I created a MODS folder with a copy of every script that has an "installer option" : the scripts inside the MODS folder have the options enabled, while the version in the Location folders have the mods disabled. I also added comments to the scripts to make enabling/disabling easier. The idea is to only update the Location folders (ignoring the mods folder), then (before publishing) check which scripts are in the mod folder, replace them with the newer version from the location folder and enable the mods following the instructions... maybe this makes updating easier, as it only needs to fix one script, and then just create a copy of it and enable whatever mod is required in that copy.]
[Changes]
-I marked the sections for the Vault Boxer Appearance Mod in NcStuLit, FcDragon & FcLopan. This required to move the (start_boxing_match) macro from NewReno.h to NcStuLit.
-I marked the sections for the Armour Change mod in (DcVic, EPAc11, EPAc12, KcSulik, NhMyron, VcCasidy) and also updated the code to proper macro.
-I marked the sections for the Marcus & Dogmeat armour in (AbBill & HcLiz).

Compiling Notes:
[changes between the compiled source and the 2.3.3 int files]
Binary differences:
-several int files (about 45) are different, but decompiled they are identical : not sure why?, could have been very old (and possibly unused) scripts compiled with a different compiler... nvm, doesn't matter anymore [i.e. after removing global procs this has become irrelevant as all scripts will be different now, and if it's only the missing checkPartyMembersNearDoor proc].
Header differences caused by:
-inc_good/evil/neutral_critter (the karma beacon fix was not applied in several scripts)
-the redefine of light level (see UpDatMap) was not applied to Abbey, Hubstash & ZiSunSpt
-the time unifying of the (day) & (night) defines (see command.h & condition.h) was not applied in several scripts
-the change to (clear_family_flags, see NewReno.h) was not applied to many scripts (but it was in all where it mattered) [the most outdated was NcWriDog which had even an increased Town Rep bonus for killing a NR boss, looked almost like a test script as that was never +1 TR but always -25.]
-Party Background was not updated in many scripts but none of them used it
-Party Member Near Door was not updated in many scripts but none of them used it
-The fix to (move_to_point, see command.h) was not updated in several scripts (McButcher, McSlag, NCExSpou, NsHsgSal, NcWriDog, ZcSlave, etc...)
-Changes to the included (ZiLocker) script and (ZiWodDor - which is included through DiDoor etc.) script - (some of these are (minor) bug fixes)
Script differences (2.3.3 int to 2.3.3 ssl output):
Changes made By killap: 2.3.(4?) (source):
[I believe all of this is sound (i.e. 2.3.4) - however, as the 2.3.3 ssl is different to the 2.3.3 int, it needed checking which version was more up to date/improved. It was usually the ssl, but there were excpetions (see McBess and HiChadDr). All of the following changes must have been made by Killap]
-Arroyo - ascrldr.ssl : fix to only trigger damage proc when damage is explosive
-Broken - HcFranci - removed Lvar1 from talk_proc, can't tell what it was or for, seemed unused anyway...
-Broken - HcScorp - moved a line from the addition (of which it wasn't a part) to after it - detail
-Den - DcBlkJck - fix to the floater in node000 of (ZiBlkJack), bc the macro didn't compile correctly (I think)
-Den - DcOrphn2 : source increased the timer from (150,250) to game_ticks(30,45), now only the map enter one is (150,250)... not sure... need to see in-game, could be fine
-Den - DcSlave - (timed_event) adjusted from ("map_next_tile" to "30302") : [this seems to change the tile from 32304 to 30302...good idea?], plus it checks tile_distance now instead self_tile... probably just a detail... could get tested to see which is better/more up to date
-Den - DiChcDor - had some adjustments not included in the RP 2.3.3 int file. (check_unlock_door got cleaned out - fine) & (map_update_p_proc got added to define object - which may be a small bug... as it removes using the original map_update (now def_map_update) of the script which is a failsafe to make sure a door never locks itself, although that never happens if the door is properly scripted... so it should be fine)
-Generic - ZiSmoke - fix to check for 1 or more lighter, not exactly 1
-Maps - Arvillag : adds a new move_to command (map_enter) which adjusts/improves starting position when entering via town map only : does not overwrite exit grids and being in map_enter means it won't trigger on elevation switches - fine
-Maps - bhrnddst.ssl : adds (cattle_drive(HAL_DEAD)) to (build caravan team)
-Maps - epa3.ssl : the ssl commented out the GVAR 27 check (GVAR is set to 12 by EPAs1 but that script [EPAs1] may not be used anymore).
-Modoc - McJonny.ssl : removed the redundant childkiller check
-Modoc - MiShtRks.ssl : enabled the setting of GVAR 491 (line was commented out in 1.02d), and the script was never added to RP either - works, though, tested it [edit: has a couple of other bugs though, mainly that the player can survive the scenario, which should not happen once 491 is set]
-NewReno - NCPRZFTR.SSL : fix to the misspelling of (boxbell2) in the (end_boxing_round) macro of the NewReno header
-NewReno - NiMcgSlt.ssl : adds a use_obj_on proc allowing to use a tool to fix the machine - not tested
-Redding - RcJane : the exit line (in node016) now goes to node999, not node016d, which makes sense (going by msg) but it means that nothing uses node16d anymore - ?
-SanFran - FcDJosh & FcNLuke : both swapped the nodes around in talk_proc - however, I didn't like it and fixed it differently - in detail: I replaced the dude_level checks with checks that reflect progress better (it now checks the state of the topics the dude can ask Josh/Luke about, i.e. Vic & V13)
-SanFran - FcFemPnk & FcMalPnk : both increased the timer from game_ticks(5,10) (RP Mod) back to game_ticks(20,30) (1.02d) - ? - maybe 5,10 on map enter, then 20,30 ?
-SanFran - FcGunMer & FcLaoCho : both added the self_obj define also to map_enter and map_update (new proc), as many scripts do as a precaution
-Template - (Emitter & FFeild) : the MVARs changed as RP changed the header file, nvm - template only
-Vault13 - OcMatt : declared map_update proc (which was undeclared) and got moved as a consequence
By me (does NOT include repetitions from the above, i.e. warning fixes):
- ... - and "'twat's all repetition, sire."
By newfangled technology:
-Den - DCSLVRUN.SSL : fix to critter proc (which now uses the (Flee_From_Dude) macro from - v1.0... -.-)... just a change as RP never compiled this script and the master.dat version is that old - is this script even used?
-Redding - RCDRJOHN.SSL : adds brackets after every (call nodexxx;) check now (old 1.02d omission), no idea why it does it suddenly... old int versions (including the RP 2.3.3 one) did not add the brackets, but they are present in other scripts, like RcBette, and there is no difference as far as I can tell... no idea why it adds them on compiling usually (i.e. w/ RcBette) but skips it for others (i.e. RcDrJohn (& ScEnlOne))... until now - odd
-NCR - SCENLONE.SSL : see RCDRJOHN.SSL, same thing
-Concerning/odd : there are four scripts that compile differently (dcCraps.ssl (see zccrpdel), ocGoris.ssl (NodeUnset3), scfelix.ssl (node004a) zccrpdel.ssl (NUMBLOCK)). I don't know why? The checks are (bwxorlvar, V13.h) and (bwxor, zccrpdel.ssl) - I'm not enough of an expert to tell if this is fine, only that it compiles differently (to the RP (but also 1.02d) versions)... needs testing & checking.



NOT FIXED : more complicated : needs more time
-BrokHill - HcMarcus - the addition of Newr1.h (0) re-defines the (unused!) Made_Car map variable of broken1.h (14)... not sure... could add ("if not defined then" to Newr1) or comment out the Newr1 header and only define the one MVAR (2) it uses in script... not sure what is best - especially as it's currently unused - so what is wrong/right?... messing with the header seems wrong (just to remove a no-effect warning), but so is setting an exception in HcMarcus script (i.e. if modder assumes the Newr1 header applies to companions then it should) - bit tricky either way
-Den - DCATKSLV.SSL - gives a warning, not sure why, when pasting the macro into the proc it's fine... maybe it can't handle the macro inside the macro?
-Den - DCRNSLVR.SSL - gives a warning, not sure why, when pasting the macro into the proc it's fine... maybe it can't handle the macro inside the macro?
-Headers - CVGENENC.H - warnings could be an include order issue? - but compiles fine [the caves scripts could add these procs as macro?]
-Headers - NEWRENO.H - warnings (in h) could be an include order issue? - but compiles fine [check if global proc and how many actually need it : it's not only porn name and mobster names, is it? actually this global proc, for some reason, gets no (not referenced proc) warning when included in scripts... prob. because it references itself...]
-Headers - PARTYBKG.H - define for symbols, could be because it's a global or an include order, not looked into yet - compiles fine
-Klamath - KCSULIK.SSL - (same as HcMarcus) : the addition of Newr1.h (0) re-defines the (unused!) Made_Car map variable of kladwtn.h (15)... not sure... could add ("if not defined then" to Newr1) or comment out the Newr1 header and only define the one MVAR (2) it uses in script... not sure what is best - especially as it's currently unused - so what is wrong/right?... messing with the header seems wrong (just to remove a no-effect warning), but so is setting an exception in KcSulik script (i.e. if modder assumes the Newr1 header applies to companions then it should) - bit tricky either way
-Modoc - the warnings for MiMirDor and MiDavDor I can fix by using my script and set it to no lockpick, rather than commenting it all out. But that's a bit of a job.
-NewReno - NIWRT2LK.SSL - needs to redefine, maybe ZiLocker could change to ifndef, as that's apparently an option scripts need [note this redefine does not seem to work, gets ignored : to work it must set ifndef in ZiLocker and NiWrt2Lk must define it before the include : however, fixing this will change the behaviour - MUST TEST]
-Vault13 -OcMatt : the editor sets a proc with skipping the variable name (for q1 & q2), could remove and just name them variable, either way makes no difference to the int : there are other ssl files that do that too - keep as something that can be done or clean up?


The remaining warnings are "not referenced" notes (especially node998 or node999), however, removing those is generally not a good idea (set up for later additions or restorations), but some could... like initial inventory in map scripts (which is a copy & paste remnant from the Arroyo map script).



Next:
-Check if some "not referenced procs" warnings are copy & paste garbage (initial inv) etc. AND if some are bugs (and should be used)
-Add my door script to fix em all - but that would probably need a full set of decompiled scripts to check for bad changes... best use the above fixed set, make changes and then compare the two sets with each other, see what doors have adjusted badly. - May even create a new system that has all doors & boxes default down to a single script (door.ssl and containr.ssl) that way it would work like a macro and only ever one ssl needs to be changed to apply bug fixes or adjustments to the basic door/box behaviour.

Next:
-Add armour mod for Davin, Miria, Lenny (can't; items on handslot), Dex. (only PA & CA)
The full changelog can also be found as a txt in the source folder. Please note that the above is foremost a documentation for my own sake (I need that to memorize) and only secondarily a manual for others. However, it's fairly concise, I think, just long.


The following are a few points of interest if wanting to work with the RP source (especially the first two you may want to be aware of):
1. Redefines: There are several redefines of variables and names all over the source, which all triggered a warning. This was mostly just cosmetic/inconvenient, but when I compared the output to the int files it turned out that a few scripts actually compiled wrongly. It seems killap's scripts always used the first define (of a redefine) while the tool I used always used the last one. This created some errors (e.g. XP for curing Fanny Mae became 500 XP when it was supposed to be 1000) and some bugs (e.g. the Sierra Army Depot repair-bay function stopped working, as the scripts compiled with the wrong MVARs). This is something I probably wouldn't have noticed if not for comparing the decompiled 2.3.3 int to the decompiled 2.3.3 source output. However, after fixing all the warnings (for redefines and dupes) the source I've linked above should always create the correct output no matter what tool you use.
2. The pickup_p_proc global always caused problems, like in some cases (depending on tool) blocking the declaration of a new pickup proc, but even worse, I found that any script including the global pickup proc would crash the parser the moment I tried to script anything. To code in these scripts, I had to uncomment the "#define NPC_REACTION_TYPE" line, then code what I had to (avoiding the parser crash) and then comment the line back in (to include the global pickup proc again). Anyway, the source linked above has removed the global proc and replaced it with a macro. It does not fix a warning but it seems cleaner this way. Anyway, if you use 1.02d or the original RP source, mind that scripts with "#define NPC_REACTION_TYPE" may crash your parser.
3. I found that the RP auto-installer (full vs compact) makes an error (regarding Dogmeat/Marcus armour) when installing. The scripts in question don't toggle the option on/off but are only a new/old version of the same script. That said, a RP install with "Marcus/Dogmeat armour" disabled has the more up to date script, just no frms (so they turn invisible should you buy the armour), while the full version is missing a few fixes (nothing dramatic, arguably). Other full/compact scripts, albeit toggling correctly, were outdated too (regarding headers, code etc.). In general the compact (or manual) install had the more up to date scripts (just didn't toggle the (unsupported) Dogmeat/Marcus armour option). Anyway, this "conflict of keeping all the different versions of s cript up to date" was one reason I added a "mod" folder and cleaned the scripts up a bit. Should be easier to keep updated now. [edit: the idea is to only update one script (the one in the location folders), then check the mod folder, and create a modded version of every script inside it, which shouldn't take more than to copy & paste the updated script, use ctrl+f and enable the marked sections... this should make it (at least a bit) easier to stay on top.]
4. Bug Fix: Detail, but I made one more advanced change to the BoS characters in Den & NCR (FcDJosh & FcNLuke). Mostly as the 2.3.3 source made a change (not included in the int, btw) that made no sense to me... and I had to make a decision on what to do with it. [edit: in all other cases the changes made by the source were sound, btw, these two were the only exception.] Anyway, in the original (1.02d) & (RP) the check is PC level only which I've replaced with status checks based on the questions the player can ask. So in the Den the player can talk until "Vic is free or V13 known" (that's the question the dude can ask in dialogue) (instead being lvl > 4) and in NCR until "V13 is known" (ditto) (instead being lvl > 9). I think that's better especially as RP (by adding the Umbra tribe etc.) changed the progression and in most cases the player was above the checked level before entering the Den or NCR. And in any case, a status check on quest progress (Vic or V13 else get send to NCR/SF) should be more precise than PC lvl; which, tbh, was never a good check for this, never liked it.

That's all of interest... I think. Rest is details of stuff I've found while deep-diving into scripts (like John at V15 has a full animation set that only starts when it's precisely 8.00 – which makes me wonder if many people have actually seen it... [note: you can enter V15 rest till 8.00 then rest in steps of 10 minutes to fast forward to the next animation (aka timed event), eventually he walks around, throws rocks and falls over oddly) and so on.]
Maybe I'll try to put together a full modernized RP (including sfall (new), mod folders (so the expansions can be toggled w/o re-installing every time, which I find inconvenient), source (as above)) and post a link for those who want to play killap's mod with minimal changes but don't feel comfortable updating sfall themselves.

Updating Sfall (in passing)
Updating sfall can be really difficult if you try to merge 3.3 into 4.4.4 (for example) [i.e. tons of differences and massive changes of order] but becomes very easy when you compare 3.3 (RP) to 3.3 (default) first, and then make the changes in 4.4.4 – which is a good tip in general – however, you would need to find an original 3.3 ddraw.ini first. I got one from Drobovik's archive – which is very hard to navigate but very complete. Unfortunately, it's not updated since 2017 (I think), which means the past 8 years are possibly a black hole. [that's when I joined, actually – must be true then...]
On the other hand, updating sfall is never inconsequential, as it basically means to change the rulebook. I believe the sfall team tries to avoid compatibility issues, and it's fairly safe, but there's always a chance that scripts written for one version may not behave the same in another. [Btw, I did had scripts change behaviour once [change was from 4.2. to 4.3.7], which is why I don't try to fix engine issues in script – that's just a long-shot bug, imo.] Anyway, if being honest and doing it properly changing the engine requires a full play-test each and every time (which is another time sink). Especially when making a jump over several versions. I don't believe you can ever really know – there are too many variables, in the end you always have to test it).


ANYWAY, if someone wants to mod RP 2.3.3, you may use the source linked above. You may find it a bit cleaner and easier to use OR use the original and when you encounter any warnings or errors you may check my changelog and maybe find a fix (or issues to be aware of).


I also may continue working on this : most interesting would be (as mentioned in the txt) to rewrite every door and container script to default down to only one door/box script. Which I can do (skill wise) but it would be a bit of a job (probably a month or two, maybe more). However, it would mean that any bug fix would only need to be made to one script rather than (best case) 3 to 5 door scripts as it currently is.... would be an option to include some of the fixes... like bugs, corrections or stuff like NPCs (including companions) being able to disarm traps on doors. However that may turn out to be a much bigger undertaking once the details come rolling in – it definitely would take some time. [In my experience such undertakings always have to be done twice : first time around you stumble into all kinds of troubles and need to adjust – second time around you have a plan and roll it up. And currently I'm not entirely sure what that plan could look like or what makes most sense etc... I just like the idea.]
It may also fix more warnings by checking if not referenced nodes can be removed from a script. For example the "initial inventory" node in almost every map script is a copy & paste thing and can be removed.


And so on... there's always more. But that was roundabout everything of interest (I think), i.e. all the bigger problems I ran into and had to figure out.
 
Back
Top