Jump to content

fighting styles vs proficiencies


critto

Recommended Posts

Is there some place I can take a look how did you do that?

 

One example of mine adds on-hit melee effects to certain thief weapons, in my Might & Guile mod:

https://github.com/UnearthedArcana/Might_and_Guile/releases

 

The Weidu looks like this:

 

APPEND ~splprot.2da~ ~D5_134_BIT1%TAB%134%TAB%1%TAB%8~
COPY_EXISTING ~splprot.2da~ ~override~
	COUNT_2DA_COLS cols // amount of columns
	READ_2DA_ENTRIES_NOW rows cols // read all file into memory  
	FOR (row = 1; row < rows; ++row) BEGIN // iterate over rows
	  READ_2DA_ENTRY_FORMER rows row 0 ~stat~ // read column value
	  PATCH_IF ~%stat%~ STRING_EQUAL_CASE ~D5_134_BIT1~ BEGIN
	    SET 134_bit1 = %row%
	  END
	END
BUT_ONLY
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
	READ_BYTE 0x31 prof
	PATCH_IF (%prof% = 115) BEGIN	// club
	  LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~d5_rf75a~ END
	END
	PATCH_IF (%prof% = 96) OR	// dagger
			(%prof% = 91) BEGIN	// short sword
	  LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~d5_rf75c~ END
	END
	PATCH_IF (%prof% = 102) BEGIN	// staff
	  LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 248 target = 1 timing = 2 resist_dispel = 0 STR_VAR resource = ~d5_rf75e~ END
	END
  END
BUT_ONLY
COPY ~might_and_guile/feats/d5_rf75a.eff~ ~override~
COPY ~might_and_guile/feats/d5_rf75a.spl~ ~override~
  LPF ALTER_EFFECT INT_VAR match_opcode = 326 parameter1 = 1 parameter2 = %134_bit1% END
COPY ~might_and_guile/feats/d5_rf75b.spl~ ~override~
COPY ~might_and_guile/feats/d5_rf75c.eff~ ~override~
COPY ~might_and_guile/feats/d5_rf75c.spl~ ~override~
  LPF ALTER_EFFECT INT_VAR match_opcode = 326 parameter1 = 1 parameter2 = %134_bit1% END
COPY ~might_and_guile/feats/d5_rf75d.spl~ ~override~
COPY ~might_and_guile/feats/d5_rf75e.eff~ ~override~
COPY ~might_and_guile/feats/d5_rf75e.spl~ ~override~
  LPF ALTER_EFFECT INT_VAR match_opcode = 326 parameter1 = 1 parameter2 = %134_bit1% END
COPY ~might_and_guile/feats/d5_rf75f.spl~ ~override~

 

 

That ability sets an unused proficiency in the character, and applies effects to multiple weapons that check it. But you could fairly easily change it to check a regular weapon prof and apply something to that weapon. Then you don't need to use bit equality; so the line appended to SPLPROT.2da should use a relation of 1 or 4 instead of 8.

 

You'll have to download the mod to check out what those .spl and .eff files look like, but basically

- the mod patches weapons with a 248 on-hit effect;

- that triggers an .eff which I think uses 146 to cast a spell (at the target);

- the spell has a 326 effect checking the item wielder's prof;

- if the proficiency is there, it casts a final spell on the target

 

If it's not exactly that, it's something like that. You can hopefully piece it together from the code and inspecting the files.

 

Doing stuff like I did with single weapon style is more complex; it needs to know how many weapons you are holding, which isn't easy. So it simultaneously sets and evaluates a separate proficiency in addition to the SWS proficiency. That one is in my Scales of Balance mod.

Link to comment

Archived

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

×
×
  • Create New...