The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: fetid_breath on April 16, 2005, 07:32:12 pm



Title: Ship Editing Help
Post by: fetid_breath 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. :(

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.


Title: Re: Ship Editing Help
Post by: Novus 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 (http://www.wincvs.org/).
  • Check out (download) the UQM source code from the UQM CVS repository (http://sourceforge.net/cvs/?group_id=59452). 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.
To perform further changes, edit the values as described above and repeat the "./build.sh uqm" step from the compilation instructions.


Title: Re: Ship Editing Help
Post by: meep-eep 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.


Title: Re: Ship Editing Help
Post by: fetid_breath 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.


Title: Re: Ship Editing Help
Post by: 0xDEC0DE on April 19, 2005, 06:03:12 am
WinCVS?  You masochist.

Try TortoiseCVS (http://www.tortoisecvs.org/) -- A Windows CVS that doesn't suck.


Title: Re: Ship Editing Help
Post by: Novus on April 19, 2005, 02:10:04 pm
The OpenAL SDK seems to have been recently moved; it is now here (http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=45&file=OpenALSDK.zip).

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.


Title: Re: Ship Editing Help
Post by: fetid_breath 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...


Title: Re: Ship Editing Help
Post by: fetid_breath 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?


Title: Re: Ship Editing Help
Post by: Novus 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.


Title: Re: Ship Editing Help
Post by: Novus 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).


Title: Re: Ship Editing Help
Post by: meep-eep 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.


Title: Re: Ship Editing Help
Post by: fetid_breath 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?


Title: Re: Ship Editing Help
Post by: Novus on April 26, 2005, 01:44:42 pm
Header files have the extension .h.


Title: Re: Ship Editing Help
Post by: fetid_breath 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).


Title: Re: Ship Editing Help
Post by: Novus 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.


Title: Re: Ship Editing Help
Post by: fetid_breath on April 27, 2005, 02:35:56 am
I moved the sc2 folder to /z/uqmedit.
I changed fstab and it worked, but now I have a different problem.

Quote
Zach@DESKTOP /z/uqmedit/sc2
$ ./build.sh uqm config
'echo -n' capable echo found.
Sed stream editor found.
tr found.
Make found.
GNU C compiler found.
windres found.
Little-endian machine.
build/unix/build.sh: sdl-config: command not found
build/unix/build.sh: sdl-config: command not found
build/unix/build.sh: sdl-config: command not found
Fatal: Could not determine version of Simple DirectMedia Layer

Zach@DESKTOP /z/uqmedit/sc2
$


Thanks to the MOD who moved this topic.


Title: Re: Ship Editing Help
Post by: Novus on April 27, 2005, 12:33:29 pm
OK, so SDL is incorrectly installed. Use the installation instructions in SDL-1.2.8/INSTALL to install (it should be a simple "make native" from the SDL directory).

Maybe it would have been simpler to install Linux instead. ;D


Title: Re: Ship Editing Help
Post by: fetid_breath on April 28, 2005, 12:07:40 am
I didn't even have SDL on my computer. At least, I didn't have a working version of it. So I found the SDL homepage and downloaded the SDL 1.2.8 and then read the INSTALL file with notepad. It says something along the line of:
" Run './configure; make; make install' "
So I started up MSYS and 'cd' to where SDL was located and typed:
./configure
Then It looked like a flash flood of text. It kept checking stuff then it built new files. Was this the correct way to install it?

Then after it got done, I 'cd' to /z/uqmedit/sc2 and typed:
./build.sh uqm config
It still gave me the same error as before.
What am I doing wrong?


Title: Re: Ship Editing Help
Post by: Novus on April 28, 2005, 12:59:26 pm
From context, I assume you downloaded the SDL 1.2.8 source code instead of the precompiled development libraries. In this case, the installation procedure should be as the instructions say: "./configure; make; make install". "./configure" runs a configuration script included with the source code that detects system settings and creates makefiles for SDL. make then uses the makefiles to work out the commands to run to compile SDL. Finally "make install" tells make to install SDL. The semicolons separate commands on the same line; you can run each command separately if you like.

If you just ran "./configure" (which tests a lot of stuff and then generates a large amount of makefiles), you won't have a compiled copy of SDL, and it certainly won't be installed.


Title: Re: Ship Editing Help
Post by: fetid_breath on April 28, 2005, 09:25:40 pm
YES! IT WORKS! Sorry, I'm just very happy that it is working.

Ok, so I got MSYS going again then cd to SDL and then I './configure; make; make install' After a heck load of text it was finished. Then I cd to /z/uqmedit/sc2 and './build.sh uqm config' and it worked! Now I have come to a main menu:

1. Include debugging information        Debugging information
2. OpenGL graphics support              Including OpenGL graphics support
3. Sound backend                             Use MixSDL for sound (internal)
4. Supported file i/o methods              Direct & .zip file i/o
5. Installation paths                           [...]

I'm going mess around with it for awhile. Which number should I go with to make the changes?


Title: Re: Ship Editing Help
Post by: 0xDEC0DE on April 28, 2005, 11:14:31 pm
Whoa, not done yet, young'un.  It's safer to say that you've barely started.

If I recall correctly, the install target doesn't work right with MinGW+MSYS, so don't bother mucking with the install directories.  As for the rest, you should probably turn off OpenGL support (I do recall this not working with certain vintages of MinGW; it could be fixed now, but "better safe than sorry") and leave the rest of the options alone.

Once you've established the rules by which you will build the game, hit enter and watch the fireworks.  There are nearly 300 source files to build, so it will take some time, but once finished, make sure that the resulting game binary (should be uqm.exe in the sc2 directory) actually works.  THEN you can safely start wondering how to change things.

After the initial build, subsequent builds should be much faster, as only the parts that you have changed will get rebuilt.

As for what tools to use, I much prefer cscope (http://cscope.sourceforge.net/), but from the looks of things, their level of support on win32 platforms is lacking.  You might find Dev-C++ (http://www.bloodshed.net/dev/devcpp.html) to be of some utility, but I don't think you'll be able to fire off a build from inside it and achieve meaningful results.  It might be good for finding symbols and editing source, though.


Title: Re: Ship Editing Help
Post by: Novus on April 29, 2005, 12:36:34 am
OpenGL support works fine under Windows when compiled with MinGW on every machine and MinGW version I've tried. Leave it out only if you have problems compiling the OpenGL graphics code.

Debugging information is helpful if something goes wrong, but if you don't know how to use it, you can turn it off to save a megabyte or five of disk space.

As for installation... There is really no reason to install UQM anywhere; it just copies the executable and contents to another directory. You can run UQM from the build directory, anyway.


Title: Re: Ship Editing Help
Post by: fetid_breath on April 29, 2005, 01:40:35 am
Ok, so I turned debugging off, cuz I have no coding knowledge. Now I'm going to './build.sh uqm' and see what happens... It is stuck on 'Building dependency information...'
Oh, no. There is an error. I'll just type all of it down, since there is no copy paste for it.

Code:
gcc -o "obj/release/./src/options.o" -c  -I/user/local/include/SDL -Dmain=SDL_main -I/usr/local/include/SDL -Dmain=SDL_main -03 -DGFXMODULE_SDL -DHAVE_OPENGL  -DSOUNDMODULE_SDL  -DHAVE_ZIP=1  -I "." -I src -I src/sc2code -I src/sc2code/libs -I src/regex "scr/options.c"
In file included from src/options.h:25,
                             from src/options.c:22:
src/port.h:58: error: conflicting types for 'ssize_t'
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/types.h:104: error: previous declaration of 'ssize_t' was here
make: *** [obj/release/./src/options.o] Error 1


Ok so there you go. Have no clue what is wrong, but I think I have two of the same 'ssize_t'. So do I just delete one of them?


Title: Re: Ship Editing Help
Post by: Novus on April 29, 2005, 12:19:03 pm
See bug 723 (http://uqm.stack.nl/cgi-bin/bugs/show_bug.cgi?id=723). For a quick fix, delete the typedef int ssize_t; from the UQM source code.

MSYS does have copy-paste support, but it works Unix-style. Highlighting an area is "copy", middle-clicking is paste.


Title: Re: Ship Editing Help
Post by: fetid_breath on April 29, 2005, 07:58:28 pm
I deleted 'typedef int ssize_t;' from sc2/src/port.h
I tried './build.sh uqm' again and another batch of errors popped up. I don't have a middle button on my mouse, but it appears that pressing down on my scroller does the same thing.

Code:
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/os_types.h:38: error: syntax error before "ogg_int64_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/os_types.h:39: error: syntax error before "ogg_int32_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/os_types.h:40: error: syntax error before "ogg_uint32_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/os_types.h:41: error: syntax error before "ogg_int16_t"
In file included from z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:26,
                from src/sc2code/libs/sound/decoders/oggaud.c:28:
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:55: error: syntax error before "ogg_int64_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:72: error: syntax error before "packetno"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:77: error: syntax error before "granulepos"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:90: error: syntax error before "ogg_int64_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:132: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:133: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:134: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:147: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:148: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:149: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:153: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:154: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:155: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:156: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:157: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:158: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:166: error: syntax error before "ogg_page_granulepos"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ogg/ogg.h:171: error: syntax error before '*' token
In file included from src/sc2code/libs/sound/decoders/oggaud.c:28:
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:77: error: syntax error before "ogg_int64_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:80: error: syntax error before "glue_bits"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:81: error: syntax error before "time_bits"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:82: error: syntax error before "floor_bits"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:83: error: syntax error before "res_bits"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:86: error: syntax error before '}' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:100: error: syntax error before "ogg_int64_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:102: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:113: error: conflicting types for 'glue_bits'
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:80: error: previous declaration of 'glue_bits' was here
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:114: error: conflicting types for 'time_bits'
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:81: error: previous declaration of 'time_bits' was here
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:115: error: conflicting types for 'floor_bits'
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:82: error: previous declaration of 'floor_bits' was here
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:116: error: conflicting types for 'res_bits'
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:83: error: previous declaration of 'res_bits' was here
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:120: error: syntax error before '}' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:176: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:177: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:178: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:182: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:183: error: syntax error before "ogg_packet"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:184: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:189: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:190: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:191: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:192: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:194: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:195: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:200: error: syntax error before "ogg_packet"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:202: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:203: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:204: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:205: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:206: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:207: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:208: error: syntax error before "ogg_packet"
In file included from src/sc2code/libs/sound/decoders/oggaud.c:29:
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:41: error: syntax error before "ogg_int64_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:55: error: syntax error before "ogg_int64_t"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:62: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:63: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:65: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:72: error: syntax error before "pcm_offset"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:80: error: syntax error before "os"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:82: error: syntax error before "vd"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:82: error: conflicting types for 'vd'
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/codec.h:102: error: previous declaration of 'vd' was here
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:83: error: syntax error before "vb"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:87: error: syntax error before '}' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:89: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:90: error: syntax error before "OggVorbis_File"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:91: error: syntax error before "OggVorbis_File"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:94: error: syntax error before "OggVorbis_File"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:95: error: syntax error before "OggVorbis_File"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:97: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:99: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:100: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:101: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:102: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:103: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:105: error: syntax error before "ov_raw_total"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:105: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:106: error: syntax error before "ov_pcm_total"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:106: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:107: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:109: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:110: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:111: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:112: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:113: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:115: error: syntax error before "ov_raw_tell"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:115: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:116: error: syntax error before "ov_pcm_tell"
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:116: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:117: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:119: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:120: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:122: error: syntax error before '*' token
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/vorbis/vorbisfile.h:124: error: syntax error before '*' token
src/sc2code/libs/sound/decoders/oggaud.c:71: error: syntax error before "OggVorbis_File"
src/sc2code/libs/sound/decoders/oggaud.c:71: warning: no semicolon at end of struct or union
src/sc2code/libs/sound/decoders/oggaud.c:73: warning: data definition has no type or storage class
src/sc2code/libs/sound/decoders/oggaud.c:84: error: syntax error before "ogg_int64_t"
src/sc2code/libs/sound/decoders/oggaud.c: In function `ogg_seek':
src/sc2code/libs/sound/decoders/oggaud.c:86: error: `offset' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:86: error: (Each undeclared identifier is reported only once
src/sc2code/libs/sound/decoders/oggaud.c:86: error: for each function it appears in.)
src/sc2code/libs/sound/decoders/oggaud.c:87: error: `datasource' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:87: error: `whence' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c: In function `ova_GetError':
src/sc2code/libs/sound/decoders/oggaud.c:140: error: `ova' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:140: error: syntax error before ')' token
src/sc2code/libs/sound/decoders/oggaud.c: In function `ova_Open':
src/sc2code/libs/sound/decoders/oggaud.c:164: error: `ova' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:164: error: syntax error before ')' token
src/sc2code/libs/sound/decoders/oggaud.c: In function `ova_Close':
src/sc2code/libs/sound/decoders/oggaud.c:212: error: `ova' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:212: error: syntax error before ')' token
src/sc2code/libs/sound/decoders/oggaud.c: In function `ova_Decode':
src/sc2code/libs/sound/decoders/oggaud.c:220: error: `ova' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:220: error: syntax error before ')' token
src/sc2code/libs/sound/decoders/oggaud.c: In function `ova_Seek':
src/sc2code/libs/sound/decoders/oggaud.c:238: error: `ova' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:238: error: syntax error before ')' token
src/sc2code/libs/sound/decoders/oggaud.c: In function `ova_GetFrame':
src/sc2code/libs/sound/decoders/oggaud.c:254: error: `ova' undeclared (first use in this function)
src/sc2code/libs/sound/decoders/oggaud.c:254: error: syntax error before ')' token
make: *** [obj/release/./src/sc2code/libs/sound/decoders/oggaud.o] Error 1


Title: Re: Ship Editing Help
Post by: Novus on April 29, 2005, 08:28:45 pm
There's probably some error about a missing include file somewhere, but it's not in the text you quoted (I wish GCC would stop parsing if a file is missing instead of generating hundreds of errors due to missing definitions). Finding the first error message should help you sort things out.

You did put the _G_config.h you downloaded in your MinGW include directory, right?


Title: Re: Ship Editing Help
Post by: fetid_breath on April 29, 2005, 10:46:07 pm
Yeah, I had _G_config.txt in my mingw/include file. I opened it up and did 'save as' and made it _G_config.h. I guess that did the trick, because I './build.sh uqm' and a different error popped up instead. This error looks like the ssize_t error.

Code:
gcc -o "obj/release/./src/sc2code/libs/uio/charhashtable.o" -c  -I/usr/local/include/SDL -Dmain=SDL_main -I/usr/local/include/SDL -Dmain=SDL_main -O3 -DGFXMODULE_SDL -DHAVE_OPENGL  -DSOUNDMODULE_SDL  -DHAVE_ZIP=1  -I "." -I src -I src/sc2code -I src/sc2code/libs -I src/regex "src/sc2code/libs/uio/charhashtable.c"
In file included from src/sc2code/libs/uio/hashtable.h:31,
                from src/sc2code/libs/uio/charhashtable.h:33,
                from src/sc2code/libs/uio/charhashtable.c:23:
src/sc2code/libs/uio/uioport.h:74: error: conflicting types for 'ssize_t'
z:/uqmedit/edit/mingw/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/types.h:104: error: previous declaration of 'ssize_t' was here
make: *** [obj/release/./src/sc2code/libs/uio/charhashtable.o] Error 1


This looks a little different then the previous ssize_t error, but
I thought I fixed this. Do I delete ssize_t from a different file?


Title: Re: Ship Editing Help
Post by: fetid_breath on April 29, 2005, 11:04:39 pm
I think I fixed this error on my own. See last time I just deleted 'typedef int ssize_t;' from sc2/src/port.h. This time I went to sc2/src/sc2code/libs/uio/uioport.h. I found the evil 'typedef int ssize_t;' and deleted it.

I tried './build.sh uqm' again. This time I think it got built entirely, because there was no errors. I looked under sc2 and saw the uqm.exe icon. I clicked it and it gave me the error, "This application has failed to start because SDL.dll was not found. Re-installing the application may fix this problem."

I have SDL.dll in MinGW/lib so why won't it work?


Title: Re: Ship Editing Help
Post by: Novus on April 30, 2005, 01:35:11 am
Just shove all the DLLs it complains about in your Windows system directory or the same directory as UQM. That should fix it.

UQM needs a lot of DLLs, so you may have to iterate a while to get them all installed.


Title: Re: Ship Editing Help
Post by: fetid_breath on April 30, 2005, 02:04:20 am
Huzza! It works! I copied all the needed dll's and now the new built version works! A thousand thanks to you Novus. Also, thank you 0xdecode and Meep-Eep. Now to see what the changes did...


Title: Re: Ship Editing Help
Post by: wojtx on July 23, 2005, 06:23:15 pm
From context, I assume you downloaded the SDL 1.2.8 source code instead of the precompiled development libraries. In this case, the installation procedure should be as the instructions say: "./configure; make; make install". "./configure" runs a configuration script included with the source code that detects system settings and creates makefiles for SDL. make then uses the makefiles to work out the commands to run to compile SDL. Finally "make install" tells make to install SDL. The semicolons separate commands on the same line; you can run each command separately if you like.

If you just ran "./configure" (which tests a lot of stuff and then generates a large amount of makefiles), you won't have a compiled copy of SDL, and it certainly won't be installed.

I got the dev libraries, but there is a folder 'test' , so is this the folder with the stuff to install sdl?? Sorry for bringing the topic back to life but I would like to know this


Title: Re: Ship Editing Help
Post by: Novus on July 23, 2005, 09:25:48 pm
I got the dev libraries, but there is a folder 'test' , so is this the folder with the stuff to install sdl?? Sorry for bringing the topic back to life but I would like to know this
No, the test folder contains test software for SDL. Examples, if you want to look at it differently.

Just follow the installation instructions in the SDL-devel package. They should be in a file named "INSTALL". If you are using MinGW, the installation should simply be a matter of running "make native" in the SDL directory.


Title: Re: Ship Editing Help
Post by: wojtx on July 23, 2005, 10:29:03 pm
Ok, thanks. It worked but I have something different I want to install cscope ( version 15.5 - which was on their homepage ) and this is what I get

checking regex.h usability... no
checking regex.h presence... no
checking for regex.h... no
configure: error: necessary header <regex.h> not found


I tried to copy another regex.h file from sc2 but it failed. What am I suppose to do??


Title: Re: Ship Editing Help
Post by: Novus on July 24, 2005, 10:25:03 am
I don't think cscope compiles or runs under MinGW/MSYS. Use Cygwin or a proper Unix-like system or forget about cscope.


Title: Re: Ship Editing Help
Post by: wojtx on July 24, 2005, 04:12:13 pm
I see. I have a stupid little question. I should place sc2 in a different folder if I want to edit it ( ships mainly ), right? But what about the content and source, Should they be in the packages folder, and should they be unpacked??


Title: Re: Ship Editing Help
Post by: Novus on July 24, 2005, 06:21:45 pm
Where you put the source really doesn't matter, and you can use command-line options to specify where the content is, so it really doesn't matter where you put that either. You don't need to unpack the content unless you want to edit it.


Title: Re: Ship Editing Help
Post by: Jormasteri on January 27, 2007, 11:38:05 pm
Sorry for bringing up such an old thread, versions have changed and so forth...but...
I followed instructions and got everything working somewhat till this:

 CC       obj/debug/src/sc2code/libs/network/wspiapiwrap.c.o
src/sc2code/libs/network/wspiapiwrap.c:32:28: wspiapi.h: No such file or directory
make: *** [obj/debug/src/sc2code/libs/network/wspiapiwrap.c.o] Error 1

I doublechecked and both files are there, for some reason it just doesn't want to compile?


Title: Re: Ship Editing Help
Post by: meep-eep on January 27, 2007, 11:43:12 pm
See this thread (http://uqm.stack.nl/forum/index.php?topic=3416.0).


Title: Re: Ship Editing Help
Post by: Jormasteri on January 28, 2007, 12:01:43 am
Thanks! However, now I get this:

 LINK     uqm-debug
obj/debug/src/sc2code/melee.c.o(.text+0x3adb): In function `StartMeleeButtonPressed':
c:/uqmedit/uqm-0.6.2/sc2/src/sc2code/melee.c:2180: undefined reference to `DrawMeleeStatusMessage'
obj/debug/src/sc2code/melee.c.o(.text+0x3b3a):c:/uqmedit/uqm-0.6.2/sc2/src/sc2code/melee.c:2190: undefined reference to `DrawMeleeStatusMessage'
obj/debug/src/sc2code/libs/uio/match.c.o(.text+0x770): In function `match_prepareRegex':
c:/uqmedit/uqm-0.6.2/sc2/src/sc2code/libs/uio/match.c:469: undefined reference to `regcomp'
obj/debug/src/sc2code/libs/uio/match.c.o(.text+0x7f9): In function `match_matchRegex':
c:/uqmedit/uqm-0.6.2/sc2/src/sc2code/libs/uio/match.c:490: undefined reference to `regexec'
obj/debug/src/sc2code/libs/uio/match.c.o(.text+0x86d): In function `match_errorStringRegex':
c:/uqmedit/uqm-0.6.2/sc2/src/sc2code/libs/uio/match.c:509: undefined reference to `regerror'
obj/debug/src/sc2code/libs/uio/match.c.o(.text+0x89e):c:/uqmedit/uqm-0.6.2/sc2/src/sc2code/libs/uio/match.c:512: undefined reference to `regerror'
obj/debug/src/sc2code/libs/uio/match.c.o(.text+0x8bd): In function `match_freeRegex':
c:/uqmedit/uqm-0.6.2/sc2/src/sc2code/libs/uio/match.c:521: undefined reference to `regfree'
make: *** [uqm-debug] Error 1


Title: Re: Ship Editing Help
Post by: meep-eep on January 28, 2007, 02:19:53 pm
Hmm... the first line I thought we fixed, but apparently, it was put in in the CVS repository after we moved to SVN. It's fixed in SVN now. So you'll have to use the SVN version (http://sourceforge.net/svn/?group_id=59452) (snapshots here (http://uqm.stack.nl/files/snapshots/)).

As for the regex errors, it seems to think you have regex, while you haven't really. (You have the headers, but not the code itself). Have you been moving regex headers around, like wojtx in this thread? You shouldn't. If you get rid of that header, and rerun "./build.sh uqm config", it will see that you don't have regex, and use the included one.


Title: Re: Ship Editing Help
Post by: Jormasteri on January 28, 2007, 07:02:58 pm
Thank you a lot, again :)
Though it gave me some warnings I did get it compiled, now to change the effectiviness of
'point-defence system'... Is it in sis.c?


Title: Re: Ship Editing Help
Post by: meep-eep on January 28, 2007, 08:31:26 pm
No, you'll want src/sc2code/ships/sis_ship/sis_ship.c


Title: Re: Ship Editing Help
Post by: Razorback on February 16, 2007, 10:40:01 am
This is a very interesting conversation.  I've always been curious about the nuts and bolts of how the various starship values were determined.  Maye I'll do some digging myself and see if I can figure out some things like just what each VUX limpet does in terms of ship effects.  I do have a question about all this editing, though.  What would happen if an unedited install and an edited install fought in melee? 


Title: Re: Ship Editing Help
Post by: Novus on February 16, 2007, 11:07:06 am
I do have a question about all this editing, though.  What would happen if an unedited install and an edited install fought in melee? 
The net melee code transmits a checksum of the game state to detect problems in keeping the game states in sync. As soon as the game starts behaving different on the two machines involved, the game will abort with an error message. It is almost impossible for two UQM installations to disagree on what's happening even if one has different gameplay.

If you disable this checksum, you can end up with two different games being played out on the different machines but with the player input being the same (because that, together with the initial fleet setup, is really the only information that's being used to implement netplay).

As an additional check, UQM transmits a "netplay version" which is essentially the number of the earliest version of UQM with exactly the same melee gameplay and network protocol. This prevents people with incompatible UQM versions from even starting a game by accident. If you implement and distribute an UQM version with modified gameplay, I strongly suggest you change the netplay version to avoid confusion with official UQM, which would manifest itself as unexpected errors during the game.