Resource placement (Game Data tables)

Joined
Jul 31, 2014
Messages
836
Hi all, quick (or not-so-quick :lol:) question for those of you who have messed around with the resource placement logic:

Resource_FeatureBooleans
Resource_FeatureTerrainBooleans
Resource_TerrainBooleans

Are these tables actually referenced by whatever subroutine AssignStartingPlots.lua calls to check if a specific resource can be placed at a plot?

If so, does the game run an AND or a OR check on these tables (because some resources show up more than once, some do not show up at all) to determine plot validity?

And lastly, does anyone know which .lua script (and function) this is all processed in? It is not in ASP.lua as far as I can tell (apart from the logic pre-determining what types of resources can be initially placed in each 'region').
 
Resource_FeatureBooleans
Resource_FeatureTerrainBooleans
Resource_TerrainBooleans
Feature_TerrainBooleans

Are these tables actually referenced by whatever subroutine AssignStartingPlots.lua calls to check if a specific resource can be placed at a plot?

No. The tables are not used directly (via GameInfo) nor indirectly (via the pPlot:CanHaveResource() or pPlot:CanHaveFeature() methods) in any lua map script. They are used by the Civilopedia, but that's all.

IIRC they are used by WorldBuilder (or that may be just Feature_TerrainBooleans, which is the table that incorrectly places jungle on grass, not plains)

Edit: A good search tool is invaluable when trying to find things like this out - I use Agent Ransack
 
Top Bottom