Title: Another dumb "I want to mod this game" thread Post by: Zaidyer on March 08, 2009, 11:36:08 pm So I've played UQM quite a lot. I've looked at the code. Now I'm thinking of using it as a base for some modifications.
I don't want to raise anyone's hopes by starting a long term project, because everyone knows how those turn out. I just want to figure things out and learn how to build up to larger goals. Here is what I'd like to do, sorted in order of importance:
I'm not promising anything in this thread. I'm just looking for some input on the methods and difficulties regarding these tweaks. Title: Re: Another dumb "I want to mod this game" thread Post by: meep-eep on March 09, 2009, 03:32:09 am
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. Quote
Quote
Quote
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. Title: Re: Another dumb "I want to mod this game" thread Post by: Shiver on March 09, 2009, 03:38:45 am 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.
Title: Re: Another dumb "I want to mod this game" thread Post by: Zaidyer on March 09, 2009, 10:08:43 am 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?
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. Quote :: === UrQuanMasters, Win32 Release === I think there might be some sort of misconfiguration on my end. I haven't even modified the code yet, just trying to compile a clean version to see if it will work.StarCon2mod\uqm-0.6.2\sc2\src\config.h:13: config_win.h: No such file or directory StarCon2mod\uqm-0.6.2\sc2\src\port.h:156: error: conflicting types for 'wint_t' Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\include\stddef.h:354: error: previous declaration of 'wint_t' was here StarCon2mod\uqm-0.6.2\sc2\src\options.c:: In function `prepareContentDir': StarCon2mod\uqm-0.6.2\sc2\src\options.c:126: error: `CONTENTDIR' undeclared (first use in this function) StarCon2mod\uqm-0.6.2\sc2\src\options.c:126: error: (Each undeclared identifier is reported only once StarCon2mod\uqm-0.6.2\sc2\src\options.c:126: error: for each function it appears in.) StarCon2mod\uqm-0.6.2\sc2\src\options.c:: In function `prepareConfigDir': StarCon2mod\uqm-0.6.2\sc2\src\options.c:167: error: `CONFIGDIR' undeclared (first use in this function) StarCon2mod\uqm-0.6.2\sc2\src\options.c:: In function `prepareSaveDir': StarCon2mod\uqm-0.6.2\sc2\src\options.c:216: error: `SAVEDIR' undeclared (first use in this function) StarCon2mod\uqm-0.6.2\sc2\src\options.c:: In function `prepareMeleeDir': StarCon2mod\uqm-0.6.2\sc2\src\options.c:253: error: `MELEEDIR' undeclared (first use in this function) Title: Re: Another dumb "I want to mod this game" thread Post by: Cedric6014 on March 09, 2009, 08:42:21 pm 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? Hi I'm one of those making "another dumb mod". You all know how they turn out.... Anyway, there's nothing in the code that groups the stars as such, but you'll notice that in the array towards the end of each line theres a number between 0 and about 14. This denotes alpha, beta etc. The next number denotes constellation name. This refers to a text file under conent smewhere. I dont have access to the code right now (I'm at work shhh) so I cant give you a specific path. But if you search the whole project for "Wolf" or something, you'll find it easily enough. Title: Re: Another dumb "I want to mod this game" thread Post by: meep-eep on March 09, 2009, 11:35:07 pm 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).Quote 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:
|