The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
August 11, 2022, 07:34:30 am
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)
| | |-+  Ship Files
« previous next »
Pages: [1] Print
Author Topic: Ship Files  (Read 3220 times)
jesse
Guest


Email
Ship Files
« on: December 12, 2003, 12:24:26 am »

I remember that with the original SC2, it was possible to exchange any ship with any ship by renaming the .SHP files. For example, if I wanted to start the game with a Ur-Quan Dreadnaught, rather than an Earthling Cruiser, I just had to change urquan.shp to human.shp (and vice versa).
I was wondering if it is possible to do the same in Ur-Quan Masters? Maybe by changing the file names in the content.zip file?

Thanks for the advice!
Jesse
Logged
Michael Martin
Core Team
*Smell* controller
*****
Offline Offline

Posts: 387



View Profile
Re: Ship Files
« Reply #1 on: December 12, 2003, 01:22:08 am »

You can't do this at the moment.  (SHP files were effectively DLLs; we link all ship data into the executable.)  Whether this becomes possible in the future or not remains to be seen.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Ship Files
« Reply #2 on: December 12, 2003, 05:21:27 pm »

I can't check it now, but I think this *is* actually possible to do this at this time.
The .cod files in uqm contain an index specifying which (linked-in) code to use.
If you replace a .shp file, you're also replace the reference to the .cod file.


Logged

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

Posts: 41


I love YaBB 1G - SP1!


View Profile
Re: Ship Files
« Reply #3 on: December 12, 2003, 09:30:28 pm »

One time I tried extracting the SHP files from one of the zip files (content.zip I believe). Then I tried several of the SHP editors found on PNF, but the editors never were able to edit the SHP files extracted from the zip file.

My plan was to edit a single ship and put it back into the zip file to see if that did anything. It could be that the editors just don't work anymore or that the SHP files have changed. Either way, with my meager programming skills, I couldn't get it working.
Logged
Jesse
Guest


Email
It works!
« Reply #4 on: December 14, 2003, 02:38:04 am »

It does in fact work. I extracted urquan.shp from the content.zip file. I then renamed the file "human.shp" and added it back to the zip file (thus over-writing the old human.shp). This gives you a Ur-quan ship at the start of the game.

Thanks very much for pointing me in the right direction.
PS. For those of you planning on trying this, remember to save your old ship files OR make a backup of the content.zip file.

Logged
Ace987
Zebranky food
*
Offline Offline

Posts: 41


I love YaBB 1G - SP1!


View Profile
Re: It works!
« Reply #5 on: December 15, 2003, 10:47:20 am »

Quote
It does in fact work. I extracted urquan.shp from the content.zip file. I then renamed the file "human.shp" and added it back to the zip file (thus over-writing the old human.shp). This gives you a Ur-quan ship at the start of the game.


If that's the case, then modifying the SHP files should be possible. There's still the problem that there is no SHP file editor. The old ones don't appear to work anymore, perhaps I need to be in real DOS to do this. Maybe there's another editor out there I missed. Perhaps someone (with better programming skills than myself) will write a newer program that can properly edit SHP files.

Anyhow, I'm glad that it worked for you.
Logged
Zeep-Eeep
Enlightened
*****
Offline Offline

Gender: Male
Posts: 917


Good Grief


View Profile WWW
Re: Ship Files
« Reply #6 on: December 15, 2003, 11:24:18 am »

I'm not sure where the stats for the ships are stored. However, I am fairly sure that they aren't in the .shp files. At least not anymore.  Whether they're in the code or in one of the other files, I'm not sure. Perhaps one of the developers would be kind enough to point us in the right direction.
Logged

What sound does a penguin make?
Michael Martin
Core Team
*Smell* controller
*****
Offline Offline

Posts: 387



View Profile
Re: Ship Files
« Reply #7 on: December 16, 2003, 08:18:34 am »

It would appear that they're a pile of defines at the beginning of each ship's .c file.  src/sc2code/ships/human.c begins with the GPL and copyright notice, then...

Quote
#define MAX_CREW 18
#define MAX_ENERGY 18
#define ENERGY_REGENERATION 1
#define WEAPON_ENERGY_COST 9
#define SPECIAL_ENERGY_COST 4
#define ENERGY_WAIT 8
#define MAX_THRUST /* DISPLAY_TO_WORLD (6) */ 24
#define THRUST_INCREMENT /* DISPLAY_TO_WORLD (2) */ 3
#define TURN_WAIT 1
#define THRUST_WAIT 4
#define WEAPON_WAIT 10
#define SPECIAL_WAIT 9
                                                                               
#define SHIP_MASS 6
#define MISSILE_LIFE 60
#define MIN_MISSILE_SPEED DISPLAY_TO_WORLD (10)
#define MAX_MISSILE_SPEED DISPLAY_TO_WORLD (20)


Sounds like it's a good place to start, anyway.
Logged
Zeep-Eeep
Enlightened
*****
Offline Offline

Gender: Male
Posts: 917


Good Grief


View Profile WWW
Editing Ship Stats
« Reply #8 on: December 16, 2003, 09:19:23 am »

That's great. Yeah, I looked over the stats for a couple of ships. It looks like it would be easy to change those values to anything resonable and re-compile the code. I think I'll start with the "lastbat" section, which appears to change the values for the Ur-quan battle platform. Just for an added challenge.

Thanks for the help.
Logged

What sound does a penguin make?
confused
Guest


Email
Re: Ship Files
« Reply #9 on: October 17, 2004, 01:26:04 am »

where did you guys find the src/sc2code/ships/human.c  ?? ....i can't seem to locate it.
Logged
Megagun
Enlightened
*****
Offline Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: Ship Files
« Reply #10 on: October 17, 2004, 06:11:33 pm »

It's in the source code, not in the actual game...
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!