Mod to keep ‘outdated’ planetary improvements available?

Hi,

I’ve been asking around the other sections of the forum whether it might be possible to implement a little feature that would allow the older planetary improvements to remain available for construction once newer ones have been researched. Often I find myself strapped for cash, not being able to afford a xeno factory, xeno farm, multimedia complex etc, or not wanting to wait so many weeks for these to be built. Sometime there just isn't much sense in building the latest thing when an older structure would do just fine. Ideally, I'd like to have it so right clicking on the newer structure in the list of available buildings makes the older ones pop up, or perhaps there could be some sort of ‘show older planetay improvements’ tab. No word yet as to whether anything of the kind will make it into an official update, but people generally seemed to like the idea, and it was suggested by someone that this might be acheivable with a mod.

So, would this be possible to mod? I’ve never done any serious modding and wouldn’t know where to begin with this.

~Fingers~
11,732 views 20 replies
Reply #1 Top
In looking over the planetary improvements XML file my initial thought would be that yes it is possible to mod that file and have all buildings be available to build throughout the entire game. There is a tag in that file that tells the game the building is meant to upgrade an older type. My guess is that if you removed that tag from all the buildings the game would react by letting you keep all the buildings in the build list. To upgrade you'd probably then have to demolish the old one first. But since there isn't a penalty for that (except farms that your population instantly reduces) I don't see that it would harm anything. Also I don't think the governor AI for auto upgrades would work.

I would give it a try for ya but I play metaverse games exclusively. No modding allowed
Reply #2 Top
I don't think you'd have to demolish first. AFAIK you can upgrade any building to any other building.
Reply #3 Top
Ok so even one less step assuming the change to the XML file does work.
Reply #4 Top
Hey thanks. It took me a while to notice I was editing the wrong PlanetImprovements.xml (was doing the one in the metaveres folder!) but now I think I’ve got it. At any rate, commenting out that "S_UpgradeTarget.." line under the xeno lab improvement resulted in the basic lab not vanishing from the list once the xeno lab showed up there, in the game I just started. If it can be done for all of the buildings, perhaps it will get a bit cluttered, but it's an acceptable solution for the time being.

~Fingers~
Reply #5 Top
I'm not a dev here, but this might mess up the AI a little bit.

It depends whether the AI re-evaluates squares with buildings on it for better buildings, or just upgrades buildings once it has chosen a role for the square.

-Neb
Reply #6 Top
Hmm. That wouldn’t be good. I _really_ want to be able to build those older structures, but not if the ai gets all messed up. I wish a dev would comment.

~Fingers~
Reply #7 Top
Taking Fingers_9's idea one step further, what would be nice is a redesign of how the planetary building worked. Would need to be reworked at the official-level, or require some REAL overhaul mod, but here's my idea...

Once a tile has a class of building (factory, farm, etc), clicking the tile should bring up only the "Demolish" option, and the researched selection of upgrades and downgrades for that class of building. (IE: When I click on my Academy, it should show Demolish, Xeno Lab, Research Center, and an upgrade to Invention Matrix etc.) Upgrades would work as normal, but downgrades would be either free, or a small charge for reconstruction. To work this in, all blank tiles would need to be started as the basic type, THEN upgraded to whatever you have. Achievements, Trade Goods, and specialty items like starports would build as normal.

Now this idea would also work VERY well if the game could have one other tweak... Auto-Upgrade's on-off function should be universal, not local. Changing it for every planet while playing a huge universe is VERY tiring.

My $0.02 on this...
Reply #8 Top
Well I don't know if removing upgrades_target will mess up the AI, but it will mess up the auto-upgrade govenor.
My choice would be to have an 'old' version of each improvement unlocked with the same tech that gives you an upgraded version of the improvement.
ie
Xeno factory contstruction unlocks Enhanced factories, which upgrades existing factories like normal (if you opt for that).
It also unlocks a 'factory -old' that is a direct replacement for factories and which upgrades to nothing. That way smaller developing worlds can continue to build the lower cost, more basic, improvements while larger worlds will get their improvements upgraded like normal.
On larger maps, no auto-upgrades would be excessively tedious if no building upgraded to the more powerful incarnations of itself. But old, lower cost, buildings (used sparingly on smaller worlds) makes a lot of sense.
Reply #9 Top
Yep but anything other then what Fingers did (which I'm glad worked out for ya) would require the devs to alter the code. Since his original request was for a mod I think the solution is fine. Personally I've never had the need to build the old buildings but I certainly understand the reasons why you might want the option if nothing else.
Reply #10 Top
Thanks for the replies. Forgive my ignorance if I haven’t understood everything.

Along the lines of what Freidog was saying (I think), I’ve added another improvement to the xml called basic lab-old. It has a tech requirement of xeno research and an upgrade target of nothing. Now, during the game, when the xeno lab becomes available, so does basic lab-old; and any basic labs that were already built start upgrading to xeno labs automatically. Basic labs-old have to be upgraded manually, which isn’t too terrible, though if I were to use this approach with all of the buildings, I suppose bigger maps could become rather tedious.

And I’d sure feel better having an official word that I’m not screwing up the ai with these kinds of changes.

~Fingers~
Reply #11 Top
The way the AI works, it will try to optimize, so you probably don't have to worry about adding new older buildings into the game. If it is useful, they will build it. However, if you're worried, set the AIValue tag for those buildings to zero, and it should be a lot less likely to build them.

About the only AI problem *I* can think of is that by doing this, you are giving yourself an easier time if the AI isn't able to adapt to this particular strategy of planetary rebuilding. What I mean by that is, I can forsee you going around tidal waving all their planets since it's so much easier for you to rebuild, while the AI won't do this because they still think it's worthwhile to keep the planet intact. This would create an inherent weakness that you can exploit in ground combat. But if you don't take advantage of it, then it should be fine.

Personally, I opted for the "Cost vs Functionality" mod. That is, adjust the cost of the buildings to the amount that the produce. A basic factory that makes 8 PP (production point) might cost 80, while an industrial sector that makes 22 PP would cost 220. Although this method suffer from the possible ground invasion cheese that I mentioned above, it doesn't have the side effect of adding a bunch of buildings on to the list, which makes scrolling very annoying. They really need to add filterable tags to that window.
Reply #12 Top
Found this in my game. I hope they don't fix it, really. (beta 4)

With tech trading, I was able to skip Xeno-Research and build research academies. Because of the skip, I was able to build both. My choice of basic lab or r.a. The game did not update the basic lab while it was building, nor afterwards. I had to manually "upgrade" it.

Might work with other xeno techs. I have not had the oppty to test it yet.

Yes, it's a metaverse game (and a work in progress. lol).

The other discovery was it costs more per ship to "upgrade all" than it does if you do it one by one. Not an all "milk and honey" post.
Reply #13 Top
Thanks. I guess what I’ll do is play a few games with the changes I’ve made so far, observe what the AI does with them, and if I get weird results or if it seems too exploitive, perhaps try tinkering with ai values or using your approach of ‘cost v. functionality’.

Perhaps in the end I’ll just have to live with the way it works normally!

As for the problem of the list getting to cluttered, I’ve been able to semi-solve it by putting a “~” at the beginning of each new (old) building’s name. Now instead of them being scattered in with the most recent improvements, they all appear together at the bottom of the list. It’s only necessary to scroll way down there when they are needed.

~Fingers~
Reply #14 Top
I wrote an overhauled "planetaryimprovements.xml" file that addresses the above concerns.

Where should I post it so others can take a look at it?
Reply #15 Top
fsk+:
Goto the mod section of the website. You'll see a button that says Add. This will allow you to upload the file and put it into the appropriate category.
Reply #16 Top
Anxious to see what you've done there, fsk+

Link

... In case it isn't clear which link leads to the mod section. (didn't figure it out myself til just now)

~Fingers~
Reply #17 Top
OK, I uploaded two versions, v1.0 and v1.1 of my rebalanced planetary improvements.

I'm still in the "playtesting" stage of my mod.

I found that the trade goods don't work! I can't add new trade goods! (But they're in my file.) I wanted to make it so that each trade good provided 40 mp (equal to an Industrial Sector) on the planet that built it.

I'm putting my "PlanetaryImprovements.xml" in my "mods" folder. I'm *NOT* overwriting the file that comes with the game. Unfortunately, this is buggy in V1.1.

The AI seems to be a fool when it comes to using the new buildings. For some reason, it's still building the original versions even though mine are strictly better. Also, this change appears to screw up its ability to manage its economy.

You're right that I needed to bump up the economic bonuses of market buildings, to infuse more cash into the game to balance out greater spending. I may bump them up even more compared with what I submitted. I'm also thinking of increasing morale bonuses for morale buildings.

I also realized that I'm probably going to have to re-balance the tech tree as well. With more RP available in the game, I really should also be adjusting the costs of all the techs. Besides, it seems wrong to me that "technological victory" costs less than researching to the highest level of "lasers".

It's just a shame that the mod support doesn't work properly (yet). I assume this will be fixed in 1.2, because that was mentioned somewhere else.

I decided to upload two versions of the file - the version I used in my latest game and the newer one, with more tuning and tweaking.
Reply #18 Top
I uploaded them, but they haven't been "approved" yet. It looks like the approval process is a week behind.

I made another version (not submitted yet). I added some new social projects.

Did you notice that "starport" was made "indestructible" in v1.1 b17! WTF!?!?!
Reply #19 Top
I’ll be interested to see it. Btw, what is the deal with the ai when it comes to upgrading its standard improvements once better ones that are meant to replace them have been unlocked? Do those upgrades occur automatically, or does it have to ‘choose’ whether to do each one?

Also, is there special syntax to specify two upgrade targets per improvement? Or is that not possible?

I hadn't noticed the indestructable starports.

~Fingers~
Reply #20 Top
Hi,

I would definitely like to have the ability to build obsolete improvements (sometimes, just from the maintainance point of view, they end up being cheaper than upgraded models). Having said that, this means that the Dread Lords will also be able to start building up their planets from smaller improvements, dramatically reducing the time needed for turning them into manufacturing powerhouses . Maybe this is the reason why they left building obsolete improvements out of the game.

Later,

Doc Fate