Galactic Navy OXP - Mission Ideas Needed

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

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 was initially puzzled when you said they didn't respond to the distress call (which needs to be removed), but after pulling apart the AI again I noticed that the ships aren't switching states but switching AI's for gotoWaypoint. The gotoWaypoint AI doesn't contain a scanForOffenders update, and therefore, no response to other transports under attack.
First: Your convoy was never programmed to accept a distress message. It misses a "ACCEPT_DISTRESS_MESSAGE" entry. And this is the one that is send to police ships in the area in response to a "sendDistressMessage" command. (see the Wiki)

Second: Before version 1.65 the gotoWaypointAI was always wart of the normal AI. In version 1.65 Giles introduced a separate AI for this purpose. It makes the AI's less complex. But as you said, it does no scanning. For rewriting the Behemoth I left the "gotoWaypointAI" method inside the script with scanning functions. But I needed it on tree places now. I was in doubt of making it into a new external "gotoWaypointAI" with scanning options. Maybe I should do it.: "gotoScanningWaipointAI".
Matt634 wrote:
Eric, I have been unable to recreate the lack of response problem you encountered. The AI seems to be working fine for me. Was the transport that fell under attack out of scanner range relative to the rest of the convoy?
The problem is there, for sure. When you fire at one ship, the system will signal this to al ships by setting the "OFFENCE_COMMITTED" flag. All ships will react on this message as you tested. The scanForOffenders on the other hand is a random function. It will not per definition find something on the first scan. (All other scans methods will find their target on the first scan when in range). scanForOffenders subtracts on each new scan a random value between 0 and 256 from the legal status of each ship. Only when the result stays above 0 he will find him that scanning round. I personally find this a very nice method. On average it takes long to find ships with a low bounty as ships with a high bounty are found easily. (With a bounty above the 256 even on he first scan).

So what I saw was that one of your ships found an offender and your AI issued a groupAttack command. But by placing ships in the normal way in the system they always get different ID numbers and the system will never see them as one group and the groupAttack function will not work to signal something to the others. Tho others were still scanning on their own but were not finding the target with a low legal bounty.

Groups are only created when the system populator adds pirates, when stations or carriers launch defenders and with escorts. To be able to use groupAttack commands, the ships have to be created with one of these methods. The method I outlined uses the escort function to create a group where I later give each a custom AI.

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.
Last edited by Eric Walch on Fri Nov 30, 2007 1:25 pm, edited 1 time in total.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Commander McLane wrote:
Hmmm, in my understanding it's not the wormhole leading to Galaxy 1 that collapses, but the one leading from Galaxy 1 to Galaxy 2.
Well, that would work too. It would still put a fatal interrupt in the ability of the Co-op worlds to cycle trade around. The occupation of key systems in Galaxy 1 (possibly the few original Elite worlds which exist in the Frontier galaxy?) could disrupt the delicate commercial balance that keeps the Co-op worlds ticking over. Galaxy 1 becomes isolated -- can't go up to 2, can't go back to 8 -- and becomes easy pickings for Federation and Imperial aggressors. The rest of the Oolite galaxies stagnate, with the lower numbers becoming increasingly depopulated and the upper ones getting more and more crowded, as there's no quick, sure mechanism for news of the disaster to be communicated. It would just gradually dawn on them -- and there's no way to co-ordinate actions, since all travel is eventually one-way into hostile territory.

Personally, I prefer this option to the more apocalyptic physical collapse of the "inter-galactic" wormholes. Apart from anything else, it offers the chance for the (to me) more attractive Oolite worlds, with their varied races, to continue to survive in some form -- and the hope that at some point we might break out and revenge ourselves on the Federation and the Empire. The forgotten peoples, isolated, alone, and discounted by their militaristic conquerors, will strike back... Maybe we become the seed for the 33rd-century Alliance?

@ Roberto: true, conspiracies are more fun. A combination of the two, then: a cabal, plotting in the dark, who unleash chaos and are in the end consumed by it... :twisted:
Last edited by Disembodied on Fri Nov 30, 2007 12:34 am, edited 1 time in total.
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

Today I saw a navy convoy passing by. One of them saw a hostile ship, went for an attack and send a distress message. That looked silly calling for help if one is the attacker. More silly is that none of his friends came to help.
However, when you need a group of 5 ships, you can define one ship as group leader and give it 4 escorts with escort-ship or escort-role.
Thanks again for the AI spotting Eric. The convoy AI, as we discussed awhile back, is extremely frustrating. I have found a way to make it work here, but still needs some fine tuning :? Because the transports have Scan Class Police, they can use scanForOffenders, offense_committed, and markTargetforOffence to mutually protect eachother. I was initially puzzled when you said they didn't respond to the distress call (which needs to be removed), but after pulling apart the AI again I noticed that the ships aren't switching states but switching AI's for gotoWaypoint. The gotoWaypoint AI doesn't contain a scanForOffenders update, and therefore, no response to other transports under attack.

Apparently, when I play tested this AI I always attacked before they switched AI's :x The escort idea was a good one, which I did try with my early attempts at armed convoys. Unfortunately, escorts don't spawn with turrets, not sure what the reason behind this is, but they don't. Regardless, the AI should work with some tweaks.

Thanks for troubleshooting! I'll get to work sorting out the problem. I'm hoping to put out another update tonight or tomorrow.


EDIT
Eric, I have been unable to recreate the lack of response problem you encountered. The AI seems to be working fine for me. Was the transport that fell under attack out of scanner range relative to the rest of the convoy?
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 was initially puzzled when you said they didn't respond to the distress call (which needs to be removed), but after pulling apart the AI again I noticed that the ships aren't switching states but switching AI's for gotoWaypoint. The gotoWaypoint AI doesn't contain a scanForOffenders update, and therefore, no response to other transports under attack.
First: Your convoy was never programmed to accept a distress message. It misses a "ACCEPT_DISTRESS_MESSAGE" entry. And this is the one that is send to police ships in the area in response to a "sendDistressMessage" command. (see the Wiki)

Second: Before version 1.65 the gotoWaypointAI was always wart of the normal AI. In version 1.65 Giles introduced a separate AI for this purpose. It makes the AI's less complex. But as you said, it does no scanning. For rewriting the Behemoth I left the "gotoWaypointAI" method inside the script with scanning functions. But I needed it on tree places now. I was in doubt of making it into a new external "gotoWaypointAI" with scanning options. Maybe I should do it.: "gotoScanningWaipointAI".
Matt634 wrote:
Eric, I have been unable to recreate the lack of response problem you encountered. The AI seems to be working fine for me. Was the transport that fell under attack out of scanner range relative to the rest of the convoy?
The problem is there, for sure. When you fire at one ship, the system will signal this to al ships by setting the "OFFENCE_COMMITTED" flag. All ships will react on this message as you tested. The scanForOffenders on the other hand is a random function. It will not per definition find something on the first scan. (All other scans methods will find their target on the first scan when in range). scanForOffenders subtracts on each new scan a random value between 0 and 256 from the legal status of each ship. Only when the result stays above 0 he will find him that scanning round. I personally find this a very nice method. On average it takes long to find ships with a low bounty as ships with a high bounty are found easily. (With a bounty above the 256 even on he first scan).

So what I saw was that one of your ships found an offender and your AI issued a groupAttack command. But by placing ships in the normal way in the system they always get different ID numbers and the system will never see them as one group and the groupAttack function will not work to signal something to the others. Tho others were still scanning on their own but were not finding the target with a low legal bounty.

Groups are only created when the system populator adds pirates, when stations or carriers launch defenders and with escorts. To be able to use groupAttack commands, the ships have to be created with one of these methods. The method I outlined uses the escort function to create a group where I later give each a custom AI.

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.
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 »

Do the Weeviloid2's have turrets as well or other subentities? If its only turrets that are missing, maybe its 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
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

NEW UPDATE!

Version 1.5
-Added new NPC Navy Shuttle
-Added Abandon Ship AI to Behemoths causing Shuttle launches before they explode
-Added all 16 Named Behemoths to OXP instead of Generic Behemoth
-Relocated 3 SecComs in Galaxy 3
-SecCom's now have more variation of ships in Orbit
-Improved SecCom AI and Hails

This pretty much completes my vision for this OXP and should be the last update until I have the mission completed (Unless Eric discovers a better way to implement the minesweeperAI or convoyAI). Thanks everyone for all your help, and I hope you enjoy it. If anyone is feeling literary, I have some Wiki pages that could use some fleshing out. I created over a dozen in the last few days and am little burned out. The navy viper, asp, and shuttle pages particularly demand attention, but all the ship pages could use a little more flare.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Cheers Matt634, many thanks for your efforts and contribution, non techies like me are indebted to all you guys out there who spend so much personal time on making our enjoyment of the game better and better.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

I have a technical scripting question for my work on the next update:

Would it be possible to set the scavengers and shuttles launched by SecCom Stations to be medical ships and navy shuttles respectively? The medical ship I may be able to do on my own since scavengers are launched through AI commands, but shuttles are launched randomly like traders, so AI is no help here. Any Ideas... [clears throat and looks sheepishly in Eric's direction].

And, if it is possible, I would probably change all launching traders to navy transports.
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

Okay, I was little hasty when I said that would be the last update until the mission. I found a couple typos :x which bothered me to no end, so I put together a quick update with some extras I had planned on adding later to make it worth downloading.

Version 1.6
-Added AI to Medical Ships allowing them to recover Escape-Capsules
-Added Missile capability to Frigates
-Fixed a few typos and errors
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Could do it with launchShipWithRole in the stations AI and give the Navy versions a custom role in shipdata. You can also set the number of default shuttles and scavengers to zero in the station's shipdata so that it only every launches the custom ones. Eg when switched to this state, this station launches a patrol ship every 20 seconds until a condition is triggered to take it out of the ATTACK state:-

Code: Select all

"ATTACK" = {
 "ATTACKED" = (setTargetToPrimaryAggressor, "sendTargetCommsMessage: [spacebar-warning]", "markTargetForOffence: 51", increaseAlertLevel, groupAttackTarget, launchDefenseShip);
 "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 15", increaseAlertLevel, "sendTargetCommsMessage: [spacebar-warning]", "launchShipWithRole: random_hits_patrol");
 "ENTER" = ("launchShipWithRole: random_hits_patrol", increaseAlertLevel);
 "EXIT" =();
 "INCOMING_MISSILE" = (fireECM, setTargetToPrimaryAggressor, "sendTargetCommsMessage: [spacebar-warning]", "markTargetForOffence: 51", increaseAlertLevel, groupAttackTarget, launchDefenseShip);
 "NO_TARGET" = ("setStateTo: SCAN_FOR_CRIMINAL_PLAYER");
 "RED_ALERT" = ("launchShipWithRole: random_hits_patrol");
 "TARGET_DESTROYED" = ("setStateTo: SCAN_FOR_CRIMINAL_PLAYER");
 "TARGET_LOST" = ("setStateTo: SCAN_FOR_CRIMINAL_PLAYER");
 "UPDATE" = ("launchShipWithRole: random_hits_patrol", "pauseAI: 20.0");    };

[/code]
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

Thanks Littlebear,

It appears AI is route I'll have to go. I was toying with the idea of giving the navy shuttles a role something like shuttle(9999999) and a conditions line limiting them only to SecCom systems, but this would affect the main station as well. Is there a limit to how long I can pause the AI? I would only want a shuttle launch every 5 minutes or so - can I "pauseAI: 300"?

On a different line,
Please post any notable encounters you have with the Navy in this thread. I won't have any time to play or script until the 10th (finals week is here :cry:), but I'd like to hear people's experiences so I know what's working and what's not when it comes time to update. In particular, I'd like to know what success people have when engaging Navy ships, so I have an idea of how to set the difficulty level of the upcoming mission.

Thanks again everyone!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Don't think there is a limit on pause, but it only effects the execution of a command in UPDATE, so you would need to only launch a shuttle in update with a: "UPDATE" = ( "pauseAI: 300.0", "launchShipWithRole: my_navy_shuttle"); .The AI will still react to attacks and stuff whilst its counting the pause, but if it gets sent to a different state before the count is reached then I don't think the update is done unless it returns to this state and makes the count. If you have a very long pause though it might never get executed as the AI goes off to another state in response to somthing else happening, but if the station doesn't react to loads of things then should work.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Post by Cmdr. Maegil »

I've been away for a while, so I missed the discussion of this great-looking OXP. Though late, here are my two credits:

matt634 wrote:
A bit of perspective,

While my OXP does increase the strength of the Navy, all this discussion of new ships, stations, 112 SecComs... may have overstated its real impact on the Ooniverse.

A Commander has a little more than 5% chance of running into a SecCom system. My script also gives a 5% chance of encountering a Carrier Group. Unless you happen to live on a SecCom planet or constantly misjump - running into the Navy is still a rare occurrence. I really feel that this OXP just brings into fruition the previously held ideas regarding Galcop and its Galactic Navy. It had one, large enough to battle the Thargoid invasion, and it obviously required some amount of military infrastructure to carry out its mission.
Why not put permanent naval bases on rich, high-tech systems including the stations and possibly a whole battle group, but more often just a few ships in maneouvres.

Code: Select all

Trainee Five, you're drifting to port - return to your station!
A force built-up on a random system, preparing to jump to a battle zone in deep space could also be the hook to take the player into the thick - liking it or (more likely) not...

Code: Select all

By order of Rear-Admiral Ssi'tlk Askree of the Galactic Cooperative Navy, all reservists in the system are hereby ordered to join the fleet and follow its wormhole to the battlefield. Cowards and defectors will be court-martialled and punished to the full extent of the law.
Of course, if a player gets involved in it, it should end eventually. You've crated a respawn command, so how about a capital ship kill count for the Navy and the Thargs, and who loses (for instance) five of them first loses (stops receiving reinforcements) and has to hold out for some time until the retreat order comes?
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

Hello Cmdr. Maegil, thanks for taking an interest!

I really like the idea of massed battle groups jumping into interstellar space to battle the Thargoids - leaving witchspace holes for the player to follow. I'll see what I can do for the next release.

Many of the SecCom bases are permanently located in rich, high tech systems, but several are not. I concentrated more on geographical location than system characteristics. You can see maps of all 112 here. SecCom systems do absolutely have at least one battle group located in them, and I have scripted random occurrences of behemoths and frigates orbiting the station (probably returning from the front to re-fit) for some variety. I'm toying with the idea of having Navy ships arrive in real time while the player is visiting the station.

The respawn command for ships is not part of this OXP. Its part of a separate, unreleased "Warzone OXP" I run on my computer. I may released it separately or include somehow in a later update.
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 »

Hi, Matt,

the maps on the wiki are really great, because you see any possible conflicts at first glance! Thanks for moving the SecComs as I requested. Now it's perfect, because really for the inhabitants of planet number 22 the SecCom in number 26 is the place to go to! (Talking of Galaxy 3 here.)

May I ask for another change? Sorry to disturb you again! I have another OXP in the making, called Equilibrium.oxp, which basically deals with some inter-system frictions in the south-east corner of Galaxy 3 (I asked at the time whether there could be clashes with anything else there). For that purpose I imagined that corner to be a place remote from the authorities. One of the main features of the OXP is that the inhabitants of one of the planets try to invade and conquer other planets in the sector. That would of course be very difficult with a SecCom in the midst of the planets. So could you remove the SecCom on Laorbila (planet 181) completely, making this group of planets an attachment either to the SecCom on 204 or 205? If you want to maintain the number of 14 SecComs, you could place an additional one in the cul-de-sac in the south-west corner of the galaxy (planets around 27).
Post Reply