Jump to content


Photo

A humble suggestion for the next WeiDU revision...


  • Please log in to reply
12 replies to this topic

#1 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 24 February 2003 - 06:22 AM

I've encountered a slight inconvenience when creating dialogues with WeiDU. The problem is that I wanted to cerate PST-style dialogues which included using symbolic brackets (such as [] and <>) in its dialogue lines mainly to emphasize the meaning of some particular lines similar to the way it was done in Torment and NWN, for example :

1. [Lie] I swear that I'll let you go if you tell me where your leader is hiding!

or perhaps:

2. [Insight] You perceive that the story this rogue just told you is full of loopholes and inconsistences. It is most likely false.

Now, BG2 ignored these symbols so I posted about it in this thread. There, I received a reply which clarified things a bit. It seams that WeiDU always creates 'message with tags' as entry type in the tlk file and I needed 'standard message' entries in order to use the above mentioned symbols.

If it's not too much trouble, I'd really appreciate it if Wes could incorporate a method for doing this in one of his next WeiDU revisions :)

#2 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 25 February 2003 - 04:27 AM

Can't you use \[ and \] to indicate that no, this is not some sort of tag, I really want that bracket to show up? Or have I just totally missed the point of the question?

#3 Dyara

Dyara
  • Member
  • 262 posts

Posted 25 February 2003 - 04:50 AM

Another idea (donīt know if it works):

Write

<OpenBracket>Lie<CloseBracket> I swear that I'll let you go if you tell me where your leader is hiding!

and define the tokens <OpenBracket> and <CloseBracket> with the script command 'SetToken' using strings '[' and ']'. (you will find more infos about SetToken at IESDP).

#4 -Sim-

-Sim-
  • Guest

Posted 25 February 2003 - 05:05 AM

SetToken is a bit of a pain to use because custom tokens are not stored in the savegame, which means you have to reset them every time the game is loaded. Not hard, but quite messy. Plus, in this instance, it seems quite silly to me to use custom tokens.

#5 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 25 February 2003 - 06:01 AM

SetToken is a bit of a pain to use because custom tokens are not stored in the savegame, which means you have to reset them every time the game is loaded. Not hard, but quite messy. Plus, in this instance, it seems quite silly to me to use custom tokens.


My thoughts exactly. It seams I'll have to stick with parentheses until a better solution comes up.

#6 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 25 February 2003 - 09:58 AM

BTW, I've encountered a couple of minor problems while I was working on my .tp2 file.

The first one is related to he STRING_SET command. I used this to replace some kit and class descriptions, and I wanted to use AT_INTERACTIVE_UNINSTALL command to restore the original descriptions for example:
AT_INTERACTIVE_UNINSTALL ~STRING_SET ~9562~  @901  // Bard~
Unfortunately, this does not seam to work for me possible because of the double usage of the tilde ~ character. Is there any other way to replace kit/class descriptions, or perhaps to make STRING_SET work when a mod component is uninstalled ?

My second issue is with the REPLACE_TEXTUALLY command, more specifically when I use it to modify 2DA files. I wanted to replace a whole line of WEAPPROF.2DA:
COPY_EXISTING ~weapprof.2da~  ~override/weapprof.2da~
REPLACE_TEXTUALLY ~2WEAPON.*~ ~2WEAPON (my modified line goes here)~

I used regexps *. because I wanted to replace the whole line no matter what it's contents may be, but this didn't work. Is there a more elegant way of editing 2DA files using WeiDU ?

#7 -jcompton-

-jcompton-
  • Guest

Posted 25 February 2003 - 10:46 AM

My thoughts exactly. It seams I'll have to stick with parentheses until a better solution comes up.

I believe Kismet told you how it might work...

#8 weimer

weimer
  • Member
  • 1569 posts

Posted 25 February 2003 - 11:02 AM

WeiDU always creates new strings with the flags value set to 7. If you really want support for other values and you can find two or three other people who also want it, I will code up the feature.

STRING_SET is a WeiDU command, not a dos command. There is currently no undo support for STRING_SET, mostly because I do not believe in it. Adding undo support for it is on the todo list. In IWD2 some kit/class description numbers are given in 2DA files (cf. the revised shapeshifting mod for iwd2).

Since you didn't tell us the manner in which your regular expression failed to work, it's hard for us to fix it. However, I will use my magic powers and guess that what happend was this: that line *and the entire rest of the file* was replaced by your modified line. If that's what's happening you'll want to look into the $ end-of-line regexp or using [^\n]* instead of .*

#9 -Avenger-

-Avenger-
  • Guest

Posted 25 February 2003 - 01:26 PM

Well, i suppose you could have tag syntax checking included in your compiler.
So adding a string with would either trigger a warning, or add it as a non-tagged entry. (i prefer the first).
If you got tag checking then setting 7 or 3 is cakewalk...

#10 Avenger_teambg

Avenger_teambg
  • Member
  • 604 posts

Posted 25 February 2003 - 01:34 PM

Well, i suppose you could have tag syntax checking included in your compiler.
So adding a string with <CARNAME> would either trigger a warning, or add it as a non-tagged entry. (i prefer the first).
If you got tag checking then setting 7 or 3 is cakewalk...

Ok, i think i got it right this time... :rolleyes:
Avenger

#11 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 25 February 2003 - 02:43 PM

I believe Kismet told you how it might work...


Unfortunately, using \ before [ and ]produced the exact same effect as just []. The whole word incased in the brackets disappears along with them :(

WeiDU always creates new strings with the flags value set to 7. If you really want support for other values and you can find two or three other people who also want it, I will code up the feature.


Well, it would be nice to have this if it's not too much trouble for you. But still, it's just a 'cosmetic' preference, nothing really important.

There is currently no undo support for STRING_SET, mostly because I do not believe in it. Adding undo support for it is on the todo list.


It seamed useful for me as I have found no other way to replace the class/kit descriptions via WeiDU. It would be nice to have the uninstaller automatically restore the original strings or at least to have an option to let the player/modder do so.

In IWD2 some kit/class description numbers are given in 2DA files (cf. the revised shapeshifting mod for iwd2).


I think there are string references in BG2 2DAs as well, but I didn't know how to replace the original string number used in a 2DA file with one of my custom strings. Is such an operation possible ?

Since you didn't tell us the manner in which your regular expression failed to work, it's hard for us to fix it.


It didn't work at all, meaning the WEAPPROF.2DA remained unchanged after I used this line in my .tp2:
COPY_EXISTING ~weapprof.2da~  ~override/weapprof.2da~
REPLACE_TEXTUALLY ~2WEAPON.*~ ~2WEAPON (my modified line goes here)~

BTW, I didn't list the whole 2DA line since it's very long, so just pretend it's there :) As you may have noticed, I'm trying to replace one particular line in WEAPPROF.2DA which contains information about proficiency slots of Two Weapon Style (hence the 2WEAPON in the beginning). I hope this clears things up a bit...

#12 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 25 February 2003 - 03:49 PM

I believe Kismet told you how it might work...


Unfortunately, using \ before [ and ]produced the exact same effect as just []. The whole word incased in the brackets disappears along with them :(

Very strange... it works fine for me (this is using version 109 of WeiDU).

#13 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 25 February 2003 - 04:10 PM

It works !!! Apparently, I made a slight typo in my .tra file on the first try, so the \ appeared behind the [ and that's why it didn't work. Thanks a bunch Kismet :)

Do you have any suggestions for the 2DA problem ?