Basic Modding Help

Everything about mods can be found here.

Moderator: Morax

Basic Modding Help

Postby Crazy Cossack » 13 Mar 2013, 12:56

I want to teach myself FA modding. I will have to start simple and learn from there. First, I will just do something really simple like a mod to say double the power from t1 p gens. This is as a learning exercise only, it has no other point. So here are some basic questions.

1. I need a guide or links to guides that outline modding steps. Can you help?
2. I need the tools and utilities that are used in modding. Can you help?
3. How do simple mods work like 2x res? I assume a modded file for FA is placed in the mod folder and when you select the mod, the program uses any new data from that file instead of the standard data. But it uses all other standard data from its own files. Is this correct?
4. I assume it is done as in 3 above at least for simple mods and that I do not have to copy my whole game to another directory and work in there and make a whole new game as it were?
5. Although, I guess it is possible that comprehensive new mods are done as in point 4. Is that correct or incorrect?
I used to program in Borland Turbo Pascal a long time ago. For example, for fun I wrote a program that played chess. It only looked ahead 2moves (4 ply) with a minimax algorithm so it wasn’t very good, lol. I have not done any programming for many years but I still have the basic concepts. I don’t know C++ or LUA or anything modern. Is this going to hamper me? Initially, I will just be playing with unit and structure costs, production output and also simple unit and structure attributes like strength of weapons and armour.
My ultimate envisaged mod will not be limited to the above but I have to start learning with the easy stuff first.

Thanks in advance for any assistance. - Crazy Cossack.

PS. I posted a General Theory of RTS Design paper at;

http://forums.gaspowered.com/viewtopic.php?f=2&t=61617
Crazy Cossack
Avatar-of-War
 
Posts: 53
Joined: 13 Mar 2013, 12:44
Has liked: 0 time
Been liked: 9 times
FAF User Name: Crazy_Cossack

Re: Basic Modding Help

Postby Mr-Smith » 13 Mar 2013, 13:14

http://forums.gaspowered.com/viewforum.php?f=19

there you should anything you need and also some advice if you need help
If you can't beat us...
...join us.
Doge This, hover ACU: https://youtu.be/a67tvWmu31Y?list=LLW-T ... O4fQ&t=179
User avatar
Mr-Smith
Evaluator
 
Posts: 523
Joined: 27 Mar 2012, 19:15
Location: Austria
Has liked: 39 times
Been liked: 36 times
FAF User Name: Mr-Smith

Re: Basic Modding Help

Postby Myxir » 14 Mar 2013, 15:12

Crazy Cossack wrote:1. I need a guide or links to guides that outline modding steps. Can you help?
this one is a huge help: http://forums.gaspowered.com/viewtopic.php?f=19&t=2318
2. I need the tools and utilities that are used in modding. Can you help?
even the standard windows texteditor can read LUA files. if you want to have something better, use notepad++
3. How do simple mods work like 2x res? I assume a modded file for FA is placed in the mod folder and when you select the mod, the program uses any new data from that file instead of the standard data. But it uses all other standard data from its own files. Is this correct?
FA works in layers. the basic layer is whatever you can find in the gamedata folder (rename the .scd files to .zip and extract them). then, in FAF, the featured mods "overwrite" existing files. then, gameplay mods "overwrite" current files, if such a mod is enabled. and finally, UI (user interface) mods overwrite again stuff, but UI mods can't edit units or something
mods like 2x ressources usually edit the blueprint of ressource buildings (pgns, mexes), and let them produce 4 mass per second instead of 2. that's all :)

4. I assume it is done as in 3 above at least for simple mods and that I do not have to copy my whole game to another directory and work in there and make a whole new game as it were?
making mods, you do not touch existing files. as described in 3, you just override some functions and data, but you don't edit files.
5. Although, I guess it is possible that comprehensive new mods are done as in point 4. Is that correct or incorrect?
it is correct, you do not need to edit existing files. if you make, for example, a gameplay mod, you usually hook an existing file (you make changes to a certain file in a higher layer) so that the file will now load your new script


if you want to check how the featured mods work, go to C:\ProgramData\FAForever\gamedata (programdata is a hidden folder, do not confuse it with programs or something else), take a mod of your liking, rename it to .zip and extract it somewhere. then you can see how it works

hope that helps :)
Unhappy with balance http://i.imgur.com/q5G2BlM.png
User avatar
Myxir
Evaluator
 
Posts: 791
Joined: 09 Apr 2012, 14:01
Has liked: 94 times
Been liked: 306 times
FAF User Name: Washy (irc)

Re: Basic Modding Help

Postby Crazy Cossack » 25 Mar 2013, 08:42

Thank you for the replies but I am still not finding the information I need. The links given go to very piecemeal information. The first sticky there was about modding SC2 not FA. It took me a while to realise that.

I need an overview document that explains how it works overall first. People go straight into talking about hooks and files and other details and I have no idea how it all fits together at the high level.

A simple way to help me get a first handle on modding would be this. Imagine I wanted to make a mod that doubled all factory costs and halved all mobile unit costs and did nothing else. (This is just a learning example.) How would I do such a mod? Please give me a fool-proof step by step guide.

1. Would I create a new hook\system\lua\blueprints.lua file?
2. What would it look like and how would it double all factory costs and halve all unit costs? (I assume it would look a bit like the 2x res mod lua but would call other functions (related to fixed building and mobile unit costs).
3. When I created this file would I simply drop it in the gamedata directory of my game or a subdirectory of it? What would any sub-directory name be?
4. Note: I want it to appear as a selectable mod like the 2x resource mod.

If someone can give me an example so I can work through a simple startup mod like this then I can kickstart my learning process.
Crazy Cossack
Avatar-of-War
 
Posts: 53
Joined: 13 Mar 2013, 12:44
Has liked: 0 time
Been liked: 9 times
FAF User Name: Crazy_Cossack

Re: Basic Modding Help

Postby Krapougnak » 26 Mar 2013, 08:45

User avatar
Krapougnak
Contributor
 
Posts: 340
Joined: 12 Jul 2012, 11:03
Has liked: 193 times
Been liked: 24 times
FAF User Name: Krapougnak

Re: Basic Modding Help

Postby Crazy Cossack » 26 Mar 2013, 12:33

Thank you mate. That gives me the overview I need. I have skimmed the tutorial now I need to read it carefully and follow the recommened steps. Initially, I will not be trying anything tricky. First, I will just play with resource costs for structures and units to test for myself if I can make a simple mod that works.
Crazy Cossack
Avatar-of-War
 
Posts: 53
Joined: 13 Mar 2013, 12:44
Has liked: 0 time
Been liked: 9 times
FAF User Name: Crazy_Cossack


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest