Pages: [1]
|
|
|
Author
|
Topic: Another dumb "I want to mod this game" thread (Read 3015 times)
|
|
meep-eep
Forum Admin
Enlightened
Offline
Posts: 2847
|
- Create a new star map. Most of it is procedurally generated, except for a bunch of specific places, right? This seems like the most obvious first step.
src/sc2code/plandata.c defines the position of the stars. That position is also used as a seed for the pseudo-random number generator. For some specific star systems, some parts are overridden in src/sc2code/planets/gen*.c. Note that this is in some cases done just by changing some parameters of the randomly generated solar system. It may for instance if you change the type of the third planet. This will go wrong if the random seed is changed so that there is no third planet.
- Relocate aliens to fit them where I want them on the new map.
Trivial, see plandata.c again.
- Alter dialog to account for new locations.
Trivial if that's the only change. If you add lines of dialog, you need to adjust the timestamps too.
- This is where it gets tricky: Re-skin the graphics. The idea here is to come up with a "new" game this way, not by adding new races or ships, which is practically suicide with the source code the way it is right now. Just rewriting the old races to suit the needs of a new story should work well enough.
A drop-in replacement of graphics isn't too hard (from a code perspective; making the artwork is another matter). You just need to make sure you've got the transparency right, and the image descriptions (*.ani, *.sml, *.med, *.big) are correct. See doc/devel/aniformat for that.
Adding races is doable. You can copy one of the other races and modify it according to your wishes. Some other files you will need to change to link your new race to the game: src/sc2code/globdata.h (GAME_STATEs), src/sc2code/races.h, src/sc2code/comm/Makeinfo. Adding ships is harder, but you can again use the code of other ships as an example. The trickiest part will be making the AI for your ships.
|
|
|
Logged
|
“When Juffo-Wup is complete when at last there is no Void, no Non when the Creators return then we can finally rest.”
|
|
|
Shiver
Guest
|
We might need a subforum for game modifications to accompany the release of UQM 0.7 if this type of activity continues to pick up.
|
|
|
Logged
|
|
|
|
|
|
meep-eep
Forum Admin
Enlightened
Offline
Posts: 2847
|
Hmm, it looks like every single star is laid out in one giant array. Where's the list of letter/name values for the starmap, so I can make sure all my star groups are definitely named correctly and grouped together?
They're indices into the string list in starcon.txt, relative to STAR_NUMBER_BASE and STAR_STRING_BASE respectively (defined in gamestr.h).
I'm also having a lot of trouble compiling the source. I'm using an IDE called CodeBlocks, which can read the msvc++ project files included with the source, and the MinGW compiler. But it keeps tripping over config.h and several windows-related lines of code at build time. We haven't tried Code::Blocks before. But what you're doing now is using two build systems together. As the backend is MinGW, you should use the files intended for MinGW. The MSVC++ project files are probably going to just make things harder. So this is what I suggest you do:
- make sure you have all the dependencies installed. See INSTALL and perhaps INSTALL.mingw.
- from the MinGW command prompt, from the top dir of the UQM sources (the one containing 'src'), run "./build.sh uqm" once successfully. Choose a debug build (for this example; the release build is analogous). This should (among other things), generate config_win.h, build.vars, and obj/debug/make.depend.
- create a new project in Code::Blocks. Do not import the msvc++ project files.
- add all the .c files from make.depend to your project.
- from the top dir of the UQM sources, from the MinGW command prompt, execute the line
gcc -MM -I. -Isrc -Isrc/sc2code -Isrc/sc2code/libs `sed -e 's,./obj/debug/,,' obj/debug/make.depend` | sed -e 's,^[^:]*: ,,' | tr -d '\n\' | tr ' ' '\n' | sort | uniq -d > hfiles.txt to write a list of all the .h files used to hfiles.txt. Then add all the .h files from this list to your project.
- examine build.vars. It contains an assignment to uqm_CFLAGS and to uqm_LDFLAGS. Somewhere in your project settings you should be able to set the compiler and library flags. Set them to the values of uqm_CFLAGS and uqm_LDFLAGS respectively (without the '' chars).
- hit the build button
- pray to the gods of technology
|
|
|
Logged
|
“When Juffo-Wup is complete when at last there is no Void, no Non when the Creators return then we can finally rest.”
|
|
|
Pages: [1]
|
|
|
|
|