Pages: [1]
|
|
|
Author
|
Topic: How do you learn how to mod? (Read 2172 times)
|
danzibr
*Many bubbles*
Offline
Posts: 109
|
I'm interesting in making some mods but... I have no idea how. For all you great modders out there, how do you do it? I suppose the goals determine the process, but what are some general things to do?
|
|
|
Logged
|
|
|
|
|
onpon4
Enlightened
Offline
Gender:
Posts: 709
Sharing is good.
|
UQM doesn't have any sort of modding API, so "mods", as we call them, are really more like forks: you change the source code of UQM to do something different.
So like chenjesuwizard said, you need to learn to program in C if you don't know how to already. It might help to make only really small changes at first and gradually progress to bigger ones.
|
|
|
Logged
|
|
|
|
oldlaptop
*Smell* controller
Offline
Posts: 337
|
I strongly recommend you do *not* introduce yourself to programming by modding UQM. The code is old, poorly documented C, that's not exactly the best combination of things to learn with. Learn Python, write some simple things. Learning any language will give you some important grounding and experience, and more importantly you will get acquainted with good practice, things you're supposed to do to keep Bad Things from happening. The UQM code works very well, especially considering how blatantly it ignores best practices. This is no accident, Fred Ford knew what he was doing very well, well enough to get away with some very ugly things without actually causing problems, and the UQM team has also fixed quite a few bugs he managed to miss. If your first experience with programming is reading and modifying UQM code, you will get yourself in trouble very quickly, because you will follow the only example you know, and do ugly and potentially dangerous things, without knowing how to get away with it.
|
|
« Last Edit: April 28, 2013, 04:35:07 am by oldlaptop »
|
Logged
|
|
|
|
danzibr
*Many bubbles*
Offline
Posts: 109
|
Hmm, Python. And C. I'll check those out. I do a little bit of programming (sort of) and I had a class or two in college. Maybe I'll be able to help with some stuff by summer's end.
|
|
|
Logged
|
|
|
|
danzibr
*Many bubbles*
Offline
Posts: 109
|
Just to see if I can get it compiled and running I'm following the INSTALL file in the main UQM HD file and I ran into a problem. I got MinGW and MSYS as instructed, downloaded the extra needed files, following 1) put the .dll's and .h's where I was supposed to (EXCEPT the link for the header Ogg Vorbis wants which wasn't included with MinGW is broken), cd'd to the UQM directory (which I made C:UrQuan for ease), then when I type ./build.sh uqm config it says "No such file or directory."
Now I'm a total programming noob, like total noob. I'm actually happy I even know what cd stands for. Any pointers?
|
|
|
Logged
|
|
|
|
onpon4
Enlightened
Offline
Gender:
Posts: 709
Sharing is good.
|
"cd" stands for "change directory".
I recall that building UQM on Windows was annoyingly complicated at least with 0.6.2. I don't know if this was just my imagination at the time or if it's improved. In any case, using a Unix system, such as GNU/Linux, when programming in C is definitely less annoying than Windows.
Did you actually cd to "C:UrQuan", or was that just a typo in your post? That would be wrong; it's "C:\UrQuan". Notice the backslash between "C:" and "UrQuan". If that isn't it, did the error message say what file doesn't exist?
|
|
|
Logged
|
|
|
|
danzibr
*Many bubbles*
Offline
Posts: 109
|
First of all, thanks!
I meant to say I put all the UQM HD files in a place called C:UrQuan. When the MinGW black window thing appeared I typed "cd /C/UrQuan" This seemed to work fine. The text above where I type went from "Dan@Adrienne-PC ~" to "Dan@Adrienne-PC /C/UrQuan"
At this point I assume I'm in the right spot (which is more than I've ever done correctly in that black box before). Now I type "./build.sh uqm config" and it returns "/bin/sh: build/unix/build.sh: No such file or directory"
So I got to thinking... and I went to my C:UrQuan and looked around a bit. There is a file called uqm, the one that runs the game, but there's no uqm folder (should there be?) and no file called uqm config. I'm not sure what the uqm config after the ./build.sh should be. A file, maybe? Maybe uqm is supposed to be a folder and config is supposed to be a file within the folder? I did however notice in the src folder there's a file called config.
Also, I'm not asking people to teach me programming. If there's some good place to learn this information on my own I'm totally willing. But when I type ./build into google it comes up with... absolutely nothing useful.
|
|
|
Logged
|
|
|
|
danzibr
*Many bubbles*
Offline
Posts: 109
|
Alright I'm at a loss. I did a bit of reading and understand things quite a bit better. I now know what ./ means for starters. And there is indeed a file in my /C/UrQuan called build.sh (before I thought it was a command). I also managed to get that _G_config.h I was missing. It was the first link in google in text, so I plopped it in Code::Blocks, saved it as _G_config.h in my /C/MinGW/include as I should.
So at this point according to the install file that comes with the UQM HD I should be able to build the actual executable. I mean, I followed the steps exactly and it says, "Now you're ready to build." However when I type /C/UrQuan/build.sh uqm config into my MinGW it STILL says /bin/sh: build/unix/build.sh: No such file or directory.
Google isn't helping me out. The hits I saw had to deal with a similar but not identical error message. Any pointers?
|
|
|
Logged
|
|
|
|
Gekko
*Many bubbles*
Offline
Gender:
Posts: 199
Arena regular
|
Do yourself a favor and develop on Linux. You save yourself the entire hassle that is compiling UQM on Windows. Simply go through that mess when you release the mod. I assume your problem currently is that you are not running build.sh from the same directory. The script (build.sh) is looking for a file in directory ./build/unix, and can't find that since you didn't execute the script from where it is supposed to be executed.
|
|
|
Logged
|
|
|
|
danzibr
*Many bubbles*
Offline
Posts: 109
|
That's actually encouraging. After a bit more reading I know what header files and stuff are. I went to poking around in the files in my Code::Blocks and I have some things I want to try out, see if they work. In particular, in shipyard.c and races.h.
But before that... to install Linux.
|
|
|
Logged
|
|
|
|
oldlaptop
*Smell* controller
Offline
Posts: 337
|
I personally suggest openSUSE (http://www.opensuse.org/en/) for newbies, as opposed to Ubuntu which has *really* driven off a cliff recently. You might also consider Puppy Linux (http://puppylinux.com/), which is a really neat lightweight LiveCD with some interesting features (like the ability to save settings to a special savefile on your hard disk or a USB drive without actually installing itself). Unfortunately Puppy is somewhat harder to get set up for development (still much easier than building UQM on Windows!). I personally can help you with either, here or on IRC (follow the #uqm-arena siglinks ), although Mir in #uqm-arena might be of more help with general openSUSE stuff than me. There's also dedicated IRC channels for both on Freenode.
|
|
|
Logged
|
|
|
|
onpon4
Enlightened
Offline
Gender:
Posts: 709
Sharing is good.
|
I have to concur with oldlaptop about Ubuntu, but it might not be for the same reason: Ubuntu includes spyware in its default desktop environment, Unity (local searches get sent to Ubuntu's developers to deliver Amazon ads, by default, without asking), and they should not be supported in any way if they're willing to do such a bad thing to their users.
|
|
|
Logged
|
|
|
|
|
Pages: [1]
|
|
|
|
|