Events modding/XML questions

I usually play with lowered settings for resources, relics etc.  But there are events adding those. Can those fire several times in one playthrough? At least that's my impression.

 

Generally, I'd like to keep those events (esp. since they include ideology choices), but a bit toned down so that they either give less new resources and /or occur less often. Because I don't like it when at some point everyone just swims in stuff, even when I set them to uncommon.

 

ResourceGlut_MegaEventDefs has this part:

    <MegaEvent>
    <InternalName>ResourceGlut</InternalName>
    <Weight>25</Weight>

    <Prerequ>
      <Turns>150</Turns>
    </Prerequ>

Turns seems pretty straightforward - minimum number required for this to happen? Or does it mean it fires every 150 turns?

 

What does the "weight" part mean - does it control how often this triggger would fire? Could I just lower it to to have it firing less often (if it does indeed fire more than once)?

 

Then the actual trigger for this is in ResourceGlut_ScenarioTriggerSetDefs, with parts like:

        <PerformAction>
          <Action>ConvertAsteroidsToDurantiumProportional</Action>
          <ValueParam>0.25</ValueParam>
        </PerformAction>
        <PerformAction>
          <Action>ConvertDeadPlanetToThuliumProportional</Action>
          <ValueParam>1</ValueParam>

I understand I need to change ValueParam - but which is acutally giving less resources, a higher value like 1 or the lower ones like 0.XX?

 

There are similar sets of XMLs for anomalies, relics so I'd like to understand how these work to change them :)

 

 

 

 

 

 

 

 

 

10,918 views 2 replies
Reply #1 Top

Turns = Number of turns to wait before said event will have a chance of been triggered. (Local - meaning said player)

Weight = Chance to Spawn (0 - 100)

It is divided between all relevent events in this case, so if all events (which i think they are) are set to weight 25, then they will all have an equal chance of been triggered. Lowering it will reduce the chance an event will trigger. 0 will disable said event. 100 Will make this even always fire.

ValueParam 0.25 = Convert 25% of Asteroids into x Resources.

ValueParam 1 = Convert all dead Planets into x Resource. (OP as FK)

This event should only Fire once all game.

The above is the same for Anomalies. (They all use the same event system)

 

Edit:

As a note, WarTurns acts differently, Will fire the event every x number of turns. (Local)

PeaceTurns also acts differently, it is galactic wide.

Check out my UCP_Events modules form my mod pack and you will see many examples.

Reply #2 Top

Thanks a bunch, very helpful :)