Jump to content


Photo

Simple spell weidu question


  • Please log in to reply
7 replies to this topic

#1 kharan5876

kharan5876
  • Member
  • 204 posts

Posted 18 October 2005 - 07:02 PM

I have a couple spells that use the effect 139:Display String

How do I make it so that I can install this spell using weidu and have it append that string to dialog.tlk?

#2 Ghreyfain

Ghreyfain
  • Member
  • 137 posts

Posted 18 October 2005 - 08:22 PM

Much as you would do SAY NAME1 ~Spell name~ or SAY DESC ~Blah~ you can do SAY to a specific offset within the file. Use NI (or DLTCEP? Not sure if it does this) to find out what the offset to the string is, then do SAY 0xwhatever ~Whatever you want the text to be.~

An example from Ashes of Embers is as follows:
COPY ~AshesofEmbers\Itemdesc\itemdesc\bola02.itm~
~override\bola02.itm~
  SAY NAME1 @23
  SAY NAME2 @26
  SAY DESC @27
  SAY UNIDENTIFIED_DESC @24
SAY 0x1fe @25

There are of course ways of reading through the file to find out where the string you want to write is, if its location is likely to change, but this way should be pretty safe.

#3 kharan5876

kharan5876
  • Member
  • 204 posts

Posted 18 October 2005 - 10:06 PM

Awesome it worked! Thanks!

#4 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 19 October 2005 - 09:11 AM

A safer way might be to set the string number to some really high value (out of the range of the game), and then do REPLACE #2398529865 ~Foo~ or something. Since that's not directed at an offset, it should be safer generally. Not sure if it will work off the top of my head though, and I don't recall if the string number needs the # or not.
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#5 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 19 October 2005 - 09:28 AM

I've never tried using REPLACE on an item file (or any non-text file) but I guess it should work, I'd go with the method Ghrey descibed though.

When using REPLACE you don't actually need to use a number at all. REPLACE ~bar~ ~foo~ works equally well.

#6 kharan5876

kharan5876
  • Member
  • 204 posts

Posted 19 October 2005 - 01:40 PM

I'll just write it to the offset, I like that way better just gotta be sure to change the tp2 if I change the item so it doesnt write it somewhere else that could cause huge bugs.


Anyway the next step is this one kit that made is a cleric that uses a gun type weapon. There are 19 variations of the weapon and it levels up with the character. Right now I just have 19 spells that create the item in the first weapon slot. The weapon itself is undropable so it cannot be removed. The 19 spells are in the kits clab file.

Is there any better way to do this? Possibly with one spell? Also is there is the issue of transfering over to BG2 (this is a BGT game). Any way to make it so that the weapon is not removed by irenicus without adding scripts or changes to the actual area?

#7 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 19 October 2005 - 03:04 PM

You can use one spell, which has different extension headers with different level requirements. The extension headers will then create the appropriate items (since with a spell with level-dependent effects, the game only applies those on the highest-level-requirement header the character qualifies for).
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#8 kharan5876

kharan5876
  • Member
  • 204 posts

Posted 19 October 2005 - 06:17 PM

Ahh thanks thats much better, all thats left now is the irenicus issue, I might be stuck just having to edit the weapon back in after transitioning. I set the spell at least to activate at every level so if I didn't edit it in at least I can just level up once and get it back.