The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Gizmoboy on January 03, 2014, 03:14:44 pm



Title: Adding new phrases in NPC`s dialogues.
Post by: Gizmoboy on January 03, 2014, 03:14:44 pm
I`m trying to to subject. I add my new phrases in, for example,  C:\Build\sc2\content\Packages\base\comm\melnorme\melnorme.txt file. Then I add ID_links on the new phrases in C:\Build\sc2\src\uqm\comm\melnorme\strings.h.
I call new phrases with function:
Code:
NPCphrase (New_Phrase_ID)

or with
Code:
NPCphrase_cb (New_Phrase_ID, &SelectAlienXXX)
(like Zoq-Fots)

In melnorme.txt I add my phrase at the end of the list. But the program, instead of taking this entry, goes at the beginning of the list and takes FIRST phrases of NPC in the game. Why does it happen? How can I really add some new phrases to the game? Does the game in some way store the length of these lists?


Title: Re: Adding new phrases in NPC`s dialogues.
Post by: meep-eep on January 04, 2014, 01:01:20 pm
What you're doing should work.

One possible reason for the fact that it does not, is that the modified melnorme.txt may not the one which is used by the game. Are you modifying the file in the correct location. Is there a uqm-0.7.0-content.uqm file still present in addition to the unzipped files?

If this does not help, please send me the files you modified, and I'll take a look.



Title: Re: Adding new phrases in NPC`s dialogues.
Post by: Gizmoboy on January 04, 2014, 07:19:31 pm
I feel much better. I didn't know that they must be packed back into uqm-0.7.0-content.uqm.

But still there are questions:
1. when I'm done with editing dialogue files - can I pack them into archive with Zip or WinRar and after that just rename to "*.uqm", or should I use some special archiver?

2. when I call NPCPhrase_cb three times one after another, I see all of them in one screen, they are sticked together in one phrase. How to prevent it?


Title: Re: Adding new phrases in NPC`s dialogues.
Post by: meep-eep on January 06, 2014, 09:11:26 pm
They do not need to be packed into uqm-0.7.0-content.uqm. But if you have both packed and unpacked files at the same time, the wrong one might be used. See here (http://wiki.uqm.stack.nl/Content_Management).

1. You can just use any zip program, but you should configure it to just store .ogg files uncompressed.
2. I'm not sure. It could be that this only happens with tracks which do not have an associated .ogg file. You could try adding an empty line at the end of the dialog segment in the dialog .txt file. If you're using a post-0.7.0 development version, this bug (https://bugs.uqm.stack.nl/show_bug.cgi?id=1178) may be involved.


Title: Re: Adding new phrases in NPC`s dialogues.
Post by: Death 999 on January 17, 2014, 10:05:23 pm
waait. Where in the text file did you put the new NPC phrase?