How you learned to Mod

moopoo

King
Joined
Jan 5, 2008
Messages
729
Location
Adelaide, Australia
I am a man with many ideas for Civ. However, if you've had a look at any of those ideas, you know that A) I don't know how to mod and B) My Ideas are left dormant as a result :cry:

So. To fix this, I want to learn how to Mod! However! I don't know python or C++, nor do i know any other programming languages, nor the priniciples behind programming/scripting/whatever-it-is.

So my question: How did you guys learn? What i'm Ideally looking for is an awesome internet tutorial you used. A book, buyable from Adelaide, Australia without the use of a credit card would be ok too. Anything resembling a course would be impossible, as I am a uni student with limited cash flow and limited time ;)

This is an open invitation to share you path to Civ modding. I also think this thread or a thread like this (depending on how many respond :)) would be a good sticky for people like me, as this is kind of a last-ditch attempt before i give up on modding :sad:
 
I also started without any other programming experience. I downloaded other peoples mods and looked at how they did things.

The nice thing at the time (for learning) was that the mods were pretty simple. The SDK wouldn't be released for another 6 months or so, so everyone was only making xml or python mods. It forced us to concentrate on python.

The other big thing when starting is to start with things that other people are already doing. I see more startup modders killed by their own ambition, trying to do something that is so far over their heads that they are going to fail and never continue on. There will be a time, time for you to do something no one has ever seen before. But first you need to figure out the basics.

So I would follow the same sort of pattern. Don't download the big complex mods to dig through. Thats like starting math with calculas. Pick some smaller mod that isn't an SDK mod. See what they do that you like and try to figure out how to get that into your mod. Build your experiese there until you can create your own functions, and up and up.

1. Play lots of mods to see what people have done
2. Start simple, getting functions from non-sdk mods you like into your mod (preferablyl those that only modify a few python files)
3. Do that until you are able to create your own non-SDK content
4. When thats done start looking into more complex mods

Thats the process that works for me. Other people may learn better ion other ways.
 
I agree 100% with Kael. I started out with python (I'm just beginning to work with C++). I first tried to make my own stuff by duplicating code that other people had written that did what I wanted (place a unit and give it a promotion). I didn't do so good at first (take a look at Zebra 9's Additions, on second thought DON'T :shifty:), but slowly I got better.
 
Oh wow. Responses from Kael and Zebra. Cool :)

So both of you guys didn't have any experience? That's quite inspirational, actually :). I hadn't really thought of going through other's mods. I always got caught up on trying to learn the ins and outs of the language (like "arglist". what's an arglist?). I will give that a go some time in the future. Thankyou very much.

If others want to post their ideas on how to learn this stuff, please go right ahead :)

EDIT: I just had a look at Your Additions Mod, Zebra. I reckon the promotions through combat change would be a nice one to look through and attempt. What do you reckon?
 
My path to modding Civ4 came about as I helped Firaxis refine modding in development of vanilla Civ. :)

Helps to get the inside scoop. ;)

Before that, I did heaps of modding for other games like EU2, HOI and CTP2.
 
I came into modding with zilch experience on the subject. After I found out that XML could be read and modified with Notepad, I decided to look into the issue. At first it all seemed like gobbledygook to me and I was at a loss as far as the number of involved files was concerned. What I did initially was modify ONE tag, and then load the game to see what that would provoke on the other side. Some of the tags were pretty self-explanatory, others less so. This was a very slow process. I then started looking into other mods -- how they played compared to plain vanilla CIV and exactly what it was that made these differences possible. This helped understand how to setup the mod folders and xml files, and how to edit xml tags within these files. Play lots of mods! Look at what they do differently.

Once I understood how to incorporate a map, changing/adding Civs to the map, I then published on this forum a crude scenario. I was very lucky that Woodelf jumped in and walked me through the process of adding units, fixing xml goofs, and whatnot -- which taught me a lot. Go through this forum's many sections and read about the various problems modders encounter. Although you might not want to get into what they do, it will help you understand related issues. Uploading a scenario taught me a lot thanks to other people volunteering feedback on the forum. Be patient. Be persistent!

Best thing to do, I would say make copies of files and get into them to see what they contain. See what files people use in their mods and try to understand why. Learn xml first (you might not need Python or SDK for a while if ever, depending on what you do). To do a basic scenario, all you need is Notepad (for xml). To do some very, very basic graphics work (like buttons), you need Paint and something called DXTbmp (which is a free download). Just try stuff until you figure out how they work! If you can't figure it out, go back to the forum and ask around. Someone is bound to help out at some point. Eventually, you will connect the points.

-------------

The reason why I posted here is that I'm probably in the same boat you are (not understanding Python or SDK). We might have followed the same path and wanted to share that. Either way, the thread could be very useful!
 
I also started with almost zero experience. I played around with XML for a while, then I realized that what I wanted to do required Python and C++. I bought a book or two (still reading, actually), and reverse-engineered similar stuff that already existed in the game to do what I wanted for modding. Still far from an expert, though.

Oh and I asked a lot of questions on CFC. Lots and lots of questions. ;)
 
I had some previous experience as a (not very talented) programmer before attemptig to mod Civ IV. However, any programming skills I've picked up are entirely self taught, mostly learned by doing the sorts of things mentioned by others in this thread. I can also say that no matter how much code experience a person had before coming to Civ IV, there's still a significant learning curve involved.

I strongly agree with others that its best to start small. I also very strongly feel that for Civ IV in particular, the place to start learning is with the XML. Once you understand the XML structure, the code becomes much easier to understand because you start getting a sense of where everything "should be" in the file. You don't have to memorize it all of course, but the more you know the easier it will be once you move to working with code.

Like someone else said, I recommend picking a particular XML file, and changing some stuff in it, then loading it up in the game to see what effect it had. You can pick any XML file, but IMO one of the easiest to try your hand at is the Traits file, because it is fairly short, you are probably already somewhat familiar with its purpose, and the results of changing anything show up in text before you even have to load the game. The Civics file is also a good one to try out. Once you get a little experience, check out Units, and use the Worldbuilder to add them to the map and try them out.

Also, a quick tip on something I totally didnt understand at first: to create a new mod all you have to do is create a empty folder and place it in the mods folder with the other mods. That's it! Any files you drop into the folder override the standard Civ IV files. You just have to make sure the file structure in your mod folder matches the structure of the source (so in other words, the trait XML file would go in MyMod\XML\Civilizations\Traits.xml, for example.)

-isau
 
Re Dale: LOL. what and how did you first learn to program?

Re Ambreville: Yeah that's very much the path that I took to where i am XML-wise(that is, fairly confident at editing XML's and reading through the Schema's. I leave most of the worldbuilder stuff to my brother :) Although i good a pretty good feel for it just hitting random buttons and seeing what they do.

From the looks of it you are in the same boat as me (I've also dabbled in graphics, more the 3d stuff with Blender tho) :D. I'm having a go at starting a small python/XML modcomp (the second link in my sig). If you have some time, check it out and have a go/make suggestions/whatever :)

Re jkp: LOL I definitely plan on asking questions :) I also plan on grabbin a coupla books when my employer finally gives me some fricken hours :rolleyes:

Re Isau: Thanks for the response :) I mostly stuffed around with the Traits file, adding espionage points and tile bonuses at random :D I also managed to Give Boudica and Ragnar a "barbarian" promotion, which caused all their units to inflict a small amount of collateral damage :)
 
Now here's a question from me:
I've learned some python syntax and want to add some custom functions to use in game.
Is there a nice tutorial (or maybe you can easily answer me here?) how to implement a python for modding? I do know xml (although not all of the tags, but a lot of general) but I have some troubles with python.
I.e. I want to add a special promotion which is activated in city only by a special unit. I can write some come in python to check the unit combat type and if it's the city, but I don't know how to use this function in xml/game to make it working.
Any help would be great!
 
One way of doing this is to link the promo to a tech that is unavailable to any of the civs, then give the promotion to the specific unit class in the unitinfos file, under "free promotions". Not sure this is what you wanted, but at least, it doesn't require Python. Of course then, your unit always starts with that promotion.
 
The problem is that I want a promotion to be triggerable by a player when the unit is in city.
The idea is to make changeble equipment. I.E. I have a gunship with base combat strength 10. I want to make an option for it to equip "gunners crew" while in city which makes it +2 str -1 movement, and then to equip "regular crew" (removes promotion) or "technicians crew" (-2 str heals 10% faster).
I thought the same thing in the FFH mod, but it's a bit complicated there (a lot of python and custom variables).
 
I know the script, but it uses "caster" variable (maybe in dll?) also I don't see how do they invoke the python in game.

I was asking about a general way to activate a python script in vanilla game by same action - "how do I ...?" =). I can't get it yet. Just how to call a python function...
 
Back
Top Bottom