Jump to content


Photo

Some fixes


48 replies to this topic

#31 Mike1072

Mike1072
  • Gibberling Poobah
  • 2457 posts
  • Gender:Male
  • Location:Canada

Posted 12 January 2010 - 02:40 AM

Woops. These must have slipped by... I started with a big list of odd stuff and tried to rule everything out that was unused.

I'd leave 'em, were it up to me. The triggered spells exist already, they're just not hooked up to the 2da, and this is at least as OBC as the giant vs short races .effs.

Sure, fix away if you want. The resources do look like they'd make good tweak content, but I think Spell Revisions has beat you to the punch on this one, and with 24 weapon choices instead of 6.

Any thoughts on letting monks use the scimitars sw1h56 or dwsw1h01?

sw1h56 is already monk usable?

Oh, good. It looks like I mixed up what was wrong with it, because mage/thieves are the ones who can't use it.

Fixpack has been adding the monk flag to the drow scimitar redundantly (hence its omission from the list above). It's fine if it goes in (but we need to stop ticking the flag in the first place, whatever happens there).

I'm seeing it monk unusable with just the 26498 patch as well.

#32 Wisp

Wisp
  • Modders
  • 1113 posts
  • Gender:Male

Posted 16 January 2010 - 07:24 AM

Revised fix for Anomen's proficiencies. First three cleric points are put into staffs, hammers and sword&shield. Fourth point (level 8) is used to increase sword&shield to 2 stars and the fifth (level 12) is used to increase hammers to 2 stars.
// anomen short 4 stars from f > c dual
COPY_EXISTING ~anomen6.cre~  ~override~
			  ~anomen7.cre~  ~override~
			  ~anomen8.cre~  ~override~
			  ~anomen9.cre~  ~override~
			  ~anomen10.cre~ ~override~
			  ~anomen12.cre~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
	WRITE_ASCII 0x3c ~NANOMENM~  // portrait fix for anomen9 in SoA
	SET_BG2_PROFICIENCY 98 2 //spears
	SET_BG2_PROFICIENCY 102 1 //staffs
	SET_BG2_PROFICIENCY 112 2 //sword & shield
	SET_BG2_PROFICIENCY 97 "%SOURCE_RES%" STRING_CONTAINS_REGEXP "1[02]" ? 1 : 2 //war hammers
  END
  BUT_ONLY_IF_IT_CHANGES

Revised fix for poison resistance. Poison resistance is removed from the disease batch (diffs omitted) and given its own batch where it is only given to items that grant both poison and disease immunity.
// poison resistance
COPY_EXISTING demogorg.itm override //<Invalid Strref -1>
			  finmel01.itm override //<Invalid Strref -1>
			  minhp1.itm   override //<Invalid Strref -1>
			  ravag03.itm  override //<Invalid Strref -1>
			  ring39.itm   override //Ring of Gaxx
			  sengua04.itm override //<Invalid Strref -1>
			  tstatue.itm  override //<Invalid Strref -1>
  LAUNCH_PATCH_MACRO ~add_fx_batch_prep~ // defines vars for rest of patch
  PATCH_IF (SOURCE_SIZE >= min_size) BEGIN
	SET "new_fx" = 0
	FOR (index = (0 - global_loop); index < abil_num; index = index + 1) BEGIN
	  SET "new_fx_1" = 0
	  SET "new_fx_2" = 0
	  SET "new_fx_3" = 0
	  PATCH_IF ("%index%" < 0) BEGIN // if loop through globals needed
		SET "abil_fx_idx" = 0
	  END ELSE BEGIN // otherwise normal ability
		SET "counter_offset" = ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%"))
		READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"
		SET "abil_fx_idx" = ("%abil_fx_idx%" + "%new_fx%")
		WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%")
	  END
	  READ_SHORT "%counter_offset%" "counter" // fx_num on global loop, otherwise abil_fx_num
	  FOR (index2 = 0; index2 < counter; index2 = index2 + 1) BEGIN
		READ_SHORT ("%fx_off%"		+ (0x08 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "opcode"
		READ_LONG  ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param1"
		READ_LONG  ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "param2"
		READ_ASCII ("%fx_off%" + 0x14 + (0x14 * "%fx_type%") + (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "resref"
		PATCH_IF (("%opcode%" = 101) AND ("%param2%" = 78)) BEGIN // disease immunity
		  SET "new_fx_1" = 1
		  READ_ASCII ("%fx_off%" +							 (("%abil_fx_idx%" + "%index2%") * (0x30 + (0xd8 * "%fx_type%")))) "template" ((0x30 + (0xd8 * "%fx_type%")))
		END ELSE
		PATCH_IF (("%opcode%" = 101) AND ("%param2%" = 25)) BEGIN // poison immunity
		  SET "new_fx_2" = 1
		END
		PATCH_IF (("%opcode%" = 173)) BEGIN					   // poison resistance
		  SET "new_fx_3" = 1
		END
	  END
	  PATCH_IF ("%new_fx_1%" = 1 AND new_fx_2 = 1 AND new_fx_3 = 0) BEGIN
		INSERT_BYTES   ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
		  WRITE_ASCIIE ("%fx_off%"							   + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
		  WRITE_SHORT  ("%fx_off%"		+ (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 173		  // reduced damage from poison
		  WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 100		  // value
		SET "new_fx" = ("%new_fx%" + 1)
		SET "counter" = ("%counter%" + 1)
	  END
	  WRITE_SHORT "%counter_offset%" "%counter%"
	END
	LAUNCH_PATCH_MACRO ~add_fx_batch_final~ // wrapup creature offset patching
  END
  BUT_ONLY_IF_IT_CHANGES

Revised Anomen banter fix. Check for CHAOTIC_NEUTRAL or not.
<<<<<<<<inlined/dialogues/are/gauche/anomenfix.d
ALTER_TRANS bimoen25 BEGIN 14 16 END BEGIN 0 END BEGIN
"TRIGGER" ~!Alignment("Anomen",CHAOTIC_NEUTRAL)~
END
ALTER_TRANS bimoen25 BEGIN 14 16 END BEGIN 1 END BEGIN
"TRIGGER" ~Alignment("Anomen",CHAOTIC_NEUTRAL)~
END
>>>>>>>>
COMPILE "inlined/dialogues/are/gauche/anomenfix.d"

Speaking of revised fixes, I posted fixes for the Shield of Reflection and Physical Mirror a while back (here), but here are some better ones.
Shield of Reflection lacks protection against pro 102 (ice arrow) and Physical Mirror lacks protection against pros 3 (fire arrow), 13 (firetooth bolts) and 15 (bolt03).
Pro 2 (exploding arrow) is also missing from Physical Mirror, but opcode 197 does not seem to protect against it anyway.
I notice these issues have come up before (here). Were they conciously left unfixed or did it just fizzle out?
//Shield of Reflection does not reflect all projectiles it should
COPY_EXISTING shld24.itm override
  PATCH_IF SOURCE_SIZE > 0x71 BEGIN
	READ_LONG  0x64 ab_off
	READ_SHORT 0x68 num_ab
	READ_LONG  0x6a fx_off
	READ_SHORT 0x70 num_fx
	FOR (i=0;i<num_fx;i+=1) BEGIN
	  READ_SHORT fx_off + 0x30*i fx_type
	  PATCH_IF fx_type = 197 BEGIN
		READ_LONG fx_off + 0x30*i + 0x8 pro
		SET $pro_shld24("%pro%") = 1
	  END
	END
	PATCH_FOR_EACH pro IN 1 3 4 6 9 11 13 14 15 16 19 26 29 31 34 102 BEGIN
	  PATCH_IF !VARIABLE_IS_SET $pro_shld24("%pro%") BEGIN
		INSERT_BYTES fx_off + 0x30*num_fx		0x30
		WRITE_SHORT  fx_off + 0x30*num_fx		197
		WRITE_BYTE   fx_off + 0x30*num_fx + 0x2  1
		WRITE_LONG   fx_off + 0x30*num_fx + 0x8  pro
		WRITE_BYTE   fx_off + 0x30*num_fx + 0xc  2
		WRITE_BYTE   fx_off + 0x30*num_fx + 0x12 100
		num_fx += 1
	  END
	END
	WRITE_SHORT 0x70 num_fx
	FOR (i=0;i<num_ab;i+=1) BEGIN
	  WRITE_SHORT ab_off + 0x38*i + 0x20 num_fx
	  num_fx += SHORT_AT ab_off + 0x38*i + 0x1e
	END
  END
BUT_ONLY

//Physical Mirror does not reflect all projectiles it should
COPY_EXISTING sppr613.spl override
  PATCH_IF SOURCE_SIZE > 0x71 BEGIN
	READ_LONG  0x64 ab_off
	READ_SHORT 0x68 num_ab
	READ_LONG  0x6a fx_off
	READ_SHORT 0x70 fx_idx
	num_fx = 0
	FOR (i=0;i<num_ab;i+=1) BEGIN
	  fx_idx += num_fx
	  READ_SHORT  ab_off + 0x28*i + 0x1e num_fx
	  WRITE_SHORT ab_off + 0x28*i + 0x20 fx_idx
	  FOR (j=0;j<num_fx;j+=1) BEGIN
		READ_SHORT fx_off + 0x30*(fx_idx + j) fx_type
		PATCH_IF fx_type = 197 BEGIN
		  READ_LONG  fx_off + 0x30*(fx_idx + j) + 0x8 pro
		  SET $pro_sppr613("%i%" "%pro%") = 1
		END
	  END
	  PATCH_FOR_EACH pro IN 1 3 4 6 9 11 13 14 15 16 19 26 29 31 34 102 BEGIN
		PATCH_IF !VARIABLE_IS_SET $pro_sppr613("%i%" "%pro%") BEGIN
		  INSERT_BYTES fx_off + 0x30*num_fx		0x30
		  WRITE_SHORT  fx_off + 0x30*num_fx		197
		  WRITE_BYTE   fx_off + 0x30*num_fx + 0x2  1
		  WRITE_LONG   fx_off + 0x30*num_fx + 0x8  pro
		  WRITE_BYTE   fx_off + 0x30*num_fx + 0xc  2
		  WRITE_BYTE   fx_off + 0x30*num_fx + 0x12 100
		  num_fx += 1
		END
	  END
	  WRITE_SHORT ab_off + 0x28*i + 0x1e num_fx
	END
  END
BUT_ONLY


#33 Nythrun

Nythrun

    Long since out to pasture

  • Modders
  • 1761 posts
  • Gender:Female

Posted 16 January 2010 - 08:51 AM

I notice these issues have come up before (here). Were they conciously left unfixed or did it just fizzle out?


Fizzled, at least in part because we didn't decide if flame arrow was meant to count as a spell-created weapon or a spell for the purpose of the Shield of Reflection. If the latter, we'll want to
// flame arrow dupe so physical mirror can bounce only correct projectiles
COPY_EXISTING arrowflm.pro ~override/cdarrowf.pro~
ADD_PROJECTILE ~override/cdarrowf.pro~

// spells should use the new arrowflm.pro dupe
COPY_EXISTING
eyeeglm3.spl override // Eagle Eye gaze attack
spwi011.spl  override // TRAP_ARROW_FIRE, probably not a spell
spwi303.spl  override // WIZARD_FLAME_ARROW
  PATCH_IF SOURCE_SIZE BEGIN
	FOR (i = 0; i < SHORT_AT 0x68; i += 1) BEGIN
	  WRITE_SHORT LONG_AT 0x64 + i * 0x28 + 0x26 cdarrowf
	END
  END
BUT_ONLY
and add eyeeglm3.spl to the ALLOW_MISSING block.

The bounce projectile opcode shouldn't work on area effects.

Thank you for all the work you've been doing, by the way.
"You tell lies, too."
"Not I." The witch laughed; her laughter was clear and yet unpleasant. "I used to as a child, I confess. But I soon found the truth more disconcerting."

#34 devSin

devSin
  • Fixpackers
  • 3017 posts
  • Gender:Male

Posted 16 January 2010 - 11:55 AM

You know how much I hate custom pros.

"Don't cast flame ARROW at reflection shield, duh," is so much cleaner, don't you think?

We should make the eagle eye use the holy bolt spear thing out of spite, though.

#35 Nythrun

Nythrun

    Long since out to pasture

  • Modders
  • 1761 posts
  • Gender:Female

Posted 17 January 2010 - 04:54 PM

ALLOW_MISSING


Ya know, unless anyone has objections, I think I'm just going to trash ALLOW_MISSING and convert the long-file-list patches to ACTION_IF FILE_EXISTS_IN_GAME. It'll save some space, too (though not as much as a detildafier/"%int%" -> int revision.
"You tell lies, too."
"Not I." The witch laughed; her laughter was clear and yet unpleasant. "I used to as a child, I confess. But I soon found the truth more disconcerting."

#36 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 7097 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 17 January 2010 - 11:08 PM

I think retiring ALLOW_MISSING as a coding option will help avoid some troubles folks have had over the years with 0 byte files.
I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#37 Wisp

Wisp
  • Modders
  • 1113 posts
  • Gender:Male

Posted 18 January 2010 - 05:38 AM

Ya know, unless anyone has objections, I think I'm just going to trash ALLOW_MISSING and convert the long-file-list patches to ACTION_IF FILE_EXISTS_IN_GAME. It'll save some space, too (though not as much as a detildafier/"%int%" -> int revision.

Sounds like a good idea to me. Making a proposal for removing ALLOW_MISSING has been on my to-do list as well. So much the better if I won't have to :)

#38 aVENGER_(RR)

aVENGER_(RR)
  • Fixpackers
  • 1008 posts
  • Gender:Not Telling

Posted 18 January 2010 - 05:54 AM

I think retiring ALLOW_MISSING as a coding option will help avoid some troubles folks have had over the years with 0 byte files.


Just for clarity, a properly implemented ALLOW_MISSING + PATCH_IF SOURCE_SIZE combo doesn't create 0 byte files in the override. :)

Still, it's definitively a better idea to use the more robust ACTION_FOR EACH + ACTION_IF FILE_EXISTS_IN_GAME coding approach.

#39 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2600 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 18 January 2010 - 08:00 AM

http://forums.gibber...s...st&p=161341

ACTION_FOR_EACH file IN
amul26.itm // Amulet of Cheetah Speed
boot01.itm // Boots of Speed
BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~%file%.itm~ BEGIN
COPY_EXISTING ~%file%.itm~ override
WRITE_LONG 0x1e LONG_AT 0x1e & ` 0x20000000 // unset monk unusable flag
BUT_ONLY
END
END


Retired from modding.


#40 Nythrun

Nythrun

    Long since out to pasture

  • Modders
  • 1761 posts
  • Gender:Female

Posted 19 January 2010 - 09:03 PM

Detildafied, ALLOW_MISSING removed, many of the patches to unused creatures dumped in the modder pack, some compression via replacing (only a few) long multiple use patches with function crud. Will diff with version 8 later this week, after some quality napping. Don't let me hold you folks up in posting all the fine stuff you've been working on - nothing is finalized and there's no hurry.

The only place ALLOW_MISSING was really getting us in trouble was with scripts (especially because EXTEND_* doesn't even warn you if it's attaching to a nonexistent file). It'll demand some testing later on a SoA install to make sure there wasn't some hidden error that A_M was concealing that'll prevent installation for those players missing out on the gripping ToB plot.

Anyway. The documentation is going to need updating with any new stuff that's going into beta fixes, and it'd be swell to keep that synched with the forum posts. If anyone's clamoring for a grating chore, try volunteering for Fixpacker status. You could move posts around for hours! It's a power trip that leaves you feeling curiously hollow and dissatisfied!

If not, I'll get to that too - but not tonight.

Did anyone ever get a chance to look at the Saemon Havarian beta fixes? I know there were some reports of snafu there, but I'm not sure what. It's the only thing in the old Beta fixes that I haven't promoted to Core.
"You tell lies, too."
"Not I." The witch laughed; her laughter was clear and yet unpleasant. "I used to as a child, I confess. But I soon found the truth more disconcerting."

#41 Nythrun

Nythrun

    Long since out to pasture

  • Modders
  • 1761 posts
  • Gender:Female

Posted 20 January 2010 - 07:16 PM

Not to unduly turn Wisp's thread into a farrago, but I keep finding things to remove, and it's holding the process up.

Edwin spellbook patch = bogus, has to go.

Jaheira spellbook patch = why are we trying to replace Remove Fear with Entangle? She doesn't know the former at all and the replacement is the wrong level?

Minsc8 and Minsc10 are getting one memorized spell too many.

We're patching Nalia's damn arrows four times :)

Oh well. At least all the Centeol patches are exiled to the modder pack :D

While we're at it, I've thrown together an OBC "Dispel Magic uses level based .effs" for folks who can't use Taimon's haxx (it's been requested several times now, and since the Shapeshifter Paw stuff will never be undeprecated, it's the next closest thing).

Also a couple secrets.
"You tell lies, too."
"Not I." The witch laughed; her laughter was clear and yet unpleasant. "I used to as a child, I confess. But I soon found the truth more disconcerting."

#42 devSin

devSin
  • Fixpackers
  • 3017 posts
  • Gender:Male

Posted 20 January 2010 - 07:50 PM

Did anyone ever get a chance to look at the Saemon Havarian beta fixes? I know there were some reports of snafu there, but I'm not sure what. It's the only thing in the old Beta fixes that I haven't promoted to Core.

Nobody has the courage to touch it.

The whole sequence is probably better left along unless there's a clear bug that we cause or somebody really intends to take responsibility for making sure we don't sack and burn the whole island trying to get Saemon to appear next to the boat.

#43 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2600 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 21 January 2010 - 06:19 AM

Btw, fyi Saemon appeared correctly to me when I had no Fixpack/BD installed. It's been very long time ago, but I'm 99% certain. And the sequence was bugged with BD/FP_non_beta.

Retired from modding.


#44 Wisp

Wisp
  • Modders
  • 1113 posts
  • Gender:Male

Posted 21 January 2010 - 02:17 PM

Anyway. The documentation is going to need updating with any new stuff that's going into beta fixes, and it'd be swell to keep that synched with the forum posts.

I can look over the documentation, but I'd like to finish another project I've been working on (extracting the legit stuff from the GTU and putting it among the core fixes) first. It might be another few weeks before I'm done with that (in case someone else is chomping at the bit).

#45 Nythrun

Nythrun

    Long since out to pasture

  • Modders
  • 1761 posts
  • Gender:Female

Posted 23 January 2010 - 01:38 AM

I can look over the documentation, but I'd like to finish another project I've been working on (extracting the legit stuff from the GTU and putting it among the core fixes) first.


I won't try to dissuade you.

Okay, that's a lie. Please make sure that you've made peace with devoting a large and irrevocable chunk of your only life to the GTU before enmeshing yourself in such a project. It's not that you wouldn't improve it - and it could certainly use the help - but it's dire toil on something that ought never have been incorporated into the Fixpack in the first place.

Kevin Dorner did the best he could with the tools available at the time, and Baldurdash was overall a notable improvement over nothing - except for the GTU, which is genuinely worse than no patch at all. I'd like to set it on fire myself, and Cam and devSin both had to suffer with it longer than I did.

So, erm, godspeed. And no rush - the forum's been in slow motion for a while now, it can stand to wait a bit longer.
"You tell lies, too."
"Not I." The witch laughed; her laughter was clear and yet unpleasant. "I used to as a child, I confess. But I soon found the truth more disconcerting."



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users