
Custom AI Descriptions & Stores
Started by Melkor, May 27 2003 04:35 AM
13 replies to this topic
#1
Posted 27 May 2003 - 04:35 AM
Is there a way to add text to custom AI descriptions? When you set a AI script for your character it has a description of what it does, example "This AI does blah blah".
Also is there a way to add an item to a store without replacing the whole store file? If not and it was possible this would be a good addition. With so many mods out there someone may add some stuff of theirs to a store file which may have some new stuff from a previous modder thus the new .sto file will over write.
Also is there a way to add an item to a store without replacing the whole store file? If not and it was possible this would be a good addition. With so many mods out there someone may add some stuff of theirs to a store file which may have some new stuff from a previous modder thus the new .sto file will over write.
Chosen of Mystra Mod Forums Home to great BG and IWD mods
The Frozen North Forums IWD, NWN, KotOR discussion
The Frozen North Forums IWD, NWN, KotOR discussion
#2
Posted 27 May 2003 - 06:12 AM
1) Yep
2) No idea, sorry.
// Scripts APPEND ~scrpdesc.2DA~ ~eArcher 999970 999969~ APPEND ~scrpdesc.2DA~ ~eFighter 999968 999967~ APPEND ~scrpdesc.2DA~ ~eMage 999966 999965~ APPEND ~scrpdesc.2DA~ ~eMulti 999964 999963~ APPEND ~scrpdesc.2DA~ ~ePriest 999962 999961~ APPEND ~scrpdesc.2DA~ ~ePureF 999960 999959~ APPEND ~scrpdesc.2DA~ ~eThief 999958 999957~ COPY_EXISTING ~scrpdesc.2da~ ~override/scrpdesc.2da~ REPLACE ~999970~ @26 REPLACE ~999969~ @27 REPLACE ~999968~ @28 REPLACE ~999967~ @29 REPLACE ~999966~ @30 REPLACE ~999965~ @31 REPLACE ~999964~ @32 REPLACE ~999963~ @33 REPLACE ~999962~ @34 REPLACE ~999961~ @35 REPLACE ~999960~ @36 REPLACE ~999959~ @37 REPLACE ~999958~ @38 REPLACE ~999957~ @39 // EOF: Setup-eSeries.tp2
2) No idea, sorry.
-cirerrek Cirerrek's IE Miscellania
#3
Posted 27 May 2003 - 08:31 AM
2) Yes, this can be done like so. I've coloured the stuff you need to change in red text.
COPY_EXISTING ~gorch.sto~ ~override/gorch.sto~ // You would obviously C_E the store you want to add an item to here
READ_LONG "0x34" "itemssaleoffset"
READ_LONG "0x38" "#itemsforsale"
READ_LONG "0x70" "curesoffset"
READ_LONG "0x2c" "itemspurchasedoffset"
INSERT_BYTES "%itemssaleoffset%" 0x1c
WRITE_ASCII "%itemssaleoffset%" ~sw1h01~ // The item file without the .itm extension
//WRITE_SHORT ("%itemssaleoffset%" + 0x4) 1 // This is the first header's # of charges
//WRITE_SHORT ("%itemssaleoffset%" + 0x6) 1 // This is the second header's # of charges
//WRITE_SHORT ("%itemssaleoffset%" + 0x8) 1 // This is the third header's # of charges
WRITE_LONG ("%itemssaleoffset%" + 0x10) 1 // This makes the item identified
WRITE_LONG ("%itemssaleoffset%" + 0x14) 5 // This is how many are in stock
WRITE_LONG 0x38 ("%#itemsforsale%" + 1)
WRITE_LONG 0x70 ("%curesoffset%" + 0x1c)
WRITE_LONG 0x2c ("%itemspurchasedoffset%" + 0x1c)
So, just change the stuff in red to the values you want and change the store filename to the name filename of the store you want to add an item to and it's done.
However, any modifications to a store must be done *before* that player even looks at the store in the game.
COPY_EXISTING ~gorch.sto~ ~override/gorch.sto~ // You would obviously C_E the store you want to add an item to here
READ_LONG "0x34" "itemssaleoffset"
READ_LONG "0x38" "#itemsforsale"
READ_LONG "0x70" "curesoffset"
READ_LONG "0x2c" "itemspurchasedoffset"
INSERT_BYTES "%itemssaleoffset%" 0x1c
WRITE_ASCII "%itemssaleoffset%" ~sw1h01~ // The item file without the .itm extension
//WRITE_SHORT ("%itemssaleoffset%" + 0x4) 1 // This is the first header's # of charges
//WRITE_SHORT ("%itemssaleoffset%" + 0x6) 1 // This is the second header's # of charges
//WRITE_SHORT ("%itemssaleoffset%" + 0x8) 1 // This is the third header's # of charges
WRITE_LONG ("%itemssaleoffset%" + 0x10) 1 // This makes the item identified
WRITE_LONG ("%itemssaleoffset%" + 0x14) 5 // This is how many are in stock
WRITE_LONG 0x38 ("%#itemsforsale%" + 1)
WRITE_LONG 0x70 ("%curesoffset%" + 0x1c)
WRITE_LONG 0x2c ("%itemspurchasedoffset%" + 0x1c)
So, just change the stuff in red to the values you want and change the store filename to the name filename of the store you want to add an item to and it's done.
However, any modifications to a store must be done *before* that player even looks at the store in the game.
Check out BG1Tutu.
#4
Posted 28 May 2003 - 02:40 AM
Glad to see you can add an item to an existing store without actually editing the STO file itself. Lot of typing to add one item but I suppose thats the price to pay to keep things compatible. B)
Chosen of Mystra Mod Forums Home to great BG and IWD mods
The Frozen North Forums IWD, NWN, KotOR discussion
The Frozen North Forums IWD, NWN, KotOR discussion
#5
Posted 29 May 2003 - 11:30 AM
I *love* this forum! Every time I come here to ask a question, one of two things happens:
1) Someone just asked it and answered it.
2) My brain gets jumpstarted and I figure it out.
In this case it was the former.
It does prompt a new question for me, though. As much as I have not wanted to learn it, I see the usefullness of knowing what those READ_LONG flags mean (or any other flag for that matter). Is there a tutorial that will teach me how to figure out what those flags mean?
1) Someone just asked it and answered it.
2) My brain gets jumpstarted and I figure it out.
In this case it was the former.

#7
Posted 31 May 2003 - 04:18 AM
Something similiar could be used to add items to area containers I would guess?
Chosen of Mystra Mod Forums Home to great BG and IWD mods
The Frozen North Forums IWD, NWN, KotOR discussion
The Frozen North Forums IWD, NWN, KotOR discussion
#8
Posted 31 May 2003 - 11:32 AM
You can just use a script for that.
For instance, in my Cal Culator mod, this is how I added the ring to one of the promenade containers:
You just need to find the container name of the container that you want to add the item to and then append the script block to the area's area script. You can use IETME or NI to do this.
For instance, in my Cal Culator mod, this is how I added the ring to one of the promenade containers:
IF Global("JPCalItemCreate","AR0700",0) THEN RESPONSE #100 ActionOverride("Table 3",CreateItem("jpcal",0,0,0)) SetGlobal("JPCalItemCreate","AR0700",1) END
You just need to find the container name of the container that you want to add the item to and then append the script block to the area's area script. You can use IETME or NI to do this.
Check out BG1Tutu.
#9
Posted 01 June 2003 - 01:03 PM
I promise I have read the readme! For some reason, though, until someone says, "You should read the readme," it makes no sense to me. I read that several times, but I couldn't figure out how to find the byte with NI, so it didn't make sense to me. After tinkering with NI for a while today, I figured it out - and it makes perfect sense. Thanks, japheth!
#10
Posted 08 June 2003 - 09:43 AM
Forgive me asking possibly stupid questions but how can I add unlimited amount of item?WRITE_LONG ("%itemssaleoffset%" + 0x14) 5 // This is how many are in stock
#12
Posted 08 June 2003 - 11:58 AM
To say the truth it crashed the installer but it gave me new idea as well. So I've done some research with NI and now I know how to do it
It's just a matter of puting this line under "how many are in stock" section:
WRITE_LONG ("%itemssaleoffset%" + 0x18) 1 //unlimited flag
I've tested it and it works

WRITE_LONG ("%itemssaleoffset%" + 0x18) 1 //unlimited flag
I've tested it and it works

#14
Posted 08 June 2003 - 02:08 PM
Hmm, I've tested it. It still shows only 65535 items in stock. I've checked it even with 10000000000 without any luck. I mean no matter what I put there the unlimited flag is not marked but maybe I'm doing something wrong.
Oh well, most important that I know how to do it
Thanks for inspiration

Oh well, most important that I know how to do it

