Author Topic: [Req] Expanding ALTER_TLK (sound references) ; STRING_SET should evaluate strref  (Read 684 times)

Offline K4thos

  • Planewalker
  • *****
  • Posts: 110
1. As the topic mentions I'm looking for a way to patch/alter/remove existing sound references in TLK without overwriting whole strref. Expanding ALTER_TLK / ALTER_TLK_LIST / ALTER_TLK_RANGE commands would probably be best solution to achieve this.

2. This code:
Code: [Select]
OUTER_SET strref = 1
STRING_SET ~%strref%~ ~test~
doesn't work. WeiDU can't evaluate strref number variable. It works if we change variable to number. Adding EVAL results in error. No problems with variable evaluations when ALTER_TLK_LIST command is used instead, so it's not really a huge problem.

Thanks in advance.
« Last Edit: August 27, 2016, 02:50:22 AM by K4thos »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1071
1.
Code: [Select]
OUTER_FOR (i = 0; i < NEXT_STRREF; ++i) BEGIN
  ACTION_GET_STRREF i male
  ACTION_GET_STRREF_F i female
  ACTION_GET_STRREF_S i male_sound
  ACTION_GET_STRREF_FS i female_sound

  // stuff goes here

  STRING_SET_EVALUATE i ~%male%~ [%male_sound%] ~%female%~ [%female_sound%]
END
You should probably wrap some sort of "did something change" check around the STRING_SET, though. NEXT_STRREF is new.

2. STRING_SET_EVALUATE

Offline K4thos

  • Planewalker
  • *****
  • Posts: 110
thank you very much for this sample code. I'm blind (again) considering STRING_SET_EVALUATE is right below STRING_SET in documentation. Also completely missed those sound commands :o

Glad to hear about that new NEXT_STRREF variable.
« Last Edit: September 09, 2016, 04:57:56 PM by K4thos »

 

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