subtledoctor Posted February 1, 2022 Share Posted February 1, 2022 As I'm putting the final polish on the amazing new revision of my NPC customization mod, I am confronting the fact that NPC customization just does not work well with dual-class NPCs. So I will have to give some special treatment to dual-class NPCs at install time. Right now that means I need to make extra mod components for Imoen, Anomen, and Nalia. That's all I can think of off the top of my head. Does anyone here know of mod NPCs who are dual-classed? Any of them that I can add to the list will get a bit of special treatment to work better (read: 'at all') with the customization options. All information is much appreciated! Quote Link to comment
ahungry Posted February 1, 2022 Share Posted February 1, 2022 Is there a weidu snippet that could locate this? I just did a big install with probably 30+ npc/quest mods installed - if I could run some type of scan on my override dir and print out each match if the dual-class bit is set? (Assuming there is a dual class bit) Quote Link to comment
subtledoctor Posted February 2, 2022 Author Share Posted February 2, 2022 (edited) 17 hours ago, ahungry said: Is there a weidu snippet that could locate this? I just did a big install with probably 30+ npc/quest mods installed - if I could run some type of scan on my override dir and print out each match if the dual-class bit is set? (Assuming there is a dual class bit) Sure. Something like [ whoops, this was wrong, see a few posts below ] I think that should do it. Copy the output before the Terminal window closes and paste it into a text document or a forum post. EDIT - huh, that doesn't work. Hang on, I'll figure something out... Edited February 2, 2022 by subtledoctor Quote Link to comment
Endarire Posted February 2, 2022 Share Posted February 2, 2022 I don't recall the mods, but Yoshimo and Hexxat have dual options. Quote Link to comment
ahungry Posted February 2, 2022 Share Posted February 2, 2022 Klatu tweaks can give Hexxat an inactive fighter class. Quote Link to comment
J Beau Posted February 2, 2022 Share Posted February 2, 2022 Amber is dual if I remember correctly. Quote Link to comment
subtledoctor Posted February 2, 2022 Author Share Posted February 2, 2022 (edited) Fixed the code to detect this: //JOINABLE NPCS ARRAY MACRO__________________________________________________________ // DEFINE_ACTION_MACRO JOINABLE_NPC_ARRAYS BEGIN //PDIALOG.2DA exists in all games ACTION_DEFINE_ASSOCIATIVE_ARRAY JOINABLE_NPC_ARRAY_2da BEGIN ~PDIALOG~ => ~~ END //Check PDIALOG.2DA file variants referenced in CAMPAIGN.2DA ACTION_IF FILE_EXISTS_IN_GAME ~CAMPAIGN.2DA~ BEGIN COPY_EXISTING ~CAMPAIGN.2DA~ ~CAMPAIGN.2DA~ COUNT_2DA_ROWS 32 "cntrow" FOR (i = 0; i < cntrow; i = i + 1) BEGIN READ_2DA_ENTRY i 11 32 file TO_UPPER file DEFINE_ASSOCIATIVE_ARRAY JOINABLE_NPC_ARRAY_2da BEGIN ~%file%~ => ~~ END END BUT_ONLY END //Generate array with joinable NPC DV ACTION_PHP_EACH JOINABLE_NPC_ARRAY_2da AS file => ~~ BEGIN ACTION_IF FILE_EXISTS_IN_GAME ~%file%.2da~ BEGIN COPY_EXISTING ~%file%.2da~ ~override~ COUNT_2DA_ROWS 3 "cntrow" FOR (i = 1; i < cntrow; i = i + 1) BEGIN READ_2DA_ENTRY i 0 3 "dv" TO_UPPER dv DEFINE_ASSOCIATIVE_ARRAY JOINABLE_NPC_ARRAY_dv BEGIN ~%dv%~ => ~~ END END BUT_ONLY END END //Generate array with joinable NPC cre files COPY_EXISTING_REGEXP GLOB ~.+\.CRE~ ~override~ PATCH_IF (%SOURCE_SIZE% > 0x2a8) BEGIN READ_ASCII 0x280 "deathvar" (32) NULL TO_UPPER deathvar PATCH_IF VARIABLE_IS_SET $JOINABLE_NPC_ARRAY_dv(~%deathvar%~) BEGIN DEFINE_ASSOCIATIVE_ARRAY JOINABLE_NPC_ARRAY BEGIN ~%SOURCE_FILE%~ => ~%deathvar%~ END END PATCH_IF NOT VARIABLE_IS_SET $JOINABLE_NPC_ARRAY_dv(~%dv%~) BEGIN DEFINE_ASSOCIATIVE_ARRAY NON_JOINABLE_NPC_ARRAY BEGIN ~%SOURCE_FILE%~ => ~%deathvar%~ END END END BUT_ONLY END LAM JOINABLE_NPC_ARRAYS ACTION_PHP_EACH JOINABLE_NPC_ARRAY AS cre => dv BEGIN COPY_EXISTING ~%cre%~ ~override~ READ_STRREF 0x08 cre_name READ_BYTE 0x10 o_class READ_BYTE 0x11 r_class PATCH_IF ((o_class BAND 0b00001000) = 0b00001000) BEGIN SPRINT $dc_npcs(~%SOURCE_RES%~) ~%cre_name%~ END PATCH_IF ((o_class BAND 0b00010000) = 0b00010000) BEGIN SPRINT $dc_npcs(~%SOURCE_RES%~) ~%cre_name%~ END PATCH_IF ((o_class BAND 0b00100000) = 0b00100000) BEGIN SPRINT $dc_npcs(~%SOURCE_RES%~) ~%cre_name%~ END PATCH_IF ((o_class BAND 0b01000000) = 0b01000000) BEGIN SPRINT $dc_npcs(~%SOURCE_RES%~) ~%cre_name%~ END PATCH_IF ((o_class BAND 0b10000000) = 0b10000000) BEGIN SPRINT $dc_npcs(~%SOURCE_RES%~) ~%cre_name%~ END PATCH_IF ((r_class BAND 0b00000001) = 0b00000001) BEGIN SPRINT $dc_npcs(~%SOURCE_RES%~) ~%cre_name%~ END BUT_ONLY END ACTION_PHP_EACH dc_npcs AS res => name BEGIN PRINT ~%res%.cre = %name% = dual-class~ END Edited February 2, 2022 by subtledoctor Quote Link to comment
ahungry Posted February 3, 2022 Share Posted February 3, 2022 I ran the code (had to add a header/pre-amble to the tp2 file to avoid parser error), my results and weidu.log: !SARTOB.cre = Saradas = dual-class ADANG25.cre = Angelo = dual-class ADANGEL.cre = Angelo = dual-class ANOMEN10.cre = Anomen = dual-class ANOMEN12.cre = Anomen = dual-class ANOMEN6.cre = Anomen = dual-class ANOMEN7.cre = Anomen = dual-class ANOMEN8.cre = Anomen = dual-class ANOMEN9.cre = Anomen = dual-class BDIMDEAD.cre = Imoen = dual-class BDIMOEN.cre = Imoen = dual-class BDSHIMOE.cre = Imoen = dual-class FINIMOEN.cre = Imoen = dual-class G#TYRS10.cre = Tyris = dual-class G#TYRS11.cre = Tyris = dual-class G#TYRS13.cre = Tyris = dual-class G#TYRS16.cre = Tyris = dual-class G#TYRS8.cre = Tyris = dual-class MWARN.cre = Ariena = dual-class MWARN25.cre = Ariena = dual-class OHHEX10.cre = Hexxat = dual-class OHHEX11.cre = Hexxat = dual-class OHHEX13.cre = Hexxat = dual-class OHHEX15.cre = Hexxat = dual-class OHHEX25.cre = Hexxat = dual-class OHHEX8.cre = Hexxat = dual-class OHHEX9.cre = Hexxat = dual-class TTIMOEN.cre = Imoen = dual-class SUCCESSFULLY INSTALLED Dual check Press ENTER to exit. weidu.log Quote Link to comment
Fishmalk Posted February 4, 2022 Share Posted February 4, 2022 Faren: http://www.shsforums.net/files/file/1125-faren/ Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.