ModModder's Guide

Already implemented in the latest SVN, if I remember correctly.
 
Hi,

Is there a good tutorial/advice/thread available on how to tamper with Artstyles and ArtDefines with Modules?
 
Has onPlayerChangeStateReligion been made modular in the SVN? If not are the plans to make this python modular?
 
A question:

Is there any way to restrict a unit to the owner's territory? I can't see anything too obvious in the XML...
 
Not currently. You can prevent a unit from exploring but that still let's them move in tiles you already explored.

Thanks.

Guess I'll have to live with it.

I wanted to have a unit that had to be kept "in supply" as a Mechanos trireme replacement, so I could have a tough defender that wasn't too useful for attack.
 
What you could do is make the unit lose all of it's abilities if it leaves your national borders. That should be simple enough, given that there are tags specifically for that (have a look at the pacifism promotion that elohim units get, for instance)
 
That would help, but could the AI cope?

Would it just not effectively suicide its units by sending them out? or is that a question of telling the AI how to use the units?
 
Hi,

I'm trying to incorporate some button art for improvements in my mod. If I get this sorted, I may be able to move on to sorting the associated nif.
If I put the following:
Code:
<!--  Panivo Test  -->
		<ImprovementArtInfo>
			<Type>ART_DEF_IMPROVEMENT_WITHERED_ONE</Type>
			<bExtraAnimations>1</bExtraAnimations>
			<fScale>0.5</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<NIF>Art/Structures/Improvements/Yggdrasil/LemonTree.nif</NIF>
			<KFM/>
			<Button>Modules/NormalModules/Panivo/Art/Panivo_Withered_One.dds</Button>
		</ImprovementArtInfo>
directly into CIV4ArtDefines_Improvement.xml in the Rise from Erebus\Assets\XML\Art folder, the button for the improvement is correctly used.

When I use the same code in Panivo_CIV4ArtDefines_Improvement.xml in the Rise from Erebus\Assets\Modules\NormalModules\Panivo\Art, the button isn't used.:confused:

Should I have the module xml file in a different folder?
Is there any other reason why the modular Panivo_CIV4ArtDefines_Improvement.xml won't work?

-----------
Solved the problem. I think I'd just become to used to the team having made xml editing easier. Once I included every element from the Schema in the Panivo_CIV4ArtDefines_Improvement.xml, it worked fine.
 
Hi,

(I guess there's little chance of an answer seeing as the last post on this thread was by me over two years ago but it does seem the most appropriate thread for a query on modding modules in RifE. Here's hoping.)

I seem to have an issue with CvEventManager modular python files (e.g. onUnitKilled) interfering with each other. Unlike the spell and event modular python, the CvEventManager modular python files will have the same name in different modules. Where I have two modules which use the same python file name, then the python does not work properly.

This happens when the modules are in the NormalModules folder and also seems to occur when I put them in the LoadOrderVitalModules subfolders.

Has anyone else encountered this and does anyone know how to get such modules to work together?
 
hmm, hmm,

yeah, i don't really know how exactly python works with additional modules, but according to the code the name of the module is the name of the file, which might cause issues when two files are named the same ... i guess (i wrote that piece of code like 4 years ago, i don't really remember :D)

i'd probably solve it by adding the name of the module (or it's shortened variant or UUID) to the name of the python file

edit:

if you want to look at it and attempt to fix it, it's in the CvEventManager.py file in the pluginScan function:
http://sourceforge.net/p/rife/code/HEAD/tree/Development/Assets/python/CvEventManager.py#l367 (it might be different line in your version of rife )
the loading of the module itself is on the line 404

useful references: https://docs.python.org/2/library/imp.html?highlight=load_module#imp.load_module
 
Top Bottom