Assigning \ removing specialists in city window

masaykh

Prince
Joined
Jan 16, 2012
Messages
446
Why is it taking so long?

25-40 secs for adding or removing specialist looking like TOO long.
it is take same time in prehistoric era and in middle ages

profiling show that most time take - CvPlayer::getGold
maybe something can be done to speed up this process?

and CvGameTextMgr::getBuildingDataForWB take 20-30 secs to execute
 
Last edited:
I know it takes a long time and always has. I'm not sure why. If you can find the answer to that question, awesome!

BTW, you've been trying to compile a faster DLL and such. You've had to address a few issues in the code to do that. If you're wanting team access to help us with optimizing, by all means the help is welcome.
 
I don't know if everyone's already aware of this, but the "forced specialists" feature doesn't work. In vanilla BtS you could designate a number of specialists that had to be assigned all the time, and the city governor would choose all the rest. It's not working. Maybe this is old news.

On top of that, the city governor is showing odd behavior when using the emphasize buttons (Underneath the draft and whip buttons). "Avoid growth" cities continued to work 7:food: farm tiles, running a surplus but assigning no additional specialists. I had one situation with my capitol, still in the prehistoric era, where the city was working production tiles, switched to food tiles when I emphasized food, but when I removed all emphases it continued to work food. When I did the reverse, and set a production emphasis, the city switched back to production and stayed there when I removed the emphasis. (Maybe both options were equally valuable? :confused:)
 
@cammcken: avoid growth means that a full food bar will not turn into a new population unit. Also food is used for producing some units (depends on current active civics).
 
You are learning that C2C has moved way past vanilla BtS. :)
 
I don't know if everyone's already aware of this, but the "forced specialists" feature doesn't work. In vanilla BtS you could designate a number of specialists that had to be assigned all the time, and the city governor would choose all the rest. It's not working. Maybe this is old news.

I did not even know there was such a thing, so when changing the specialist box I may have missed that bit of code. Not all the code is in the same place. This feature actually seems to be something we have wanted for awhile.

Can you describe how you do the setting of "forced specialists" in vanilla so I can see if I can resurect that behaviour when I next work on that bit (it is common between the mod I am currently working on and C2C).

On top of that, the city governor is showing odd behavior when using the emphasize buttons (Underneath the draft and whip buttons). "Avoid growth" cities continued to work 7:food: farm tiles, running a surplus but assigning no additional specialists. I had one situation with my capitol, still in the prehistoric era, where the city was working production tiles, switched to food tiles when I emphasized food, but when I removed all emphases it continued to work food. When I did the reverse, and set a production emphasis, the city switched back to production and stayed there when I removed the emphasis. (Maybe both options were equally valuable? :confused:)

I have not done anything on that part of the screen at all so it may be in the dll. I will need to check.

I also remind everyone there are two "Avoid Growth" buttons the one talked about here in the "governor box" that comes with Civ that actually stops growth completely no matter how much food you have and the one that comes from RoM/AND up in the City name bar which doesn't stop growth just moves the city worked tiles/specialists around to minimise the amount of food produced.
 
In Vanilla, forcing specialists is as simple as clicking the plus button next to the icon while the city is still set to automate. Clicking plus and minus will change the number of forced specialists. So if you want two citizens to always be working as priests, you click 'plus' twice next to the priest icon. Clicking minus once reduces it to 1 forced priest, again will put all citizens back to automate, but clicking minus when there are none forced turns off automation, just like clicking a workable plot would.

I can't remember how they're displayed... either a yellow box appears around those specialists that are forced, or you could roll over the icon, and the number is described in parenthetical text: "3 (2 forced)" would mean there are three citizens working as priests, two of which were assigned by you, one of which was assigned by the governor. Since C2C has changed the display, the yellow boxes won't work.

As implied, the governor can still assign other specialists, or assign more than the number you've forced (unlike in Civ5's lousy system).

(When playing with a specialist economy, forcing a single specialist often guided the governor in specializing the city. If a completely automated city was equally split between scientists and merchants, or had only merchants because the governor decided that's what your empire needs, you could force one scientist and often the governor would follow suit by assigning all extra citizens to scientists.)

Anything I missed? Sorry I don't know anything at all about the code behind it.

Minor edit.
 
Last edited:
In Vanilla, forcing specialists is as simple as clicking the plus button next to the icon while the city is still set to automate. Clicking plus and minus will change the number of forced specialists. So if you want two citizens to always be working as priests, you click 'plus' twice next to the priest icon. Clicking minus once reduces it to 1 forced priest, again will give put all citizens back to automate, but clicking minus when there are none forced turns off automation, just like clicking a workable plot would.

I can't remember how they're displayed... either a yellow box appears around those specialists that are forced, or you could roll over the icon, and the number is described in parenthetical text: "3 (2 forced)" would mean there are three citizens working as priests, two of which were assigned by you, one of which was assigned by the governor. Since C2C has changed the display, the yellow boxes won't work.

As implied, the governor can still assign other specialists, or assign more than the number you've forced (unlike in Civ5's lousy system).

(When playing with a specialist economy, forcing a single specialist often guided the governor in specializing the city. If a completely automated city was equally split between scientists and merchants, or had only merchants because the governor decided that's what your empire needs, you could force one scientist and often the governor would follow suit by assigning all extra citizens to scientists.)

Anything I missed? Sorry I don't know anything at all about the code behind it.
Very well described. It gives me enough to go on anyway. Although I wont get to it soon.

As I said we are C2C is using a modified version of Platyping's code and I suspect no one had seen or used what you describe mostly because not many people automate their governors.
 
I don't know if everyone's already aware of this, but the "forced specialists" feature doesn't work.

Update, and sorry for the necro, but I just found out forced specialists do work, but they can only be set when the city is automated and there is already at least one working specialist of that type. Eg., if there are 3 priests, I can click the 'plus' button one, two, or three times to force one, two, or three priests, but if there were no priests, pressing the 'plus' button would do nothing.

Edit: it appears I can force more specialists than are currently working, but the city doesn't re-distribute until the next turn.

As of SVN revision 9675.
 
Last edited:
Back
Top Bottom