Jump to content


Photo

Need a weidu code svp


3 replies to this topic

#1 deratiseur

deratiseur
  • Members
  • 108 posts
  • Gender:Male
  • Location:GAP, Hautes Alpes, France

Posted 07 February 2012 - 02:17 PM

Hello guys :)

I need a weidu code, please. I have read the weidu readme, but this is complicated for me without practice :-/

I need to patch all the wizard spells scrolls to be forbidden for hundead slayer.
French modder of a kit pack : Deratiseur_Unused_Kits_Pack_0.9.5_EE_bis for TOB/BGT/BGEE/BG2EE

#2 Ardanis

Ardanis

    A very GAR character

  • Members
  • 2227 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 07 February 2012 - 04:13 PM


COPY_EXISTING_REGEXP GLOB ~.*\.itm~ override PATCH_IF SOURCE_SIZE>0x71 BEGIN

  READ_SHORT 0x1c item

  PATCH_IF item=0xb BEGIN

    arc=0

    GET_OFFSET_ARRAY ab_arr ITM_V10_HEADERS

    PHP_EACH ab_arr AS i => ab_off BEGIN

	  GET_OFFSET_ARRAY2 ef_arr ab_off ITM_V10_HEAD_EFFECTS

	  PHP_EACH ef_arr AS i2 => ef_off BEGIN

	    READ_SHORT ef_off op

	    PATCH_IF op=147 BEGIN // the 'learn spell' opcode

		  READ_ASCII ef_off+0x14 spell (8) NULL

		  PATCH_IF FILE_EXISTS_IN_GAME ~%spell%.spl~ BEGIN

		    INNER_ACTION BEGIN

			  COPY_EXISTING - ~%spell%.spl~ override PATCH_IF SOURCE_SIZE>0x71 BEGIN

			    READ_SHORT 0x1c tp

			    PATCH_IF tp=1 BEGIN // spell type is arcane

				  arc=1

			    END

			  END

		    END

		  END

	    END // PATCH_IF op=147

	  END

    END

    PATCH_IF arc BEGIN

	  WRITE_BYTE 0x2f (THIS | 32)

    END

  END // PATCH_IF item=0xb

END BUT_ONLY


"Uguu~ Boku Ayu."

Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?

#3 deratiseur

deratiseur
  • Members
  • 108 posts
  • Gender:Male
  • Location:GAP, Hautes Alpes, France

Posted 08 February 2012 - 02:55 AM

Thanks, this works :)

My mage kitted pc cannot "use" the scrolls "Contingency" and "Wish" passed "universal" by Spell revision, and this is what i ask first. Thanks.

But i saw another problem. He can "Learn" from thems. He has the 0x00003FC0 opcode (in fact, 0x00003FE0 to add the undead hunter code), so he's considered specialist of all schools and have all scrolls forbidden..... except for the scrolls passed "universal" (no school) by Spell revision.

Have you an idea to fix this ? (at final, i wish a mage kit that cannot use scrolls at all and cannot learn from thems.)

Edited by deratiseur, 08 February 2012 - 02:56 AM.

French modder of a kit pack : Deratiseur_Unused_Kits_Pack_0.9.5_EE_bis for TOB/BGT/BGEE/BG2EE

#4 deratiseur

deratiseur
  • Members
  • 108 posts
  • Gender:Male
  • Location:GAP, Hautes Alpes, France

Posted 24 February 2012 - 01:38 AM

Ok, i have find how to fix this.

I still use the weidu code that Ardanis gave to me, it works fine, making the scrolls "red in inventory" for the kit
For the "he can learn from these scrolls" problem, i have fix this be using the opcode #101 [protection from opcode] -> protection from opcode #147 [learn spell]

Thanks for your help, again :)
French modder of a kit pack : Deratiseur_Unused_Kits_Pack_0.9.5_EE_bis for TOB/BGT/BGEE/BG2EE



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users