Author Topic: STRING_SET with dialogF.tlk  (Read 174 times)

Offline Gwendolyne_FP

  • Planewalker
  • *****
  • Posts: 26
STRING_SET with dialogF.tlk
« on: August 09, 2017, 05:04:30 AM »
I am updating a French correct pack and I just wonder if this command

STRING_SET n @n

will correct both the dialog.tlk and the dialogF.tlk files

with

n = ~blabla~ ~blabla
~
and
@n = ~blabla~


Edit : another question, or maybe a request

Quote
STRING_SET_RANGE #min #max USING traFile
For every integer i between min and max (inclusive) we do STRING_SET i @i USING traFile (except that this command should be executed more rapidly). The command will fail if @i is not defined (either by traFile or by some other tra file in scope) for some i between min and max.

Would it be possible to add an option that forces STRING_SET_RANGE not to fail if @i does not exist? That would save me a lot of consuming time to write STRING_SET lines. ;)
« Last Edit: August 09, 2017, 05:09:27 AM by Gwendolyne_FP »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 897
Re: STRING_SET with dialogF.tlk
« Reply #1 on: August 10, 2017, 01:32:18 PM »
I am updating a French correct pack and I just wonder if this command

STRING_SET n @n

will correct both the dialog.tlk and the dialogF.tlk files

with

n = ~blabla~ ~blabla
~
and
@n = ~blabla~
The female string would be clobbered and the male string would be updated.

n = ~blabla~ // or some other way of identifying the right strref (this uses the male string)
@n = ~lele~ ~lala~
would update both strings.

Quote
Edit : another question, or maybe a request

Quote
STRING_SET_RANGE #min #max USING traFile
For every integer i between min and max (inclusive) we do STRING_SET i @i USING traFile (except that this command should be executed more rapidly). The command will fail if @i is not defined (either by traFile or by some other tra file in scope) for some i between min and max.

Would it be possible to add an option that forces STRING_SET_RANGE not to fail if @i does not exist? That would save me a lot of consuming time to write STRING_SET lines. ;)
I think I could remove the failure outright. It's pretty overkill to fail the installation over a missing @traref in this context. If someone wants feedback for debugging purposes or whatever, I can add a MODDER option for it, or something.

Offline Gwendolyne_FP

  • Planewalker
  • *****
  • Posts: 26
Re: STRING_SET with dialogF.tlk
« Reply #2 on: August 11, 2017, 02:38:04 AM »
Thanks!

The female string would be clobbered and the male string would be updated.

n = ~blabla~ // or some other way of identifying the right strref (this uses the male string)
@n = ~lele~ ~lala~
would update both strings.

So it means that if I want to remove an extra unnecessary empty row or remove a typo (an extra unwanted character) in the the dialogF.tlk, I must use the following commands:

STRING_SET = ~blabla~ ~blabla
~ ~blabla~ ~blabla~
STRING_SET = ~blabla~ ~blablas~ ~blabla~ ~blabla~

Quote
I think I could remove the failure outright. It's pretty overkill to fail the installation over a missing @traref in this context. If someone wants feedback for debugging purposes or whatever, I can add a MODDER option for it, or something.

Until now, I wrote a little WeiDU process to generate a tpa file which reads the tra file and writes all STRING_SET @n references existing in in the tra file. But a WeiDU function would really be more convenient to use.

And yes, a MODDER option would be helpful.
« Last Edit: August 11, 2017, 02:38:41 AM by Gwendolyne_FP »

 

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.

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