The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Testing kits in scripts
aigleborgne
post Jan 12 2006, 08:24 AM
Post #1



Group Icon

Mod Developer
Posts: 210
Joined: 3-December 05




Hello,

I'm trying to test kits in scripts, but I have manually set the kits with that:
WRITE_SHORT 0x244 0 //unused in KITLIST.2DA designation
WRITE_BYTE 0x246 29 //change to <name of kit> number as per KITLIST.2DA row
WRITE_BYTE 0x247 0x40 //force kit to use KITLIST.2DA instead of KIT.IDS

29 for a transmuter, in my example
When I look into Near infinity, I have 29 - Transmuter
It seems to work fine (notice that on a normal cre, Transmuter is number 8192 if you set the kit with NI)

Then come the script:
OR(3)
CheckStat(Myself,8192,KIT)
CheckStat(Myself,29,KIT)
Kit(Myself,MAGESCHOOL_TRANSMUTER)
Neither of these triggers work...
The first one work with a normal cre using transmuter kit.

I don't know how to do.
Go to the top of the page
 
Quote Post
Ascension64
post Jan 12 2006, 12:40 PM
Post #2





Contributor
Posts: 44
Joined: 17-September 05




One solution would be to use KIT.IDS in the Kit parameter in the CRE file, but even I am having trouble convering raw hex to Big Endian mod. Any mathematical geniuses know the trick to this (not necessarliy WeiDU coding, just the rules of how to convert)?
Go to the top of the page
 
Quote Post
Vlasák
post Jan 13 2006, 05:33 PM
Post #3


Mathematical poet


Retired team member
Posts: 159
Joined: 9-July 04
From: Prague, Czech Republic




Original kit.ids has incorrect values. Correct table should look as follows:

CODE
0x0000 BARBARIAN
0x0000 WILDMAGE
0x0040 MAGESCHOOL_ABJURER
0x0080 MAGESCHOOL_CONJURER
0x0100 MAGESCHOOL_DIVINER
0x0200 MAGESCHOOL_ENCHANTER
0x0400 MAGESCHOOL_ILLUSIONIST
0x0800 MAGESCHOOL_INVOKER
0x1000 MAGESCHOOL_NECROMANCER
0x2000 MAGESCHOOL_TRANSMUTER
0x4000 TRUE_CLASS
0x4001 BERSERKER
0x4002 WIZARDSLAYER
0x4003 KENSAI
0x4004 CAVALIER
0x4005 INQUISITOR
0x4006 UNDEADHUNTER
0x4007 FERALAN
0x4008 STALKER
0x4009 BEASTMASTER
0x400A ASSASIN
0x400B BOUNTYHUNTER
0x400C SWASHBUCKLER
0x400D BLADE
0x400E JESTER
0x400F SKALD
0x4010 TOTEMIC
0x4011 SHAPESHIFTER
0x4012 BEASTFRIEND
0x4013 GODTALOS
0x4014 GODHELM
0x4015 GODLATHANDER


BTW ascension: what do you mean? In kit.ids there are the hex humbers too. The only neccessity can be in the switching of the bytes to the reversed endian.


--------------------
Baldur's Gate II add-on CZ - TC from Dalelands
http://addoncz.gamestar.cz

English forums are opened!
Go to the top of the page
 
Quote Post
Ascension64
post Jan 14 2006, 02:37 AM
Post #4





Contributor
Posts: 44
Joined: 17-September 05




QUOTE
BTW ascension: what do you mean? In kit.ids there are the hex humbers too. The only neccessity can be in the switching of the bytes to the reversed endian.
Well, if you fix KIT.IDS and force CREs to use KITLIST.2DA as the kit designation, will Kit() still work? If so, then nevermind. However, if that doesn't work, I couldn't work out how the Endian mode could be written properly.

Explain this:

I manually assigned the SHAPESHIFTER kit to a random CRE file using NI (the KIT.IDS used at the time was your repaired one above). In the .IDS file, the raw hex value is 0x4011. Now, if I convert the NI assignment value to hex, it reads 0x00100000. Why?

Now let's try TRANSMUTER kit. Again, the repaired KIT.IDS reads 0x2000, and the NI assignment in hex reads 0x00000020. That looks OK, and the same is for the rest of the specialist mage kits, which is good.

Now let's try the WIZARDSLAYER kit. Repaired KIT.IDS reads 0x4002, yet NI hex assignment reads 0x00002000. Why?

Remember, NI is currently using the repaired KIT.IDS as you stated above.

Now read the IESDP description of the Kit field; there is a line that reads "NB.: The values of this offset are written in big endian style." It is obvious from the examples above the Big Endian style is not simply hex bytes reversed. So what is it, and how can you code the change in WeiDU?

This post has been edited by Ascension64: Jan 14 2006, 02:43 AM
Go to the top of the page
 
Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 19th May 2024 - 03:06 AM