Author Topic: A couple of WeiDU questions  (Read 3827 times)

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
A couple of WeiDU questions
« on: September 07, 2004, 06:24:37 PM »
Some of my questions weren't answered at G3, so I thought I might have better luck asking me. The WeiDU documentation proved to be a confusing piece of work, so I had to resort to example mods, like the P&P Celestials, Cleric Remix, etc.

I'll give ye a full list of 'em:
1.) How is it possible to add projectiles to extension headers? What if I want different extension headers to have different projectiles?
2.) How is it possible to modify a .2da file so, that a new string is added to the dialog.tlk file, the new string value is memorized, and the value is added to column number 'x' on row 'y'? And what if I just simply want to add a new row?
3.) How is it possible to modify an effect in an extension header so that a string is shown (that you recently added to the dialog.tlk via installation)?

For now, this is it. As I continue learning WeiDU, I will have more, no doubt. :)

-Galactygon

Offline igi

  • IESDP Guardian
  • Planewalker
  • *****
  • Posts: 124
  • IESDP Guardian
Re: A couple of WeiDU questions
« Reply #1 on: September 07, 2004, 06:34:11 PM »
1) Find the offset of the projectile field for the relevant extension header in the file, and WRITE %projectile% there. Or something.
2) Put a marker in the 2da where you will want your strref ("TEMP" will do), then copy the 2da accross then do REPLACE "TEMP" ~my string". Or something.
3) Find the place in the file where your strref will be (param1 of opcode 139 iirc), copy it across and then SAY offset ~my string~. Or something,

The ideas are right, not sure on the syntax. Find mods to steal .tp2 code from :)
NPC: Arg || Galoomp || Thash
Mods: Dark Heart of the Xvart || GbG
Tweak Pack: iiTweak

mcwrench.com
mcwrench.com forums

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #2 on: September 07, 2004, 07:32:12 PM »
I had to resort to example mods, like the P&P Celestials, Cleric Remix, etc.
Funny, I always thought this was a key part of learning WeiDU. It is definately recommended practice.
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

Offline hlidskialf

  • Owner of the first chair with an ale-fridge
  • Planewalker
  • *****
  • Posts: 100
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #3 on: September 07, 2004, 09:51:09 PM »
Recommended for learning weidu or all of IE modding for that matter. (Monkey see, monkey mods!)
Unknown to most, hlidskialf is the first incarnation of the eternal warrior with a beer fridge in his chair.

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #4 on: September 08, 2004, 03:03:08 PM »
Thanks for all the replies, but my question was half-answered. There are no example .tp files for the ones I asked for (or I didn't find any yet), so I need an example code.

Also, I have been having trouble with components lately. For some reason I cannot get component requirements to work. What I mean is this: to install component one, you must have component zero installed.

I type (something like this my memory is failing again, darn):
Code: [Select]
REQUIRE_COMPONENT ~Setup-LostCrossroads.tp~ ~0~ ~@5~

and I recieve a parse error when I try to install LC.

-Galactygon

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #5 on: September 08, 2004, 04:25:37 PM »
Code: [Select]
REQUIRE_COMPONENT ~Setup-LostCrossroads.tp~ ~0~ ~@5~Have you ever seen in any WeiDU code a traref wrapped in tildas?

Code: [Select]
REQUIRE_COMPONENT ~Setup-LostCrossroads.tp~ ~0~ @5
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #6 on: September 08, 2004, 05:25:35 PM »
That might be it. On the side note, what does the zero represent? I remember getting the same parse error when I tried to copy+paste the REQUIRE_COMPONENT piece of code before the BEGIN @#.

-Galactygon

Offline japheth

  • PPG
  • Planewalker
  • *****
  • Posts: 143
Re: A couple of WeiDU questions
« Reply #7 on: September 08, 2004, 05:36:19 PM »
The zero represents the component number of the mod in question.

Example:

I have a TP2 with two BEGIN statements in it, so if I want to only install my new mod if the second component is present from the other mod I'd type this:

REQUIRE_COMPONENT ~somemod.tp2~ ~1~ ~You don't have my mod's second component installed!  You suck!~

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #8 on: September 08, 2004, 05:59:35 PM »
Here is what I have in my .tp file (I finally found it):

Code: [Select]
.....

//////////////////////////////////////////////////////
// Redone AI, Classes, Creatures, Rules, and Spells //
//////////////////////////////////////////////////////

BEGIN @3 /*Continue with displaying mod component redone AI, Classes, Creatures, Rules, and Spells*/
REQUIRE_COMPONENT ~Setup-LostCrossroads.tp2~ ~0~ ~You don't have the first component installed!~
REQUIRE_COMPONENT ~Setup-LostCrossroads.tp2~ ~1~ ~You don't have the second component installed!~


/* TOB Check prior to compiling.*/
REQUIRE_FILE ~Data/25Dialog.bif~ ~You do not appear to have Throne of Bhaal installed.~ // ToB  check


.....

The BEGIN @3 is component number three.

Still, I get a parse error. I have a suspicion the code itself right from the start, but something out there is wrong. I might as well post the debug file. Line 48 is the first REQUIRE_COMPONENT line.

-Galactygon

Code: [Select]
WeiDU v 123 Log

 C:\Program Files\Black Isle\BGII - SoA\Setup-LostCrossroads.exe
[C:\Program Files\Black Isle\BGII - SoA\Setup-LostCrossroads.exe] this file time = 1.05253e+009
[Setup-LostCrossroads.exe] file time = 1.05253e+009
[Setup-Sunscorch.exe] file time = 1.05253e+009
[./chitin.key] loaded, 590551 bytes
[./chitin.key] 182 BIFFs, 41793 resources
[dialog.tlk] loaded, 12976043 bytes
[dialog.tlk] 102401 string entries
[./Autorun.ini] loaded, 1452 bytes
[./baldur.ini] loaded, 3390 bytes
Possible CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD1]
Possible CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2]
Possible CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD3]
Possible CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD4]
Possible CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD5]
[./CharView.ini] loaded, 266 bytes
[./Copy (2) baldur.ini] loaded, 2060 bytes
Possible CD Path: [[BG2]\CD1]
Possible CD Path: [[BG2]\CD2]
Possible CD Path: [[BG2]\CD3]
Possible CD Path: [[BG2]\CD4]
Possible CD Path: [[BG2]\CD5]
[./Copy (3) of baldur.ini] loaded, 2138 bytes
Possible CD Path: [[BG2]\CD1]
Possible CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2\]
Possible CD Path: [[BG2]\CD2]
Possible CD Path: [[BG2]\CD3]
Possible CD Path: [[BG2]\CD4]
Possible CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD5\]
[./Copy of baldur.ini] loaded, 2225 bytes
Possible CD Path: [E:\CD1\]
Possible CD Path: [E:\CD2\]
Possible CD Path: [E:\CD3\]
Possible CD Path: [E:\CD4\]
[./Keymap.ini] loaded, 5423 bytes
[./Mplaynow.ini] loaded, 230 bytes
[dialog.tlk] claims to be writeable.
[dialog.tlk] claims to be a regular file.
[WeiDU.log] parsed

[SETUP-LOSTCROSSROADS.TP2] PARSE ERROR at line 48 column 1-17
Near Text: REQUIRE_COMPONENT
syntax error

[SETUP-LOSTCROSSROADS.TP2]  ERROR at line 48 column 1-17
Near Text: REQUIRE_COMPONENT
Parsing.Parse_error
ERROR: parsing [SETUP-LOSTCROSSROADS.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [SETUP-LOSTCROSSROADS.TP2]: Parsing.Parse_error

ERROR: Parsing.Parse_error

WeiDU Timings
TOTAL                                    0.871 s
  unmarshal TLK                          0.531 s
  unmarshal KEY                          0.170 s
  loading files                          0.170 s
  parsing .tp2 files                     0.000 s
  parsing .log files                     0.000 s

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #9 on: September 08, 2004, 06:29:15 PM »
* Idobek hunts for a copy of WeiDU-v123 so he can attempt to track down the error
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #10 on: September 08, 2004, 06:38:29 PM »
Ah, I might've forgotten to update WeiDU. ::) Thanks, Idobek, it works like a charm.

-Galactygon

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #11 on: September 11, 2004, 11:37:55 AM »
Hmm...I still seem to have trouble adding a string value to the .2da file.

-Galactygon

Offline CamDawg

  • Infidel
  • Planewalker
  • *****
  • Posts: 859
  • Dreaming of a red Xmas
    • The Gibberlings Three
Re: A couple of WeiDU questions
« Reply #12 on: September 11, 2004, 11:46:40 AM »
Code: [Select]
APPEND ~STATE.IDS~ ~0x80101FEF replaceme~

COPY_EXISTING ~STATE.IDS~ ~override~
  REPLACE ~replaceme~ @1

An append is only necessary if you're adding something new. REPLACE will replace any matching text with the STRREF of @1, wherever @1 ends up in dialog.tlk.
« Last Edit: September 11, 2004, 11:48:12 AM by CamDawg »
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #13 on: September 11, 2004, 01:43:36 PM »
I cannot express my gratitude... thank you. :) It works perfectly.

-Galactygon

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #14 on: September 14, 2004, 06:58:02 PM »
I have never seen any examples on doing this from any mods, so don't shoot me just yet. ;)

Let's say I want to alter parameter one in effect eighty on extension header twelve, so that a newly added string's value is placed in there. How might I do that?

Thanks for any help there.

-Galactygon

Offline hlidskialf

  • Owner of the first chair with an ale-fridge
  • Planewalker
  • *****
  • Posts: 100
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #15 on: September 14, 2004, 08:37:55 PM »
Find the offset number and use a SAY ~~ for it.
Unknown to most, hlidskialf is the first incarnation of the eternal warrior with a beer fridge in his chair.

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #16 on: September 14, 2004, 08:45:25 PM »
Although any help is appreciated, please bear in mind, when I ask questions in the future, I am shooting for examples. It's quite hard for me to not work off of examples (especially if I'm a WeiDU novice), so forgive me on that. Hey, I didn't read any spell making tutorials when I first started modding; I used existing examples until I was at a sufficient level to figure stuff out without even glancing at 'em.

That's why I ask these questions; there are no tp files that seem to do this (or I might have missed something).

-Galactygon

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: A couple of WeiDU questions
« Reply #17 on: September 14, 2004, 09:09:23 PM »
There are plenty of examples out there, though.  They're called "other mods".

If you have a sample of script that you've worked out based on those examples and it doesn't work, and you can't figure out why, then post that and we'll analyze it.

Edit: Oh, and you mention further up not having seen an example for what you want to do in an existing mod.  So I didn't read the entire thread.  So what?  Bleah. :)

Second Edit: Okay, and there are like a bajillion mods that do what you're asking, I'm sure.

See the bolas in Ashes of Embers.  I patch in a string to one of their effect headers that says something like "Bola snare" when it entangles a target.  Check that out.
« Last Edit: September 14, 2004, 09:12:19 PM by Ghreyfain »
Earn Money Sleeping.

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: A couple of WeiDU questions
« Reply #18 on: September 15, 2004, 12:30:44 PM »
Find the offset number and use a SAY ~~ for it.
Finding an offset could prove to be difficult if you assume that the original spell might have been modified.
If you don't assume that, you don't need WeiDU.
What you need is a complete script driven (command line) game file editor (patcher).
I think igi made some tools that might help.

Offline hlidskialf

  • Owner of the first chair with an ale-fridge
  • Planewalker
  • *****
  • Posts: 100
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #19 on: September 15, 2004, 12:45:00 PM »
Find the offset number and use a SAY ~~ for it.
Finding an offset could prove to be difficult if you assume that the original spell might have been modified.
If you don't assume that, you don't need WeiDU.
What you need is a complete script driven (command line) game file editor (patcher).
I think igi made some tools that might help.


True, but I believe Galactygon was creating his own version of the spell for his mod.
Unknown to most, hlidskialf is the first incarnation of the eternal warrior with a beer fridge in his chair.

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #20 on: September 15, 2004, 03:14:14 PM »
You can also find the offset using WeiDU if necessary.
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

Offline igi

  • IESDP Guardian
  • Planewalker
  • *****
  • Posts: 124
  • IESDP Guardian
Re: A couple of WeiDU questions
« Reply #21 on: September 15, 2004, 04:22:12 PM »
Use a hex editor!
Duh.

:P
NPC: Arg || Galoomp || Thash
Mods: Dark Heart of the Xvart || GbG
Tweak Pack: iiTweak

mcwrench.com
mcwrench.com forums

Offline Galactygon

  • Modding since 2002
  • Planewalker
  • *****
  • Posts: 378
  • Gender: Male
  • Creator of spells
Re: A couple of WeiDU questions
« Reply #22 on: June 03, 2005, 12:13:51 PM »
How do you go by uninstalling certain components of certain modsduring the install of certain mods?

-Galactygon

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: A couple of WeiDU questions
« Reply #23 on: June 03, 2005, 03:34:42 PM »
Use UNINSTALL. Have you looked at the readme at all?
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

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:
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)?: