Jump to content

Question to REPLACE_TEXTUALLY


jastey

Recommended Posts

@wisp, I'm pretty sure STRING_SET can take a #strref for its first argument as well as ~strings~ ... my mod does it dozens of times.

 

@jastey, here's a method that should work:

 

1) Open BGEE in Near Infinity. Search for the string "Sorcerous Sundries". Let's assume you find that it is in strref #10,000, and there is a dialog in strref #15,000 to the effect of "There's a great sale at Sorcerous Sundries! Potions half off!"

 

2) Put something like this in your .tp2:

ACTION_IF GAME_IS ~bgee~ THEN BEGIN
   STRING_SET 10000 ~Sundry Sorceries~
   STRING_SET 15000 ~There's a great sale at Sundry Sorceries! Potions half off!~
END
I can basically guarantee that will work. Of course, if the name appears in a lot of strings it would be a PITA to change them all. Presumably there is some way to automate the process a bit, but it's beyond my know-how.
Link to comment

subtledoctor: Sorry I wasn't clear enough: The text is in my mod's tra-file. I want to use different strings for the two games (classic and EE), and if possible would not use variables inside the text, as the tra-package should be useable without having to read in a variable, if it makes any sense. I don't know which string ref they will be in the player's game.

 

So, in my tra-file, Imoen says "Sorcerous Sundries transaltion no.1" in the tra file upon shipping, and upon installation on a EE-game, it should be changed (either before or after) to "Sorcerous Sundries translation no.2". I am sure this is possible, I just don't know the syntax.

Link to comment

You are mistaken. #123 will never work. 123 will work because its a string (even without delimiters).

Right, sorry, I was imprecise. But I just wanted to make clear for readers that
STRING_SET 123 ~hello!~
and
STRING_SET ~123~ ~hello!~
both work. And both do different things. (Edit: well, I assume they do different things. I've never tried the latter application.)

 

@jastey why do you need to alter the text after the fact? Admittedly I've never made dialog text, but why not have two versions of the dialog text in your tra file, and apply the right one for the game?

 

Heck, why not have two different tra files and just load the right one for each game? (Okay, this suggestion could make mod updates a bit of a nightmare...)

Link to comment

 

but why not have two versions of the dialog text in your tra file, and apply the right one for the game

I think this approach is the most realistic - define a variable, and use it in the .d-file! Thank you, I was so fixed on changing the text line that this didn't occur to me. EDIT: But this approach is not the best, either, because it would mean I had to introduce doubled text lines for all (other) language versions.

 

No, I'd rather change the text in the tra-file before the installation, and I am absolutely sure that WeiDU should be capable of doing this, all I would need is the syntax.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...