Flintlock
Emperor
- Joined
- Sep 25, 2004
- Messages
- 1,178
Here are just the changes from R21 Preview 2 to the final version:
There are still some more issues I intend to look into (how perfume affects wonders granting free improvs, if it's possible to apply perfume to the AI's "panicked" production choices, applying stack limits to unloading one by one, ...) but I don't want to delay R21. Also that nasty bug related to zone of control ought to be stomped out sooner rather than later.
R22 will include an option to expand the workable radius of cities. I've already starting working on that. Ideally, I'll be able to make it so that the radius can vary based on improvements, technologies, governments, (Lua scripts...), but I'm not sure that's practical. It might just be a single config setting that applies to all cities.
There's also the issue that some parts of the city economy are cached. I know that tile yields and maintenance are and maybe some other things are too. So if you have a wonder that places a building with a maintenance cost in enemy cities, the game might go ahead and recompute happiness when war is declared, but I doubt it would recompute maintenance. In fact, there's already a bug in the base game where city maintenance isn't kept properly up to date.
By "weird rules" I was thinking of a request I got a while back to make it possible for units to grant a building to cities by standing on the city's tile. Specifically, the requester wanted an army or general type unit to give a special defensive building to any city the unit's in. The simplest way to make that happen would be to modify the has_improvement function to check units on the city's tile but that would be very inefficient. In order to do it efficiently you'd have to know whenever a unit of that special type entered or left a tile with a city on it, which honestly shouldn't be too difficult.
- Allow stack limit to be set separately for land, sea, and air units
- Prevent rebasing from violating the stack limit
- Group foreign units on the right-click menu based only on their surface characteristics
- Hopefully this fixes the issue reported here . I haven't checked whether it does but this change is worth doing anyway. Previously, if you were to put a stack of 10 AI riflemen on a tile in the scenario editor then load up the game and right click on that tile, you'd see two groups of rifleman units listed. That's because those riflemen were randomly assigned the offense or defense AI strategy, which made them different as far as the right-click menu grouping was concerned. Not anymore, the grouping logic now ignores properties of foreign units that wouldn't matter to other players, like movement, current job, AI strategy, etc.
- Fix double despawn of barb unit entering city after hit by lethal ZoC
- If lethal ZoC was turned on, barb units could get despawned twice if they got hit by ZoC while they were moving into a city. That's because they were getting despawned after looting the city and then despawned again by the lethal ZoC mod logic, which incorrectly detected that they'd been killed by ZoC. This could cause odd game data corruption that only showed up when loading a save.
- Fix incorrect ETAs shown for one tile paths when railroad movement is limited
- Fixes the issue reported here
- Turn exclude_cities_from_units_per_tile_limit off by default
There are still some more issues I intend to look into (how perfume affects wonders granting free improvs, if it's possible to apply perfume to the AI's "panicked" production choices, applying stack limits to unloading one by one, ...) but I don't want to delay R21. Also that nasty bug related to zone of control ought to be stomped out sooner rather than later.
R22 will include an option to expand the workable radius of cities. I've already starting working on that. Ideally, I'll be able to make it so that the radius can vary based on improvements, technologies, governments, (Lua scripts...), but I'm not sure that's practical. It might just be a single config setting that applies to all cities.
I just looked over the logic for adding interest and it's unfortunately not easy to modify. Presumably there was originally a single function that determined a player's net income but it's been inlined in several places, which means I can't make just one modification to remove the cap. I'd have to hunt down and modify all the locations where interest applies. I've already found where that is for actually granting the gold but I don't know where it is for the interface. Another issue is that the maximum amount of 50 is stored inside an instruction in a single byte. That means it's not possible to overwrite it where it is with a value greater than 255. It's still possible to increase the cap on interest and modify the rate too, just annoyingly difficult.A special case is the Treasury earns 5% given to "Wall Street", but is limited to a maximum earning of 50 gold.
Sure, I'll add this to the latest list. I have so many lists now. I stopped updating the list on the GitHub and instead put suggestions in a mod to-do list I keep on my desktop. Every time the list gets too large, I push it down and start a new one. I've done that several times already.If you're still actively keeping your list with suggestions, I hope you'll add it.
I'm not sure what gets recomputed when wars break out. I remember having trouble with resource generation from buildings not being updated when trade agreements got broken by wars or other means. There were issues like you can't know a trade agreement is broken until you update all resource access because losing access to one resource can break an export agreement that loses a player access to a different resource that was traded as part of the same agreement. In the end, I wasn't able to find a good place to trigger an update around the time when access to some resource was lost, instead I made it so the mod remembers that resource generation info might be obsolete and only updates it when the human player looks, for example by zooming to a city.Isn't this something that's actually already partially happening? When war breaks out, it is common to lose active trades such as resources of luxury for money, which will inherently affect happiness in cities. In fact, the very act of war at the beginning will affect the happiness in cities and you don't even need to have an active trade to lose. I mean, I'm assuming that the game is already doing some checks the moment the diplomatic status between civilizations changes. Likewise, checks are made due to the change of ownership, becoming obsolete, or destruction of the city in which the wonder is located or to which the free improvement is given. So recalculations of the city economy also happen during such situations. I'm not quite sure what kind of WEIRD RULES you're referring to?
There's also the issue that some parts of the city economy are cached. I know that tile yields and maintenance are and maybe some other things are too. So if you have a wonder that places a building with a maintenance cost in enemy cities, the game might go ahead and recompute happiness when war is declared, but I doubt it would recompute maintenance. In fact, there's already a bug in the base game where city maintenance isn't kept properly up to date.
By "weird rules" I was thinking of a request I got a while back to make it possible for units to grant a building to cities by standing on the city's tile. Specifically, the requester wanted an army or general type unit to give a special defensive building to any city the unit's in. The simplest way to make that happen would be to modify the has_improvement function to check units on the city's tile but that would be very inefficient. In order to do it efficiently you'd have to know whenever a unit of that special type entered or left a tile with a city on it, which honestly shouldn't be too difficult.