Pocket Plane Group
Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: The_Swordalizer on May 09, 2005, 11:48:14 AM
-
If I want to add some strings that aren't in a .dlg file (e.g. in a .baf file or whatever) what is the correct command in a .tp2 file? I remember seeing a command that let you write a string to specific StrRef, but how can you be sure that noone else has chosen that ref number for their mod??
-
I'm not entirely sure what you mean, but here's an example of text in a script.
The.baf file:
IF
Global("SomeGlobal","GLOBAL",1)
THEN
RESPONSE #100
DisplayStringHead(Myself,~Ah, <CHARNAME>, at last we meet!~)
SetGlobal("SomeGlobal","GLOBAL",2)
END
And in the .tp2 you'd have:
COMPILE ~mymod/scripts/the.baf~
You can also use .tra references in scripts like that. DisplayStringHead(Myself,@1), for instance.
-
Strings don't work inside BAFs, and you cannot traify a baf.
You'll have to use @ in a baf (or use the old cumbersome way of putting placeholder numbers and then using REPLACE)
-
Strings don't work inside BAFs, and you cannot traify a baf.
You'll have to use @ in a baf (or use the old cumbersome way of putting placeholder numbers and then using REPLACE)
Yes, they do work inside bafs and yes you can traify a .baf.
-
Yes, they do work inside bafs and yes you can traify a .baf.
False and false, I just run a test.
IF
True()
THEN
RESPONSE #100
DisplayStringHead(Myself,"Hey this is a new string!")
END
Compiled with WeiDU and decompiled with WeiDU:
IF
True()
THEN
RESPONSE #100
DisplayStringHead(Myself,0) // ~<NO TEXT>~
END
traify-ed:
IF
True()
THEN
RESPONSE #100
DisplayStringHead(Myself,"Hey this is a new string!")
END
-
Ah, you can't use quotes to enclose the string. Try again with tildes.
-
Ah, you can't use quotes to enclose the string. Try again with tildes.
I, err, umm... :'(
Damn Italian keyboard :(
-
Wrap 'em in %s.
-
Wrap 'em in %s.
Well, there is no reason at all to use hard strings instead of tranlsation files, so I fail to see where is the problem in hard strings not working, after all ;D
-
Well, there is no reason at all to use hard strings instead of tranlsation files, so I fail to see where is the problem in hard strings not working, after all ;D
I'm not entirely sure what you're talking about, but what I meant is that WeiDU will compile and traify bafs with strings wrapped in %s.
-
Well, there is no reason at all to use hard strings instead of tranlsation files, so I fail to see where is the problem in hard strings not working, after all ;D
I'm not entirely sure what you're talking about, but what I meant is that WeiDU will compile and traify bafs with strings wrapped in %s.
I think he's saying that he thinks there is no point not tra-ing files, which personally I feel is bollocks. But oh well.
-
I think he's saying that he thinks there is no point not tra-ing files, which personally I feel is bollocks. But oh well.
Can I hire you as a Gibberish2English translator? :P ;D
-
So I can use ~This is a string.~ inside a .baf? For some reason I thought that wouldn't work. Kewl.
Cheers all.
-
So I can use ~This is a string.~ inside a .baf?
Short version of this thread: Yes. That and %String%. :)