Couple of questions...

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

Moderators: winston, another_commander

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 »

Hmm, well would giving the bomb:-

<key>cargo_type</key>
<string>CARGO_SPECIALBOMB</string>

and then telling the mothership in it shipdata that it cargo is the specialbomb, work?

As long as Roberto can get his ship carrying the special bomb, then he should be able to eject it with a simple eject cargo in the AI.
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
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

I don't think it works that way, but try. It might. I've been wrong before. ;)
Riding the Rocket!
User avatar
Roberto
---- E L I T E ----
---- E L I T E ----
Posts: 318
Joined: Sun Jun 11, 2006 1:16 pm
Location: London, UK

Post by Roberto »

I changed the command in the AI to simply ejectCargo.

I added these lines to the shipdata entry for the mothership:

<key>cargo_type</key>
<string>CARGO_CARRIED</string>
<key>cargo_carried</key>
<string>1 qbomb-taranis</string>

And guess what? It didn't work. And yes, it's probably because (according to the Wiki) it has to be something defined in Commodities.

Can't find anything about ejecting cargo in the trader AIs either (though I'm pretty sure it would work if I just had a regular cargo - maybe I should just have the bad guy eject food at you!).

Is Giles on holiday at the mo? I suspect only he would know how to do this. I remember him saying somewhere that traders now (very) occasionally eject Q-mines, so there must be a way. There must be!

Perhaps I should turn back to the escort problem. Or just go and headbutt the wall and then do something else! :)
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 you maybe copy Giles's commodities plist into your OXP and add an entry for the special bomb? Though I guess if that worked, then special bombs would start comming up on the F8 screen! :shock:

EDIT: And I have a nasty feeling, you'd get a normal cargo cannister ejected, put when you scooped it, it would come up on the Manifest as Special Bomb, rather than getting the ship to actually eject the Special Bomb. Dunno stumped!
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
Roberto
---- E L I T E ----
---- E L I T E ----
Posts: 318
Joined: Sun Jun 11, 2006 1:16 pm
Location: London, UK

Post by Roberto »

They might well do :)

It all seems so convoluted. I don't see why "ejectItem: qbomb" shouldn't work.

Maybe ejectItem only works for the player or something. But I'm tired of trying to figure it out - going to wait for Giles's advice :)
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

it works for the cloakingdevice.
Riding the Rocket!
User avatar
Roberto
---- E L I T E ----
---- E L I T E ----
Posts: 318
Joined: Sun Jun 11, 2006 1:16 pm
Location: London, UK

Post by Roberto »

It's not my day!

I tried setting up the escorts as suggested, in an attempt to stop them defaulting to escortAI (if indeed that is what's happening):

1. I removed these lines from the mother's details in shipdata:
<key>escort-ship</key>
<string>gecko-taranis</string>
<key>escorts</key>
<integer>8</integer>
2. I removed setUpEscorts from the mother's AI (as it supposedly relies on those shipdata details).
3. I modified the escorts' AI thusly (note that I have the mother's role correct):
GLOBAL = {
ENTER = ("scanForNearestShipWithRole: taranis-shark");
"TARGET_FOUND" = (setTargetToFoundTarget, suggestEscort);
ESCORTING = ("setDesiredRangeTo: 0.0", "setStateTo: FLYING_ESCORT");
EXIT = ();
UPDATE = ();
};
4. I modified the script to add 8 escort ships at the same location as the mother (used addShipsAt).

Result? No escort ships at all! Either they didn't appear for some reason, or buggered off somewhere by the time I reached the mother.

So it looks like I'm stuck with defining the escort details in shipdata and using setUpEscorts, and thus (presumably) the AI inconsistencies - sometimes attacking properly and sometimes not.

So, again, I think I need Giles's advice. I feel like I've tried everything.
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 »

Cloaking device is spawned in shipdata by the ships Death Action. Giffs BattleBotts spawns splinter missiles and my Nova Ship spawns the Nova Device when they die no problem. Roberto wants the ships to fire the mine whilst its still alive though.

On the escorts they probeberly buggered off. I think I could get away with this as I was using them as "Guards" with an AI telling them to wait where they were until they found the player.
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
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

I know about the deaths.

You need the <key>escorts</key> : <$>n</$>
it is crucial, without it, the mother has no reason to accept any escorts.

Only problem is: the ship will accept any escort without a defined escort_role.


Why has it buggered off before you get to it? Just have it sit at the WPB.
Riding the Rocket!
User avatar
Roberto
---- E L I T E ----
---- E L I T E ----
Posts: 318
Joined: Sun Jun 11, 2006 1:16 pm
Location: London, UK

Post by Roberto »

Before I go through it all again (cos it's getting v dull), won't putting…

<key>escorts</key>
<integer>8</integer>

…make it spawn eight random escorts? Or does it only generate them itself if it has escort-ship defined as well?

There's no danger of it finding another kind of escort, cos it's way off the normal space lane.

The ships are meant to be patrolling as you discover them.
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 »

If you want them to patrol and not bugger off. Why not scrap the idea of escorts and give all the ships an AI that sends then go to point 1, go to point 2 go to point 3, go to point 1. Then they'll all go round in circles on patrol. Have scan for player / found = attack nothing found = go to point 1. (Sleezen did this with the Graveyard Kraits in his OXP - they go round and round the graveyard unless you attack them or attack the monuments -download is on any of his posts). That should give the effect you want without having to open up the whole escort can of worms! :wink:
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
Roberto
---- E L I T E ----
---- E L I T E ----
Posts: 318
Joined: Sun Jun 11, 2006 1:16 pm
Location: London, UK

Post by Roberto »

They're meant to be protecting the mother, that's the thing. I don't want some/all of them to be flying merrily around while you're lasering into the boss.

I really have tried everything now. I've discovered that setUpEscorts on its own generates a random group of escorts - you can specify the number and type using "escorts" and "escort-ship" in shipdata. So if I'm using addShipsAt to generate escorts in the script file, I can't have setUpEscorts in the AI.

Using addShipsAt generates the escort ships, but despite being told to scan for the mother and suggestEscort, they just sit there. Doesn't matter whether or not an "escorts" number is defined in shipdata for the mother. The mother doesn't send back whatever signal it is to make them start escorting. Over time, I believe these ships must drift away or something (I tested them at the witchpoint to check they were actually appearing; they're normally generated somewhere near the sun, and by the time I get there, they're gone).

I'm stuck with having the mother generate its own escorts, and therefore (it seems) stuck with the inconsistencies of escort behaviour when it comes to attack. I've made the AIs as good as I know how to make them, but I can't stop ships from sometimes failing to engage as they should - either because they're using escortAI for some reason, or because something else is going on behind the scenes.

I await Giles's wisdom, as on the Q-bomb-launching issue :)
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 »

If you made the go to points in a 5 km sphere, they would never get too far away from each other. If they all have scan for ships, player, kill player as an update, as soon as the player comes within their scanner range they will all lock on, so the escorts won't fly around whilst you laser the mother.
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
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

or have them reply to distressCalls?
Riding the Rocket!
User avatar
Roberto
---- E L I T E ----
---- E L I T E ----
Posts: 318
Joined: Sun Jun 11, 2006 1:16 pm
Location: London, UK

Post by Roberto »

Distress calls wouldn't be appropriate in this case. And I'd rather have them patrolling a decent-sized area. Plus, if the mother injects away (as it will usually when attacked), I want the other ships to at least try to stick with it. I guess if I didn't have them escorting, this could be accomplished via scan and move orders - but that would mean they weren't looking for the player.

Interestingly, the mother has a player scan as an update in every state of its main AI, yet it sometimes takes a while (or simply fails) to respond! I guess I've just got to accept that the AI system is a little quirky.
Last edited by Roberto on Tue Sep 12, 2006 10:43 am, edited 1 time in total.
Post Reply