Edited by cmorgan, 17 September 2011 - 11:10 AM.
[Repaired] Slight problem with v18 Jaheira Picture
#1
Posted 21 September 2009 - 10:03 AM
#2
Posted 21 September 2009 - 10:40 AM
COPY_EXISTING_REGEXP GLOB ~^_?jahei.*\.cre$~ ~override~ // Jaheira
PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
READ_LONG 0x08 "strref"
PATCH_IF (("%strref%" = 9456) OR ("%strref%" = 9475)) THEN BEGIN // exclude harper cre files
WRITE_ASCII 0x34 ~NJAHEIRS~ #8 // small portrait
WRITE_ASCII 0x3c ~NJAHEIRM~ #8 // medium portrait
END
END
BUT_ONLY_IF_IT_CHANGES
BTW, Viconia may be similarly affected, so use this code for her:
COPY_EXISTING_REGEXP GLOB ~^\(bg\|_\)?viconi[0-9]*\.cre$~ ~override~ // Viconia PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 "NVICONS" #8 // small portrait WRITE_ASCII 0x3c "NVICONM" #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES
Edited by aVENGER_(RR), 21 September 2009 - 10:52 AM.
Rogue Rebalancing - Author
aTweaks - Author
Wizard Slayer Rebalancing - Co-Author
BG2 Fixpack - Contributor
#3
Posted 21 September 2009 - 11:08 AM
Should I run out a "silent" update tonight, rather than wait for 6 months and a version up, for this and the journal entry report?
#4
Posted 21 September 2009 - 11:39 AM
People tend to have fewer expectations when a mod jumps from say v4 to v4.1 instead of going straight for v5 in case I'm just including a translation update and some minor bugfixes.
Rogue Rebalancing - Author
aTweaks - Author
Wizard Slayer Rebalancing - Co-Author
BG2 Fixpack - Contributor
#5
Posted 21 September 2009 - 01:18 PM
Might as well hard code the lot of them while we are at it, to avoid inadvertently patching away that portrait that only the BG2 version of the NPC should have had, or whatever.
/* Portrait Changes */ /* Edwin */ BEGIN @1022 /* The BG1 NPC Project: Give Edwin his BG2 portrait. */ GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */ REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */ ACTION_FOR_EACH edwin IN edwin edwin2 edwin4 edwin6 _edwin _edwin2 _edwin4 _edwin6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%edwin%.cre" BEGIN COPY_EXISTING "%edwin%.cre" ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 ~NEDWINS~ #8 // small portrait WRITE_ASCII 0x3c ~NEDWINM~ #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES END END /* Imoen */ BEGIN @1023 /* The BG1 NPC Project: Give Imoen her BG2 portrait. */ GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */ REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */ ACTION_FOR_EACH imoen IN imoen imoen1 imoen2 imoen4 imoen61 _imoen _imoen1 _imoen2 _imoen4 _imoen6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%imoen%.cre" BEGIN COPY_EXISTING "%imoen%.cre" ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 ~NIMOENS~ #8 // small portrait WRITE_ASCII 0x3c ~NIMOENM~ #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES END END /* Jaheira */ BEGIN @1024 /* The BG1 NPC Project: Give Jaheira her BG2 portrait. */ GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */ REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */ ACTION_FOR_EACH jaheira IN jaheir jaheir2 jaheir4 jaheir6 _jaheir _jaheir2 _jaheir4 _jaheir6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%jaheira%.cre" BEGIN COPY_EXISTING "%jaheira%.cre" ~override~ // Jaheira PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 ~NJAHEIRS~ #8 // small portrait WRITE_ASCII 0x3c ~NJAHEIRM~ #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES END END /* Minsc */ BEGIN @1025 /* The BG1 NPC Project: Give Minsc his BG2 portrait. */ GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */ REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */ ACTION_FOR_EACH minsc IN minsc minsc2 minsc4 minsc6 _minsc _minsc2 _minsc4 _minsc6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%minsc%.cre" BEGIN COPY_EXISTING "%minsc%.cre" ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 ~NMINSCS~ #8 // small portrait WRITE_ASCII 0x3c ~NMINSCM~ #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES END END /* Viconia */ BEGIN @1026 /* The BG1 NPC Project: Give Viconia her BG2 portrait. */ GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */ REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */ ACTION_FOR_EACH viconia IN viconi viconi4 viconi61 _viconi _viconi4 _viconi6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%viconia%.cre" BEGIN COPY_EXISTING "%viconia%.cre" ~override~ // Viconia PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 "NVICONS" #8 // small portrait WRITE_ASCII 0x3c "NVICONM" #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES END END /* Kivan */ BEGIN @1027 /* The BG1 NPC Project: Kivan's "Kivan and Deheriana Companions" portrait */ GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */ REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */ COPY ~BG1NPC/Phase2/Portraits/P#KI2L.bmp~ ~override~ COPY ~BG1NPC/Phase2/Portraits/P#KI2M.bmp~ ~override~ COPY ~BG1NPC/Phase2/Portraits/P#KI2S.bmp~ ~override~ ACTION_FOR_EACH kivan IN kivan kivan4 kivan6 _kivan _kivan4 _kivan6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%kivan%.cre" BEGIN COPY_EXISTING "%kivan%.cre" ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 ~P#KI2S~ #8 // small portrait WRITE_ASCII 0x3c ~P#KI2M~ #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES END END
Assuming this in an open referendum, I vote for the silent update.
Also, the offline readme is missing its icon due to a mismatch between the name of the icon file (g3.ico) and the file name in the readme (g3icon.ico).
#7
Posted 22 September 2009 - 07:10 AM
Wisp, on Sep 21 2009, 11:18 PM, said:
Might as well hard code the lot of them while we are at it, to avoid inadvertently patching away that portrait that only the BG2 version of the NPC should have had, or whatever.
Nice work!
Cmorgan, I've updated the soundset expansion code in a similar manner.
Rogue Rebalancing - Author
aTweaks - Author
Wizard Slayer Rebalancing - Co-Author
BG2 Fixpack - Contributor
#8
Posted 22 September 2009 - 01:04 PM
ScuD, on Sep 21 2009, 09:40 PM, said:
X#ANDART.BCS after the installation has _WOLFDR in the BGT install.
Search "wolfdr" (2 hits in 1 files)
F:\BG1NPC_Workspace\bg1npc-v18\bg1npc\phase2\baf\x#andart.baf (2 hits)
Line 59: CreateCreature("%tutu_var%WOLFDR",[-1.-1],0)
Line 60: CreateCreature("%tutu_var%WOLFDR",[-1.-1],0)
so something else might be going wrong.
#9
Posted 22 September 2009 - 01:25 PM
Tutu:
ACTION_FOR_EACH imoen IN imoen1 imoen2 imoen4 imoen61 _imoen _imoen1 _imoen2 _imoen4 _imoen6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%imoen%.cre" BEGIN COPY_EXISTING "%imoen%.cre" ~override~ // Imoen PATCH_IF (SOURCE_SIZE > 0x2d3) AND (FILE_EXISTS_IN_GAME ~AR7200.are~) THEN BEGIN // protects against invalid files WRITE_ASCII 0x248 ~BGIMOEN~ #8 // override script for BGT END PATCH_IF (SOURCE_SIZE > 0x2d3) AND (FILE_EXISTS_IN_GAME ~FW0100.are~) THEN BEGIN // protects against invalid files WRITE_ASCII 0x248 ~_IMOEN2~ #8 // override script for Tutu END BUT_ONLY_IF_IT_CHANGES END END[/size]
No else statement, so it doesn't trigger for 0 byte files and such - any quicker, cleaner suggestions?
#10
Posted 22 September 2009 - 03:13 PM
cmorgan, on Sep 22 2009, 05:04 PM, said:
Search "wolfdr" (2 hits in 1 files)
F:\BG1NPC_Workspace\bg1npc-v18\bg1npc\phase2\baf\x#andart.baf (2 hits)
Line 59: CreateCreature("%tutu_var%WOLFDR",[-1.-1],0)
Line 60: CreateCreature("%tutu_var%WOLFDR",[-1.-1],0)
so something else might be going wrong.
I'll look more into the matter.
Edited by ScuD, 22 September 2009 - 03:23 PM.
#11
Posted 12 February 2011 - 11:18 PM
#12
Posted 13 February 2011 - 09:51 AM
from the DEBUG
Install Component [The BG1 NPC Project: Give Jaheira her BG2 portrait]? [I]nstall, or [N]ot Install or [Q]uit? Installing [The BG1 NPC Project: Give Jaheira her BG2 portrait] [./override/FW0100.are] loaded, 30444 bytes Tutu detected: support at www.gibberlings3.net [./override/FW0100.are] loaded, 30444 bytes Copying and patching 1 file ... [BG1NPC/TRA/english/BG1NPC_tmp.tra] loaded, 83768 bytes BG1NPC/TRA/english/BG1NPC.tra copied to bg1npc/backup/4/BG1NPC.tra, 82535 bytes Copied [BG1NPC/TRA/english/BG1NPC_tmp.tra] to [BG1NPC/TRA/english/BG1NPC.tra] loading 1 tra file [BG1NPC/TRA/english/BG1NPC.tra] has 580 translation strings Checking for required files ... [override/X#BG1NPCCore.G3] found: 83 bytes Copying and patching 5 files ... Copied [JAHEI1.CRE] to [override/JAHEI1.CRE] Copied [JAHEI2.CRE] to [override/JAHEI2.CRE] Copied [JAHEI3.CRE] to [override/JAHEI3.CRE] Copied [JAHEI4.CRE] to [override/JAHEI4.CRE]so only the BG2 harpers get changed as reported above.
Confirmation screen:
But the new code works like a charm, as far as i can see... replacing lines 4885 - 4894 in setup-bg1npc.tp2 to
this code,
/* Jaheira */ BEGIN @1024 /* The BG1 NPC Project: Give Jaheira her BG2 portrait. */ GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */ REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */ ACTION_FOR_EACH jaheira IN jaheir jaheir2 jaheir4 jaheir6 _jaheir _jaheir2 _jaheir4 _jaheir6 BEGIN ACTION_IF FILE_EXISTS_IN_GAME "%jaheira%.cre" BEGIN COPY_EXISTING "%jaheira%.cre" ~override~ // Jaheira PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_ASCII 0x34 ~NJAHEIRS~ #8 // small portrait WRITE_ASCII 0x3c ~NJAHEIRM~ #8 // medium portrait END BUT_ONLY_IF_IT_CHANGES END END
results in the following:
Install Component [The BG1 NPC Project: Give Jaheira her BG2 portrait]? [I]nstall, or [N]ot Install or [Q]uit? Installing [The BG1 NPC Project: Give Jaheira her BG2 portrait] [./override/FW0100.are] loaded, 30444 bytes Tutu detected: support at www.gibberlings3.net [./override/FW0100.are] loaded, 30444 bytes Copying and patching 1 file ... [BG1NPC/TRA/english/BG1NPC_tmp.tra] loaded, 83768 bytes BG1NPC/TRA/english/BG1NPC.tra copied to bg1npc/backup/4/BG1NPC.tra, 82535 bytes Copied [BG1NPC/TRA/english/BG1NPC_tmp.tra] to [BG1NPC/TRA/english/BG1NPC.tra] loading 1 tra file [BG1NPC/TRA/english/BG1NPC.tra] has 580 translation strings Checking for required files ... [override/X#BG1NPCCore.G3] found: 83 bytes [./override/_jaheir.cre] loaded, 1964 bytes Copying and patching 1 file ... [./override/_jaheir.cre] loaded, 1964 bytes override/_jaheir.cre copied to bg1npc/backup/4/_jaheir.cre, 1964 bytes Copied [_jaheir.cre] to [override/_jaheir.cre] [./override/_jaheir2.cre] loaded, 1976 bytes Copying and patching 1 file ... [./override/_jaheir2.cre] loaded, 1976 bytes override/_jaheir2.cre copied to bg1npc/backup/4/_jaheir2.cre, 1976 bytes Copied [_jaheir2.cre] to [override/_jaheir2.cre] [./override/_jaheir4.cre] loaded, 2316 bytes Copying and patching 1 file ... [./override/_jaheir4.cre] loaded, 2316 bytes override/_jaheir4.cre copied to bg1npc/backup/4/_jaheir4.cre, 2316 bytes Copied [_jaheir4.cre] to [override/_jaheir4.cre] [./override/_jaheir6.cre] loaded, 2388 bytes Copying and patching 1 file ... [./override/_jaheir6.cre] loaded, 2388 bytes override/_jaheir6.cre copied to bg1npc/backup/4/_jaheir6.cre, 2388 bytes Copied [_jaheir6.cre] to [override/_jaheir6.cre]
and a confirmation screen:
As a reminder, any changes to .cre files will not appear in-game from a saved game (the .cre is saved in the file and we try not to mess with saves at any point in the whole project). To make the change occur, it needs to be a new game. If your .DEBUG file entries from the new code show that the .cres are being skipped, please post the code used and the debug snippet, so I can help track it down and fix whatever is going wrong on your install.
Until I get a new one out (hopefully the French Translation version), the best way to deal with this on Tutu is to edit in the code or just use ShadowKeeper (which is saved-game friendly). The BWP folks already fix this in their Fixpack for BGT, I think.
Edited by cmorgan, 13 February 2011 - 09:53 AM.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











