Creating visibility from a plot

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
Trying to decipher dll visibility code makes my head spin. I'm trying to figure out how to create visibility for a player from a given plot (without unit or owned land there).

Does anyone have some dll (or non-dll for that matter) code that would do that?
 
Not sure I understand. Say worker from Civ A wanders into the wilderness and builds a fort and then leaves/dies. When a scout from Civ B finds the fort do you want them to "meet" player A?

Or are you just trying to reveal an arbitrary tile to player A (which there's a Lua method for)
 
It's for a Scrying Spell. A player casts it on a distant plot. Then they can see from that plot as if they have a unit there (until dispelled). That would include meeting a civ or any other effects of normal visibility. The spell setting and dispelling is all on Lua side.

I have dug around the visibility code some, but (as I said) it causes dizziness. I'm afraid I'll invent an overly complicated solution when there is an easy one. (Or perhaps I'm right that there is no easy solution.)
 
Presumably a unit is casting the spell. Can the unit cast more than one Scrying Spell at the same time?
 
Presumably a unit is casting the spell. Can the unit cast more than one Scrying Spell at the same time?
Just one at a time from a unit. Casting again cancels the previous Scry. But the effect could be at any distance from the unit (based on their spell modifier, which is a mod mechanic). And the unit should be able to go about other business meanwhile.
 
I've added a column to the promotions table that changes recon range, so I have short range recon (-2, ie 4 hexes) for tri-planes and long range recon (+2, ie 8 hexes) for jets - search for "VARIABLE_RECON". The standard Lua API allows you set the recon plot for a unit - it doesn't have to be the one it's standing on. So you should be able to give the casting unit a promotion for the scrying range and then set its recon plot. A quick test shows this sort of works (not all the fog was lifted) but I suspect that's just a case of fixing some oversight in the DLL rather than writing whole new sections of code
 
Well... I never even noticed the Get/SetReconPlot methods. I'm not really clear what a recon plot is. Does that make the unit "blind" with respect to the plot it is actually at? Or does it then see from both the "recon" plot and its actual location plot?

(Traveling now so I don't have access to dll source...)
 
The recon plot is where the unit performed the recon from, usually where it starts its turn.

No it doesn't make the unit blind. If you give a destroyer the recon promotion, at the start of its turn it will reveal all plots in a 6-hex radius, if you then sail away, you'll only get the standard 2-hex radius LOS vis where it ends its turn. At the start of the next turn you'll get the full 6-hex radius vis from that plot.
 
Back
Top Bottom