Jump to content


Photo

Problem with biff-type, and textout when searching


  • Please log in to reply
4 replies to this topic

#1 Mhoram

Mhoram

    Dlan´s Great Inquisitor

  • Member
  • 34 posts

Posted 22 June 2003 - 03:22 AM

First of all, i have edited this post because the token CHARNAME properly write is not displayed in this forum, i´ll ask Neil about that, that´s because i write CHARNAME> without the < but i have wrote it properly in my DOs window.

When i´m searching for DLG files with the string "Hola, CHARNAME>." First I type:

Microsoft Windows XP [Versión 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

c:\juegos\black isle\bgii - soa>weidu --strfind "Hola, CHARNAME>."
[weidu] WeiDU version 127
[./chitin.key] 182 BIFFs, 41794 resources
[./dialog.tlk] 78627 string entries
[./dialogf.tlk] 78627 string entries
String #2260 is ~Hola, CHARNAME>. El TÝo Quayle me dijo que volverÝais...~
String #2289 is ~Hola, CHARNAME>. Bienvenido...~
String #40826 is ~H-hola, CHARNAME>. Va a ser un honor estudiar a tu lado.~
String #41869 is ~Hola, CHARNAME>. Estoy listo para rendirte cuenta detallada d
e lo que pas¾ con nuestra ·ltima prßctica.~
String #42077 is ~Hola, CHARNAME>. SÝ, me enterÚ de tu llegada y sÚ c¾mo te lla
mas. Volveremos a vernos en un futuro, pero por ahora, s¾lo deberßs recordar una
s cuantas cosas.~
String #42078 is ~Hola, CHARNAME>. Me enterÚ de tu llegada. ┐QuÚ te pareci¾ el
espectßculo? ┐Fue de tu gusto? Espero que sÝ. Volverßs a verlo en un futuro.~
String #42249 is ~Hola, CHARNAME>. Ribald me ha contado que deseas mandar a cie
rta gente a su propio plano, ┐no? ┐Caballeros de alg·n tipo? ┐Estamos preparados
para hacerlo?~
String #42261 is ~Hola, CHARNAME> ┐tienes buenas noticias para nosotros? ┐Se pu
ede hacer algo? ┐Podemos ser enviados a casa?~
String #42297 is ~Hola, CHARNAME>.~
String #46897 is ~Hola, CHARNAME>. Bienvenido a Caravasar. Disc·lpame, debo vol
ver a mis estudios.~
String #48696 is ~Hola, CHARNAME>. Estoy feliz de que hayas vuelto. Parece que
no tengo lugar al que ir en la superficie de esta maldita ciudad. ┐Debo unirme a
ti de nuevo?~ [VICONIB8]
String #58619 is ~Hola, CHARNAME>. Vengo para hablar de un asunto de suma impor
tancia para la causa y costumbres druÝdicas.~
String #78268 is ~Hola, CHARNAME>. ┐Quizßs ahora tengas tiempo para escuchar lo
que tengo para decirte?~

c:\juegos\black isle\bgii - soa>

To see if there are some stringref with that string, is clear that they exists and must be part of a dlg file.

Now I type

Microsoft Windows XP [Versión 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

c:\juegos\black isle\bgii - soa>weidu --biff-type DLG --biff-str "Hola, CHARNAM
E>."
[weidu] WeiDU version 127
[./chitin.key] 182 BIFFs, 41794 resources
[./dialog.tlk] 78627 string entries
[./dialogf.tlk] 78627 string entries
[./data/Dialog.bif] 4557664 bytes, 2729 files, 0 tilesets
[./data/25Dialog.bif] 705847 bytes, 299 files, 0 tilesets

c:\juegos\black isle\bgii - soa>


No results in the search, the Readme tells that with biff-str regexp are allowed, and at least the stringref 42297 must be displayed, it´s exactly the same string and a string like "Hello, CHARNAME>." must be part of a dlg file. I know there are dlg files with that string.

More, i type

Microsoft Windows XP [Versión 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

c:\juegos\black isle\bgii - soa>weidu --strfind "CHARNAME>"
[weidu] WeiDU version 127
[./chitin.key] 182 BIFFs, 41794 resources
[./dialog.tlk] 78627 string entries
[./dialogf.tlk] 78627 string entries


And it find a lot of results as expected, but if I type

Microsoft Windows XP [Versión 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

c:\juegos\black isle\bgii - soa>weidu --biff-type DLG --biff-str "CHARNAME>"
[weidu] WeiDU version 127
[./chitin.key] 182 BIFFs, 41794 resources
[./dialog.tlk] 78627 string entries
[./dialogf.tlk] 78627 string entries
[./data/Dialog.bif] 4557664 bytes, 2729 files, 0 tilesets
[./data/25Dialog.bif] 705847 bytes, 299 files, 0 tilesets

c:\juegos\black isle\bgii - soa>


No results again, and the string CHARNAME> REALLY exists en dlg files (even dlg files i´ve made)

Microsoft Windows XP [Versión 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

c:\juegos\black isle\bgii - soa>weidu --biff-type DLG --biff-str "CHARNAME>" --
textout pruestr.txt
[weidu] WeiDU version 127
[./chitin.key] 182 BIFFs, 41794 resources
[./dialog.tlk] 78627 string entries
[./dialogf.tlk] 78627 string entries
[./data/Dialog.bif] 4557664 bytes, 2729 files, 0 tilesets
[./data/25Dialog.bif] 705847 bytes, 299 files, 0 tilesets

c:\juegos\black isle\bgii - soa>


This order give me a blank pruestr.txt file.

Microsoft Windows XP [Versión 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

c:\juegos\black isle\bgii - soa>weidu --strfind "CHARNAME>" --textout fichero.txt
[weidu] WeiDU version 127
[./chitin.key] 182 BIFFs, 41794 resources
[./dialog.tlk] 78627 string entries
[./dialogf.tlk] 78627 string entries


This order show all the string references in window but creates a blank fichero.txt file

The order weidu --biff-type dlg --biff-str hola --textout fichero.txt

worked fine in the 124 version, but now in my 127 version don´t work.

As you can see i have WXP versión 5.1.2600, WeiDu versión 127 I have a complete install of both SoA and ToB and i have change the baldur.ini for skip the need of using all the game´s cd´s. This is my baldur.ini file:

[Program Options]
Installing=0
Install Type=3
Path Search Nodes=400000
Maximum Frame Rate=30
Resolution=800
Full Screen=1
BitsPerPixel=16
SoftMirrorBlt=0
SoftBlt=0
SoftSrcKeyBlt=0
3D Acceleration=0
16Bit Textures=1
GLSetup Driver=-1
Translucent Shadows=1
Disable Brighten=1
Force 50 Percent Transparent=0
Volume Movie=0
Volume Music=0
Volume Voices=0
Volume Ambients=0
Volume SFX=0
Font Name=
Double Byte Character Support=0
Drop Capitals=1
Display Frequency=60
Tooltips=60
Sprite Mirror=0
Gamma Correction=0
Brightness Correction=0
Backwards Compatible 3d=0
SoftSrcKeyBltFast=0
SoftBltFast=0
Strref On=0
First Run=0
Display Subtitles=0
Disable Vertex Padding=0
[Alias]
HD0:=C:\Juegos\Black Isle\BGII - SoA\
CD1:=E:\CD1\
CD2:=C:\Juegos\Black Isle\BGII - SoA\CD2\
CD3:=C:\Juegos\Black Isle\BGII - SoA\CD3\
CD4:=C:\Juegos\Black Isle\BGII - SoA\CD4\
CD5:=C:\Juegos\Black Isle\BGII - SoA\CD5\
[Local]
Language=Spanish
Zip=
Country Code=
Language25=Spanish
[Game Options]
Memory Access=100
Memory Level=1
Difficulty Level=3
Enhanced Path Finding=1
Use 3d Animations=1
Critical Hit Screen Shake=1
Low End Machine=0
Low End Machine 2=0
Duplicate Floating Text=0
Footsteps=1
Attack Sounds=1
Disable Casting Glows=0
Low Mem Sounds 1=0
Low Mem Sounds 2=0
Disable VEFVidCells=0
Mid Level Brighten=1
High Level Brighten=1
Tiles Precache Percent=100
Automated Speed Adjustment=1
Pausing Map=0
Extra Feedback=0
All Learn Spell Info=1
Automated Translucent Shadows=50
Automated Very Low Performance=30
Automated Low Performance=60
Automated Disable Brightest=40
Automated Limit Transparency=40
Automated Disable Casting Glows=40
Automated Disable VEFVidCells=30
Automated Mid Level Brighten=60
Automated High Level Brighten=80
Automated Foot Steps=70
Automated Attack Sounds=50
Automated 3D Animations=80
Automated Disable VVC Sounds=60
Automated Faster Blur=60
Disable Statics During Combat=0
Disable Footsteps During Combat=0
Disable Placed Sounds During Combat=0
Disable VVC Sounds=0
Faster Blur=0
One Time Popup=1
Never Show Nuisance=1
Current Loading Hint=30
Mouse Scroll Speed=36
GUI Feedback Level=5
Locator Feedback Level=3
Bored Timeout=3000
Always Dither=1
Subtitles=0
Keyboard Scroll Speed=36
Command Sounds Frequency=2
Selection Sounds Frequency=3
Effect Text Level=62
Infravision=0
Weather=1
Tutorial State=1
Auto Pause State=0
Auto Pause Center=1
Quick Item Mapping=1
Environmental Audio=1
Heal Party on Rest=0
Terrain Hugging=0
HP Over Head=0
Hotkeys On Tooltips=1
Area Effects Density=100
Filter Games=1
Never Show Nuisance SOA=1
[Uninstall]
Uninst_dir=C:\Archivos de programa\InstallShield Installation Information\{5E30BDEB-9307-11D4-9AE0-006067325E47}
Uninst_dir_25=C:\Archivos de programa\InstallShield Installation Information\{68F40945-449D-11D5-96E9-0050BA84F5F7}
[Config]
General=1
Graphics=1
Sound=1
CacheSize=150
ConfigWidth=800
ConfigHeight=600
[Movies]
BISLOGO=1
BWDRAGON=1
WOTC=1
INTRO15F=1
INTRO=1
RESTCAMP=1
RESTDUNG=1
RESTINN=1
DEATHAND=1
NITEDAY=1
SARADUSH=1
POCKETZZ=1
MANAFORG=1
FLYTHR01=1
FLYTHR02=1
[GameSpy]
Enabled=1
Location=


Can you help me??. I think i can be doing the biff-type commands wrong, but i bet the --textout order is well done.

#2 Mhoram

Mhoram

    Dlan´s Great Inquisitor

  • Member
  • 34 posts

Posted 22 June 2003 - 03:25 AM

Hey, the token CHARNAME don´t appear in this forum.

#3 weimer

weimer
  • Member
  • 1569 posts

Posted 22 June 2003 - 04:35 PM

I'm not sure how much of a programmer you are, but here's the answer: --biff-str searches for embedded ASCII text in game resources. DLG files don't really have embedded ASCII text: they have integers that are "string references" to lines in DIALOG.TLK. So even if QUAYLE.DLG contains #2260 /* ~Hola, CHARNAME>. El TÝo Quayle me dijo que volverÝais...~ */, searching for "Hola" won't find it. Unfortunately, searching for "2260" won't find it either because the 2260 is stored as a 32-bit two's complement integer (= binary representaiton) and not as a four-byte ascii text string.

There is really no way in WeiDU to say "find me all of DLG files that reference dialog.tlk lines that contain the string 'hola'".

However, if you have bash, you could do this:

mkdir work
weidu --biff-get .*.dlg --out work
weidu work/*.dlg --out work
grep "Hola" work/*.d

Finally,

weidu --biff-str hola --biff-type dlg --textout f.txt

... should result in an empty f.txt file -- no DLG files contain the ASCII text "hola". The order of the arguments does not matter. You are entering the right commands ... they just don't do what you think they're doing.

#4 -jcompton-

-jcompton-
  • Guest

Posted 23 June 2003 - 07:53 AM

So it's probably better to use NI for this sort of thing.

#5 Mhoram

Mhoram

    Dlan´s Great Inquisitor

  • Member
  • 34 posts

Posted 22 June 2003 - 10:51 PM

Ok, my fault i haven´t understand correctly the WeiDU-Readme. i know that dlg files don´t contain strings but references to dialog.tlk I tought WeiDU firts search dialog.tlk for matches and then the dlg references to find dlg files with that string (too strange, i know) .

Thanks Jason, again.