The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
November 05, 2024, 08:31:16 am
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
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  How do you learn how to mod?
« previous next »
Pages: [1] Print
Author Topic: How do you learn how to mod?  (Read 2519 times)
danzibr
*Many bubbles*
***
Offline Offline

Posts: 109



View Profile
How do you learn how to mod?
« on: April 27, 2013, 11:19:56 pm »

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
chenjesuwizard
*Many bubbles*
***
Offline Offline

Posts: 158


I support Project6014


View Profile
Re: How do you learn how to mod?
« Reply #1 on: April 27, 2013, 11:29:58 pm »

Learn C programming code.
Logged

Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings.
onpon4
Enlightened
*****
Offline Offline

Gender: Male
Posts: 709


Sharing is good.


View Profile WWW
Re: How do you learn how to mod?
« Reply #2 on: April 27, 2013, 11:48:58 pm »

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 Offline

Posts: 337



View Profile
Re: How do you learn how to mod?
« Reply #3 on: April 28, 2013, 04:29:25 am »

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. Smiley
« Last Edit: April 28, 2013, 04:35:07 am by oldlaptop » Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
danzibr
*Many bubbles*
***
Offline Offline

Posts: 109



View Profile
Re: How do you learn how to mod?
« Reply #4 on: April 28, 2013, 04:46:02 am »

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 Offline

Posts: 109



View Profile
Re: How do you learn how to mod?
« Reply #5 on: May 03, 2013, 12:10:44 am »

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 Offline

Gender: Male
Posts: 709


Sharing is good.


View Profile WWW
Re: How do you learn how to mod?
« Reply #6 on: May 03, 2013, 12:30:19 am »

"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 Offline

Posts: 109



View Profile
Re: How do you learn how to mod?
« Reply #7 on: May 03, 2013, 01:48:25 am »

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 Offline

Posts: 109



View Profile
Re: How do you learn how to mod?
« Reply #8 on: May 05, 2013, 05:15:58 am »

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 Offline

Gender: Male
Posts: 199


Arena regular


View Profile
Re: How do you learn how to mod?
« Reply #9 on: May 05, 2013, 07:11:14 pm »

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

Visit #uqm-arena and play a game of Net Melee!
Try the Net Melee Improvement mod
danzibr
*Many bubbles*
***
Offline Offline

Posts: 109



View Profile
Re: How do you learn how to mod?
« Reply #10 on: May 06, 2013, 01:47:15 am »

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 Offline

Posts: 337



View Profile
Re: How do you learn how to mod?
« Reply #11 on: May 06, 2013, 04:55:17 am »

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 Wink), 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. Smiley
Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
onpon4
Enlightened
*****
Offline Offline

Gender: Male
Posts: 709


Sharing is good.


View Profile WWW
Re: How do you learn how to mod?
« Reply #12 on: May 06, 2013, 05:38:01 am »

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

oldlaptop
*Smell* controller
****
Offline Offline

Posts: 337



View Profile
Re: How do you learn how to mod?
« Reply #13 on: May 07, 2013, 02:10:34 am »

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.

Oh, that's just one of the exciting new forms of awfulness they've discovered lately. Wink
Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
Pages: [1] 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!