Workers

For the actual Combat Workers yes, but in this case the normal workers are so weak that they could only really take a unit two or three eras behind them, the only reason they have combat strength is to ward off animals later on (and to get xp, but that comes later). It would be close enough in almost all cases for the Industrial worker (Str 8) to call for an escort against most any contemporary unit.

Combat Workers are another animal entirely, and would need more subtle routines, I agree. However, I'm trying to do something simple here, as I know very little C++ so far.

Then yes, you could remove the canDefend() checks and have them behave as if they couldn't defend anyway. However, doing so would make them flee from animals too so doesn't that defeat the purpose of giving them strength in the first place - automations would continually break due to nearby animals and workers would flee all the way back to cities before trying again. You'd need to make the code sensitive to the difference beween random animal danger and other danger (and just flee to borders maybe for animals that are too strong to defend against).
 
I'm thoroughly enjoying reading this exchange.

Curious about a few things.

In the call exposedToDanger(plot(), 80), what is the second parameter there? I could look it up of course... but I thought it might help to get the answer displayed here. Koshling, you were talking about evaluating the danger LEVEL... does that figure have something to do with that? Is it the combat odds of the greatest threat visible?

Also, you mentioned that retreat to city would be a bit extreme. Is there a better command one would use in that case that encapsulates 'escape to most defensible nearby terrain'?

Also, for LS's benefit:
if (!getGroup()->canDefend() && exposedToDanger(plot(), 80) && plot()->getOwnerINLINE() != getOwnerINLINE())

You'd need to remove what's in Red for this to function like you had in mind. And the plot()->getOwnerINLINE() != getOwnerINLINE()) is basically saying this only comes into effect if the plot they are on is not owned by their owner. Thus, it only counts outside of borders. Something to consider.



Without reading all those codes and following their program threads, I'm just asking a few questions to passively learn a little about it along the way.
 
I'm thoroughly enjoying reading this exchange.

Curious about a few things.

In the call exposedToDanger(plot(), 80), what is the second parameter there? I could look it up of course... but I thought it might help to get the answer displayed here. Koshling, you were talking about evaluating the danger LEVEL... does that figure have something to do with that? Is it the combat odds of the greatest threat visible?

Also, you mentioned that retreat to city would be a bit extreme. Is there a better command one would use in that case that encapsulates 'escape to most defensible nearby terrain'?

Also, for LS's benefit:
if (!getGroup()->canDefend() && exposedToDanger(plot(), 80) && plot()->getOwnerINLINE() != getOwnerINLINE())

You'd need to remove what's in Red for this to function like you had in mind. And the plot()->getOwnerINLINE() != getOwnerINLINE()) is basically saying this only comes into effect if the plot they are on is not owned by their owner. Thus, it only counts outside of borders. Something to consider.



Without reading all those codes and following their program threads, I'm just asking a few questions to passively learn a little about it along the way.

The second param, is indeed combat odds to visible enemy danger (acceptable survival odds). The routine is only fully meaningful really on units that CAN defend (on defenseless units it will return 0 or 100 depending on whether it sees any enemies at all).

Workers also make calls to AI_workerNeedsToAwaitDefender() before executing a potential move - that check s (for defenseless units ONLY currently, so it will likely need modification) for any danger (not just visible units, but thuings like recent battles, recent pillages etc. which build up a slowly decaying 'danger aura' in an area) near the plot the uni will end up in, and request (and wait for) an escort if there is any.

Most units that can defend use AI_safety() rather than AI_retreatToCity(). That routine seeks the best defensive terrain (taking account of visible enemy positions) that can be reached in one turn and heads there. It also knows about animals not being able to cross borders, so will simply duck back into the border for animal danger if that's an option
 
The second param, is indeed combat odds to visible enemy danger (acceptable survival odds). The routine is only fully meaningful really on units that CAN defend (on defenseless units it will return 0 or 100 depending on whether it sees any enemies at all).

Workers also make calls to AI_workerNeedsToAwaitDefender() before executing a potential move - that check s (for defenseless units ONLY currently, so it will likely need modification) for any danger (not just visible units, but thuings like recent battles, recent pillages etc. which build up a slowly decaying 'danger aura' in an area) near the plot the uni will end up in, and request (and wait for) an escort if there is any.

Most units that can defend use AI_safety() rather than AI_retreatToCity(). That routine seeks the best defensive terrain (taking account of visible enemy positions) that can be reached in one turn and heads there. It also knows about animals not being able to cross borders, so will simply duck back into the border for animal danger if that's an option

Ah, I think I understand this much better now. This is all rather new to me, I only started reading the c++ tutorial last week.:D I think that for a start I should add

PHP:
	if (exposedToDanger(plot(), 50) && plot()->getOwnerINLINE() != getOwnerINLINE())
	{
		if (AI_safety())
		{
			return;
		}
	}
To the AI_workerMove() function. That would make the worker seek safety if it's odds of losing were worse than 50-50 if I'm understanding it right, correct?
 
@Koshling:

So, I setup the VC2008 and the other things that go along with that to compile the DLL, and I got the following error.

Code:
1>------ Build started: Project: C2C, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>SubWCRev : E155007: 'C:\Users\*name removed*\Documents\SDK Workspace\Sources' is not a working copy
1>Error running SubWCRev
1>"fastdep.exe" NOT FOUND! 
1>Please edit Makefile to reflect the correct path of fastdep. 
1> "C:\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /Zi /O2 /Oy /Oi /G7 /DNDEBUG /Fp"Release\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /DFP_PROFILE_ENABLE /D_MOD_GWARM /D_MOD_SHAM_SPOILER /DC2C_BUILD /DUSE_INTERNAL_PROFILER /IBoost-1.32.0/include /IPython24/include /I"C:\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A/Include" /I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A/Include/mfc" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Python24/include" /YcCvGameCoreDLL.h /Fo"Release\_precompile.obj" /c _precompile.cpp
1>'C:\Microsoft' is not recognized as an internal or external command,
1>operable program or batch file.
1>NMAKE : fatal error U1077: '"C:\Microsoft Visual C++ Toolkit 2003\bin\cl.exe' : return code '0x1'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\*name removed*\Documents\SDK Workspace\Sources\Release\BuildLog.htm"
1>C2C - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What is going on? I followed the instructions in asaf's guide to compiling, with the exception that I used the makefiles and solutions directly from the SVN.
 
@Koshling:

So, I setup the VC2008 and the other things that go along with that to compile the DLL, and I got the following error.

Code:
1>------ Build started: Project: C2C, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>SubWCRev : E155007: 'C:\Users\*name removed*\Documents\SDK Workspace\Sources' is not a working copy
1>Error running SubWCRev
1>"fastdep.exe" NOT FOUND! 
1>Please edit Makefile to reflect the correct path of fastdep. 
1> "C:\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /Zi /O2 /Oy /Oi /G7 /DNDEBUG /Fp"Release\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /DFP_PROFILE_ENABLE /D_MOD_GWARM /D_MOD_SHAM_SPOILER /DC2C_BUILD /DUSE_INTERNAL_PROFILER /IBoost-1.32.0/include /IPython24/include /I"C:\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A/Include" /I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A/Include/mfc" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Python24/include" /YcCvGameCoreDLL.h /Fo"Release\_precompile.obj" /c _precompile.cpp
1>'C:\Microsoft' is not recognized as an internal or external command,
1>operable program or batch file.
1>NMAKE : fatal error U1077: '"C:\Microsoft Visual C++ Toolkit 2003\bin\cl.exe' : return code '0x1'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\*name removed*\Documents\SDK Workspace\Sources\Release\BuildLog.htm"
1>C2C - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What is going on? I followed the instructions in asaf's guide to compiling, with the exception that I used the makefiles and solutions directly from the SVN.

Three things:
  1. The SVN error is because the makefile runs an SVN command to get the vrsion numbers and auto-generate a header file that is part of the build. It will only work if the place you build from is the SVN working copy - are you building from some other copy?
  2. fastdep has to be installed separately (search for 'fastdep' on these boards). However, that error is not fatal and won't cause funtional problems (just slower builds in some cases)
  3. Most important one - when you edited your makefilepaths file you didn't quote a path with spaces in (the one to the Toolkit) by the looks of things
 
Three things:
  1. The SVN error is because the makefile runs an SVN command to get the vrsion numbers and auto-generate a header file that is part of the build. It will only work if the place you build from is the SVN working copy - are you building from some other copy?
  2. fastdep has to be installed separately (search for 'fastdep' on these boards). However, that error is not fatal and won't cause funtional problems (just slower builds in some cases)
  3. Most important one - when you edited your makefilepaths file you didn't quote a path with spaces in (the one to the Toolkit) by the looks of things

1. I exported it from the working copy (and updated beforehand), is that bad?

2. OK, I'll go and install it.

3. I didn't touch the makefilepaths, that sounds like the issue here.
 
1. I exported it from the working copy (and updated beforehand), is that bad?
That will make your life VERY hard goign forward. You really should edit your workig copy or else you will have to mnaually keep track of what's chnaged before you copy that back and doa submit - you'll also have to manually track any clahses since your edits wion't be in the same place (which is highly dangerous - suppose you do an SVN update then copy your modified source intio your working copy to commit it - how will you know yopu have not overwritten something?)
2. OK, I'll go and install it.

3. I didn't touch the makefilepaths, that sounds like the issue here.
Makefilepaths was split out fo the main makefile for the C2C build so that everyone could use the same makefile and just edit thier local installation paths into a separate file - everything in that file is just your local setup, so you should edit it to match where you have things installed.
 
@Koshling:

Great, thanks for your help. Doing those things fixed several errors, but now I have some new errors.

Code:
1>------ Build started: Project: C2C, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>SubWCRev: 'c:\Users\*Name Removed*\Documents\Sources'
1>Last committed at revision 3360
1>Updated to revision 3391
1>Local modifications found
1> "C:\Users\*Name Removed*\Documents\SDK Workspace\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /Zi /O2 /Oy /Oi /G7 /DNDEBUG /Fp"Release\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /DFP_PROFILE_ENABLE /D_MOD_GWARM /D_MOD_SHAM_SPOILER /DC2C_BUILD /DUSE_INTERNAL_PROFILER /IBoost-1.32.0/include /IPython24/include /I"C:\Users\*Name Removed*\Documents\SDK Workspace\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Users\*Name Removed*\Documents\SDK Workspace\WindowsSDK/Include" /I"C:\Users\*Name Removed*\Documents\SDK Workspace\WindowsSDK/Include/mfc" /I"C:\Games\2K Games\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Games\2K Games\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Python24/include" /YcCvGameCoreDLL.h /Fo"Release\_precompile.obj" /c _precompile.cpp
1>_precompile.cpp
1>c:\Users\*Name Removed*\Documents\Sources\CvGameCoreDLL.h(234) : fatal error C1083: Cannot open include file: 'boost/python/list.hpp': No such file or directory
1>NMAKE : fatal error U1077: '"C:\Users\*Name Removed*\Documents\SDK Workspace\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\*Name Removed*\Documents\Sources\Release\BuildLog.htm"
1>C2C - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What did I do wrong now? I appreciate your willingness to work and teach me how to code and compile the DLL, I really am new to this.
 
@Koshling:

Great, thanks for your help. Doing those things fixed several errors, but now I have some new errors.

Code:
1>------ Build started: Project: C2C, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>SubWCRev: 'c:\Users\*Name Removed*\Documents\Sources'
1>Last committed at revision 3360
1>Updated to revision 3391
1>Local modifications found
1> "C:\Users\*Name Removed*\Documents\SDK Workspace\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /Zi /O2 /Oy /Oi /G7 /DNDEBUG /Fp"Release\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /DFP_PROFILE_ENABLE /D_MOD_GWARM /D_MOD_SHAM_SPOILER /DC2C_BUILD /DUSE_INTERNAL_PROFILER /IBoost-1.32.0/include /IPython24/include /I"C:\Users\*Name Removed*\Documents\SDK Workspace\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Users\*Name Removed*\Documents\SDK Workspace\WindowsSDK/Include" /I"C:\Users\*Name Removed*\Documents\SDK Workspace\WindowsSDK/Include/mfc" /I"C:\Games\2K Games\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Games\2K Games\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Python24/include" /YcCvGameCoreDLL.h /Fo"Release\_precompile.obj" /c _precompile.cpp
1>_precompile.cpp
1>c:\Users\*Name Removed*\Documents\Sources\CvGameCoreDLL.h(234) : fatal error C1083: Cannot open include file: 'boost/python/list.hpp': No such file or directory
1>NMAKE : fatal error U1077: '"C:\Users\*Name Removed*\Documents\SDK Workspace\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\*Name Removed*\Documents\Sources\Release\BuildLog.htm"
1>C2C - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What did I do wrong now? I appreciate your willingness to work and teach me how to code and compile the DLL, I really am new to this.

Whatever path you have set for the line in MakeFilePaths:
Code:
GLOBALBOOST=$(CIVINSTALL)\CvGameCoreDLL\Boost-1.32.0
isn't being found - check that it's present (and contains include\boost)
 
Whatever path you have set for the line in MakeFilePaths:
Code:
GLOBALBOOST=$(CIVINSTALL)\CvGameCoreDLL\Boost-1.32.0
isn't being found - check that it's present (and contains include\boost)

Horray, it compiled! It's 200 KB larger then the ones on the SVN though. I most likely did something wrong. What would that be?
 
I know you've figured out th correct build settings now, but one other thing(that you may have done - I'm on an iPad so I don't know for sure). When you push a new DLL to SVN make sire to always push the DLL and pdb both to the pdb archive folder, one level up in the svn. This is so hat (for ever version) we have the matching DLL and pdb pair needed to interpret mini dumps from that version.
 
I know you've figured out th correct build settings now, but one other thing(that you may have done - I'm on an iPad so I don't know for sure). When you push a new DLL to SVN make sire to always push the DLL and pdb both to the pdb archive folder, one level up in the svn. This is so hat (for ever version) we have the matching DLL and pdb pair needed to interpret mini dumps from that version.

Please look at my PM about the PDB.
 
I like this idea. Is any of the coding for the new promotion system made?

At RI, we had talked about worker promotions as well, but I wasn't able to create the SDK code for improvement specific promotions.

I've made a worker modcomp, but it is unreleased. It simply takes the FFH2 cope to allow promos for workers. I've made the art for several promos already. I'll try and release it soon. If you want any of it, just ask.
 
Please look at my PM about the PDB.

@Koshling:

So, I tried running C2C with my new DLL, and when I tried loading a game, poof, CTD. Attached is the save, dump, and changed source files (I don't have the slightest idea how to read the dumps, so you'll have to help.) The branch PDB and DLL is in a subfolder in the PDB & DLL archive. Remember that this is NOT with the trunk, you need to export a copy of the Combat Workers branch Assets folder.
 
@Koshling:

So, I tried running C2C with my new DLL, and when I tried loading a game, poof, CTD. Attached is the save, dump, and changed source files (I don't have the slightest idea how to read the dumps, so you'll have to help.) The branch PDB and DLL is in a subfolder in the PDB & DLL archive. Remember that this is NOT with the trunk, you need to export a copy of the Combat Workers branch Assets folder.

I'd rather teach you how to debug! Do you have an IM account of some sort (MSN, Google, Yahoo...?). If so PM me with your IM account details so we can talk real-time. Meanwhile create a DEBUG build and check it still crashes with that - that's where we'll start with the debugging (because debugging the DEBUG version is much easier0
 
I'd rather teach you how to debug! Do you have an IM account of some sort (MSN, Google, Yahoo...?). If so PM me with your IM account details so we can talk real-time. Meanwhile create a DEBUG build and check it still crashes with that - that's where we'll start with the debugging (because debugging the DEBUG version is much easier0

I'm in the Chat right now, we can do it there.
 
I'm in the Chat right now, we can do it there.

The chat has not worked for me for nearly a month (assuming I'm using the right one, which is the URL most recently given in that thread I think)

Edit - that's t15.org

Edit 2 - I CAN get inot the tinychat one (but urgh), but I'm the only one there
 
@Koshling:

Combat Workers AI

OK, Here is what I would like to try and do for Combat Worker AI (the actual Combat workers with their own unitclass, not workers with combat strength, those I've done already.) It is not perfect, but I believe from looking at the code it is something I can handle. Here are the behaviors I thought of.

How It builds improvements

  • If area around target plot is dangerous: This can be calculated using similar functions to the ones that Scouts use to find danger. The AI should send a Combat Worker to do the job if the plot in question is near a conflict zone. It should also call for escorts while doing this if it feels that the danger is too high. I have a feeling that this can be mostly copy-pasted from other existing unit code, but I may be wrong. If you have a simpler idea please tell me. This sounds like the most complex part of the Combat Worker AI to my knowledge.
  • It should also use Combat workers for normal work if there are no normal workers in the area (prioritizes workers, as they have a higher workrate)

When to retreat:

  • Unlike a normal worker, the Combat Worker wants to try and stay in a dangerous situation. Therefore it will try and call for reinforcements before seeking safety if it is threatened (will need to take into account any escorts/stacks it already has with it)

When to be used as a combat unit:

  • They need to not be grabbed and merged into an attack stack by the AI. They should not be doing combat duty if possible.

When to build:
  • Not often, they are only really useful in wartime (or building forts, but that is a ways down the road)

What do you think of this? Is it going on the right track, and how should I go about accomplishing this?

Edit: Now that I look some more at this it is looking far more complicated than I originally thought. Maybe I should do some simpler stuff and leave this to you.
 
@Koshling:

Combat Workers AI

OK, Here is what I would like to try and do for Combat Worker AI (the actual Combat workers with their own unitclass, not workers with combat strength, those I've done already.) It is not perfect, but I believe from looking at the code it is something I can handle. Here are the behaviors I thought of.

How It builds improvements

  • If area around target plot is dangerous: This can be calculated using similar functions to the ones that Scouts use to find danger. The AI should send a Combat Worker to do the job if the plot in question is near a conflict zone. It should also call for escorts while doing this if it feels that the danger is too high. I have a feeling that this can be mostly copy-pasted from other existing unit code, but I may be wrong. If you have a simpler idea please tell me. This sounds like the most complex part of the Combat Worker AI to my knowledge.
  • It should also use Combat workers for normal work if there are no normal workers in the area (prioritizes workers, as they have a higher workrate)

When to retreat:

  • Unlike a normal worker, the Combat Worker wants to try and stay in a dangerous situation. Therefore it will try and call for reinforcements before seeking safety if it is threatened (will need to take into account any escorts/stacks it already has with it)

When to be used as a combat unit:

  • They need to not be grabbed and merged into an attack stack by the AI. They should not be doing combat duty if possible.

When to build:
  • Not often, they are only really useful in wartime (or building forts, but that is a ways down the road)

What do you think of this? Is it going on the right track, and how should I go about accomplishing this?

Edit: Now that I look some more at this it is looking far more complicated than I originally thought. Maybe I should do some simpler stuff and leave this to you.

It sounds reasonable. However, as you say it's not that easy. The main issues are:
  • The AI doesn't really have a central command and control, so there is no concept of 'sending a unit to do XXX' (well, I've started to add one with the contract brokering system, but it's not yet widely used, and the base BTS AI has no such concept). Thus there is nothing to 'decide to send a combat worker...' - workers decide what to do on their own by looking for work that needs doing.
  • Calling for reinforcements in a dangerous situation should probably not stop it ALSO seeking (local) safety (else it'll likely die before the reinforcements arrive)
  • Deciding when to build them might be tricky. Currently it is city AIs that decide what needs building, and in vanilla BTS they do so themselves. In C2C they no longer go ahead and build them - instead they place an order for them, which might be picked up by the originating city, or might be picked up by some other city that is better placed to do it. This new system allows any piece of code (not just the city AI) to place such an order, so one possibility would be to have a normal worker do so when it decides there is too much danger for it to do the work itself.

It's certainly not the easiest ask you could pick as a starter ;) However, I don't see it rating as high on my priooprity list for a while either.
 
Back
Top Bottom