The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 05, 2021, 09:12:16 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Adding new phrases in NPC`s dialogues.
« previous next »
Pages: [1] Print
Author Topic: Adding new phrases in NPC`s dialogues.  (Read 1715 times)
Gizmoboy
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Adding new phrases in NPC`s dialogues.
« 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?
« Last Edit: January 03, 2014, 07:21:34 pm by Gizmoboy » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Adding new phrases in NPC`s dialogues.
« Reply #1 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.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Gizmoboy
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Re: Adding new phrases in NPC`s dialogues.
« Reply #2 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?
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Adding new phrases in NPC`s dialogues.
« Reply #3 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.

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 may be involved.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3862


We did. You did. Yes we can. No.


View Profile
Re: Adding new phrases in NPC`s dialogues.
« Reply #4 on: January 17, 2014, 10:05:23 pm »

waait. Where in the text file did you put the new NPC phrase?
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!