How did you learn to mod?

Users who are viewing this thread

Sterikos

Banned
I've been reading over the tutorials. Much of the information seems outdated but it's proving helpful regardless.

How did you learn your way around the code?
Did you already know Python?
What are some best practices you've found?
 
Sterikos said:
I've been reading over the tutorials. Much of the information seems outdated but it's proving helpful regardless.

How did you learn your way around the code?
Did you already know Python?
What are some best practices you've found?

90% of tutorials isn't actually outdated.
No python is needed unless you doing advanced stuff.

Best practices will differ from person to person.  I would suggest set your self some goal as simple mod. Then try to make it using  all info you can  find and eventually ask for details.
Then make more and more complicated mods untill you get enough experience to do what you actually desire. Very good source of examples is original module system itself as many solutions here can be used for modding purposes.

Not all knowlwdge is included in tutorials. Many interesting stuff can be found in normal question threads  on main forge board. Use search function to your advantage.

Other users mods can be also good source of modding knowledge. If you seen some feature in mod examine its source code if avaible.

Use Q&A thread only for short questions like "what this error means?". Avoid adding complicated problems as Q&A is  mostly cluster**** and keeping track of serious discussion can be difficult. Just make new thread instead.

Ofcourse searching Q&A can still provide information on some topic.
 
Sterikos said:
Much of the information seems outdated but it's proving helpful regardless.

Game was released at 2010. Updates since then have some impact in the code side, but not much. You can read a tutorial from 7 years ago and it will probably be relevant today.

Of course that, as a modder, you will need to spend some time learning about new operations (header_operations.py), and you can learn a lot by looking at what people did over the last 7 years. Look at small OSP features to see how you can go outside the box (Native), and create your own mechanics and gameplay. You don't need to be limited by how Native does things at all.

Remember to download Lav's module system, as his header_operations.py is organized. Then you can dedicate some time to read the entire thingy (lets say, one chapter a day). That is one good example of how you can study the modsys.

Update:

Code:
#                                             header_operations for VC v.0.1.0 #
#                           based on header_operations expanded v.1.0.1 by Lav #
################################################################################
# TABLE OF CONTENTS
################################################################################
#
# [ Z00 ] Introduction and Credits.
# [ Z01 ] Operation Modifiers.
# [ Z02 ] Flow Control.
# [ Z03 ] Mathematical Operations.
# [ Z04 ] Script/Trigger Parameters and Results.
# [ Z05 ] Keyboard and Mouse Input.
# [ Z06 ] World Map.
# [ Z07 ] Game Settings.
# [ Z08 ] Factions.
# [ Z09 ] Parties and Party Templates.
# [ Z10 ] Troops.
# [ Z11 ] Quests.
# [ Z12 ] Items.
# [ Z13 ] Sounds and Music Tracks.
# [ Z14 ] Positions.
# [ Z15 ] Game Notes.
# [ Z16 ] Tableaus and Heraldics.
# [ Z17 ] String Operations.
# [ Z18 ] Output And Messages.
# [ Z19 ] Game Control: Screens, Menus, Dialogs and Encounters.
# [ Z20 ] Scenes and Missions.
# [ Z21 ] Scene Props and Prop Instances.
# [ Z22 ] Agents and Teams.
# [ Z23 ] Presentations.
# [ Z24 ] Multiplayer And Networking.
# [ Z25 ] Remaining Esoteric Stuff.
# [ Z26 ] Hardcoded Compiler-Related Code.

see how you can actually learn things from just reading that header_operations.py. What can you do with agents in a scene? Well look at the operations/functions on section Z22.
 
1) I read a couple of basic guides.
2) I paid attention to header_operations's explanations and other header files.
3) I just studied the original code. And all my first coding was find=>copy=>paste=>edit (though I still have a habit to not type operation blocks, but copy them, like I need try_for_range block, so I just scroll up or down, find it in some other script, copy the whole block, and then ctrl+c/ctrl+v my own variables/other operations into it - I don't trust my fingers to not make any typos or not forget any commas, so I type very little and usually use ctrl+c/ctrl+v).
Basically, the third point is all what you need. And Total Commander.
Like you need to add a faction?
Then take an existing faction and use TC to find every instance of it being mentioned in module files, and add you own instances after them. Then check module constants to see if the first faction or the next faction after the last faction is included in any ranges, and then find them too.
Or, since 95% of range usages don't need to be adjusted, just use you brains to think about what could use an adjustment.
E.g., companions. They need dialogue strings. So I added them. But how will they know what strings to use in what dialogues? Let's trace it, i.e. find one of strings. Hmm. Nothing. So things here are  probably coded by using ranges. Let's find the first string. Aha! It leads us to scripts. What do we have here? Strings are added to companions' slots at the start of the game! And I see that there is an offset number in the assignment script that needs to be adjusted. Problem solved.
Many questions I've seen here on the Forge could easily be solved in a matter of couple of minutes if their authors just played detectives and used basic search function.
 
Myself, I used reverse engineering with old mount and blade mods and got into banter and friendly chatting with some of the big modders of the time. I started off as a graphic designer for Rigale mod then after doing load screens for other Mods ect I got to know people and bugged the hell out of them. I found a mod called enlist from M&B and thought I'd give it a shot at porting it to Warband, I called it Freelancer, The mod wouldn't have gotten very far if it hadn't been for the community. There is you Key. This forum is full of hundreds of people, everyone has something to give. Great Community this one. So everyone else that has spoken is correct. Q&A thread is great, the forge in itself is awesome. I'm still learning and will continue to do so, welcome to an exclusive club.

1. Searching the code, learning to read basic code structures.

2. Very very basic code, ( codecombat.com would you believe has helped me allot lol)

3. Add  ##notes to code to remind you of what things do or what the activates.. Quite frankly my first code to play with was dialogues and game menus


Have fun and don't forget Q&A and the Forge are your best friends... there's also a mod forge bible around here somewhere.

- Gothy  :mrgreen:

 
i spent quite some time reading the code and just looking around the menus in openbrf, figuring out what's what and where stuff is.
don't be afraid to try things out, if it breaks work out how to fix it; and don't forget that things won't always work the first time so don't give up.
if you're thinking of making a mod, remember that no one will want to see it finished more than you, so rather than sit around waiting for people to turn your ideas into a mod, fire up blender, photoshop, whatever and learn all the aspects. it'll take a long time and you'll want to give up lots of times, but if you keep powering through you'll come out at the end having learnt a whole boat load of cool ****.
 
1. I read the code to understand how it worked.
2. I read the Q&A thread to understand how to solve potential problems, and to pick up tidbits of undocumented game knowledge.

And that's it. I have no prior coding knowledge but even without using tutorials I was able to make sense of the entire module system in about a year. It helps to start off by trying to recreate bits of code on your own.
 
I skulked around the forums, especially the Mod Makers Q&A thread, a lot.
I read, I searched, I asked questions.

Best practices;
- back up your code/module system regularly (that is, employ version control).
- comment out the original blocks your editing or replacing in the module files so you can easily revert then and there.
- add comments in general, wherever you've made a change, put a little comment next to it with your name and what it is and why it's there, for easy reference later.
- after changing something, always helpful to build the module just to ensure you didn't make a mistake. Doing it then and there after a change lets you know that the change is what caused the hiccup, as opposed to making a bunch of changes and seeing a problem in the command line and wondering what the hell you got wrong.
 
Hey Duh, may I propose this to be sticked?  As "How to educate yourself in modding" or something in these lines. Amount of good advice's so far may eliminate some of newbie threads.
 
EmielRegis? said:
Hey Duh, may I propose this to be sticked?  As "How to educate yourself in modding" or something in these lines. Amount of good advice's so far may eliminate some of newbie threads.
There is an older, longer thread like this. I may dig it up.
 
Definitely check this then

https://forums.taleworlds.com/index.php/topic,184473.msg7017307.html#msg7017307
 
The best way I found was to do what Jacob said. Then try changing something and test to see how it works. Experiment with different things and don't forget to read operations_header. I didn't read this for a long time and it done me no favours. Also take your time and try to digest everything you are doing. Fault finding will also make you better and help you to understand more.
Take a look at the VC module system and compare how they changed/modified things from Native.

To some people it will come more naturally (I'm looking at you Jacob), though if your like me it might take a little longer with a little more hard work :wink:. Though keep trying and eventually you will get there.


Just ask Mad Vader about some of the replies I received in my initial mod making thread. My mod is now regularly in the top 10 on ModDB and has had over 130k downloads in a little over 2 months (on moddb and steam). So if I can achieve that I think anyone can :smile:.
 
Once you resolve some kind of issue and want to remember how you fixed it, make a note somewhere for yourself. Sometimes you can find on it on the forums, but honestly, searching and retrieving an (obscure) fix is a pain in the ass from TW forum.

And what TheCaitularity wrote. Back-ups, frigging back-ups...
TheCaitularity said:
Best practices;
- back up your code/module system regularly (that is, employ version control).
- comment out the original blocks your editing or replacing in the module files so you can easily revert then and there.
- add comments in general, wherever you've made a change, put a little comment next to it with your name and what it is and why it's there, for easy reference later.
- after changing something, always helpful to build the module just to ensure you didn't make a mistake. Doing it then and there after a change lets you know that the change is what caused the hiccup, as opposed to making a bunch of changes and seeing a problem in the command line and wondering what the hell you got wrong.
 
This is how you want to make a mod
1) make a simple MOD  :wink:
2) improving it like make it from simple into a normal
3) learn how to fix and code (hard part )
4) have a idea into it
5) make it a better MOD and badass mod  :mrgreen:
6) when you make a mod for a long time I think you have enough skill how to make a mod
7) and learn how to model (hard part)
Final is invite some people to make with you because you can't finish by yourself 
That is all I can tell you
 
I wrote a quick reference guide for VC https://forums.taleworlds.com/index.php/topic,347990.0.html, with a mix of links of tutorials, basic information, examples of how to change features, etc

as VC is a Warband module, a modder can also use most of it

      Edit warning as @Duh was confused by this post
     
disclaimer: it is only and only the quick reference guide

for general mods. The aim was to help new VC modders.
 
as VC is a Warband module, a modder can also use most of it for general mods.
Unless specified otherwise by the developers no modder may use DLC content in WB and vice versa.
 
Back
Top Bottom