Question Regarding Modular Modding

@Methos, define difficult, Are you talking a large mod pack or a small one? Difficulty is mostly in finding time. Other than that pretty much anything can be madw modular except for sounds. Also the TGA's
 
Sorry to bother you all, but you seem to be the best ones to ask. How difficult would it be to take an already existing mod and turn it into modular?
Easy answer: if only XML, it's only as difficult as your unexperienceness with XML, if python, it's only as difficult as your unexperiencess with python, if SDK, ...bla bla...

Amount of work, i guess that's what you really want to know, depends on the size really...

What I would like to do is set up a check box on the Custom Game screen. If the box is checked, than it runs my module. Is this possible?

If so, than it looks like I'm really going to have to study up on modules.
No, checkbox modular won't work, well, some xml's might work, and flags in the SDK/python can of course be set to true/false even during the game(however one might consider that as cheating or even corrupt older data, but most likely it won't crash, at least no reasons i see right away why it would bug you in the sense of crashing, but yeah, you can set flags to true false prior to starting a game)

on the XML, this is a whole different story...
to make it simple, DO NOT load modules AFTER you've loaded all the other xml's!!!! simple rule..there might be exceptions to this, but generally, do NOT even think of it!

Many XML files rely on other XML files. enumerations are done while loading. UnitXXX01 gets number 138 and it's corresponding UNITCLASS number 48..if you load any unit later, you might corrupt such numbers. Sure you can make sure to APPEND ALWAYS, if loaded later, but you still need to update both enumerations as well as all dependencies...

to cope with dependencies, and to make sure the code always works, firaxis has a loading order, first all XML of type AAAAA then BBBBB then CCCC, etc..
now later you want to load XML of type FFFFF and YYYYY...which just means, you have to RELOAD from FFFFF and everything that comes after...so for each module you select in the main menu, you have to make sure to RELOAD again and again for each added module every XML loaded after this one...which will take your PC to load alot of data over and over again...bad idea, and long loading time, and hard to tell how your memory will handle this...

I'm sure i could rewrite to make sure only to load necessery stuff, but really, why would you want to do that, it will have alot of risks of missing stuff and corrupting data....


simple explanation:"use the loading order of firaxis and do it prior to enter the game menu, for the sake of memory allocation, preventing bugs, keep dependencies properly, and enumerations properly..."

If you want modular loading, you can develop your mod by developing it into the WoC concept..gives you all the power of modular loading the way you want it...and you even can control the order of loading your modules if you want...in WoC it's all written already and working..still under development, but the main concept is done...Stick to this concept...as it loads everything modular wise, controlled loading mechanism, and you can use "sets" of modules, and it does this without screwing around with dependencies as will ultimately follow from loading modules from the main menu...

for more information:
http://www.worldofcivilization.net
http://www.worlfofcivilization.com

or sign up and login to the WoC jabber developers chat server for any questions..feel free to ask
 
Top Bottom