Jump to content


Photo

Discussion: BG2 Kit Creation Series


378 replies to this topic

#376 cmorgan

cmorgan

    journeyman investigator

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

Posted 27 October 2011 - 08:44 PM

Temporarily closed as I have deleted more than ten spammer posts from this thread... trying to slow the accumulated cruft.
I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#377 kimmuryiel

kimmuryiel
  • Members
  • 2 posts
  • Gender:Male

Posted 25 August 2013 - 06:41 PM

how would I restrict a class to a certain alignment (and gender, too, if possible)? Like, say I want to make a kit for a Priestess of Lolth; obviously, she isn't going to be worshipped by the good-natured folk.

#378 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Members
  • 3634 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 25 August 2013 - 07:45 PM

how would I restrict a class to a certain alignment (and gender, too, if possible)? Like, say I want to make a kit for a Priestess of Lolth; obviously, she isn't going to be worshipped by the good-natured folk.

Well you take this line from the kit install tutorial and make it match what you wish in game:
// appended to ALIGNMNT.2da

  ~C!Selune			    0	   0	   0	   1	   0	   0	   1	   1	   0~

Yes... I am probably still editing the post above.
FAQ for the Megamods. Frequently Answered Questions.

#379 Lollorian

Lollorian

    clueless

  • Members
  • 156 posts
  • Gender:Male

Posted 13 October 2013 - 12:59 AM

Since ToBEx no longer restricts ony 255 kits, the code snippet:
WRITE_SHORT 0x244 0 // doesn't change
  WRITE_BYTE  0x246 ~%A#SHAR%~ // the internal name of your kit, surrounded by %
  WRITE_BYTE  0x247 0x40 // doesn't change
will fail for any kits added by ADD_KIT that happen to have a serial number >255 (because BYTEs)

How about changing it to something more dynamic like:
SET x = IDS_OF_SYMBOL(~kit~ ~A#SHAR~) // the internal name of your kit
  SET y = x / 0x10000 // doesn't change
  SET z = x & 0xFFFF // doesn't change
  WRITE_SHORT 0x244 ~%y%~ // doesn't change
  WRITE_SHORT 0x246 ~%z%~ // doesn't change

Preserves the old functionality while allowing kit values >255 :cheers:

EDIT: Wisp provided a much more elegant solution here
WRITE_LONG 0x244 (A#SHAR + 0x4000) << 16 // the internal name of your kit

Edited by Lollorian, 15 October 2013 - 09:56 AM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users