The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => General UQM Discussion => Topic started by: waywardoctagon on November 30, 2006, 06:14:41 pm



Title: Questions: Dialog and the source code
Post by: waywardoctagon on November 30, 2006, 06:14:41 pm
I'm going to be fiddling with the dialog a bit(for, basically, personal amusement :D ), and I've worked out what I need to do with the racec.c files, the strings.h files, and the content/comm/race/race.txt files, but I've run into something:

What are the content/comm/race/race.ts files for?  How do they fit with the others?  Also, what are the numbers at the ends of some of the lines?  All I can see is that the number of numbers for a dialog bit seems to be the number of lines in the bit, minus one.  (And are there any other dialog-related files I'd need to edit, aside from those four?)  I found these two (http://sc2.cvs.sourceforge.net/sc2/sc2/doc/devel/script?view=markup) files (http://sc2.cvs.sourceforge.net/sc2/sc2/doc/devel/dialogs?view=markup) about the dialog but they don't mention the .ts files.

Also... which bits determine whether you're at a homeworld or not and change the dialog options?  Like, if you go to the Pkunk homeworld as opposed to encountering them in space, there's a completely different set of options.  I want to make sure that if I make a new option it ends up in the right place.  I'm not very familiar with C and I'm having a little trouble finding this.

Lastly... I haven't gotten this far yet, but as long as I'm asking questions:  Will I actually need to compile and link all the thousands of files individually, or is there a shortcut?


Title: Re: Questions: Dialog and the source code
Post by: meep-eep on November 30, 2006, 06:47:38 pm
What are the content/comm/race/race.ts files for?  How do they fit with the others?  Also, what are the numbers at the ends of some of the lines?  All I can see is that the number of numbers for a dialog bit seems to be the number of lines in the bit, minus one.
They are timestamps. They determine when each line is shown, so that they are synchronised with the voices. In the tools module in CVS there's a tool which can be used to (interactively) generate these.

Quote
(And are there any other dialog-related files I'd need to edit, aside from those four?)
I think that's it.

Quote
Also... which bits determine whether you're at a homeworld or not and change the dialog options?  Like, if you go to the Pkunk homeworld as opposed to encountering them in space, there's a completely different set of options.  I want to make sure that if I make a new option it ends up in the right place.  I'm not very familiar with C and I'm having a little trouble finding this.
For this the game state some bits of the variable 'GLOBAL_FLAGS_AND_DATA' is used. They are set in src/sc2code/planets/gen* with SET_GAME_STATE, and they are queried in the comm files with GET_GAME_STATE. A bit more info can be found in src/sc2code/globdata.h. We haven't really had a reason to mess with these, so this information is incomplete.

Quote
Lastly... I haven't gotten this far yet, but as long as I'm asking questions:  Will I actually need to compile and link all the thousands of files individually, or is there a shortcut?
There is a build script for building on *nix systems and on MinGW, and there is a project file for MSVC.
See the files INSTALL, INSTALL.msvc (recent CVS only), INSTALL.mingw, and/or doc/users/unixinstall.


Title: Re: Questions: Dialog and the source code
Post by: waywardoctagon on November 30, 2006, 06:50:48 pm
Aha!  Thank you very much! :D