Logo Platform
logo amplifiers simplified

Adding modules

Reply
Copied to clipboard!
7 years ago
Aug 18, 2018, 8:55:20 PM

Hello there!

Long story short, I am trying to create a mod, which enables the Vodyani to reconstruct and rejuvenate planets through Behemoths, but I am having a bit of trouble. Adding technologies and the like works just fine, however, the moment I try to add modules, the game refuses to recognise the mod. (As in, I no longer see it in the mod manager.) Futhermore, if I do remove any of the following bits, the module refuses to show as an unlok of the technology. Here are the relevant code bits:


<DataBasePlugin DataType="ModuleDefinition, Assembly-CSharp" Priority="10">
                <ExtraTypes>
                    <Extratype DataType="SupportModuleDefinition, Assembly-CSharp"/>
                </ExtraTypes>
                <FilePath>Simulation/ModuleDefinitions.xml</FilePath>

</DatabasePlugin>

And the ModuleDefinitions.xml:

<?xml version="1.0" encoding="utf-8" ?>
<Datatable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="/Documentation/Schemas/ModuleDefinition.xsd">

<SupportModule Name="ModuleShipBoundReconstructor" Family="TerraformationBase" Level="2">
        <Cost ResourceName="SystemProduction">400</Cost>
        <TechnologyPrerequisite Flags="Edition">ShipboundRestoration</TechnologyPrerequisite>
        <PathPrerequisite Flags="Edition">ClassShip,ShipRoleJuggernaut</PathPrerequisite>
        <SimulationDescriptorReference Name="ClassModuleSupport"/>
        <SimulationDescriptorReference Name="ClassModuleJuggernautOnly"/>
        <CategorizedSimulationDescriptors Category="CategoryJuggernaut">
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor"/>
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor1"/>
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor2"/>
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor3"/>
        </CategorizedSimulationDescriptors>
    </SupportModule>
   
 </Datatable>

I would really appreciate if anyone could help me out with this!

0Send private message
7 years ago
Aug 19, 2018, 10:21:19 AM

Have you had a look at the diagnostic report that can generally be found under "%userprofile%/documents/endless space 2/temporary files/"? That might give a clue. The last time a mod vanished on me was because the main mod .xml was malformed.

0Send private message
7 years ago
Aug 19, 2018, 1:13:39 PM

Well, I managed to figure it out, however, now it seems that the unlocking mechanism for the module is not working. It does not show up on the tech tree beside the technology despite me having set the prerequisite properly, like this:

 <TechnologyDefinition Name="ShipboundRestoration" TechnologyStage="TechnologyStageDefinitionScienceAndExploration5" Category="CategoryTechnologyScienceAndExploration" ScoreProvider="TechnologyUnlocked">
        <CustomCost ResourceName="EmpireResearch">Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCurrentCost) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCostStage5Multiplier) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCostQuadrantScienceAndExplorationMultiplier)</CustomCost>
        <PathPrerequisite Flags="Prerequisite,DiplomaticTradable,Discard,Faction,AffinityGameplayTechnologyVampirilis" Inverted="false">ClassEmpire,AffinityGameplayVampirilis</PathPrerequisite>
        <DownloadableContentPrerequisite Flags="Prerequisite,Discard">DLCHisshos</DownloadableContentPrerequisite>
        <PathPrerequisite Flags="Prerequisite,Disable,JuggernautsNotDiscovered">../JuggernautsCanBeResearched</PathPrerequisite>
        <PathPrerequisite Flags="DiplomaticTradable">false</PathPrerequisite>
        <SimulationDescriptorReference Name="ShipboundRestorationPrime"/>
        <SimulationDescriptorReference Name="TechnologyCountScienceAndExplorationIncreaseStage5"/>
        <SimulationDescriptorReference Name="TechnologyCounter"/>
        <PopulationEvent Name="PopulationPoliticalEventReligiousTechnology"/>
       
        <!--<HelperVariable Name="JuggernautCount"/>
        <HelperFormula>$(JuggernautCount) * 2</HelperFormula>-->
    </TechnologyDefinition>

<SimulationDescriptor Name="ShipboundRestorationPrime" Type="Technology" IsSerializable="false"/>

<SupportModule Name="ModuleShipBoundReconstructor" Family="TerraformationBase" Level="2">
        <Cost ResourceName="SystemProduction">400</Cost>
        <TechnologyPrerequisite Flags="Edition">ShipboundRestorationPrime</TechnologyPrerequisite>
        <PathPrerequisite Flags="Edition">ClassShip,ShipRoleJuggernaut</PathPrerequisite>
        <SimulationDescriptorReference Name="ClassModuleJuggernautOnly"/>
        <CategorizedSimulationDescriptors Category="CategoryJuggernaut">
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor"/>
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor1"/>
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor2"/>
            <SimulationDescriptorReference Name="ModuleShipBoundReconstructor3"/>
        </CategorizedSimulationDescriptors>
</SupportModule>

What am I missing? I already included GUI elements for it, so I do not think that is the issue...

0Send private message
7 years ago
Aug 20, 2018, 9:23:47 AM

Hey Villamvihar,


I can't see anything wrong with the data you pasted here, can you send me the whole mod so I test it and see what's wrong?

0Send private message
0Send private message
7 years ago
Aug 21, 2018, 1:55:12 PM

Ah!

There actually is an issue in Reconstructors.xml:

<Extratype DataType="SupportModuleDefinition, Assembly-CSharp"/>

Extratype must be written ExtraType!

After fixing this I had an error telling me the module should reference the descriptor ClassModuleSupport but you can fix that and other eventual issues at the same time :)

0Send private message
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message