• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Questions About Invisibility Types

samthedagger

Warlord
Joined
Jul 8, 2009
Messages
134
After looking at the XML, I have discerned the following possibilities for making a unit invisible.

1) Use the <Invisible> tag with either INVISIBLE_SUBMARINE or INVISIBLE_STEALTH. Units with either of these are invisible to all units except those with the tag <SeeInvisible> for the appropriate type.
2) Use the <bInvisible> tag set to 1. This appears to make the unit invisible to all other units with no exception.

First, how do I create a new invisible class? For example, could I just enter INVISIBLE_CLOAKING and it would become a new invisible class seen only by units with <SeeInvisible>INVISIBLE_CLOAKING</SeeInvisible> or do I have to define INVISIBLE_CLOAKING somewhere?

Second, suppose I want to make a unit able to see both submarines and stealth destroyers (and whatever other invisible class I care to add). What would I need to do to make that work? Do I enter the <SeeInvisible> tag once for each type or can I separate them within the tag with a comma or something?

Third, are there any other ways of making a unit invisible that I am missing?

Thanks in advance for your help!
 
It is trivial to make a new invisible type. Just create a new one in CIV4InvisibleInfos in the basic infos folder, and walla, you have a new valid invisible type. Also I'm pretty sure the bInvisible tag (which is how spys are invisible) makes it so units can be caught in enemy territory, so this probably isn't the best way to go about it (though I could be wrong here).
 
I thought it was the <bSpy> tag that allowed them to be caught in enemy territory. I could be wrong also though. The wiki just says "it is a spy." But if someone in the know can tell us for sure I will adjust it to make it more specific.

I figured out how to make invisible classes from looking on the wiki right after I typed this up, but thanks for the help anyway!

I'm still curious to know how to make a unit capable of seeing multiple invisible classes as I have not seen any examples of it so far in XML files I have examined.
 
SeeInvisible is a vector, so you can set a unit to see multiple types easily. Here is an example from LoR:

Code:
<SeeInvisible>INVISIBLE_SUBMARINE,INVISIBLE_STEALTH,INVISIBLE_COVERT</SeeInvisible>
 
You may also find some useful info in this thread.
 
Back
Top Bottom