strategyonly
C2C Supreme Commander
All now solved, in NWA mod.
I have no idea about RoM, but i've recently digged into RevDCM, so i understand some things of what phungus said.
To work in RevDCM (i know RoM is based on it), the milita class would have to be removed, which then leads to a complete re-intendation of the whole file.
Because i know, that you can mess it really easy up if you don't have python, i've shortly done this, the changed file is attached.
Try it out, hopefully it works (but no guarantee).
<!-- Rise of Mankind -->
<events module="WarPrizes"> </events>
<events module="WorldFair"> </events>
<events module="ScreenResolutionSize"> </events>
<events module="CvWaterAnimalsModEventManager"> </events>
<events module="NukeAfterEffects"> </events>
<events module="WarriorsOfGod"> </events>
<events module="CvMercEventManager"> </events>
<events module="SubdueAnimals"> </events>
<events module="CaptureSlaves"> </events>
<events module="Espionage"> </events>
[B]<events module="Militia"> </events>[/B]
<events module="CvEnhancedTechConquestEventManager">
</events>
<!-- Rise of Mankind end -->
I guess you've added the militia.xml before, right?
Is there any tutorial for adding modular things to BUG out there?
I guess i'd have to read it :/.
ConfigError: No such module 'Militia'
Code:ConfigError: No such module 'Militia'
This is a very specific error telling you that there is no Python module named "Militia.py" in the Python folder or its subfolders.
@The_J - My sig has a link to the BUG Modding Tutorial.
@strategyonly
Look at some of the other modules in RoM that are loaded via bug. Specifically look at the MovieMod. RoM uses a RevDCM core, so there should be a few modules to use as a reference guide.
The movie mod, or the militia mod? I only see one function that you're trying to tak into for the example code; if so you should be able to implement it exactly the same way as the movie mod. You can read up in the BUG forums about how to modularlize it, if using an existant python module isn't working for you; personally I find using an existing module as a reference easier, but to each their own.
# Militia
from CvPythonExtensions import *
import BugUtil
gc = CyGlobalContext()
def onImprovementBuilt(argsList):
BugUtil.debug("Militia - onImprovementBuilt called")