Using LUA to determine extent of empire?

Discussion in 'Civ5 - SDK / LUA' started by iamdanno, Mar 18, 2016.

  1. iamdanno

    iamdanno Warlord

    Joined:
    Jan 16, 2012
    Messages:
    196
    Location:
    Oklahoma City, OK, USA
    Has anyone used LUA to find the extents of a civ's empire? I had an idea while checking out an AI-only game. It would be nice if a MOD could be made that would start and end each turn by determining the breadth of each civ's empire, and then generating an image that incorporates the whole thing (or alternatively, a series of smaller images.).

    Does that seem possible?
     
  2. bane_

    bane_ Howardianism High-Priest

    Joined:
    Nov 27, 2013
    Messages:
    1,559
    I think you can do that by iterating through all tiles from each city and adding the result to a variable.

    Although I didn't understand what you mean with the rest of the post.
     
  3. ThorHammerz

    ThorHammerz zzz

    Joined:
    Jul 31, 2014
    Messages:
    836
    @OP, am I understanding correctly that you just want to re-draw a simplified version of the map (e.g. the civ boundaries) outside of the game (for example, in a PNG/Tiff file)?
     
  4. iamdanno

    iamdanno Warlord

    Joined:
    Jan 16, 2012
    Messages:
    196
    Location:
    Oklahoma City, OK, USA
    Yes (except actual in-game map imaging), like this:

    1: Turn starts.
    2. Find overall extents of player empire. (top left x,y to bottom right x,y).
    3. Take screenshot (or make img that contains entire empire) & save to folder.
    4. Player does whatever.
    5. When player hits "End Turn", Repeat 2 & 3.
    6. Next player's turn begins.


    Basically, automatic imaging of status of empire before & after each turn.
     

Share This Page