1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

City Nearby Map Datas Utility 2016-10-05

City Nearby Map Datas Utility

  1. LeeS
    Utility Description:
    1. 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
    2. 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.
    3. 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.
    4. 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.
    5. 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
    6. 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.
    7. 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.
    8. 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
    kidm1 likes this.

Recent Reviews

  1. kidm1
    kidm1
    5/5,
    Version: 2016-10-05
    thx LeeS, Useful & User-friendly!