Utility Description:
The file is the civ5mod archive. You will have to extract it using 7z or place it in the game's MODS folder and let the game extract it for you.
Utility Instructions and Discussion Thread Here: City Nearby Map Datas Utility Discussion
- Performs all lua code logic and instructions for gathering data from the game-map within the 3-tile working-range of a single city:
- Units (Enemy, Friendly, etc)
- Map Resources
- Map Improvements
- Other Cities
- The data to be collected can be configured so that if you want your mod's main lua to only scan for nearby units, the code can be configured to only collect unit information. The same is true for Resources, Improvements, and Other Cities.
- The code allows collection of multiple types of data. So you can collect data only about Units and Improvements, or only about Units and Resources, or only about Resources, or only about Resources and Improvements, as examples.
- If no 'selection' for the type of data to be collected is made, the code defaults to collecting data for all four types specified in #1.
- Data is collected for an individual city into one 'giant' lua-table that has multiple lua sub-tables.
- For advanced users of lua-tables, documentation is provided on all the subtable structures and the provided 'keys' and 'values' within these tables.
- For those not so versed in the use of complex lua-tables, "interface" routines are included as part of this system to make it simple for you to extract the data you want from the larger table of data
- Data is gathered for a single specified city.
- For lua code that needs to run through each of a player's cities in turn, you simply use the same data-collection routine(s) for each city in turn.
- This is actually no different efficiency-wise than writing all the lines for inspecting an individual city's plots within a larger loop through all of the player's cities.
- What this routine does is handle all the code busy-work of inspecting a city's nearby plots, while allowing your code to gather all information about those nearby plots that pertains to units, resources, improvements, and other cities.
- You should see some processing improvements as compared to scanning a city's plots first to look through for units, and then scanning the same city's plots for resources, and then scanning the same city's plots for Farms, and then scanning the same city's plots looking for Mines on Iron, for example.
- You will not see much if any processing speed difference as compared to only looking for at a city's plots for Improved Iron plots, for example.
The file is the civ5mod archive. You will have to extract it using 7z or place it in the game's MODS folder and let the game extract it for you.
Utility Instructions and Discussion Thread Here: City Nearby Map Datas Utility Discussion