escorts and turrets

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

escorts and turrets

Post by Commander McLane »

This was posted in another thread, but I wouldn'd like it to be buried there, so I post it again here:
Eric Walch wrote:
I only forgot about the problem with turrets and escorts. I can't see why it is not working. I created a convoy with your ships as I described with escorts and the whole physical structure of the turret subentity was missing with the escort but present with the mother. (Both were copies of the same ship). Then I gave the ship escorts of weeviloid2's. These ships had their subentities attached. This was observed in the past, but now I've seen it myself. Not firing of escort-turrets I might understand but why the whole structure misses in one case and is present in the other is strange. I can't see why the code sees them different.
Do the Weeviloid2's have turrets as well or other subentities? If it's only turrets that are missing, maybe it's the initialise_turret-method of the subentity that messes with the switchAIto of the main entity (without the switchAIto in the launch_actions the turrets are there and working)?

EDIT: Indeed, the Weeviloids don't have turrets, but spines with additional lasers. So my money is on some incohereny between the switchAIto and the initialise_turret.

And it would indeed be great to resolve this issue!!!

*****

Another question to Eric: Is there really no other way than the ones described by you to make a couple of entities a group? I would be in deep trouble then, with my Sentinel Asteroids, because I can't spawn them as escorts. Or is there, alternatively, a way to spawn escorts in another position than the usual wing-formation behind the mother?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

McLaine wrote:
Another question to Eric: Is there really no other way than the ones described by you to make a couple of entities a group? I would be in deep trouble then, with my Sentinel Asteroids, because I can't spawn them as escorts.
There is no other way to create a group for the scripter. But ask Ahruman if he can change the code. Looking at the code it should not be that much difficult to create new functions addGroup:, addSystemGroup: etc that do the same as addShips:, addSystemShips: etc. with the only difference that they get the same group ID.
McLaine wrote:
Or is there, alternatively, a way to spawn escorts in another position than the usual wing-formation behind the mother?
Yes there is. In the code I can't find code that creates the V-form explicit. The V-form just appears because the escorts fly towards the mother but have to keep a minimum spacing. When the mother flies faster you get a more extended V-form. The function performEscort needs a desiredRange. Normally this is set 0. When you set it at a higher value you will not get the characteristic V-form. My next courier release will contain a mother with 9 escorts. On starting the escorts get a random range of 400, 800 or 1200 meters. These escorts will just fly as a bunch of ships after their mother, without a visible structure.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Okay.

My problem is: I want a mother that is not a ship, but a dockable asteroid (the Hacker Outpost) be surrounded by escorts that are not ships, but asteroids with turrets mounted on them (the Sentinel Asteroids).

As the docking bay is accessible from the front end of the Hacker Outpost, and this is where the Hackers would also expect an attacker from, escorts behind the rear end would be of not much use.

Furthermore, as the Sentinel Asteroids are armed with plasma turrets, and these have a firing range of about 5000 meters only, all of these escorting asteroids have to be quite close to their mother in order to be useful (probably just at the edge of the 5000 meter range, in order to avoid any friendly fire-problems). And of course they should not be in a line leading away from their mother, but nicely surrounding it.

Lastly, as the escorts are asteroids, they are not expected to move (their max_speed is 0), so they have to be in their locations right from spawning. I could give them a slow max_speed, in order to enable them to reach their positions around their mother, but whenever I have tried to do this in my current trials, they drifted away with route1patrolAI, because it seems, although spawned as its escorts, they never actually recognize the Hacker Outpost as their mother, so they get into the AI-state LOOK_FOR_BUSINESS, again don't find the Hacker Outpost as a possible mother, and switch to route1patrolAI.

That's basically why I'm stuck with Anarchies.oxp. Any ideas to that? Or do I actually need a couple of new methods, in order to spawn a group of Sentinel Asteroids and make them act like escorts, without actually defining them to be escorts?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

McLane wrote:
Lastly, as the escorts are asteroids, they are not expected to move (their max_speed is 0), so they have to be in their locations right from spawning. I could give them a slow max_speed, in order to enable them to reach their positions around their mother, but whenever I have tried to do this in my current trials, they drifted away with route1patrolAI, because it seems, although spawned as its escorts, they never actually recognize the Hacker Outpost as their mother,
The escort AI is certainly wrong in your case. I write a small script were I placed a copy of your hackers outpost near the witchpoint entry. I defined 8 escorts an made the escorts switch their AI in launch_actions. (The escorts were copies of the asteroids witch I gave a speed, trust, pitch etc. so they could fly a bit) I started the new escort AI with next code.

Code: Select all

    RETREAT = {
        ENTER = (setTargetToStation, setDestinationToDockingAbort, "setDesiredRangeTo: 1000.0", performFaceDestination); 
        "FACING_DESTINATION" = ("setSpeedFactorTo: 1.0", "setDesiredRangeTo: 1000.0", performFlyToRangeFromDestination);
        EXIT = (); 
        "DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: NEXT_STAGE");
    UPDATE = (); 
    }; 
It makes sure the "escorts" don't stay at their spawn position but go to abort docking coordinates. The are initially set at 8000 meters but you can redefine this value. They go to their place of 1000 meter in about 10 seconds. So when it is far away the player will never see this movement. I took a shot at a asteroid and the mother send out his defenders. So the group should work and the escort AI should react on group_attack commands.

I hoped the setDestinationToDockingAbort would spread them nicely, but I saw a spread over two areas. And escorts have no turrets, this will also a problem in your case.

By doing this I discovered the first bug in 1.70. The command "addShips:" is not working anymore so I tested this in the old 1.69.2
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

addShips: works here. Test case, please.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

addShips: works here. Test case, please.
Now it works for me also. I do not know what I did wrong. Defining above ship with station and escorts didn't show up, but after starting up with 1.65 it did show and also later with 1.69. But now also in 1.70 as it should.
I also checked with an other ship that didn't show up, but that contained a condition that prefented him showing.
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

I've noticed in my play-testing the last couple days that any time I make a change in the addons folder with 1.70, I MUST restart the game while holding down shift before the changes will take a effect. This was not the case in 1.65 and maddening until I finally figured it out.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Matt634 wrote:
I've noticed in my play-testing the last couple days that any time I make a change in the addons folder with 1.70, I MUST restart the game while holding down shift before the changes will take a effect. This was not the case in 1.65 and maddening until I finally figured it out.
Yes that was also reported for 1.69 to be the true, but I always could make changes that were recognised, even with the oxp folder still open without holding the shift. But maybe this could have been the case for me.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

A possible fix for this would be to disable cache saving for test releases/OXP developer builds. This would reduce startup time and general performance somewhat, but not all that much.
Post Reply