Logo Platform
logo amplifiers simplified

Request: Example faction mod

Reply
Copied to clipboard!
7 years ago
Dec 18, 2017, 6:20:49 PM

Can we get an example mod that creates a 9th major faction that is playable in-game? It doesn't actually have to DO anything as a faction just exist. I know a few people are struggling to get all the pieces together that are needed to make this work(and not crash) and just having the list of files and an example of the definitions needed would be an amazing help.

0Send private message
7 years ago
Dec 19, 2017, 12:00:25 PM

Hey Kareal!


I don't personally have time I can "allocate" to make this example mod, however these are the data types that you will need to modify if you want to create a new faction:


<!-- Faction definition (listed both in the Faction DataType, via an ExtraType, and in the MajorFaction DataType) -->
<DatabasePlugin DataType="Faction, Assembly-CSharp">
<ExtraTypes>
  <ExtraType DataType="MajorFaction, Assembly-CSharp"/>
</ExtraTypes>
<FilePath>Simulation/Factions[*].xml</FilePath>
</DatabasePlugin>

<DatabasePlugin DataType="MajorFaction, Assembly-CSharp">
<FilePath>Simulation/Factions[Major].xml</FilePath>
</DatabasePlugin>

<!-- Faction traits (affinity, mapping, population trait, etc.) -->
<DatabasePlugin DataType="FactionTrait, Assembly-CSharp" Priority="20">
<ExtraTypes>
  <ExtraType DataType="FactionAffinity, Assembly-CSharp"/>
  <ExtraType DataType="FactionAffinityMapping, Assembly-CSharp"/>
  <ExtraType DataType="FactionPopulationTrait, Assembly-CSharp"/>
</ExtraTypes>
<FilePath>Simulation/FactionTraits.xml</FilePath>
<FilePath>Simulation/FactionTraits[*].xml</FilePath>
</DatabasePlugin>

<DatabasePlugin DataType="FactionAffinity, Assembly-CSharp">
<FilePath>Simulation/FactionTraits[Affinity].xml</FilePath>
</DatabasePlugin>

<DatabasePlugin DataType="FactionAffinityMapping, Assembly-CSharp">
<FilePath>Simulation/FactionTraits[AffinityMapping].xml</FilePath>
</DatabasePlugin>

<!-- Population definitions, and population traits. -->
<DatabasePlugin DataType="PopulationDefinition, Assembly-CSharp">
<FilePath>Simulation/PopulationDefinitions.xml</FilePath>
</DatabasePlugin>

<DatabasePlugin DataType="PopulationTrait, Assembly-CSharp">
<ExtraTypes>
  <ExtraType DataType="PopulationModifiersTrait, Assembly-CSharp"/>
  <ExtraType DataType="PopulationCollectionBonusTrait, Assembly-CSharp"/>
</ExtraTypes>
<FilePath>Simulation/PopulationModifiersTraits.xml</FilePath>
<FilePath>Simulation/PopulationCollectionBonusTraits.xml</FilePath>
</DatabasePlugin>

<!-- Descriptors (all the gameplay effects!) -->
<DatabasePlugin DataType="Amplitude.Unity.Simulation.SimulationDescriptor, Assembly-CSharp-firstpass">
<FilePath>Simulation/SimulationDescriptors.xml</FilePath>
</DatabasePlugin>

<!-- Galaxy generator, there's an entry for "which star type should be spawned for each faction" in the vanilla XML -->
<DatabasePlugin DataType="GalaxyGeneratorWeightTableDefinition, Assembly-CSharp">
<FilePath>GalaxyGenerator/WeightTableDefinitions.xml</FilePath>
</DatabasePlugin>

<!-- Ship design definitions, hull definitions, templates and other stuff, if you want your faction to have new ships! -->
<DatabasePlugin DataType="ShipDesignDefinition, Assembly-CSharp">
<FilePath>Simulation/Battles/ShipDesignDefinitions[*].xml</FilePath>
</DatabasePlugin>

<DatabasePlugin DataType="HullDefinition, Assembly-CSharp">
<FilePath>Simulation/Battles/HullDefinitions.xml</FilePath>
<FilePath>Simulation/Battles/HullDefinitions[*].xml</FilePath>
</DatabasePlugin>

<DatabasePlugin DataType="ShipDesignTemplateDefinition, Assembly-CSharp">
<FilePath>Simulation/Battles/ShipDesignTemplateDefinitions.xml</FilePath>
</DatabasePlugin>

<DatabasePlugin DataType="FleetNameMappingDefinition, Assembly-CSharp">
<FilePath>Mapping/FleetNameMappingDefinitions.xml</FilePath>
</DatabasePlugin>

<!-- GuiElements (some extra ExtraTypes may be needed depending on your changes) -->
<DatabasePlugin DataType="Amplitude.Unity.Gui.GuiElement, Assembly-CSharp-firstpass">
<ExtraTypes>
  <ExtraType DataType="Amplitude.Unity.Gui.ExtendedGuiElement, Assembly-CSharp-firstpass"/>
  <ExtraType DataType="AffinityGuiElement, Assembly-CSharp"/>
</ExtraTypes>
<FilePath>Gui/GuiElements[*].xml</FilePath>
</DatabasePlugin>

<!-- Localization -->
<LocalizationPlugin DefaultLanguage="english">
<Directory>Localization</Directory>
</LocalizationPlugin>

You can see it's... quite heavy.

We also currently have an issue with the loading of custom FactionAffinity and their AffinityGuiElement, which requires you to add your AffinityGuiElement directly in the game's files, in GuiElement[Affinities].xml.


If you're still interested in making this mod and need some help on the technical aspects, I'd be happy to answer your questions!

Updated 7 years ago.
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message