Modding/understanding invisibility

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
I'll likely have more questions later. But I need to work with invisibility in my mod so I'm trying to get a feel for what people know about it. Just two questions to start:

  1. What's with the cryptic note in the .xml about needing to recompile? Have folks succeeded in adding invisibility types?
  2. Since modern naval war has never been relevant in my 500+ hrs playing, I don't really know how the current invisibility works in Civ5 gameplay. What happens when I move my unit onto an invisible unit? Do they: (a) coexist, violating 1upt, (b) bump each other somehow, or (c) something else?
 
Invisibility is really idiotic as implemented right now. Basically an invisible unit will still have to follow 1UPT rules (meaning if you try to move a unit over an invisible one, youll see the red circle) and if any enemy unit is in a tile next to the invisible unit, it will become visible to that enemy.
 
That's dumb. I'm all for 1upt but they needn't apply it as some unbreakable dogma.

At the risk of changing the topic to 1upt, does anyone know if the red circle is controlled in lua or in the dll? The reason I ask is because it is quite possible in the current game to move a unit onto another unit or even onto a foreign city. It happens often when moving your unit into unrevealed territory that is crowded with units. What happens is that you can't end turn in this situation (seems like Lua to me). Also, although this situation happens often, it never leaves you in this 2upt situation with no moves left. It seems to achieve this by bumping AI units around some (this also seems like it could be a Lua function). If it's Lua, then I can change it. (Please don't tell me about the xml setting changed by Kael's Legions mod -- I know about that.)
 
I've given some land units PROMOTION_INVISIBLE_SUBMARINE. No units anywhere have PROMOTION_SEE_INVISIBLE_SUBMARINE.

It appears that any unit can see these from an adjacent tile, but not from any farther.

Can someone tell me if this is normal and expected? Or am I encountering an unexpected modding issue?
 
it's how it works for submarines too, you can alway see them where you have an unit on an adjacent tile. even a land unit...

so it's how invisibility works by default, and I agree it's not how one would expect it to work...
 
Not how I'd expect it to work for a sub, nor how I want it to work in my mod.

I know the answer is going to be "dll", but I'll ask anyway: Is there any way to make a unit actually invisible?

Edit: Different question: Is there any way to make a unit invisible to the human player?
 
Back
Top Bottom