Help Me Write a Mod -- Fixing Broken Social Project Costs

I have become frustrated by the brokenness of some of the social projects, and decided that I'm going to do something about it. For example: "Industrial Sector costs 800! WTF? Why would anyone ever research the tech that allows them to build Industrial Sector?"

My goal: create a PlanetImprovements.xml file as a mod

What do I do? Is it enough for me to create a new PlanetImprovements.xml file and place it in my "My Games\GalCiv2\mods\data\planetimprovements" directory?

Can someone give me a pointer on how to do this, or where to look?

Also: can you give a social project +population growth as an ability? (I wanted to give "Advanced Farming" this ability.)

Here is a summary of what I want to change:

Tech, prod cost, maint, effect

Soil Enhancement, 50

Habitat Improvement, 75

Terraforming, 100

===

Basic Farming, 50, 1, 4 mt

Xeno Farming, 100, 2, 6 mt

Intensive Farming, 150, 3, 8 mt

Advanced Farming, 200, 4, 10 mt *AND* +10% pop growth

===

Basic Factory, 50, 1, 5 mp

Factory, 75, 2, 10 mp

Enhanced Factory, 100, 3, 15 mp

Manufacturing Center, 150, 4, 30 mp

Industrial Sector, 200, 5, 50 mp

===

Basic Lab, 40, 1, 5 rp

Xeno Lab, 70, 2, 10 rp

Research Center, 100, 3, 15 rp

Research Academy, 150, 4, 30 rp

Invention Matrix, 200, 5, 50 rp

Discovery Sphere, 300, 6, 100 rp

Neutrality Learning Center, 200, 5, 125 rp
12,267 views 21 replies
Reply #1 Top
I just had another idea:

I want to change each trade good and galactic achievement so that, in addition to the trade good benefit, it provides as much mp as an industrial sector on the world that build it. I always hated not being able to build achievements on my top planets, because the achievement permanetly uses up a tile!
Reply #2 Top
Its pretty much as easy as you say, Fsk+. You mod the PlanetImprovements.xml and that's pretty much about it.
Reply #3 Top
Nope, it didn't work.

I edited "PlanetImprovements.xml" and placed it in
C:\Documents and Settings\Administrator\My Documents\My Games\GalCiv2\Mods\Data\PlanetImprovements

HOWEVER, instead of REPLACING the standard buildings, it now has *2 COPIES* of each building. I classify this as a bug.

Try it yourself and see. I'm using v1.1 BETA4.
Reply #4 Top
You need to put it in the C:\GalCiv2\Data\English Folder.

The Mods directory doesnt work properly yet. or whatever path you galCiv 2 is installed in. Hope that helps.
Reply #5 Top
I would suggest waiting until the mods folder really does work before doing any serious modding. But if you insist then the only real way to do it is to actually modify the existing file like has been mentioned.

IMO, while you may be fixing the cost, you are really give them WAAAAY too much production and research points. If it was me, I would never ever build anything past manufacturing center or research acadamy unless you plan to also change stock exchange into giving 50% economic bonuses (because otherwise you'd never be able to afford to fund them - unless you build one factory and one research and the rest farm/morale/econ buildings).

As for this:
Also: can you give a social project +population growth as an ability? (I wanted to give "Advanced Farming" this ability.)


There is currently no documented way for you to raise population growth on an individual planet using a facility.
Reply #6 Top
HOWEVER, instead of REPLACING the standard buildings, it now has *2 COPIES* of each building. I classify this as a bug.


Definately a problem. To replace or not include some improvements in your mod you still have to edit the main game's xml?
Reply #7 Top
Definately a problem. To replace or not include some improvements in your mod you still have to edit the main game's xml?


Since there just isn't any documentation on how to use the mod folder (IE: what works and what doesn't, and how to go about doing something), it isn't worth the effort to say that it is a bug. That's why I said it's probably best to wait until the modding features are fully in the game and supported. Right now it's best to just modify the file directly.
Reply #8 Top
Well, I went ahead and wrote. Where do I submit it so other people can look at it and critique it?

What I did was I gave my "improved" buildings a different name. So you can build both the default version and my "improved" version. It matters for the trade goods, because there's now TWO diplomatic translators (my version, and the version that comes with the game).

I tested it with one game, and I agree with what someone wrote above: I need to increase the economic bonuses provided by market buildings as well. I might try more than one version.

I made another change I like: Trade goods and achivements now give industry points equal to what an industrial sector would provide. Now, you can build them on your top manufacturing planets without trashing your manufacturing base. I increased the cost to compensate.

However, this change totally screwed up the AI. It didn't know how to manage its economy with the changes, and the AIs wound up going to 0% spending after 50 turns. I'm playing at "Intelligent".
Reply #9 Top
hehe well too bad meta games cant use mods. I like your ideas though and will keep this under 'watch'

I don't research industrial sector for the over costly factories, its the mining modules for starbases that come with the factory techs.
Reply #10 Top
Hi again. Just did some testing. Rogue was wrong. This needs to go in your \mods\planet improvements folder

It will show up as 2 diff industrial sectors if you don't rename it. The problem is we can add stuff, but don't know how to take away (as in the old industrial sector ) I certainly wouldn't advocate screwing around with core game files. So I would echo what Kalin's been saying and wait.

However if you don't mind adding new improvements and/or new additional projects or whatever -- It clearly is working.
Reply #11 Top
Hey, they rejected my mod without explanation. That's annoying.

I really think that planetary improvements and techs are totally unbalanced as/is.
Reply #12 Top
I really think that planetary improvements and techs are totally unbalanced as/is.


Why? Because the numbers are smaller than you would like them to be? Because they game isn't progressing as fast as you would like?

Not only does your "mod" decrease the cost of buildings, but it increases how much they produce. What's the point of that?

Effectively, what this "mod" will do is dramatically speed up the game, as well as making high-class worlds useless.

A class 10 world under your system could easily see max total production of, say, 300. That's a whole lot; that's 100 at 33% production. That still leaves room for other buildings and such.

A class 20 world, by comparison, could see 600, or 200 at 33%. But such a world would be exceedingly expensive, so you wouldn't really be able to afford maximum capacity. Hence, there'd be little point for it.

And God, your research buildings are nothing more than a cheat. 100RP's for Discovery Spheres? You may as well just go through the tech tree and chop the first 0 off of every tech cost.

The only benifitial thing your mod does is give us a reason to use the spending % slider. Otherwise, it's little more than a cheat. Since you don't increase the cost of anything to compensate for the added production, you're effectively quadrupling the production of everything.

Now, if you did increase costs of things (like weapon parts or hulls, techs, etc), then you would have something. You'd have a game where economy is gold. The raw number of buildings are deemphesized, except with regard to economy. And you'd really be able to spend into debt after a time, in order to quickly ramp out production.

The problem with this is that it screws up the balance. How many economic buildings do you now need per factory? How much population per factory? And so forth.
Reply #13 Top
The numbers just don't make sense, quite frankly.

For example, charging 300 for a manufacturing center and 800 for an industrial sector, but an industrial sector only gives 4 more mp? Why would anyone ever build an industrial sector? [This was fixed somewhat in the latest patch, but I still think the high-end buildings are too expensive.]

A "better" building should always give more benefit/cost. Otherwise, the better building isn't really better, now is it?

It's not a "cheat" because the AI gets the same advantages. That the AI isn't programmed to properly exploit the changes is a defect in the AI, not something you should blame on me.

I'm actually trying to modify it in a way so that the AI is penalized less for its stupidity. I notice my change trashes the AI's ability to manage its economy. I'm going to compensate for that by increasing the amount of available money.

I don't particularly care about the metaverse. I care about playing an interesting and sensible game. If I have to bump the AI to a difficulty level above "Intelligent" to get a good game with my changes, that's what I'll do.

I do agree with one point: I need to change the tech tree as well. I'm working now on a rebalanced tech tree as well as social projects. I'm also going to do ship components while I'm at it. I'm going to fix the "zippy huge ships" problem while I'm at it. (Engines use a lower % of space on high-end ships, so high-end ships are always faster than cheaper ships.)
Reply #14 Top
A "better" building should always give more benefit/cost. Otherwise, the better building isn't really better, now is it?


This isn't like guns on a ship. The permanant cost of a building is that it takes up one tile. The temporary cost of a building is how much it costs to build. Once you've paid it, it's paid and you don't need to think about it ever again.

I notice my change trashes the AI's ability to manage its economy. I'm going to compensate for that by increasing the amount of available money.


Like I said. All you're doing is speeding up the game. You're letting 2-4 turns pass (economically) for every one time you press the button. That's it.
Reply #15 Top
I don't think you could judge my mod unless you actually tried a game with it. Have you?

Besides, I'm still working on improving it.
Reply #16 Top

For example, charging 300 for a manufacturing center and 800 for an industrial sector, but an industrial sector only gives 4 more mp? Why would anyone ever build an industrial sector? [This was fixed somewhat in the latest patch, but I still think the high-end buildings are too expensive.]

I'll have to disagree with much of the premise here.

In GalCiv 1.1:

Factory is 75 (produces 10 IP)

Enh Factory is 100

Manh Center is 200

Industrial Sector is 400 (products 18 industry)

 

The question isn't about how much they cost per ONE turn of production. The issue is how much they produce in terms of difference over the course of a typical game.

For 325bc, you can increase your production by 8 per turn. In 40 turns (less than a game year) you've made up the difference in production. In a game that typically lasts 500+ turns, that's nothing. 325bc to get thousands more production in a given game is quite cheap.

Moreover, what about in terms of game time to upgrade.  Going from a manufacturing center (200) to Industrial sector (400) means 200IUs.   The Manufacturing Center is doing 14IUs per turn.  One can assume that a typical planet has at least 3 of them. So you're not talking about very many turns to upgrade to an industrial sector which will give you 4 more IUs per turn PER building -- before you get into all the bonuses being applied.

Even as-is, I find that mid game I'm cranking out battleships at an astonishing rate.

Reply #17 Top
Problem #1: You invade or culture-flip an AI planet that has no factories on it. Now, you have only approximately 6 social production, a few more if you "focus social". With an Enhanced Factory, you can get that first factory down in 15 turns. With a Manufacturing Center, it's 30 turns. With an Industrial Sector, it's 60 turns, pretty much too long to be useful. You can't rush-buy, because Industrial Sector costs way too much.

To critique the arithmetic, using values from 1.1 release (I notice you changed it again).

Industrial Sector: Cost 400, benefit 20 mp
Manufacturing Center: Cost 200, benefit 16 mp

IS: Efficiency is 20/400 or 0.05.
MC: Efficiency is 16/200 or 0.08

So you're paying 200 to upgrade the MC to the IS, for a benefit of 4 mp. That's 200 points of wasted production, and it takes you 50 turns after that just to have broken even. (I.e., what you would have gotten in mp if you just rerouted that spending to military.) If I'm involved in a major war, I don't want all my planets to have their military production cut in half for 50-100 turns just because I stole the Industrial Sector tech from the AI.

I'm just saying: Better buildings should be more efficient. Yes, this means you'd have to adjust the costs elsewhere in the game. So?

====

So you can crank out battleships at an astonishing rate?

Did you ever think that's because the large hulls are too cheap?

Medium - cost 80 for 35 space
Large - cost 110 for 55 space
Huge - cost 160 for 80 space

I assert that 80/240/1000 might be a more appropriate distribution of costs.

But a bigger hull isn't just slightly better it's A LOT better because you can cram more stuff on it, and the larger base HP means it's less likely you'll lose your investment in a fight. With a fleet of tiny ships, you expect to lose a few of them each fight.

In order to make tiny ships worth building late-game, you'd have to really jack up the cost of the bigger hulls, AND make a new version of the tiny ship with a higher base speed (unlocked after you get several hull techs). (And maybe even give "tiny mk. 2" a little more space.)

====

So Frogboy, did you look at the mod I submitted? Users can't look at it (because if it's rejected it doesn't show up on the downloads).

I am planning to rebalance the numbers. Am I wasting my time discussing it here and posting it? I'll just use it for my own benefit, then.

I'm currently:
re-doing the tech tree. Each higher tech costs 1.5x or 2x the previous tech, not the semi-random distribution there now.
re-doing ship components. I'm dropping the concept that components use different space on different hull sizes. (sizemod=0 everywhere), but I'm making the mp-cost more appropriate. I'm also trying to better define the tradeoffs between lasers/missles/mass driver.

Lasers - essentially the same
Missles - bigger, but more effecient; not worth the higher levels of missles unless you get better hulls as well
Mass driver - much cheaper than lasers, but 1.5x the space for the same damage
Reply #18 Top
Problem #1: You invade or culture-flip an AI planet that has no factories on it. Now, you have only approximately 6 social production, a few more if you "focus social". With an Enhanced Factory, you can get that first factory down in 15 turns. With a Manufacturing Center, it's 30 turns. With an Industrial Sector, it's 60 turns, pretty much too long to be useful. You can't rush-buy, because Industrial Sector costs way too much.

To critique the arithmetic, using values from 1.1 release (I notice you changed it again).

Industrial Sector: Cost 400, benefit 20 mp
Manufacturing Center: Cost 200, benefit 16 mp

IS: Efficiency is 20/400 or 0.05.
MC: Efficiency is 16/200 or 0.08

So you're paying 200 to upgrade the MC to the IS, for a benefit of 4 mp. That's 200 points of wasted production, and it takes you 50 turns after that just to have broken even. (I.e., what you would have gotten in mp if you just rerouted that spending to military.) If I'm involved in a major war, I don't want all my planets to have their military production cut in half for 50-100 turns just because I stole the Industrial Sector tech from the AI.

I'm just saying: Better buildings should be more efficient. Yes, this means you'd have to adjust the costs elsewhere in the game. So?

====

So you can crank out battleships at an astonishing rate?

Did you ever think that's because the large hulls are too cheap?

Medium - cost 80 for 35 space
Large - cost 110 for 55 space
Huge - cost 160 for 80 space

I assert that 80/240/1000 might be a more appropriate distribution of costs.

But a bigger hull isn't just slightly better it's A LOT better because you can cram more stuff on it, and the larger base HP means it's less likely you'll lose your investment in a fight. With a fleet of tiny ships, you expect to lose a few of them each fight.

In order to make tiny ships worth building late-game, you'd have to really jack up the cost of the bigger hulls, AND make a new version of the tiny ship with a higher base speed (unlocked after you get several hull techs). (And maybe even give "tiny mk. 2" a little more space.)

====

So Frogboy, did you look at the mod I submitted? Users can't look at it (because if it's rejected it doesn't show up on the downloads).

I am planning to rebalance the numbers. Am I wasting my time discussing it here and posting it? I'll just use it for my own benefit, then.

I'm currently:
re-doing the tech tree. Each higher tech costs 1.5x or 2x the previous tech, not the semi-random distribution there now.
re-doing ship components. I'm dropping the concept that components use different space on different hull sizes. (sizemod=0 everywhere), but I'm making the mp-cost more appropriate. I'm also trying to better define the tradeoffs between lasers/missles/mass driver.

Lasers - essentially the same
Missles - bigger, but more effecient; not worth the higher levels of missles unless you get better hulls as well
Mass driver - much cheaper than lasers, but 1.5x the space for the same damage
Reply #19 Top
Also: Fix the bug in the forums where you can accidentally double-post if there's an IE error while posting.
Reply #20 Top
With an Industrial Sector, it's 60 turns, pretty much too long to be useful. You can't rush-buy, because Industrial Sector costs way too much.


Maybe you should spend more time on your economy. I can generally rush-buy those things easily by the time I've seriously decided to conquer someone.

And yes, you're right: late-game colony starting takes a while. So? That's kinda the point, actually. It keeps the rich (ie, those who are conquering) from getting richer faster than everyone else.

If the turnaround-time for conquered territory was on the order of 15 turns, conquest would be a self-reinforcing action. Every conquered territory would quickly become as effective as your other territories, thus giving you vast sums of production, research, and money. Conquest would therefore be the right choice in all situations, far better than any other action.

It takes time for conquered territory to upgrade because it should; it's good game design. Maybe 1.0X was a little much in terms of cost of things, but they toned that down rather significantly in 1.1. It still requires some time before conquered territory becomes useful, but significant investment of money can speed up the process.

If I'm involved in a major war, I don't want all my planets to have their military production cut in half for 50-100 turns just because I stole the Industrial Sector tech from the AI.


Then cancel the upgrades. You can do that. You can even turn off auto-upgrading in the options menu.

Also: Fix the bug in the forums where you can accidentally double-post if there's an IE error while posting.


Here's a bugfix: stop using crappy browsers and get FireFox.
Reply #21 Top
Mods aren't going to make everyone happy. I see this mod as what Civ 4 has in terms of choosing 'game speed' building stuff faster. I don't know the percentages of who plays what but there's a lot of mods 'slowing the game down' out there. Marathon or Epic games. There's an option to speed up tech or slower as a slider when setting up the game but this affects production, in addition to affecting research rate by what labs produce instead of their cost.

You can always get your mod hosted on other fansites, even if its not 'blessed' by Stardock. So don't let that stop you.
Why do modders mod ? The same reason game devs make games. To play a game they want to play.

Good luck on your project.