The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
November 05, 2024, 04:03:43 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Adding races help?
« previous next »
Pages: [1] Print
Author Topic: Adding races help?  (Read 2354 times)
superbutcherx
*Many bubbles*
***
Offline Offline

Posts: 116



View Profile
Adding races help?
« on: November 13, 2009, 08:54:17 pm »

Hi, all!

I'm trying to add earthlings to the galaxy and have managed to
-edit the sphere of influence
-edit their encounter probability

I got the cruisers to appear in interplanetary and hyperspace although I just linked their conversation to supox conversation in races.h file.
#define RACE_COMMUNICATION \
      SUPOX_CONVERSATION,       /* (HUMAN_SHIP) */ \

So they are earthling cruisers when in IP and hyperspace and in battle too, but the comms are for supox.
But, of course I want more than this Cheesy

So, to make new human comms possible I copied the comm/supox dir and made it comm/human, editing the variable names accordingly.
Then I changed the races.h to define RACE_COMMUNICATION/HUMAN_CONVERSATION
and put a new switch case to commglue.c for HUMAN_CONVERSATION.

Here's the problem: all the *_CONVERSATIONS are defined in ires_ind.h, which gives some mystical (memory addresses??) for each one, like
#define SLYLANDRO_CONVERSATION 0x16a02907L
#define UMGAH_CONVERSATION 0x16c02a07L
#define URQUAN_CONVERSATION 0x16e02b07L

Now what the dang should I put as the HUMAN_CONVERSATION address?
Is this btw only for the OSX build or is the same ires_ind.h there for all the other systems too? This is baffling.

I read
http://forum.uqm.stack.nl/index.php?topic=4439.0
but it wasn't specific enough to help me...
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Adding races help?
« Reply #1 on: November 13, 2009, 09:38:58 pm »

They are not memory addresses. They are resource identifiers. Their format is described in doc/devel/resources.

But I suggest that you base your mod on the subversion version of the source. Those resource identifiers are gone, and a more human-friendly system is in place.
Logged

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

Posts: 116



View Profile
Re: Adding races help?
« Reply #2 on: November 13, 2009, 09:50:14 pm »

Thanks a bunch!
It really would be helpful not having to mess around with those identifiers...

Sorry for my utter stupidity, but what exactly is the subversion version?  Tongue I'm currently compiling from the 0.6.2 source tar.gz.
Logged
superbutcherx
*Many bubbles*
***
Offline Offline

Posts: 116



View Profile
Re: Adding races help?
« Reply #3 on: November 13, 2009, 10:30:36 pm »

Hmm, hehh...
Found the subversion repository at http://uqm.stack.nl/files/snapshots/  Grin

Do the content files also need updating? At least the old graphic contents don't work anymore,
I get these all over the place:
Trying to get undefined resource 'ship.arilou.code'
dummy.c::CaptureCodeRes() hCode==NULL! FATAL!
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Adding races help?
« Reply #4 on: November 13, 2009, 11:07:33 pm »

Subversion (SVN) is a version control system (like CVS — maybe you've heard of that). It makes it easy to keep track of old versions and merge in changes. The SVN repository is where the ongoing development takes place.

The content is indeed heavily modified. To keep your development synchronised with the latest changes, you're better off checking out everything from the SVN repository, rather than working with those snapshots.

You need a Subversion client. On *nix systems, there's a command-line client called simply "svn". On Windows, most people seem satisfied with TortoiseSVN.
On *nix, you run "svn co https://sc2.svn.sourceforge.net/svnroot/sc2 sc2" to check out the UQM source. Using TortoiseSVN, I don't recall exactly, but you would specify "https://sc2.svn.sourceforge.net/svnroot/sc2" as the repository to check out.
You may want to read through a Subversion introduction for the other svn commands.
Logged

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

Gender: Male
Posts: 701



View Profile
Re: Adding races help?
« Reply #5 on: November 14, 2009, 12:29:19 am »

<------------uses TortoiseSVN for his mod. Seems to do the business!
Logged

Play online melee here! http://irc.uqm.stack.nl/
superbutcherx
*Many bubbles*
***
Offline Offline

Posts: 116



View Profile
Re: Adding races help?
« Reply #6 on: November 14, 2009, 12:52:47 am »

Luckily, the svn command line tool is featured also on Mac OS X, so I used it.

At first I was aghast: Trying to run the new, (sub)version of UQM from terminal, all the keyboard input was directed to the terminal window instead of UQM application. However it is no problem: Clicking the icon starts UQM just fine!

(In the 0.6.2 source code clicking the icon just crashed UQM and it had to be run from terminal at least on my OSX.)

Hey, could you tell me how to permanently change the install config options? I'd like to have the joystick disabled permanently since I've got no joystick and when doing the "CFLAGS="-I/Library/Frameworks/SDL.framework/Headers"  ./build.sh uqm config" thing I have to disable the joystick every time. A small, but definite annoyance Smiley
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Adding races help?
« Reply #7 on: November 14, 2009, 11:56:10 am »

As long as you don't delete the config.state file, the build configuration options should remain as they were.
Logged

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

Posts: 116



View Profile
Re: Adding races help?
« Reply #8 on: November 18, 2009, 09:01:03 am »

It seems that compiling in OSX is picky: If I try to build install without running the build config with CFLAGs, it won't find the SDL headers, even if the config.state is there already. So I need to run the config each time.

But perhaps I'll cook up some way to add the CFLAGs permanently or make my command line compilation script type those 7 and 2 to disable joystick, so it's no biggie.
Logged
superbutcherx
*Many bubbles*
***
Offline Offline

Posts: 116



View Profile
Re: Adding races help?
« Reply #9 on: November 20, 2009, 08:37:36 am »

Hehh, changing build.config file in build/unix did the trick, now the joystick is disabled by default.

I can clean, config, compile and run with two keystrokes now. Oh, the joy, elation, rapture, delectation plus happy days and jubilation.
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!