Nexus Modding > Scripting

Problems using cloaking device due to "no fog of war"

(1/2) > >>

Data:
First off all hi everybody.

@Arparso: Already knowing me out of CDV IG3-Board? *waving*

After years I rediscovered Nexus. Unfortunatelly I cannot play the Campain or the MP due to some curious crashes but missions created with arparsos Skirmisher are working...   ???

I want to use a cloaking device as in one of the campain mission were you have to infiltrate that asteroid station. My problem is, that in a skirmish mission all ships are revealed from the beginning on and when I active the cloaking the enemy will chase my ship about all distances and no matter what sensors he uses.

I tried various combinations of these detection commands "Hide" and "Unhide", and most Enable-Commands but either the ship is invisible and cannot be detected even when uncloaked after the mission started or the enemy can it detect everywere even when cloaked.

Is there a possibility to use the cloaking device as intended? The enemy should discover my ship and scan it's devices but when I active cloaking it will disappear from his sensors (off course with respect to Shiptype, Range...)

Thanks

GeoModder:
The problem here probably is that you're including the Skirmisher's battle machine. Inthere it is coded to reveal all ships and devices from the first second. You could or try to disable that part of the code or don't include it in your mission file.

Data:
Thanks for your reply.

I deleted the following passage in the *ai.mach.


--- Quote ---//for cloaking ships, we will have to change code below
               ExecList(AIFleetL1,
                  MakeFullyKnown(s.this);
                  FreezeReconState(s.this, #race_player, 1);
               );
               PlayerFleetL1:=GetFreeSel();
               SelectShips(PlayerFleetL1, s.race=#race_player);
               ExecList(PlayerFleetL1,
                  MakeFullyKnown(s.this);
                  FreezeReconState(s.this, #race_spacetech, 1);
               );
               m.PShipsCount:= AllNumOf(PlayerFleetL1);

--- End quote ---

Now cloaking seems to work fine. Any ideas if adding something else would make this work even better? I ask because the first line says "we have to change code" not "have to delete" so I have the assumption that arparso intended to enter different code for cloaking.

Furthermore, am I right that making these change in "/_templates/default_ai.mach_" will affect all future missions or is there another place i have to alter?

Mularac:
You probably deleted there more than you had to, but yeah, that's what you needed to do.
the part that says "MakefullyKnown(...)" are the ones responsible for your problem, so you'd probably just have to delete those parts. this is what it should end up looking as:

--- Code: ---//for cloaking ships, we will have to change code below
PlayerFleetL1:=GetFreeSel();
SelectShips(PlayerFleetL1, s.race=#race_player);
m.PShipsCount:= AllNumOf(PlayerFleetL1);

--- End code ---

This, however, won't be very kind to the AI, as it's not meant to handle cloacked ships, for example, it could happen that enemy ships will just sit there and won't pursuit, even after you revealed yourself.

And yes, changes on that file will affect the rest of the missions.

Data:
I tested it several times with my changes (deleted the whole part) and the AI seemed to have no problem. Chased my ship when uncloaked ---> cloaked and changed position ---> enemy reached old position ---> decloaked, enemy headed torwards me...

Navigation

[0] Message Index

[#] Next page

Go to full version