[Mod] Mylon Mod - New Culture Model, Terraforming, and more!

For now, I'll hold back on the multiplicative bonuses. The main reason I was investigating them is because of the idea of replacing/adding the build wealth/research/culture options with ways of investing hammers into a bonus. If the bonus was multiplicative, it would be relatively easy to scale the invested hammers to the output without it seeming like a waste. This bonus would be a soft cap to the building development. If you max out on +research buildings but still want to build up research infrastructure, you could invest them into this option, for example.

I think, keeping it a flat bonus, and scaling it to (hammers)^0.7 for commerce types, and maybe (hammers)^0.3 for industry or something like that might work fine.
 
Great Generals should be immortal.

I've always thought of the great people joining my city, as their legacy. In other words, Davinci's work continues to inspire even to this day.

One reason I never assign a general to a unit, is that unit is definitely not immortal, but in the context of the game allowing great people to live in your city forever. I guess that makes sense.

I think though there should be some disadvantage to a great person dying with the unit they are assigned too. maybe a delay before he respawns.

I could definitely see a Great General Building that places a special promotion on the units built in that city only and a couple variations of that building.

Good idea!
 
Okay, I've almost got my culture model working using the SDK. Unfortunately, something is weird with the calculations.

I put 3 civ's cities all one tile away from each other. According to how the formula should work, one player gets the proper amount of culture, another player gets about 10% less than they should, and another player gets even less.

The formula is (0.7 * City Nationality% + 0.3) * Culture. The constants are definable in the XML, and it ensures that the minimum a city can produce at 0% nationality is 30%. The formula is slightly more complex, but only for a philosophical civ or for a civ investing some commerce percent into culture.

I'm guessing somewhere the player's ID is getting factored in, but I don't know where.

So far I've haven't actually added anything from my old mod, but I've built up from scratch using the same concepts. When it comes to doing things in the DLL that were formally hacked together in Python it's probably best this way.
 
Wow, that took forever to figure out. It turns out the difference in expected cultural output and actual cultural output was the result of the turn-based assignment of culture! That is, since I went first, my city reported the correct amount of culture. The next city had less nationality when it generated its culture than it did when I observed it, and thus generated less culture. And in turn the third city had even less nationality, and generated even less culture. Because this was done using cities only 1-2 turns old, the difference in output was significant (up to 20% for cities with the same output).

This should not be a significant issue for older cities, but if it is an issue I can see if there's a function to get the list of cities influencing a plot and, rather than doing the plot for each city, do the plot on the plot itself once every full circle.

So back to adding features of the old mod worth keeping. :)
 
I'm messing around with the tooltips. Right now I'm trying to figure out how to best present the information to the player.

Culture works generally like this:

Immutable Culture sources (creative trait, production, cultural slider) * Modifiers (buildings, civics, etc)
Mutable Culture Sources (buildings, population, other sources) * Modifiers * Nationality factor
 
Okay, I think I worked out all of the bugs with the cultural model so far. Next is to add in the influence from trade and make the criteria for flipping cities a bit more lax.

In the mean time, I've tweaked the processes (wealth, commerce, research) such that they only provide half the benefit of before, but now provide permanent boosts in addition to their old effect. Also, I've added Production and Espionage as potential processes. The formula for this effect is ((hammers/2) ^ 0.7)% for commerce types and (hammers^0.55)% production for production. So if you have nothing left to build, you can still invest your hammers here and get a lasting effect.

I still haven't figured out how to rework Espionage. I'm tempted to strip the flat +espionage bonuses from all buildings to force the player to invest here instead. I may do something similar with culture, wonders excepted.
 
I updated the todo list up top a bit. I'm currently trying to look for the function where the general gets attached so the general's experience can be carried over after dying.

Next I'll probably add that coffee corporation, now that I have the graphics for it. :)

I'm still deciding on how spies and fronts and embassies should generate espionage. They should be granted modifiers, but as they're being built in foreign cities, the owner cannot build +espionage buildings. I'm leaning towards making them comparative-size based. That is, if player A is twice as big as player B, player B's fronts generate +100% espionage.

Also, I'm thinking of adding new building: Skunkworks. All units built in this city get a free promotion that makes the cost of upgrading them 50% cheaper. Either a normal military building or more likely a national wonder.

edit: I decided to take a different approach to saving great generals. When a Great General led unit dies, it gets cloned into the owner's capital at 10% life with a special check made so if the unit dies again in the same turn, it dies for good. For the moment, this reset only occurs if the general is in the player's capital at the start of a turn. Unless I find another method (short of querying each plot on the whole map and subsequently each unit in that plot) of resetting this, if a unit gets out of the capital by whatever means before this check occurs (like, say, if he loads up the unit onto a transport after respawning), the unit becomes mortal.

I'm also thinking about changing how great people production works. One idea is to increase the number of GPP required upon a great person being born and do this for all players. However, the GPP required goes down by 1% (or smaller), each turn. In this way one person's GPP factory can literally hog great people from everyone to a small extent. At the same time, the number of GPP required would be a self-balancing force rather than an ever escalating number.

Editagain: I found a way to clear this buffer every turn, so there should be no worries.
 
I'm nearing a release (finally!) but I'm having a bit of trouble with carrying some values over from save to save. I coulda swore my old experiment let me declare variables in Python to use from turn to turn and they would get saved/loaded as appropriate, but now when I load a saved game I get a key error, as if either the city's getID() is returning a different value or the variable isn't stored there. This will have ramifications for Warlord unit immortality as well.

Also, I'm having some difficulties figuring out how culture from trade actually works. I had a city trading with the Koreans at 3 commerce per turn (times three cities) and my city was getting consumed with Korean culture while his cities were still only ~6% Spanish. The influx of foreign culture seems to be far greater than anticipated (my city, unless severely outcultured, which I doubt as it was still early game) should have been hovered at ~ 20% Korean Trade currently works at (current trade / 50)% of trade city's culture, so all cities equal, that would only be 18% influx from trade. I'm guessing that's just over the general threshold at which point the foreign city starts to take over, while the trade from my cities in return was not at this threshold.

edit again: I found out the trade problem. I used max() when I should have used min()!
 
I downloaded version 0.34 but I get all sort of XML read error.:cry:
When I tried to download 0.33, the link is dead.:mad:

When can I expect working 0.34, or 0.33?
 
Back
Top Bottom