Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plate Armors Item Usability bugs #144

Open
lixiss opened this issue Mar 10, 2019 · 0 comments
Open

Plate Armors Item Usability bugs #144

lixiss opened this issue Mar 10, 2019 · 0 comments
Labels
bug question Investigate Further

Comments

@lixiss
Copy link

lixiss commented Mar 10, 2019

From my understanding, some clerics is unrestricted to armor which they may use, but in game after F&P v0.75.21.1 installed (BGEE+SOD) they can't wear plate armors. For example, multiclassed fighter/cleric - Hand of Torm (i hope i look into right places):

In add_cleric_kits.tpa

B_FC_TORM
defined as 
 LAF ~DEFINE_FNP_KIT_INFO~
  INT_VAR
	u_leather_armor 	= 1
	u_chain_armor 		= 1
	u_plate_armor 		= 1

But in game they can't use any plates armors... so i suspect it is something wrong in item_usability.tpa.
Probably somewhere here:

//set armor usability for cleric/druid kits_________________________________________
//
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  PATCH_IF (%SOURCE_SIZE% > 0x71) BEGIN
	READ_SHORT 	0x1c type
	READ_BYTE 	0x1f class_2
	READ_BYTE 	0x29 kits
	PATCH_IF (type = 2) BEGIN
	  PATCH_IF ((%class_2% BAND 0b00001000) = 0b00000000) BEGIN 		// if *IS usable* by fighters
		WRITE_BYTE 0x29 (%kits% BAND 0b11000000) 						// make usable by divine kits
	  END
	  READ_LONG 0x22 appearance
//	  PATCH_IF (appearance = 16690) BEGIN 								// leather appearance
//		WRITE_BYTE 0x29 (%kits% BAND 0b11101111) 						// make usable by shapeshifter
//	  END
	  PATCH_IF (appearance = 16691) BEGIN 								// chain appearance
		WRITE_BYTE 0x29 (%kits% BOR 0b00111100) 						// restrict from lathander + totemic + shapeshifter + avenger
	  END
	  ELSE PATCH_IF (appearance = 16692) BEGIN 							// plate appearance
		WRITE_BYTE 0x29 (%kits% BOR 0b00111110) 						// restrict from lat + helm + totemic + shapeshifter + avenger
	  END
	END
  END
BUT_ONLY

Unfortunately i'm can't say what exactly wrong, this plays with bits and i'm not familiar with them. :)

ADD: Well, it is exactly related to next lines:

	  ELSE PATCH_IF (appearance = 16692) BEGIN 							// plate appearance
		WRITE_BYTE 0x29 (%kits% BOR 0b00111110) 						// restrict from lat + helm + totemic + shapeshifter + avenger
	  END

I'm removed any restrictions here (by changed to zero mask) and they able to wear plate armors. Surely this is just workaround, and allow wear plates for other classes which probably must not wear them.

If this is engine limitation and we can't properly disable armor usability for some classes/kits - my preference - just enable for anyone, because on average this should work better, than incorrect usability which incur limit on everyone.

@Grammarsalad Grammarsalad added bug question Investigate Further labels Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug question Investigate Further
Projects
None yet
Development

No branches or pull requests

2 participants