Logo Platform
logo amplifiers simplified

Adding new "Colonial Bases"

Copied to clipboard!
11 years ago
Jul 30, 2013, 2:51:33 AM
So I'm looking to differentiate colonial bases by faction, to get my toes wet so to speak.



Would anyone know how I can modify the Colonial Base to determine stats based on Affinity of the colonizer?
0Send private message
11 years ago
Jul 30, 2013, 2:37:42 PM
Far as I know bases cannot be modified in that way. There is on standard base across everything
0Send private message
11 years ago
Jul 30, 2013, 3:36:28 PM
a base is just a star system improvement applied in the first turn by the colony ship. So, theoretically I should be able to add an argument that applies a certain improvement based on affinity (similar to how a tech tree checks for affinity to populate the choices).



The qiuestion is how that would be done. Should be possible, I'm just not familiar enough with XML to do it.
0Send private message
11 years ago
Jul 31, 2013, 12:21:15 AM
What iblise is trying to say is we don't know of a way to actually mod colonial bases right now. If look in "StarSystemImprovementDescriptor.xml" search "StarSystemImprovementColonyBase" you'll find the descriptor that is associated with the built-in colonial base. But note the section regarding the base adding 5 food 5 ind is commented out. What this means is that a lot of effect of colonial bases are hardcoded. Possibly including the code that places the colonial base when you use a colony ship. (I've looked for it before, yet to find it)



ES modding is relatively easy, but it isn't all capable.
0Send private message
11 years ago
Jul 31, 2013, 12:30:13 AM
By modding the improvement you should be able to put in affinity specific modifiers, check the taxes in the empire descriptor on how to do this and you should have a per affinity colony base, just like how the races have their own taxes.
0Send private message
11 years ago
Jul 31, 2013, 12:45:16 AM
oops, I thought he wanted to put in a different colonial base for each faction. Not just make the base do different things for different faction.
0Send private message
11 years ago
Jul 31, 2013, 2:30:47 AM
Yah I guess I wasn't clear, though the two are technically equivalent from an end user standpoint.



So check the taxes descriptor to see how to make it be faction specific effects? I'll look into that.
0Send private message
11 years ago
Jul 31, 2013, 2:52:15 AM
Ok, so I tried a couples of things, here's what I found out.



1) I located the code that gives the colonial base the +5 food, +5 ind/colonized planet effect. It is in "StarSystemDescriptor.xml" search "colonial", apparently it is implemented as a property of ClassStarSystem. In other words, the effect is a permanent part of all star systems and does not depend on whether the colonial base exist. The only way to mod it away is to create a custom ClassStarSystem descriptor with everything else in tact, changing only the part related to the food,ind/planet effect.



2) I tried implementing the "AfinityX" pathing based on taxes using all the possible combination of paths I could think of. And none of them work. You can try different combinations yourself and see if one of them does work, good luck. There is a possibility that you cannot perform an Affinity check from a StarSystem improvement. Which may be the reason why the devs introduced the "StarSystemOwnerAffinityX" tags in the Disharmony expansion. This brings me to the third finding.



3) I was able to use "StarSystemOwnerAffinityX" to get the effect to work. You can see an example of how this pathing works by going into "StarSystemImprovementDescriptor.xml" and search "StarSystemImprovementFood1Harmony". The path for that is "../StarSystemOwnerAffinityHarmony/ClassPlanet" which allows you to specify affinity from within a star system.



Note, however, that currently only Harmony and Sower have an associated "StarSystemOwnerAffinityX" entry. To implement your effect with any other faction, you must add a new "StarSystemOwnerAffinityX" per faction. This is done by modding "StarSystemDescriptor.xml", search "StarSystemOwnerAffinitySower" (or Harmony), duplicate that entry and take out all the simulation property modifiers. You'll end up with a mostly empty SimulationObjectDescriptor with name of "StarSystemOwnerAffinityX" where X is the faction name and type of "StarSystemOwner". Looks kind of like this:



[CODE]



[/CODE]



Note the value of X is very strict and has to be the same name as what the game code uses for the given faction. For example, Sheredyn is called Empire within the game code. You can find the game code names for all the faction inside "Faction.xml".



Well, I guess in summary its pretty complicated.
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message