1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

ModModder's Guide

Discussion in 'Rise from Erebus Modmod' started by Valkrionn, Jul 31, 2010.

  1. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Yes; They've already been requested by another modder, and IIRC BI was working on adding them already.

    Should function identically to pyPostCombat, on your end; IE, specifically defined functions, rather than one large function in which you have to test for your specific scenario. ;)
     
  2. Jheral

    Jheral Chieftain

    Joined:
    Apr 29, 2009
    Messages:
    502
    Already implemented in the latest SVN, if I remember correctly.
     
  3. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Yep. Just checked, was implemented in Rev 267.
     
  4. Lplate

    Lplate Esus (Allegedly)

    Joined:
    Feb 8, 2011
    Messages:
    578
    Location:
    Ireland
    Hi,

    Is there a good tutorial/advice/thread available on how to tamper with Artstyles and ArtDefines with Modules?
     
  5. Lplate

    Lplate Esus (Allegedly)

    Joined:
    Feb 8, 2011
    Messages:
    578
    Location:
    Ireland
    Has onPlayerChangeStateReligion been made modular in the SVN? If not are the plans to make this python modular?
     
  6. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    It has been indeed; all functions in that file are modular in the SVN
     
  7. CuteKills

    CuteKills Chieftain

    Joined:
    Oct 6, 2006
    Messages:
    75
    Location:
    UK
    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...
     
  8. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Not currently. You can prevent a unit from exploring but that still let's them move in tiles you already explored.
     
  9. CuteKills

    CuteKills Chieftain

    Joined:
    Oct 6, 2006
    Messages:
    75
    Location:
    UK
    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.
     
  10. Jheral

    Jheral Chieftain

    Joined:
    Apr 29, 2009
    Messages:
    502
    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)
     
  11. CuteKills

    CuteKills Chieftain

    Joined:
    Oct 6, 2006
    Messages:
    75
    Location:
    UK
    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?
     
  12. Lplate

    Lplate Esus (Allegedly)

    Joined:
    Feb 8, 2011
    Messages:
    578
    Location:
    Ireland
    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.
     
  13. Lplate

    Lplate Esus (Allegedly)

    Joined:
    Feb 8, 2011
    Messages:
    578
    Location:
    Ireland
    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?
     
  14. arcticnightwolf

    arcticnightwolf Chieftain

    Joined:
    Jun 8, 2008
    Messages:
    1,301
    Location:
    Prague, Czech Republic
    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
     

Share This Page