Jump to content


Photo

Barbarian and class.ids


  • Please log in to reply
9 replies to this topic

#1 Lord Ernie

Lord Ernie
  • Modder
  • 755 posts

Posted 11 August 2005 - 02:59 PM

As some of you may know, I'm coding up the Tashia update that's been in here for some time. Now, Bri has written some Class-based lovetalks, but I seem to have a problem encoding the Barbarian one: there is no identifier for the class (both DLTCEP and the IESDP confirm this). I'm not sure how a barbarian is encoded (is it a fighter kit, or something?), but is it possible to detect if a PC is a barbarian, and to differentiate it from the other fighter types?

Edited by Lord Ernie, 11 August 2005 - 03:00 PM.

In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams

I like persons better than principles, and I like persons with no principles better than anything else in the world - Oscar Wilde

Give a man a fire, and he's warm for a day. But set a man on fire, and he's warm for the rest of his life. - Terry Pratchett


#2 Lord Ernie

Lord Ernie
  • Modder
  • 755 posts

Posted 11 August 2005 - 10:47 PM

Right, I've done some more searching on this, and I think I've found it. As a Barbarian is a fighter kit, this should detect him uniquely, right?

Class(Player1,FIGHTER_ALL)
Kit(Player1,BARBARIAN)

Except for the fact that Barbarian and Wild Mage still share the same identifier, of course (so the script would also trigger on the (illegal) fighter/wild mage multiclass).

Edited by Lord Ernie, 11 August 2005 - 10:50 PM.

In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams

I like persons better than principles, and I like persons with no principles better than anything else in the world - Oscar Wilde

Give a man a fire, and he's warm for a day. But set a man on fire, and he's warm for the rest of his life. - Terry Pratchett


#3 Darios

Darios
  • Member
  • 7 posts

Posted 11 August 2005 - 11:27 PM

The first thing you want if you're making kit specific talks is the corrected kit.ids - if you don't have it already, that is.

I remember that there was some debate over the correct way of correcting it, but here's what we use for Amber (I hope that we got it right):  

// The following fixes the broken kit.ids so that it can be used to detect kits properly.

COPY_EXISTING ~kit.ids~ ~override/kit.ids~
   REPLACE_TEXTUALLY ~0x00004000~ ~0x4000~ // TRUECLASS/MAGESCHOOL_GENERALIST
   REPLACE_TEXTUALLY ~0x00000040~ ~0x0040~ // MAGESCHOOL_ABJURER
   REPLACE_TEXTUALLY ~0x00000080~ ~0x0080~ // MAGESCHOOL_CONJURER
   REPLACE_TEXTUALLY ~0x00000100~ ~0x0100~ // MAGESCHOOL_DIVINER
   REPLACE_TEXTUALLY ~0x00000200~ ~0x0200~ // MAGESCHOOL_ENCHANTER
   REPLACE_TEXTUALLY ~0x00000400~ ~0x0400~ // MAGESCHOOL_ILLUSIONIST
   REPLACE_TEXTUALLY ~0x00000800~ ~0x0800~ // MAGESCHOOL_INVOKER
   REPLACE_TEXTUALLY ~0x00001000~ ~0x1000~ // MAGESCHOOL_NECROMANCER
   REPLACE_TEXTUALLY ~0x00002000~ ~0x2000~ // MAGESCHOOL_TRANSMUTER
   REPLACE_TEXTUALLY ~0x00000001~ ~0x4001~ // BERSERKER
   REPLACE_TEXTUALLY ~0x00000002~ ~0x4002~ // WIZARDSLAYER
   REPLACE_TEXTUALLY ~0x00000004~ ~0x4003~ // KENSAI
   REPLACE_TEXTUALLY ~0x00000008~ ~0x4004~ // CAVALIER
   REPLACE_TEXTUALLY ~0x00000010~ ~0x4005~ // INQUISITOR
   REPLACE_TEXTUALLY ~0x00000020~ ~0x4006~ // UNDEADHUNTER
   REPLACE_TEXTUALLY ~0x00008000~ ~0x4007~ // FERALAN
   REPLACE_TEXTUALLY ~0x00010000~ ~0x4008~ // STALKER
   REPLACE_TEXTUALLY ~0x00020000~ ~0x4009~ // BEASTMASTER
   REPLACE_TEXTUALLY ~0x00040000~ ~0x400A~ // ASSASIN
   REPLACE_TEXTUALLY ~0x00080000~ ~0x400B~ // BOUNTYHUNTER
   REPLACE_TEXTUALLY ~0x00100000~ ~0x400C~ // SWASHBUCKLER
   REPLACE_TEXTUALLY ~0x00200000~ ~0x400D~ // BLADE
   REPLACE_TEXTUALLY ~0x00400000~ ~0x400E~ // JESTER
   REPLACE_TEXTUALLY ~0x00800000~ ~0x400F~ // SKALD
   REPLACE_TEXTUALLY ~0x01000000~ ~0x4013~ // GODTALOS
   REPLACE_TEXTUALLY ~0x02000000~ ~0x4014~ // GODHELM
   REPLACE_TEXTUALLY ~0x04000000~ ~0x4015~ // GODLATHANDER
   REPLACE_TEXTUALLY ~0x08000000~ ~0x4010~ // TOTEMIC
   REPLACE_TEXTUALLY ~0x10000000~ ~0x4011~ // SHAPESHIFTER
   REPLACE_TEXTUALLY ~0x20000000~ ~0x4012~ // BEASTFRIEND
   REPLACE_TEXTUALLY ~0x40000000~ ~0x401F~ // BARBARIAN

We don't have any barbarian specific lines at the moment, but in regards of cleric kits I *remember* testing that this works out.

If you drop that _ALL from the class check you should only get response to single classes and kits. From IESDP:

2 FIGHTER
Detects fighters, though only single class & kits.

203 FIGHTER_ALL
Detects fighters, including single class, kits, multi-class, and dual-class.



#4 Meira

Meira

    I'm the snow on your lips

  • Member
  • 411 posts

Posted 11 August 2005 - 11:29 PM

And that wasn't Darios, but me. So don't blame him. ;)

Edited by Meira, 11 August 2005 - 11:29 PM.

Ihmeellinen meri

Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.

- Edith Södergran


Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3

#5 Lord Ernie

Lord Ernie
  • Modder
  • 755 posts

Posted 13 August 2005 - 02:35 PM

All right, I will. :D

Seriously, neither this piece of code, nor the updated kit.ids table at IESDP seem to make my script fire, which should actually be quite simple:

IF
InParty(Myself)
Class(Player1, FIGHTER)
Kit(Player1,BARBARIAN)
Global("TashiaRomanceActive","GLOBAL",2)
GlobalGT("LoveTalk","LOCALS",50)
Global("LE#TashiaClassLovetalkTimerSet","GLOBAL",0)
THEN

All the other variables are in order, and removing the Class restriction dosen't help either...

Edited by Lord Ernie, 13 August 2005 - 02:36 PM.

In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams

I like persons better than principles, and I like persons with no principles better than anything else in the world - Oscar Wilde

Give a man a fire, and he's warm for a day. But set a man on fire, and he's warm for the rest of his life. - Terry Pratchett


#6 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 14 August 2005 - 05:02 AM

Conveniently, the bulk of "fixed" IDS files floating around are often wrong in one way or another. As I recall, Barbarian is actually 0x0000. Maybe.
Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#7 Meira

Meira

    I'm the snow on your lips

  • Member
  • 411 posts

Posted 14 August 2005 - 12:00 PM

Lord Ernie, if you get the barbarian check working with 0x0000, I'd certainly like to know. :) I've planned kit specific talks for Amber ToB and it would really save time if I don't have to troubleshoot kit.ids again when testing ToB becomes relevant.

You seem to have knack for finding bugs in Amber - even when you're doing something else. ;)
Ihmeellinen meri

Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.

- Edith Södergran


Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3

#8 Lord Ernie

Lord Ernie
  • Modder
  • 755 posts

Posted 14 August 2005 - 01:18 PM

After a lot of messing around, I've got it to work. Seems like your replace textually thingy above is a bit wrong. I've opened up a savegame with a barbarian in DLTCEP, which was kind enough to inform me Barbarians are at 0x00004000, not 0x40000000. So I modified it to:

REPLACE_TEXTUALLY ~0x00004000~ ~0x0000~ // BARBARIAN

and the script fired perfectly. Now I was wondering where the true class went, and I opened up another savegame with DLTCEP, which gave me 0x40000000 for True Class. Seems you exchanged the two in your code block above.

You seem to have knack for finding bugs in Amber - even when you're doing something else.  ;)

Glad to be of service :). I seem to get better at this, though. I'm fixing bugs before Amber ToB is in production, let alone released :D.

Edited by Lord Ernie, 14 August 2005 - 01:22 PM.

In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams

I like persons better than principles, and I like persons with no principles better than anything else in the world - Oscar Wilde

Give a man a fire, and he's warm for a day. But set a man on fire, and he's warm for the rest of his life. - Terry Pratchett


#9 igi

igi

    IESDP Guardian

  • Administrator
  • 1059 posts

Posted 15 August 2005 - 10:05 AM

The IESDP conviniently lists barbarian as 0x0000 and trueclass as 0x4000 at http://iesdp.gibberl...ids/bg2/kit.htm

...

Visit the IESDP


#10 Lord Ernie

Lord Ernie
  • Modder
  • 755 posts

Posted 15 August 2005 - 10:23 AM

I know, that's where I got the values. Thing is, when I just placed these in the kit.ids file, it didn't work. Using REPLACE TEXTUALLY as I've explained below did work. Don't ask me why, though.

Edited by Lord Ernie, 15 August 2005 - 10:24 AM.

In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams

I like persons better than principles, and I like persons with no principles better than anything else in the world - Oscar Wilde

Give a man a fire, and he's warm for a day. But set a man on fire, and he's warm for the rest of his life. - Terry Pratchett