Im trying to make a new npc that can cloak like saboteurs and shadowtroopers. I know its not something in the .npc files as i cant see anything in them, so something must be directed at them that causes them to do it. I thought it might be in the shaders in assets1, but i cant find it. Can anyone tell me what to do to get a cloaking npc?
They get the cloaking gizmo depending on their class. It's probly the CLASS_IMPERIAL or CLASS_SHADOWTROOPER class, just experiment a little.
Thats not it, I made a copy of the shadowtroopers npc with only a name change and entered it as a new npc. Didnt work, just got a non-cloaking shadowtrooper.
I just tried adding another npc to an existing .npc file, so shadowtrooper.npc now contains shadowtrooper, shadowtrooper2 and my shadowcultist, which is a reskined cultist. By being in the shadowtrooper.npc file the cultist cloaked properly. Iys not ideal as i dont like to be replacing the existing files in this way, but itll do.
Its the name. It works if i enter additional npcs into the shadowtrooper.npc file, called shadowtrooper3, shadowtrooper.4 etc. Im not sure if theres a limit to how many you can put in there, or if you can call them something like shadowtrooperreborn, but anyway, there it is. Id imagine you can save the actual npcs anywhere, since in JK2 all npcs were in one file and it could differentiate the shadowtroopers from everything else.