Logo Platform
logo amplifiers simplified

need help creating a mod

Reply
Copied to clipboard!
2 years ago
Oct 4, 2022, 5:05:21 AM

so i want to create a mod to change minor faction village count in spawn region

i already changed WorldGeneratorSettings.xml into this


<?xml version="1.0" encoding="utf-8" ?>

<WorldGeneratorSettings>


  <!--============================================== POI DISTRIBUTION ===========================================-->


  <!--ExclusionRadius : excludes all other elements of these algorithms from being generated inside that radius -->

  <POIAlgorithmParameters>


    <Algorithm Name="DistributeVillages">

      <Parameter Name="ExclusionRadius"         Value="1"/>

      <Parameter Name="MinSitesPerEmptyRegion"  Value="1"/>

      <Parameter Name="MaxSitesPerEmptyRegion"  Value="3"/>

      <Parameter Name="MinSitesPerSpawnRegion"  Value="2"/>

      <Parameter Name="MaxSitesPerSpawnRegion"  Value="2"/>

    </Algorithm>



  </POIAlgorithmParameters>


</WorldGeneratorSettings>


and i already made  a new xml file at the root of my mod. and here is the content of that 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">

  <RuntimeModule Name="EndlessLeveling" Type="Extension">


    <Title>More Minor Faction Villages at Spawn Region</Title>

    <Author>abidhesra</Author>

    <Homepage></Homepage>

    <ReleaseNotes></ReleaseNotes>

    <Description>There will be 2 villages at spawn region</Description>


    <Plugins>


      <DatabasePlugin DataType="WorldGeneratorSettings, Assembly-CSharp">

        <FilePath>WorldGenerator/WorldGeneratorSettings.xml</FilePath>

      </DatabasePlugin>


      </Plugins>

  </RuntimeModule>

</Datatable>


i suspect that  <DatabasePlugin DataType="WorldGeneratorSettings, Assembly-CSharp"> line wrong but i dont know

where did i do wrong?

0Send private message
2 years ago
Jan 2, 2023, 12:27:22 AM

Hello, I'm not sure how exactly it should be done, but there is a mod that does similar work. It called Endless Summer and it sets map generation to only 1 Village per region. Your POIAlgorithm should be ok, but maybe you should add this code to the root xml:


      <DatabasePlugin DataType="OptionDefinition, Assembly-CSharp">

        <ExtraTypes>

          <ExtraType DataType="GameOptionDefinition, Assembly-CSharp" />

          <ExtraType DataType="WorldGeneratorOptionDefinition, Assembly-CSharp" />

        </ExtraTypes>

        <FilePath>Options/GameOptionDefinitions.xml</FilePath>

        <FilePath>WorldGenerator/WorldGeneratorOptionDefinitions.xml</FilePath>

      </DatabasePlugin>


Also do not forget to correctly name your RuntimeModule.

Updated 2 years ago.
0Send private message
?

Click here to login

Reply
Comment