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

L System Related Trouble Importing Graphics

Discussion in 'Civ4 - Creation & Customization' started by Aurelazza, Jun 17, 2013.

  1. Aurelazza

    Aurelazza Chieftain

    Joined:
    Oct 4, 2012
    Messages:
    58
    So, I'm trying to import a series of civ-specific improvement graphics from one FFH mod (MoM) to another FFH mod (MNAI) which uses generic workshop/quarry/lumbermill graphics for all civs. I've got the art files in the right place, and I know that the artdefs belong in Civ4PlotLSystem.xml, but here's where I run into problems.

    Tholal's MNAI doesn't have workshops, quarries or lumbermills allotted to the L system's 4x4 leaf (4x4 node?). When I simply add in all the references to these improvement which include artdefs from MoM, the game doesn't recognize them and still plops down a generic workshop in Infernal territory, as opposed to an Infernal styled workshop. When I add in this bit:

    Spoiler :
    Code:
    	<LProduction From="PLOT_ROOT">
    		<Attribute Class="Improvement">NO_IMPROVEMENT,IMPROVEMENT_ALL,!IMPROVEMENT_WATER_WORKED,!IMPROVEMENT_MINE,!IMPROVEMENT_PASTURE,!IMPROVEMENT_QUARRY,!IMPROVEMENT_WHALING_BOATS,!IMPROVEMENT_WINDMILL,!IMPROVEMENT_FORT,!IMPROVEMENT_TRADE1,!IMPROVEMENT_TRADE2,!IMPROVEMENT_TRADE3</Attribute>
    		<To Name="Node_12x12"/>
    	</LProduction>
    	<LProduction From="PLOT_ROOT">
    		<Attribute Class="Improvement">IMPROVEMENT_MINE,IMPROVEMENT_WINDMILL,IMPROVEMENT_FORT,IMPROVEMENT_WORKSHOP,IMPROVEMENT_LUMBERMILL</Attribute>
    		<Attribute Class="Bonus">BONUS_ALL</Attribute>
    		<To Name="Node_12x12"/>
    		<To Name="Leaf_LandImprovement_4x4"/>
    	</LProduction>
    	<!-- *************************************************************************** -->
    	<LProduction From="PLOT_ROOT" Name="LandImprovementProd">
    		<Attribute Class="Improvement">IMPROVEMENT_MINE,IMPROVEMENT_WINDMILL,IMPROVEMENT_FORT,IMPROVEMENT_WORKSHOP,IMPROVEMENT_LUMBERMILL</Attribute>
    		<Attribute Class="Bonus">NO_BONUS</Attribute>
    		<Attribute Class="Scalar">bNotBFS:1</Attribute>
    		<To Name="Leaf_LandImprovement_4x4"/>


    And try to create a workshop in Infernal territory, the game crashes. I have error logs a-plenty, which show a lot of problems related to anything 4x4, but I'm unsure of which ones can help me move forward from here.

    Edit: Having trouble attaching LSystem.Log, so I guess I'll do the next best thing and post the last bit here.

    Spoiler :
    Code:
            DoFinalizeProduction of node's production #2 failed
            DoFinalizeProduction Node_4x4_To_Bleaf_4x4_For_Wine_Dye_and_Silk failed
            DoFinalizeProduction of node's production #0 failed
           Exhausted all options at Leaf_LandImprovement_4x4
          Exploring node production #4
           Visiting node Node_3x2
            Visit failed: ShouldExploreNode returned false
           Visiting node Node_2x2
            Visit failed: ShouldExploreNode returned false
           Visiting node Node_2x2
            Visit failed: ShouldExploreNode returned false
           Visiting node Node_2x2
            Visit failed: ShouldExploreNode returned false
           Visiting node Node_3x2
            Visit failed: ShouldExploreNode returned false
           Visiting node Node_2x2
            Visit failed: ShouldExploreNode returned false
           Visiting node Node_2x1
            Visit failed: ShouldExploreNode returned false
           Visiting node Node_3x2
            Visit failed: ShouldExploreNode returned false
         Exhausted all options at Leaf_LandImprovement_4x4
        DoFinalizeProduction 4x4_Farm_Rice failed
       Exhausted all options at Leaf_LandImprovement_4x4
      Exploring production LandImprovementProd
       Visiting node Leaf_LandImprovement_4x4
     
  2. Aurelazza

    Aurelazza Chieftain

    Joined:
    Oct 4, 2012
    Messages:
    58
    If nobody knows the answer to this toughie, could someone help me with the next best thing? I went ahead and made "Elven Workshop," "Dwarven Workshop," "Orcish Workshop" and "Demonic Workshop" improvements, and may very well end up doing so for the other quarries and such as well. What would be the most efficient Python coding to automatically convert an Orcish Workshop within the borders of a recently conquered city into the conquering civ's racial equivalent?
     
  3. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,619
    Location:
    DE/NL/FR
    There's no real good way to do it, especially since you have to consider cultural expansion. Basically you'd have to check after every captured city, after every cultural expansion, while/after every rebellion, etc.
    Not considering that you're able to capture the workers of other civs.

    No idea where the problem with the LSYSTEM is. It's a hell of a file :scared:.
     
  4. tesb

    tesb Emperor

    Joined:
    Jan 16, 2010
    Messages:
    1,593
    Your PlotLSytem entries seem incomplete, here is an example for the workshop:


    under the section:
    Code:
    <LNode Name="Leaf_LandImprovement_4x4">
    you need to add:
    Code:
    <ArtRef Name="goal:IMPROVEMENT_WORKSHOP">
    			<Attribute Class="Improvement">IMPROVEMENT_WORKSHOP</Attribute>
    			<Attribute Class="Artstyle">[B]ARTSTYLE_YOUR CIVS ARTSTYLE[/B]</Attribute>
    			<Attribute Class="Era">ERA_ALL</Attribute>
    			<Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>
    			<Attribute Class="Scalar">bApplyRotation:1</Attribute>
    			<Attribute Class="Scalar">[B]NIF:Art/.../YourCustomNif.nif[/B]</Attribute>
    			<Attribute Class="Scalar"></Attribute>
    		</ArtRef>
    

    later on:
    Code:
    <LProduction From="PLOT_ROOT">
    		<Attribute Class="Improvement">...,[B]IMPROVEMENT_WORKSHOP[/B],...</Attribute>
    		<Attribute Class="Bonus">BONUS_ALL</Attribute>
    		<To Name="Node_12x12"/>
    		<To Name="Leaf_LandImprovement_4x4"/>
    	</LProduction>
    
    and a similar entry (but not the same)
    Code:
    <LProduction From="PLOT_ROOT" Name="LandImprovementProd">
    		<Attribute Class="Improvement">...,[B]IMPROVEMENT_WORKSHOP[/B],...</Attribute>
    		<Attribute Class="Bonus">NO_BONUS</Attribute>
    		<Attribute Class="Scalar">bNotBFS:1</Attribute>
    		<To Name="Leaf_LandImprovement_4x4"/>
    	</LProduction>
    

    also remember:
    Code:
    <ArtRef Name="goal:IMPROVEMENT_WORKSHOP">
    			<Attribute Class="Improvement">IMPROVEMENT_WORKSHOP</Attribute>
    			<Attribute Class="Artstyle">[B]ARTSTYLE_FORNORMALCIVS[/B]</Attribute>
    			<Attribute Class="Era">ERA_ALL</Attribute>
    			<Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>
    			<Attribute Class="Scalar">bApplyRotation:1</Attribute>
    			<Attribute Class="Scalar">NIF:Art/Structures/Improvements/Workshop/Workshop.nif</Attribute>
    			<Attribute Class="Scalar">[B]KFM:Art/Structures/Improvements/Workshop/Workshop.kfm[/B]</Attribute>
    		</ArtRef>
    


    and in artdefines_improvements:
    Code:
    <ImprovementArtInfo>
    			<Type>ART_DEF_IMPROVEMENT_WORKSHOP</Type>
    			<bExtraAnimations>0</bExtraAnimations>
    			<fScale>1.0</fScale>
    			<fInterfaceScale>1.0</fInterfaceScale>
    			<NIF>Art/Structures/Improvements/Workshop/Workshop.nif</NIF>
    			<KFM/>
    			<Button>,Art/Interface/Buttons/Builds/BuildWorkshop.dds,Art/Interface/Buttons/Actions_Builds_LeaderHeads_Specialists_Atlas.dds,8,8</Button>
    		</ImprovementArtInfo>
    
    i.e. no KFM, the KFM for the normal workshop art is in the PlotLSystem file

    if you done all those changes and it still does not work, i cannot help you further
     
  5. Aurelazza

    Aurelazza Chieftain

    Joined:
    Oct 4, 2012
    Messages:
    58
    I see where my mistake was now. Thank you.
     

Share This Page