How tough to make an air recon mission like in Civ4?

snafusmith

Unit Maker
Joined
Nov 1, 2005
Messages
1,549
Location
I've been everywhere, man
How tough to make an air recon mission like in Civ4? It's always bugged me that air units could magically see for many tiles around. How tough would it be to make a new mission that would let you pick a tile and see what's on it and maybe a few other tiles around it?
 
You need to understand User Interface Panel modding far better than I do, and then you need to
  1. add a button to the Unit Panel to allow your new mission, which probably means modding UnitPanel.lua
  2. Provide an interface where the user can select the tile where the mission is to be "centered"
    • this requires opening such a new interface mode and then "closing" it again when completed
  3. once the target tile is selected and the unit panel issues are closed out and any open interface panels are closed down, you need to
    1. decide whether the mission is successful, and deal with any issues such as shooting down the air unit from AA, counter-air, etc.
    2. reveal the target tile (remove Fog of War) if the mission is successful
    3. reveal (remove Fog of War) on any other tiles depending on anything you do for mission success / failure / partial success
    4. decide if this will be a permanent removal of For of War etc., and if not figure out how (and when) to trigger re-obscuring, and store that somewhere to be referenced later, then deal with issues through persisting data that will be reloadable when a saved game is reloaded.
    5. implement any re-hiding of the tiles if appropriate based on whether you decide this is needed
  4. and probably half a dozen other things I haven't thought of
 
The civ5 sdk is merely a file-packaging tool to assist you to put your files together into a mod the game can recognize. It does not give you any help tools, really, in creating the code of a mod.

And yes you'd be doing most of this in lua files.

But you'd also need to define a new Unit Mission-Type in either xml or sql. And you'd probably also need to define a new interface mode in either xml or sql.
 
And the AI would probably not know how to use it, or is it possible to teach the AI what to do with the new mission?
 
Top Bottom