Author Topic: --automate  (Read 1652 times)

japheth

  • Guest
--automate
« on: June 05, 2003, 11:38:26 PM »
I've found a strange anomaly using --automate to automate some IWD items.  The default strings in IWD have double-spacing for some reason or another.

For instance, take this result from --automating:

Code: [Select]
COPY ~override/BOLT02.itm~          ~override/BOLT02.itm~        
  SAY NAME1 ~Bolt~
  SAY NAME2 ~Bolt +1~
  SAY UNIDENTIFIED_DESC ~Quarrels or bolts are the ammunition fired by crossbows regardless of the weapon's size.



STATISTICS:



Damage:  1D8

Damage type:  Missile (piercing)

Weight:  0

Launcher:  Crossbow

~

It's definitely to do with the spacing inside the .tlk.  For instance, in BGII's .tlk, a carriage return is represented by 0A 0A (or LF LF).

In IWD, it's represented by 0D 0A 0D 0A (or CR LF CR LF).

This spacing is also present in IWDII, and BG1/TotSC as well.

Is there any way to account for this weird spacing when --automating?  Like a switch or something?  Otherwise it will be painful to go through and single space everything.


Thanks,


japh
« Last Edit: June 06, 2003, 03:04:43 PM by japheth »

japheth

  • Guest
--automate
« Reply #1 on: June 06, 2003, 03:06:49 PM »
Well, I solved it by simply opening up the resulting .tp2 in HexWorkshop and replacing all instances of 0D 0D 0A with 0D 0A.

It might be good to include a switch that designates --automation of anything but BGII.

Like: weidu --automate-min 0 --automate override --automate-!bgii --textout blah.tp2 or something.

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
--automate
« Reply #2 on: June 06, 2003, 05:20:33 PM »
I don't view this as an automate error -- the text is being reproduced faithfully. :-)

Changing ABAB to AB, even if A and B are special characters, is a five-second one-line search-and-replace with most editors (e.g., vi and emacs). It would take me a bit longer than that to code your proposed knob up.

 

japheth

  • Guest
--automate
« Reply #3 on: June 06, 2003, 05:38:53 PM »
Quote
I don't view this as an automate error -- the text is being reproduced faithfully. :-)

Heh, true.  That's why I sub-titled it with "not really a bug...". :)

I guess IWD/IWDII/BG just interpret CR LF CR LF differently in-game somehow.

Ah well, like you said, it's easily fixed after the .tp2 has been spit out.

 

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