Jump to content

Amber can't equip elven chain?


Fyorl

Recommended Posts

I severly doubt this is an issue with Amber's mod, it's probably down to a combination of mods but I just wanted to make sure.

 

Despite being a fighter/thief, elven chain appears red in her inventory and cannot be equipped. I've used DLTCEP to check the item's usability flags and it should be usable by thieves and fighter/thieves so I'm not sure what's going on.

 

It's a bit of a bummer because I like to have at least one person in my party that can use Elven Chain due to its coolness factor. My PC's an Arcane Archer, Jaheira's a Druid, Nalia's a Wild Mage, Xan's a Sorcerer so that only leaves Amber and Auren and Auren needs her plate mail.

 

Edit:

I'll do some tests and see if the problem's only related to Amber.

Link to comment

Amber has stalker's (a rangers' kit) armour restrictions, so it's possible that's the cause. I don't remember anymore, but I seem to recall that stalkers can't wear metal armour. But, yeah, role-playing-wise Amber should probably agree to wear elven chain as it's light and makes no sound.

Link to comment

:S She does? Well I've just checked DLTCEP and Elven Chain's usability is unchecked for Stalkers so that will definitely be the reason.

 

Why does she have those armour restrictions? I don't use Valygar so my workaround will be to check the Stalker box on all the elven chain but other people will probably not want that.

Link to comment
:S She does? Well I've just checked DLTCEP and Elven Chain's usability is unchecked for Stalkers so that will definitely be the reason.

 

Ah, okay, that's what I thought too.

 

Why does she have those armour restrictions? I

Due her fiendish background Amber has innate abilities, such as 'blind opponent' and 'resist fire damage' (they'll develop further when she gains levels). On top of that she also has the 'poison weapon' -ability of the Assassin kit. To balance that she cannot wear "better" armour than studded leather. In addition to that restriction she won't wield two-handed swords or halberds; neither she'll wear shields (other than bucklers) or helmets. However, she can still use some warrior weapons like longbows and spears. Thanks to gibberrlings' support I learned how to create a special (invisible) kit for Amber that simulates most of these effects. If I didn't use the stalker kit to simulate Amber's armour restrictions, I'd had to use a much more long winded scripting for it. That would add unnecessary burden for the engine (and wouldn't work with the latest mod releases .) The inability to use elven chain armour is IMO a small price to pay for smoother engine performance.

 

I guess role-playing-wise you can explain that by her unique stubbornness that sometimes reaches those special female levels. ;) (Or just check that box for the elven chain armour and have her wear it.)

Link to comment

I'm curious as to why you gave her the Stalker armour restrictions though. Thieves cannot wear better than studded leather either but they have an exception in that they can wear elven chain. Would that not be a solution?

Link to comment

I don't remember the exact reasoning behind using stalker (armour) restrictions as a base for Amber's. However, if I remember correctly, the armour restrictions of a kit cannot be separated from other item restrictions. If I had used thieves item restrictions, Amber could not use spears or longbows and I definitely wanted her to be able to use those weapons. In addition stalkers (because it's a warrior class kit) can also use all potions, belts and other items that fighters can - a thief kit would prevent that.

 

I recall trying out other existing kits, but the stalker gave best results with minimal unwanted side effects. The combination of abilities and restrictions I wanted for Amber was a classic case of "hardcoded, you cant have that", but with help I managed to work around that.

 

A summary of what I wanted:

No halberds

No 2-handed swords

No armour greater than studded leather

No helmets

No shields save bucklers

Spears are a must have

I'd like to have long bows and swords too, but they go with being able to use spears anyway

Backstabbing is a must have

No 'use any item' -HLA

 

If I remember right the kit deals with everything else than the shields and helmets. Like HLA tables, weapons in which the kitted character can gain proficiencies can be determined separately from the item restrictions of the kit and thus Amber should not be able to put proficiency points to halberds or 2-handed swords. Thanks to Cam the shield, helmet and large weapon restrictions are simulated further by this lovely tp2 script:

 

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
  READ_SHORT 0x1c "type"
  READ_BYTE  0x18 "2hand"
  READ_BYTE  0x20 "usability"
  PATCH_IF (
		  ("%type%" = 30) OR // halberd
		  ("%type%" =  7) OR // helm
		  (
			("%type%" = 20) AND // type: long sword with...
			(("%2hand%" BOR 0b11111101) = 0b11111111) // two-handed flag
		  ) OR (
			(("%usability%" BOR 0b10111101) = 0b11111101) AND // usable bt f-t, unusable by t
			(
			  ("%type%" =  2) OR // type: armor or
			  ("%type%" = 12)	// type: shield
			)
		  )
		) BEGIN
 // hack to preserve source_res for inner patch
 READ_ASCII			0x08 "temp" (8)
 WRITE_EVALUATED_ASCII 0x08 "%SOURCE_RES%" #8
 READ_ASCII			0x08 "exclude_file"
 WRITE_EVALUATED_ASCII 0x08 "%temp%" #8

 INNER_ACTION BEGIN

   COPY_EXISTING ~m#ear.itm~ ~override~
	 READ_LONG   0x6a "fx_off"
	 READ_SHORT  0x70 "fx_num"
	 WRITE_SHORT 0x70 ("%fx_num%" + 1)
	 INSERT_BYTES			("%fx_off%"	   ) 0x30			 // insert new global effect
	   WRITE_SHORT		   ("%fx_off%"	   ) 180			  // disallow item
	   WRITE_BYTE			("%fx_off%" + 0x02) 1				// target: self
	   WRITE_BYTE			("%fx_off%" + 0x0c) 2				// instant/while equipped
	   WRITE_BYTE			("%fx_off%" + 0x12) 100			  // probability
	   WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14) "%exclude_file%" // file
	   // this tree simply adds a display string based on the item type
	   PATCH_IF ("%type%" = 2) BEGIN // if armor
		 SAY ("%fx_off%" + 0x04) @328 /* @328 = ~Amber refuses to wear armor heavier than studded leather.~ */
	   END ELSE
	   PATCH_IF ("%type%" = 7) BEGIN // if helm
		 SAY ("%fx_off%" + 0x04) @329 /* @329 = ~Amber refuses to use helmets.~ */
	   END ELSE
	   PATCH_IF ("%type%" = 12) BEGIN // if shield > buckler
		 SAY ("%fx_off%" + 0x04) @330 /* @330 = ~Amber refuses to use shields larger than bucklers.~ */
	   END ELSE
	   PATCH_IF ("%type%" = 20) BEGIN // if 2h sword
		 SAY ("%fx_off%" + 0x04) @331 /* @331 = ~Amber refuses to use two-handed swords.~ */
	   END ELSE BEGIN // otherwise halberd
		 SAY ("%fx_off%" + 0x04) @332 /* @332 = ~Amber refuses to use halberds.~ */
	   END

 END
  END
END
BUT_ONLY_IF_IT_CHANGES

Link to comment

And now it's worse. ;)

 

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
 READ_SHORT 0x1c "type" ELSE 0
 READ_BYTE  0x18 "2hand" ELSE 0
 READ_BYTE  0x20 "usability" ELSE 0
 PATCH_IF (
		 ("%type%" = 30) OR // halberd
		 ("%type%" =  7) OR // helm
		 (
		   ("%type%" = 20) AND // type: long sword with...
		   (("%2hand%" BOR 0b11111101) = 0b11111111) // two-handed flag
		 ) OR (
		   (("%usability%" BOR 0b10111101) = 0b11111101) AND // usable bt f-t, unusable by t
		   (
			 ("%type%" = 12) OR // type: shield
			 (
			   ("%type%" = 2) AND // armor, excluding the elven chains below
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "a!bchan1") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "bsingchn") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "c2chan01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "chan12") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "chan13") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "chan14") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "chan15") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "chan16") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "chan19") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "chands06") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "clolth") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "drowchn1") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "drowchn2") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "drowchn3") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "dsjearm") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "dwchan01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "dwchan02") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "echan01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "echan02") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "efml01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "fwchan02") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "fwchan03") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "gcmch01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "illas04") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "ntchan04") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "ntchan06") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "pchan") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "rr#chn01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "scal04") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "sgchan1") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "sgchan2") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "tzchan01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "u#chan01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "u#chan07") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "ucmgch01") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "ucmgch02") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "x#garch") AND
			   ("%SOURCE_RES%" STRING_COMPARE_CASE "x#garch2")
			 )
		   )
		 )
	   ) BEGIN
// hack to preserve source_res for inner patch
READ_ASCII			0x08 "temp" (8)
WRITE_EVALUATED_ASCII 0x08 "%SOURCE_RES%" #8
READ_ASCII			0x08 "exclude_file"
WRITE_EVALUATED_ASCII 0x08 "%temp%" #8

INNER_ACTION BEGIN

  COPY_EXISTING ~m#ear.itm~ ~override~
	READ_LONG   0x6a "fx_off"
	READ_SHORT  0x70 "fx_num"
	WRITE_SHORT 0x70 ("%fx_num%" + 1)
	INSERT_BYTES			("%fx_off%"	   ) 0x30			 // insert new global effect
	  WRITE_SHORT		   ("%fx_off%"	   ) 180			  // disallow item
	  WRITE_BYTE			("%fx_off%" + 0x02) 1				// target: self
	  WRITE_BYTE			("%fx_off%" + 0x0c) 2				// instant/while equipped
	  WRITE_BYTE			("%fx_off%" + 0x12) 100			  // probability
	  WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14) "%exclude_file%" // file
	  // this tree simply adds a display string based on the item type
	  PATCH_IF ("%type%" = 2) BEGIN // if armor
		SAY ("%fx_off%" + 0x04) @328 /* @328 = ~Amber refuses to wear armor heavier than studded leather.~ */
	  END ELSE
	  PATCH_IF ("%type%" = 7) BEGIN // if helm
		SAY ("%fx_off%" + 0x04) @329 /* @329 = ~Amber refuses to use helmets.~ */
	  END ELSE
	  PATCH_IF ("%type%" = 12) BEGIN // if shield > buckler
		SAY ("%fx_off%" + 0x04) @330 /* @330 = ~Amber refuses to use shields larger than bucklers.~ */
	  END ELSE
	  PATCH_IF ("%type%" = 20) BEGIN // if 2h sword
		SAY ("%fx_off%" + 0x04) @331 /* @331 = ~Amber refuses to use two-handed swords.~ */
	  END ELSE BEGIN // otherwise halberd
		SAY ("%fx_off%" + 0x04) @332 /* @332 = ~Amber refuses to use halberds.~ */
	  END

END
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...