Posted by: Andyr
« on: September 10, 2006, 08:18:24 AM »Thread necromancy!
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!
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).
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.
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 doThat's OK. Makes sense so far...
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: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?
COPY ~newTitle.spl~ ~override/newTitle.spl~
SAY 0x1EE ~Thief of Fate~
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?
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?
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).
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.
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:
Because I do not know what I am talking about, it turned out I was right about it.Hehe... thanks Jason!
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.
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?