The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2024, 12:32:13 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)
| | |-+  Ship Editing Help
« previous next »
Pages: [1] 2 3 Print
Author Topic: Ship Editing Help  (Read 13699 times)
fetid_breath
Zebranky food
*
Offline Offline

Gender: Male
Posts: 29


Current Livelihood: Anyway I want. I can now code!


View Profile
Ship Editing Help
« on: April 16, 2005, 07:32:12 pm »

Is there a way to edit ships for ship battles? I'm sick of getting my butt whooped by the enemy. Sad

I know there was a topic about this a page back, but I couldn't understand the directions (probably due to my ignorance). Could someone explain how to edit ships in simple terms? I'm using windows XP if that is any help.
Logged

The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Ship Editing Help
« Reply #1 on: April 17, 2005, 02:21:48 pm »

Right now, the simplest solution available for editing ships in UQM is to edit the source code and recompile, so I'll briefly explain how to do that step by step, with links to the relevant information.
    [*]Install a CVS client, such as WinCVS.
    [*]Check out (download) the UQM source code from the UQM CVS repository. The module you want is "sc2".
    [*]Edit the ship definitions in sc2/sc2/src/sc2code/ships/[ship]/[ship].c (where [ship] is the name of the ship to edit). The lines you want to edit are at the top of the file and look like this:
    Code:
    #define MAX_CREW 20
    #define MAX_ENERGY 24
    #define ENERGY_REGENERATION 1
    #define WEAPON_ENERGY_COST 3
    #define SPECIAL_ENERGY_COST 2
    #define ENERGY_WAIT 8
    #define MAX_THRUST 24
    #define THRUST_INCREMENT 3
    #define TURN_WAIT 4
    #define THRUST_WAIT 0
    #define WEAPON_WAIT 0
    #define SPECIAL_WAIT 0

    #define SHIP_MASS 6
    Just change the numbers to suit your needs.
    [*]Follow the instructions in sc2/INSTALL.mingw to install MinGW and MSYS and the required libraries and compile.
    [/list]To perform further changes, edit the values as described above and repeat the "./build.sh uqm" step from the compilation instructions.
    Logged

    RTFM = Read the fine manual.
    RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
    meep-eep
    Forum Admin
    Enlightened
    *****
    Offline Offline

    Posts: 2847



    View Profile
    Re: Ship Editing Help
    « Reply #2 on: April 17, 2005, 09:42:09 pm »

    You can also rename the .shp files in the content, to replace one ship by another. That doesn't require recompilation. It messes up the spheres of influence though.
    Logged

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

    Gender: Male
    Posts: 29


    Current Livelihood: Anyway I want. I can now code!


    View Profile
    Re: Ship Editing Help
    « Reply #3 on: April 18, 2005, 07:11:47 pm »

    My life has been busy, but I've been working on this a few minutes everyday.

    Well to make sure I downloaded everything I need to edit, I'm going to list my downloads.

    WinCvs 1.3
    cvsnt (at the end of installing WinCvs 1.3, it said I needed cvsnt as well. Do I?)
    http://cvs.sourceforge.net/viewcvs.py/*checkout*/sc2/sc2/src/sc2code/ships/human/human.c?rev=1.5 (This is the Earthling Cruiser code. I saved it as a .txt. Or should I save it as something else?)
    MinGW-3.2.0-rc-3.exe
    MSYS-1.0.10.exe
    http://www.libsdl.org/release/SDL-devel-1.2.5a-mingw32.tar.gz

    http://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.3-VC6.zip

    http://www.vorbis.com/files/1.0/windows/OggVorbis-win32sdk-1.0.zip

    http://gnuwin32.sourceforge.net/packages/zlib.htm
    The last four links are the libraries, I think. There is another library file: http://ftp://opensource.creative.com/pub/sdk/OpenALSDK.exe
    But the page could not be displayed. Is there another link to this?
    The last file I downloaded was a header not included with MinGW. http://sc2.sourceforge.net/misc/_G_config.h

    That's it. Did I miss anything other then the OpenALSDK.exe? Or did I download something that is superfluous?
    Sorry if I'm bothering all of you too much, but I'm not very computer-wise and need the help.
    Logged

    The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
    0xDEC0DE
    *Many bubbles*
    ***
    Offline Offline

    Posts: 175



    View Profile WWW
    Re: Ship Editing Help
    « Reply #4 on: April 19, 2005, 06:03:12 am »

    WinCVS?  You masochist.

    Try TortoiseCVS -- A Windows CVS that doesn't suck.
    Logged

    "I’m not a robot like you. I don’t like having disks crammed into me… unless they’re Oreos, and then only in the mouth."  --Fry
    Novus
    Enlightened
    *****
    Offline Offline

    Gender: Male
    Posts: 1938


    Fot or not?


    View Profile
    Re: Ship Editing Help
    « Reply #5 on: April 19, 2005, 02:10:04 pm »

    The OpenAL SDK seems to have been recently moved; it is now here.

    The whole point of downloading a CVS client in your case is to use it to download the latest source tree (and keep it up to date easily), not just the source file you want to change. You can't recompile a single file and link it back into the executable, if that was what you were thinking.

    BTW, thanks for the TortoiseCVS link, 0xDEC0DE. I'll be looking into it further.
    Logged

    RTFM = Read the fine manual.
    RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
    fetid_breath
    Zebranky food
    *
    Offline Offline

    Gender: Male
    Posts: 29


    Current Livelihood: Anyway I want. I can now code!


    View Profile
    Re: Ship Editing Help
    « Reply #6 on: April 20, 2005, 04:18:30 am »

    Thank you, 0xDECODE, for the link. Tortoise is so much easier for the computer-savvy-less people like me.

    Ok, so progress report.

    I downloaded and installed Tortoise.
    I made a file 'shipedit' and got the sc2 module downloaded using Tortoise.
    I found the .../ships/human file and opened up the file for the earthling cruiser.
    I changed the what I wanted, but now I'm trying to figure out how to put the changes into the game (recompile the right word?)
    I'll go read the help file now...
    Logged

    The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
    fetid_breath
    Zebranky food
    *
    Offline Offline

    Gender: Male
    Posts: 29


    Current Livelihood: Anyway I want. I can now code!


    View Profile
    Re: Ship Editing Help
    « Reply #7 on: April 21, 2005, 11:33:40 pm »

    Something is wrong with the new OpenAL SDK link.
    When the window pops up with OpenAL 1.0 Software Development Kit, it doesn't let me copy it to the file I want.

    But if I use Tortoise, will I need OpenAL SDK?
    Logged

    The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
    Novus
    Enlightened
    *****
    Offline Offline

    Gender: Male
    Posts: 1938


    Fot or not?


    View Profile
    Re: Ship Editing Help
    « Reply #8 on: April 22, 2005, 03:02:09 pm »

    OpenAL is used to produce the sound in UQM, while CVS is used to keep the source code up to date when different people make changes. They have practically nothing to do with each other.

    You should be able to compile UQM without OpenAL, although this will probably disable some sound-related features. UQM contains an alternative system called MixSDL which seems to work fine, though.

    The download link works fine for me in Mozilla (suite and Firefox). Try using "Save link target as..." or the equivalent command in the right-click pop-up menu for your browser.
    Logged

    RTFM = Read the fine manual.
    RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
    Novus
    Enlightened
    *****
    Offline Offline

    Gender: Male
    Posts: 1938


    Fot or not?


    View Profile
    Re: Ship Editing Help
    « Reply #9 on: April 24, 2005, 08:27:41 pm »

    One more thing: if you get error messages about conflicting definitions of ssize_t while compiling UQM, just remove the offending definition ("typedef int ssize_t;") from the UQM source code (the error message includes information on where the problem lies; I got this error twice).
    Logged

    RTFM = Read the fine manual.
    RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
    meep-eep
    Forum Admin
    Enlightened
    *****
    Offline Offline

    Posts: 2847



    View Profile
    Re: Ship Editing Help
    « Reply #10 on: April 25, 2005, 12:07:45 am »

    You shouldn't get an error like that. If you do with the current CVS, please report a bug in the bugzilla database.
    Logged

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

    Gender: Male
    Posts: 29


    Current Livelihood: Anyway I want. I can now code!


    View Profile
    Re: Ship Editing Help
    « Reply #11 on: April 25, 2005, 10:59:27 pm »

    Thanks Novus. I got the OpenAL now.

    I have another problem.
    Quote
    1) Copy the DLLs for each library to \[MinGW]\lib.  Copy the header files for
      each library to \[MinGW]\include, (where [MinGW] is the directory where you
      installed MinGW) except for the Ogg Vorbis headers -- copy the folders (ogg
      and vorbis) containing the header files to the include directory.


    What are the header files?
    Logged

    The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
    Novus
    Enlightened
    *****
    Offline Offline

    Gender: Male
    Posts: 1938


    Fot or not?


    View Profile
    Re: Ship Editing Help
    « Reply #12 on: April 26, 2005, 01:44:42 pm »

    Header files have the extension .h.
    Logged

    RTFM = Read the fine manual.
    RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
    fetid_breath
    Zebranky food
    *
    Offline Offline

    Gender: Male
    Posts: 29


    Current Livelihood: Anyway I want. I can now code!


    View Profile
    Re: Ship Editing Help
    « Reply #13 on: April 26, 2005, 07:43:58 pm »

    I follow the instructions all the way up to when you run MSYS. Here is what it says.

    Quote
    Zach@DESKTOP ~
    $ cd /z/uqm/content/packages/sc2

    Zach@DESKTOP /z/uqm/content/packages/sc2
    $ ./build.sh uqm config
    'echo -n' capable echo found.
    Sed stream editor found.
    tr found.
    Make found.
    GNU C compiler not found.

    Zach@DESKTOP /z/uqm/content/packages/sc2
    $


    You'll noticed I have the downloaded module 'sc2' from the repository in the packages folder. Should I move the sc2 folder somewhere else?

    It says GNU C compiler not found. I'm assuming this is the problem. How do I fix it?

    As you probably know by now, my name is Zach (and consequently my drive's name too).
    Logged

    The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
    Novus
    Enlightened
    *****
    Offline Offline

    Gender: Male
    Posts: 1938


    Fot or not?


    View Profile
    Re: Ship Editing Help
    « Reply #14 on: April 26, 2005, 10:58:06 pm »

    Quote
    You'll noticed I have the downloaded module 'sc2' from the repository in the packages folder. Should I move the sc2 folder somewhere else?

    That would probably be a good idea.

    Quote

    It says GNU C compiler not found. I'm assuming this is the problem. How do I fix it?

    MSYS uses GCC from MinGW as its C compiler. You should install MinGW before MSYS and then make sure that you enter the correct MinGW installation directory when MSYS asks for your MinGW installation directory.

    You may be able to fix this by editing settings in MSYS. If you already have MinGW installed, editing /etc/fstab in MinGW to include the following line (where d:/mingw is the installation directory for MinGW) should fix things:

    Code:
    d:/mingw /mingw

    I'm surprised the moderators haven't moved this discussion to the technical section yet.
    Logged

    RTFM = Read the fine manual.
    RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
    Pages: [1] 2 3 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!