Multiple Upgrade Targets (Improvement Upgrades)

Hello, everyone! I was wondering if anyone knew if it was possible for an improvement to have multiple upgrade targets. This would mean that multiple improvements would upgrade into it. I ask because I want both the Market Center and the Black Market to upgrade into the Adv. Market Center.

 

I would also like to know if an improvement could have more then one improvement be it's upgrade target. This would, for example allow me to have the Entertainment Network upgrade into Temples in the Altarian and Drath tech tree, and into Multimedia Centers in other tech trees. I have a feeling this would cause bad things to happen in the game, but I felt it worth asking, anyway.

10,397 views 11 replies
Reply #1 Top

A better solution, IMHO, would be to make it so that the upgradability of improvements isn't hard-coded, but rather depends on the stats of the buildings. IMHO, a building has two relevant stats:

1)  The total amount of benefit it conveys.

2)  The ratio of its benefits to its maintenance cost.

If a new building is better than an existing one in at least one of these two stats, and not worse in the other one, then I want it to auto-upgrade.  Otherwise, I want to make the decision on a case-by-case basis.

Reply #2 Top

But it isn't hard coded. It's determined by the xml files. I'm just asking about the extent of the flexibility of the upgrade tag.

Reply #3 Top

Perhaps "Soft-coded" would be a better term.  My point was that I think it would be preferable to not have this defined in the XML at all, but to instead have the game figure it out on the fly.

Reply #4 Top

Yes, that would be better. But that's not the question that I need an answer to.

Reply #5 Top

I did some testing and it seemed not to work. Oh well.

Reply #6 Top

A suggestion, though I haven't tested it.

To solve a different issue, I have two instances of the Recruiting Center in my PlanetImprovements.xml.  The only change is the tech requirement - I wanted the Arceans to have access to it through War Rooms.  It works just fine, the only issue being that it shows up twice in improvements menu on the planet screen.  It doesn't break the one-per-planet requirement, though, and both disappear after either one is built.

So, you could try to cut-and-paste the AMC, then change the upgrade target to Black Market.  You would end up with two instances on the improvement menu, but one of them would automatically upgrade the Black Markets.  It should also remain as the upgrade target for Trade Centers.

Same thing with Temples, make another instance to upgrade the EC . . .wait, Temples don't have an upgrade target, do they?  Just add the EC as the target.  Should work . . .

Reply #7 Top

That... might actually work! Thanks for the suggestions!

Reply #8 Top

I've been having trouble getthing your suggestion to work. Did you leave even the internal name the same? It might be easier if you produce some sample code for me to look at.

Reply #9 Top

Actually, I don't recall.  I think I actually did change the internal name, because I first called it an Induction Center.  I'm not able to check right now, but try the same thing and change the internal name - maybe to AMC01 or something.  Is the upgrade target the internal name or the display name?  That's the key issue.

Reply #10 Top

The Internal Name is used for all coding purposes. The display names is there simply so that you don't see things like AMC01 in game. It would make sense that the internal name would be different. Having two improvement with the same name but with different states should cause only confusion and CTD.

Reply #11 Top

Interesting.  I just looked and the internal name is the same.  I just copied the recruiting center and pasted it at the bottom of the list, changing only the tech requirement.  Like so:

- <Improvement>
  <S_InternalName>Recruiting Center</S_InternalName>
  <S_Name>Recruiting Center</S_Name>
  <PlacementLimit>1</PlacementLimit>
  <AI>22</AI>
  <S_Type>Normal</S_Type>
  <Maintenance>1</Maintenance>
  <Cost>25</Cost>
  <S_BriefDescription>Increases population growth</S_BriefDescription>
  <S_Description>It is important to note that population on our planets is only the population of citizens. Citizenship can be earned through either military service or by becoming a tax payer. During good economic times, populations can increase dramatically. The Recruiting Center makes it easier for people to register for service which increases our official population.</S_Description>
  <S_IconName>MedicalTheory.png</S_IconName>
  <S_QueryGraphicName>MedicalTheory.png</S_QueryGraphicName>
  <CanHaveAgents>1</CanHaveAgents>
  <S_TechRequirement>Space Militarization</S_TechRequirement>
  <PopulationGrowthBonus>20</PopulationGrowthBonus>
  <EconomicBonus>10</EconomicBonus>
  </Improvement>
- <Improvement>
  <S_InternalName>Recruiting Center</S_InternalName>
  <S_Name>Recruiting Center</S_Name>
  <PlacementLimit>1</PlacementLimit>
  <AI>22</AI>
  <S_Type>Normal</S_Type>
  <Maintenance>1</Maintenance>
  <Cost>25</Cost>
  <S_BriefDescription>Increases population growth</S_BriefDescription>
  <S_Description>It is important to note that population on our planets is only the population of citizens. Citizenship can be earned through either military service or by becoming a tax payer. During good economic times, populations can increase dramatically. The Recruiting Center makes it easier for people to register for service which increases our official population.</S_Description>
  <S_IconName>MedicalTheory.png</S_IconName>
  <S_QueryGraphicName>MedicalTheory.png</S_QueryGraphicName>
  <CanHaveAgents>1</CanHaveAgents>
  <S_TechRequirement>WarRooms</S_TechRequirement>
  <PopulationGrowthBonus>20</PopulationGrowthBonus>
  <EconomicBonus>10</EconomicBonus>
  </Improvement>