Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Andyr
« on: September 10, 2006, 08:18:24 AM »

Thread necromancy!
Posted by: WizWom
« on: September 10, 2006, 07:28:28 AM »

It should be noted - to anyone adding a custom kit to a full load - that the Kits are in the Kit tables by RACE, and one could, conceivably, remove a single kit from the race your charracter will be, and/or just reorder that particular race's kits (that is, put the new kit in slot 1 for the race, and move everything else down).  The panel has room for 11 buttons, so one could search for the 10th kit being in place already in the appropriate K_* file.
Posted by: weimer
« on: November 08, 2002, 03:51:48 PM »

Your TP2 command looks fine to me.

You can always tell if it works by installing [that part of] your mod and then pulling up the resulting spell in IEEP or NI. If the strref has changed to 72000-something and the string is ~Nature's Assassin~, it worked.                    
Posted by: Sir Kalthorine
« on: November 08, 2002, 02:49:12 PM »

Quote
Ah, argh, sorry for the misinformation.  I use the REPLACE tactic for scripts, but now that I think about it... yeah.  Argh, oops.   :unsure:
                   No apology necessary, Ghreyfain - I am grateful for any and all advice I can possibly receive.  I am so woolly and imprecise with my requests for help that I am glad people are covering all the bases for me! :)                    
Posted by: Ghreyfain
« on: November 08, 2002, 02:40:18 PM »


Ah, argh, sorry for the misinformation.  I use the REPLACE tactic for scripts, but now that I think about it... yeah.  Argh, oops.   :unsure:                    



[!--EDIT|Ghreyfain|Nov 8 2002, 03:40 PM--]
Posted by: Sir Kalthorine
« on: November 08, 2002, 02:18:35 PM »

So, having got a brain implant and discovered that the offset to the "Title" entry in the relevant reads "9e h", I take it that the command I put in the .tp2 file to have the spell (called ChTitle.spl) grant title read "Nature's Assassin" be:

COPY ~ChTitle.spl~ ~override/ChTitle.spl~
SAY 0x09E ~Nature's Assassin~

Phew! Time to go and do something intelligent to regain confidence in my ability to not be a total neanderthal, methinks... :)


                   
Posted by: Sir Kalthorine
« on: November 08, 2002, 02:11:48 PM »

Quote
Download Near Infinity by following links from my website. You'll have to download some Java thing to make it work as well. Put your changeTitle.spl file in the override folder. Fire up Near Infinity. Go to the "Options" menu and turn on "Show Hex Offsets". Go to the "override" folder and click on your changeTitle spell. Click through its abilities and effects until you find the change title one. To the far right of it in a little column will be the hex offset. Write it down, then put it in your TP2 file.
THANK YOU!!! Boy, do I feel foolish!!  Didn't even think to check in the Near Infinity menus.... kthunk... kthunk... kthunk... (sound of head hitting wall repeatedly).

Quote
High school physics, eh? Projectile motion, F=ma, angular velocity, inverse-square laws, that kind of thing? Or do you get to do E&M as well and play with static electricity and surface integrals?
Yup, that's the sorta thing! Although we don't touch on surface integrals (no pun intended!) at least these days I get to confuse the poor little b*gg*rs with thoughts on Universe origins and basic relativity. :D                    
Posted by: weimer
« on: November 08, 2002, 01:58:36 PM »

Right, the offset is the location in the file where the reference to the dialog.tlk string entry is located.

A file is just an array (vector) of bytes (integer values from 0-255).  So a small (7 byte) file might be:

56 123 01 67 45 44 255

We say that the byte 01 is located at offset 2 (== 0x2) in that file. Recall that we count from 0 here in computer-land.  DIALOG.TLK is just a big array of strings. Imagine that it is:

[ "Hello" ; "Finger of Death" ; "Nalia" ; "Jon Irenicus" ; "Fireball" ... ]

Now imagine that offset 0x2 is the "name offset" in our 7-byte SPL file (it's not, but imagine). Then the infinity engine will load the 7-byte SPL file, look at offset 0x2, read the byte 01, and look at entry 1 in dialog.tlk. It will then display the string "Finger of Death" as the name for that spell. This is not exactly how these things happen, but it's real close.

Download Near Infinity by following links from my website. You'll have to download some Java thing to make it work as well. Put your changeTitle.spl file in the override folder. Fire up Near Infinity. Go to the "Options" menu and turn on "Show Hex Offsets". Go to the "override" folder and click on your changeTitle spell. Click through its abilities and effects until you find the change title one. To the far right of it in a little column will be the hex offset. Write it down, then put it in your TP2 file.

High school physics, eh? Projectile motion, F=ma, angular velocity, inverse-square laws, that kind of thing? Or do you get to do E&M as well and play with static electricity and surface integrals?
                   
Posted by: Sir Kalthorine
« on: November 08, 2002, 02:14:09 AM »

Quote
First, do not use "REPLACE". REPLACE is perfect for changing ASCII base-ten numbers into string references. Imagine that you have "foo.txt" and it contains "Mary had 5 little lambs.". Then you do

COPY ~foo.txt~ ~override/result.txt~
   REPLACE 5 ~Jon Irenicus~

The file "result.txt" will say "Mary had 9296 little lambs." because 9296 is the string reference for ~Jon Irenicus.~

[ By the way, it is worth noting that this syntax is both horrible and completley arbitrary. Don't sweat it if it is completely non-intuitive.]
That's OK. Makes sense so far...

Quote
SPL files are not text files. The string reference associated with the change title opcode will be stored as a 32-bit integer (NOT an ascii base-ten number) somewhere in the middle of the BINARY spell file. Say, at offset 0x1EE. This is just like the way that item names and descriptions or spell names or creature names are stored. So you want this:

COPY ~newTitle.spl~ ~override/newTitle.spl~
  SAY 0x1EE ~Thief of Fate~
Right. Gotcha.  So this "offset" is the location in the Binary spell file where the string reference is located, right (i.e. where it says where it is going to look in the dialog.tlk file)? Have I got that right?

Quote
Use Near Infinity to determine the exact offset of the string reference for the titel change in your SPL file. It may not be 0x1EE for you.
Ah... oh dear... now my virgin status as a modder starts to become painfully obvious! :unsure: I am sorry for being really thick but I have absolutely NO idea how I go about doing that.  Where in the .spl file would I look to find that, and how would I recognise it if I did find it?

Quote
What sort of physics do you teach?
Physics to 11-18 yr olds in the UK (GCSE and 'A' level).  10 years into the job and I still enjoy it... some weirdo huh? :)                    
Posted by: weimer
« on: November 08, 2002, 12:33:38 AM »

First, do not use "REPLACE". REPLACE is perfect for changing ASCII base-ten numbers into string references. Imagine that you have "foo.txt" and it contains "Mary had 5 little lambs.". Then you do

COPY ~foo.txt~ ~override/result.txt~
   REPLACE 5 ~Jon Irenicus~

The file "result.txt" will say "Mary had 9296 little lambs." because 9296 is the string reference for ~Jon Irenicus.~

[ By the way, it is worth noting that this syntax is both horrible and completley arbitrary. Don't sweat it if it is completely non-intuitive. ]

SPL files are not text files. The string reference associated with the change title opcode will be stored as a 32-bit integer (NOT an ascii base-ten number) somewhere in the middle of the BINARY spell file. Say, at offset 0x1EE. This is just like the way that item names and descriptions or spell names or creature names are stored. So you want this:

COPY ~newTitle.spl~ ~override/newTitle.spl~
  SAY 0x1EE ~Thief of Fate~

I actually recommend against having any "name" associated with this spell -- leave it blank (= STRREF #-1). Otherwise when your NPC is first created (or when you enter the area with this NPC) you'll see something like:

"NewNPC- Title Change"

... which makes no sense in teh game. I guess if the title change happens at some momentus moment it could work, but neither Anomen's name change nor the PC-Druid's title change say "Title Change Spell" when they happen.

Use Near Infinity to determine the exact offset of the string reference for the titel change in your SPL file. It may not be 0x1EE for you.

What sort of physics do you teach?                    



[!--EDIT|weimer|Nov 8 2002, 12:35 AM--]
Posted by: Ghreyfain
« on: November 07, 2002, 11:16:33 PM »

Quote
I've found the "Change title" spell effect using IEEP's spell maker.  Now, lets say I called this spell "Kit Title" and saved it in a file called SPtitle.spl, in a folder called "Chrysta" in the main BG2 directory.  As far as I understand it I would normally put the following lines in my WEIDU .tp2 file to copy it over:

COPY ~Chrysta/SPtitle.spl~ ~override/SPtitle.spl~
SAY NAME1 ~Kit Title~

My one hiccup is that the blurb that comes with the "Change Title" spell effect says:
This effect will change the Title associated for an individual. The StrRef Number parameter is the string reference number from the dialog.tlk which contains the text to change the Title to, and the Position parameter sets which Title is changed. Known values of the Position parameter are 0 to change the Title on the Records Screen information section, and 1 to change Title shown on the top of the bar for the character in various of the character screens (like Inventory and Records Screen). For example the Records Screen would show for a level 8 beserker, Beserker along the top bar (changable by the value of 1) and Beserker: Level 8 on the information section (changable by the value of 0).

Actually, the way you've written the .tp2 portion would just make the spell's name "Kit Title".

[ Edit By Weimer: I am 99% certain that this is not what you want. See my next message for how to actually do this. ]

Code: [Select]
What you would do is put "11111" in the "StrRef Parameter" field.

Then in the .tp2 you would do:

[i]COPY ~Source\Spelname.spl~ ~override\Spelname.spl~
  SAY NAME1 ~Kit Title-change-o-matic 3000~
  SAY DESC ~This spell will change the character's title to "Pirate Extraordinaire".~
  REPLACE ~11111~ ~Pirate Extraordinaire~[/i]

So when you cast the spell, "Kit title-change-o-matic 3000" would be displayed.  If you somehow wound up with this in your spellbook, the description would be "This spell will...".  What the REPLACE thing does is replace any instances of 11111 in the file to a dynamic StrRef, which WeiDU will make at the time of installation.  i.e. it appends StrRef 98765 to dialog.tlk with the text "Pirate Extraordinaire" and then the spell will have 98765 instead of 11111.  :D

Here's hoping the funky quoting I've done works.  I'm not used to this forum.

Edit: Added tildes to REPLACE 11111, and also note that, yes, I've seen the CICP in action.  Rue the day that you don't listen to Jason babbling, because the IE will make his theories true just to spite you.
                   



[!--EDIT|weimer|Nov 8 2002, 12:24 AM--]
Posted by: Sir Kalthorine
« on: November 07, 2002, 08:34:13 PM »

Quote
One other thought I have is that the thief XP table is pretty generous. To balance her getting all these swanky powers, if that interests you, you might consider using her script to implement XP penalties.
Excellent idea! I take it this is another area you know nothing about then... LOL!  :lol:
Quote
Because I do not know what I am talking about, it turned out I was right about it.  :)
:P  Hehe... thanks Jason!                    
Posted by: jcompton
« on: November 07, 2002, 08:26:04 PM »

One other thought I have is that the thief XP table is pretty generous. To balance her getting all these swanky powers, if that interests you, you might consider using her script to implement XP penalties.                    
Posted by: jcompton
« on: November 07, 2002, 07:51:55 PM »

Quote
The more I hear about this the more I like the scripting option!!
                   SK, you have just been the beneficiary of a phenomenon that BG2 scientists will probably one day call "The Compton Ignorance Certainty Principle" (CICP). Put simply, this principle says that if I offer a piece of advice on a somewhat complex BG2 modding problem, the less I know about the technology involved, the more likely it is that I'm right.

I know nothing at all about kit design and little about scripting... but as you might recall, I suggested you use the scripting route rather than kit design in the early going.

Because I do not know what I am talking about, it turned out I was right about it. :)

Ghrey can fill you in on other great moments in CICP.                    
Posted by: Sir Kalthorine
« on: November 07, 2002, 05:29:52 PM »

Thanks evasomuch for all your help and advice so far - just one final request and I'll leave you alone for a while! :)

I've found the "Change title" spell effect using IEEP's spell maker.  Now, lets say I called this spell "Kit Title" and saved it in a file called SPtitle.spl, in a folder called "Chrysta" in the main BG2 directory.  As far as I understand it I would normally put the following lines in my WEIDU .tp2 file to copy it over:

COPY ~Chrysta/SPtitle.spl~ ~override/SPtitle.spl~
SAY NAME1 ~Kit Title~

My one hiccup is that the blurb that comes with the "Change Title" spell effect says:
Quote
This effect will change the Title associated for an individual. The StrRef Number parameter is the string reference number from the dialog.tlk which contains the text to change the Title to, and the Position parameter sets which Title is changed. Known values of the Position parameter are 0 to change the Title on the Records Screen information section, and 1 to change Title shown on the top of the bar for the character in various of the character screens (like Inventory and Records Screen). For example the Records Screen would show for a level 8 beserker, Beserker along the top bar (changable by the value of 1) and Beserker: Level 8 on the information section (changable by the value of 0).
The problem here as I see it is that little "The StrRef Number parameter is the string reference number from the dialog.tlk which contains the text to change the Title to" comment.  If I were doing it the non-WEIDU way it would be pretty straightforward - just manually edit the dialog.tlk file and make a note of the string reference number.  But I DO want to use WEIDU to make the whole mod as compatible as possible, so how do I add the relevant title to the custom spell in a similar way as is done using "SAY NAME1 ~Kit Title~" to add the NAME of the custom spell to the dialog.tlk file?

Am I making any sense here? :D Can anyone tell me what to do here?