Jump to content


Stucked in the temple of Bhaal after killing Sarevok


  • Please log in to reply
134 replies to this topic

#101 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 07 May 2008 - 01:17 PM

@smeagolheart or Hoppy or anyone who got that BGMIminhp1.ITM:

Can you do a weidu --change-log on sarevo.cre and post the results here?
Also, after that you should find various sarevo.0000x.cre files in your BGT installation directory.
Please put them in an archive and attach them to your post.

It is SCS that causes the BGMIminhp1.ITM problem. If SCS merely used a check for BGT install and only added it's rings for the minion immunities, that portion of the Final Battle issue would be resolved. currently it is attempting to add a MINHP1.itm to a .cre that already has a minimum of 1 HP item on it.

Edited by erebusant, 07 May 2008 - 01:18 PM.

It takes a village...


#102 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 07 May 2008 - 01:26 PM

@smeagolheart or Hoppy or anyone who got that BGMIminhp1.ITM:

Can you do a weidu --change-log on sarevo.cre and post the results here?
Also, after that you should find various sarevo.0000x.cre files in your BGT installation directory.
Please put them in an archive and attach them to your post.

It is SCS that causes the BGMIminhp1.ITM problem. If SCS merely used a check for BGT install and only added it's rings for the minion immunities, that portion of the Final Battle issue would be resolved. currently it is attempting to add a MINHP1.itm to a .cre that already has a minimum of 1 HP item on it.



Just to be sure, it is BGMINHP1 that exists from the original BGT modded setup. Category:amulet
?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#103 Taimon

Taimon
  • Member
  • 387 posts

Posted 07 May 2008 - 02:28 PM

It is SCS that causes the BGMIminhp1.ITM problem. If SCS merely used a check for BGT install and only added it's rings for the minion immunities, that portion of the Final Battle issue would be resolved. currently it is attempting to add a MINHP1.itm to a .cre that already has a minimum of 1 HP item on it.

I'm trying to reproduce the BGMIminhp1 thing, but I'm unable to.
Grab the sarevo.00003.cre from the archive smeagolheart posted. This is the sarevo.cre directly before the "Improved final battle" component gets installed. And this is the relevant code from setup-scs.tp2:
COPY_EXISTING ~%tutu_var%sarevo.cre~ ~override~
	WRITE_SHORT 0x24 ~250~ // In vanilla BG, Sarevok dies at 150hp to avoid bugs due
	WRITE_SHORT 0x26 ~250~ // to him ~chunking~. But of course in TUTU that confuses 
				// the ~injured/badly injured/nearly dead~ display.
				// We use a min-hp ring instead.
	WRITE_BYTE 0x59 ~40~	// slightly reduced base resistances since he gets them from his followers
	WRITE_BYTE 0x5a ~40~
	WRITE_BYTE 0x5b ~40~
	WRITE_BYTE 0x5c ~40~
	WRITE_BYTE 0x5e ~40~
	WRITE_BYTE 0x5f ~40~
	WRITE_BYTE 0x63 ~0~
	READ_LONG 0x2bc ~%itemoffset%~
	WRITE_ASCII (~%itemoffset%~+0x50) ~minhp1~ #8 // give him the min-hp ring
	ADD_CRE_ITEM ~dw#sarr1~ #0 #0 #0 ~IDENTIFIED~ ~RRING~//items to simulate acolyte-shielding
	ADD_CRE_ITEM ~dw#sarr2~ #0 #0 #0 ~IDENTIFIED~ ~BOOTS~
	ADD_CRE_ITEM ~dw#sarr3~ #0 #0 #0 ~IDENTIFIED~ ~GLOVES~
	ADD_CRE_ITEM ~dw#sarr4~ #0 #0 #0 ~IDENTIFIED~ ~AMULET~
Item offset is 0x03E4. Adding 0x50 yields 0x0434. And when you look at 0x0434 you read MAGE06.
So the WRITE_ASCII should replace the MAGE06 with minhp1. (And it does on my install.)
But BGMIminhp1 means, that it somehow wrote to 0x044C, which I can't explain.

#104 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 07 May 2008 - 03:16 PM

It is SCS that causes the BGMIminhp1.ITM problem. If SCS merely used a check for BGT install and only added it's rings for the minion immunities, that portion of the Final Battle issue would be resolved. currently it is attempting to add a MINHP1.itm to a .cre that already has a minimum of 1 HP item on it.

I'm trying to reproduce the BGMIminhp1 thing, but I'm unable to.
Grab the sarevo.00003.cre from the archive smeagolheart posted. This is the sarevo.cre directly before the "Improved final battle" component gets installed. And this is the relevant code from setup-scs.tp2:
COPY_EXISTING ~%tutu_var%sarevo.cre~ ~override~
	WRITE_SHORT 0x24 ~250~ // In vanilla BG, Sarevok dies at 150hp to avoid bugs due
	WRITE_SHORT 0x26 ~250~ // to him ~chunking~. But of course in TUTU that confuses 
				// the ~injured/badly injured/nearly dead~ display.
				// We use a min-hp ring instead.
	WRITE_BYTE 0x59 ~40~	// slightly reduced base resistances since he gets them from his followers
	WRITE_BYTE 0x5a ~40~
	WRITE_BYTE 0x5b ~40~
	WRITE_BYTE 0x5c ~40~
	WRITE_BYTE 0x5e ~40~
	WRITE_BYTE 0x5f ~40~
	WRITE_BYTE 0x63 ~0~
	READ_LONG 0x2bc ~%itemoffset%~
	WRITE_ASCII (~%itemoffset%~+0x50) ~minhp1~ #8 // give him the min-hp ring
	ADD_CRE_ITEM ~dw#sarr1~ #0 #0 #0 ~IDENTIFIED~ ~RRING~//items to simulate acolyte-shielding
	ADD_CRE_ITEM ~dw#sarr2~ #0 #0 #0 ~IDENTIFIED~ ~BOOTS~
	ADD_CRE_ITEM ~dw#sarr3~ #0 #0 #0 ~IDENTIFIED~ ~GLOVES~
	ADD_CRE_ITEM ~dw#sarr4~ #0 #0 #0 ~IDENTIFIED~ ~AMULET~
Item offset is 0x03E4. Adding 0x50 yields 0x0434. And when you look at 0x0434 you read MAGE06.
So the WRITE_ASCII should replace the MAGE06 with minhp1. (And it does on my install.)
But BGMIminhp1 means, that it somehow wrote to 0x044C, which I can't explain.

The problem lies here:
READ_LONG 0x2bc ~%itemoffset%~

WRITE_ASCII (~%itemoffset%~+0x50) ~minhp1~ #8 // give him the min-hp ring

Changing the #8 to #6 (don't ask me why other than the computer looking for an 8 character name and only receiving 6) allows for the item to be replaced correctly, however with the 4 DW items for the immunities, the BGMINHP1.ITM gets shifted into the inventory 1 slot since one of the DW items is booting it to take it's place. While the new MINHP1.ITM now occupies the LRING slot. For a BGT install, it would be better for the DW item that takes the amulet slot to replace the MAGE06.ITM in the LRing slot and not even put the MINHP1.ITM on the cre. I'm not certain if merely having the minimum hp item on the cre will work, or if it needs to be equiped to work, but in BGT there is no neccessity for another one, or a relaced one, and after you get Sarevok down to the 1 HP he gets killed by script anyway, which looking at the changes to BGSARVOK.bcs, should still occur correctly.


Edited by erebusant, 07 May 2008 - 03:23 PM.

It takes a village...


#105 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 07 May 2008 - 03:30 PM

The DWSARR4.ITM could be placed in belt/girdle. That is the category that the item is in. It is a ring but in the belt class. That slot was empty and could go there so it doesn't touch the amulet slot. Then the BGMINHP1 will stay in the amulet slot.


COPY ~scs/endbattle/dw#sarr1.itm~ ~override~ //ring
COPY_EXISTING ~dw#sarr1.itm~ ~override/dw#sarr2.itm~
WRITE_SHORT 0x1c 4 //boots
COPY_EXISTING ~dw#sarr1.itm~ ~override/dw#sarr3.itm~
WRITE_SHORT 0x1c 6 //gloves
COPY_EXISTING ~dw#sarr1.itm~ ~override/dw#sarr4.itm~
WRITE_SHORT 0x1c 3 //belt


That what it says @LN5968 in the TP2. So is it the block that erebusant quoted in previous post that does the actual misplace?

Edited by Hoppy, 07 May 2008 - 03:54 PM.

?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#106 Taimon

Taimon
  • Member
  • 387 posts

Posted 07 May 2008 - 04:14 PM

Sorry for not commenting on your other points, erebusant and Hoppy, (I tend to agree with them) but I'm fixed on that particular problem with the "creation" of the BGMIminhp1 string.

The problem lies here:
READ_LONG 0x2bc ~%itemoffset%~
WRITE_ASCII (~%itemoffset%~+0x50) ~minhp1~ #8 // give him the min-hp ring

Changing the #8 to #6 (don't ask me why other than the computer looking for an 8 character name and only receiving 6) allows for the item to be replaced correctly, [...]

Are you also getting the BGMIminhp1 item?
I'm still struggeling to understand this.
WRITE_ASCII ... #6 should make no difference. It won't write two null bytes after the string, but that's all.
In fact the #8 is even more correct, since it erases any leftover characters if the previous name was longer.


@Hoppy:
Yes it's this line.
ADD_CRE_ITEM ~dw#sarr4~ #0 #0 #0 ~IDENTIFIED~ ~AMULET~

/Edit:
@smeagolheart:
Definitely the last question: Do you recall the WeiDU version you used to install SCS?

Edited by Taimon, 07 May 2008 - 04:21 PM.


#107 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 07 May 2008 - 04:31 PM

Sorry for not commenting on your other points, erebusant and Hoppy, (I tend to agree with them) but I'm fixed on that particular problem with the "creation" of the BGMIminhp1 string.

The problem lies here:
READ_LONG 0x2bc ~%itemoffset%~
WRITE_ASCII (~%itemoffset%~+0x50) ~minhp1~ #8 // give him the min-hp ring

Changing the #8 to #6 (don't ask me why other than the computer looking for an 8 character name and only receiving 6) allows for the item to be replaced correctly, [...]

Are you also getting the BGMIminhp1 item? Yes
I'm still struggeling to understand this.
WRITE_ASCII ... #6 should make no difference. It won't write two null bytes after the string, but that's all.
In fact the #8 is even more correct, since it erases any leftover characters if the previous name was longer.


Don't know. All I know is it botches the MAGE06.ITM replacement so badly it ends up overflowing some extra bytes or something into the BGMINHP1.ITM offset fubaring it. Maybe it's a WeiDU glitch or something. I've seen WeiDU fubar .cres to the point of causing CTD's by not being able to properly overwrite a 6 character.itm name with a 7 character one (specifically if using REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~staf01~ ~staftha~ ( 8 )
so who knows. Regardless, in BGT this is totally unneccesary, due to the BGMINHP1.ITM already being on the .CRE

Edited by erebusant, 07 May 2008 - 04:41 PM.

It takes a village...


#108 Taimon

Taimon
  • Member
  • 387 posts

Posted 08 May 2008 - 01:55 AM

Can you reproduce this?
Let's say you have an installation directly before the "Improved final battle" component. Then you install only this component and after that BGMINHP is screwed (transmogrified to BGMIminhp1). If so, can you give me the sarevo.cre from directly before the installation of the component? (And what WeiDU version were you using to install this?)

#109 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 08 May 2008 - 05:18 AM

Can you reproduce this?
Let's say you have an installation directly before the "Improved final battle" component. Then you install only this component and after that BGMINHP is screwed (transmogrified to BGMIminhp1). If so, can you give me the sarevo.cre from directly before the installation of the component? (And what WeiDU version were you using to install this?)

Well, uhh,,,,yeah! This occurs on an install with BG2Fixpack + BGT 105 + SCS final battle only using WeiDU 20400. I'll post the before and after .cre's when I get home tonite, along with the code that should be used in the SCS .tp2 for a BGT installation, but as far as I'm concerned, I have enough other projects going on that I don't have any more time to waste on this, because I've already defined a viable solution. I'd be interested in what you come up with as to why the .ITM file isn't getting replaced properly by the existing code, but you would probably be better served having a "Testing" installation on your computer so you can run the tests you want to run, and not need to rely upon others and their schedules. ;)

Edited by erebusant, 08 May 2008 - 05:19 AM.

It takes a village...


#110 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 08 May 2008 - 08:44 AM

Thanks for your time erebusant. :cheers: At least for now, there is a hot fix and we'll cross the installation bridge later. I PM'd David, too, so when he has time, I am sure he'll look into it as well.
?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#111 Taimon

Taimon
  • Member
  • 387 posts

Posted 08 May 2008 - 09:41 AM

Well, uhh,,,,yeah! This occurs on an install with BG2Fixpack + BGT 105 + SCS final battle only using WeiDU 20400. I'll post the before and after .cre's when I get home tonite, along with the code that should be used in the SCS .tp2 for a BGT installation, but as far as I'm concerned, I have enough other projects going on that I don't have any more time to waste on this, because I've already defined a viable solution. I'd be interested in what you come up with as to why the .ITM file isn't getting replaced properly by the existing code, but you would probably be better served having a "Testing" installation on your computer so you can run the tests you want to run, and not need to rely upon others and their schedules. ;)

Sorry, if I sounded too demanding or anything. Take your time or feel free to ignore it altogether! This is just a hobby.

My problem is: I have several test installations and I am unable to reproduce this. One installation is exactly your BG2FP v6 + BGT v1.05b + SCS v8 final battle (even using WeiDU v204 by coincidence). Maybe it's my german version or you'll need a dual core or something to let this happen, I don't know. That's why I rely on other people who actually have this particular problem.

#112 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 08 May 2008 - 04:41 PM

Well, uhh,,,,yeah! This occurs on an install with BG2Fixpack + BGT 105 + SCS final battle only using WeiDU 20400. I'll post the before and after .cre's when I get home tonite, along with the code that should be used in the SCS .tp2 for a BGT installation, but as far as I'm concerned, I have enough other projects going on that I don't have any more time to waste on this, because I've already defined a viable solution. I'd be interested in what you come up with as to why the .ITM file isn't getting replaced properly by the existing code, but you would probably be better served having a "Testing" installation on your computer so you can run the tests you want to run, and not need to rely upon others and their schedules. ;)

Sorry, if I sounded too demanding or anything. Take your time or feel free to ignore it altogether! This is just a hobby.

My problem is: I have several test installations and I am unable to reproduce this. One installation is exactly your BG2FP v6 + BGT v1.05b + SCS v8 final battle (even using WeiDU v204 by coincidence). Maybe it's my german version or you'll need a dual core or something to let this happen, I don't know. That's why I rely on other people who actually have this particular problem.

Here is the cres and the revised code to patch Sarevok properly with SCS.

Attached Files


It takes a village...


#113 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 08 May 2008 - 09:06 PM

Right on erebusant!
So do we just substitute those cres accordingly during install even with the TP2 edit? Or are they more for reference to check during install? :unsure:


EDIT: I see you replied at G3, all clear!

Edited by Hoppy, 08 May 2008 - 10:12 PM.

?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#114 Taimon

Taimon
  • Member
  • 387 posts

Posted 09 May 2008 - 01:00 AM

Here is the cres and the revised code to patch Sarevok properly with SCS.

Thanks, but postSCSsarevo.cre doesn't seem to have to BGMIminhp1 issue.
(MAGE06 get's correctly replaced with minhp1)
However, I understand if you don't want to waste more time on this, so feel free to ignore.

#115 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 09 May 2008 - 04:53 AM

Here is the cres and the revised code to patch Sarevok properly with SCS.

Thanks, but postSCSsarevo.cre doesn't seem to have to BGMIminhp1 issue.
(MAGE06 get's correctly replaced with minhp1)
However, I understand if you don't want to waste more time on this, so feel free to ignore.

Must have put the one in from before I changed the .tp2 back to #8 from #6. The point is moot anyway. In a BGT install:
1. You don't want to be adding a minimum hp item to the cre.
2. Even if you were adding the minimum hp item, you don't want to replace MAGE06.itm anyway because that is what allows Sarevok to be hasted.

It takes a village...


#116 Taimon

Taimon
  • Member
  • 387 posts

Posted 09 May 2008 - 05:19 AM

Must have put the one in from before I changed the .tp2 back to #8 from #6. The point is moot anyway. In a BGT install:
1. You don't want to be adding a minimum hp item to the cre.
2. Even if you were adding the minimum hp item, you don't want to replace MAGE06.itm anyway because that is what allows Sarevok to be hasted.

I completely agree with you. You don't need an extra minhp1 for BGT.
It's just that I'm smelling a WeiDU bug or something, that's why I'm trying to reproduce the faulty BGMIminhp1 thing.

#117 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 09 May 2008 - 10:14 AM

Must have put the one in from before I changed the .tp2 back to #8 from #6. The point is moot anyway. In a BGT install:
1. You don't want to be adding a minimum hp item to the cre.
2. Even if you were adding the minimum hp item, you don't want to replace MAGE06.itm anyway because that is what allows Sarevok to be hasted.

I completely agree with you. You don't need an extra minhp1 for BGT.
It's just that I'm smelling a WeiDU bug or something, that's why I'm trying to reproduce the faulty BGMIminhp1 thing.


@Taimon,
Are you saying that you can't reproduce it (BGMIMINHP1 thing) now? Even if you use the original TP2?
?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#118 Taimon

Taimon
  • Member
  • 387 posts

Posted 09 May 2008 - 02:22 PM

That's exactly what my problem is. I tried putting the various pre-scs sarevo.cre files (smeagolheart, erebusant) in override and installing the scs v8 (unmodified) "improved final battle" component, but I still don't get the BGMIminhp1.

#119 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 09 May 2008 - 02:42 PM

That's exactly what my problem is. I tried putting the various pre-scs sarevo.cre files (smeagolheart, erebusant) in override and installing the scs v8 (unmodified) "improved final battle" component, but I still don't get the BGMIminhp1.

But what happens when you install SCS 8 after BGT without any replacing of files: CRE or TP2? Just as is.
?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#120 Taimon

Taimon
  • Member
  • 387 posts

Posted 09 May 2008 - 11:23 PM

No BGMIminhp1 as well.
In fact, my last walkthrough through BGT + SCS did not have any Sarevok issues (besides overwriting MAGE06).
That's why I keep bugging everyone here about it. I just haven't been able to reproduce it. (And believe me, I did many test installs.)