Posts: 7,602
Threads: 75
Joined: Jan 2018
I would have to look up the code again, but yes you are right. This is about that topic.
Posts: 4,578
Threads: 31
Joined: Nov 2016
So what you're saying is, that completely bonkers culture bug on capture isn't a bug but a feature?
May 19th, 2023, 04:33
(This post was last modified: May 19th, 2023, 04:33 by Charriu.)
Posts: 7,602
Threads: 75
Joined: Jan 2018
I think it is a side-effect. I think the developers initially implemented this for the following scenario:
Consider a city without any other cities and culture around. If you conquer this city it goes into occupation for a few turns, let's say 5. During those 5 turns you should not gain control of any tiles via culture from that city. This is what the timer is for.
It may be that this timer somehow causes these additional culture shenanigans, but that is hard to find out. I think we agree though that during occuptation you should not get control of tiles via culture as the developers intended.
Posts: 4,578
Threads: 31
Joined: Nov 2016
Agreed that's how it should happen, but it's very common for "shadow pockets" of culture to remain where no cities can project culture.
I think another of the bugs here is that the timer might not be removed if the city is razed.
Posts: 5,029
Threads: 111
Joined: Nov 2007
(May 19th, 2023, 04:33)Charriu Wrote: It may be that this timer somehow causes these additional culture shenanigans, but that is hard to find out. I think we agree though that during occuptation you should not get control of tiles via culture as the developers intended.
So, I'm assuming "that is hard to find out" means something like, "there's no obvious way it's doing this, but it affects variables that then get called (or might get called) in anything from zero to a zillion other places in the code, and it would take ages to parse out which if anything is doing something wrong." If that's right, can you tell what this step actually does on its own? (Is it literally just decrementing one number associated with the tile?) Or where and how in (presumably) the city capture process the counter is set to something (rather than just decremented) for various tiles (and how the game decides which ones)?
Posts: 2,100
Threads: 12
Joined: Oct 2015
(May 25th, 2023, 19:44)RefSteel Wrote: (May 19th, 2023, 04:33)Charriu Wrote: It may be that this timer somehow causes these additional culture shenanigans, but that is hard to find out. I think we agree though that during occuptation you should not get control of tiles via culture as the developers intended.
So, I'm assuming "that is hard to find out" means something like, "there's no obvious way it's doing this, but it affects variables that then get called (or might get called) in anything from zero to a zillion other places in the code, and it would take ages to parse out which if anything is doing something wrong." If that's right, can you tell what this step actually does on its own? (Is it literally just decrementing one number associated with the tile?) Or where and how in (presumably) the city capture process the counter is set to something (rather than just decremented) for various tiles (and how the game decides which ones)?
Ref, this is a codebase for a high quality game where the devs still felt they had to leave a function in called "doHolyCity" for lack of a better name (or, more probably, time to come up with a more descriptive one). Respectful, cautious analysis (as done in this thread) is probably appropriate. Don't delve too deep or greedy.
It may have looked easy, but that is because it was done correctly - Brian Moore
Posts: 5,029
Threads: 111
Joined: Nov 2007
(May 26th, 2023, 16:03)shallow_thought Wrote: Respectful, cautious analysis (as done in this thread) is probably appropriate. Don't delve too deep or greedy.
I am definitely 100% in favor of (respectful, cautious analysis [as done in) this thread]! (True even if you remove the words in either the brackets or the parens or leave both in - though I admit it stops being a sentence if you take out both....) And excited as I am that there might be an opportunity of figuring out (some) of the actual rules behind something that has long confused me about the game, if it's too deep a rabbit hole to go down, I'll certainly understand. I would have supposed those went without saying though, so I infer my question must have read as something more than what it was: Just hopeful curiosity!
|