Couple of questions...

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

Moderators: winston, another_commander

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 »

Maybe you could have them scanForHostiles?

If ships are spawned close together (I believe) they will belong to the same group (maybe roles need to be shared too).
When one is attacked then, the others should see the offensive ship as hostile.
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 »

Hmm - I'm weighing up the pros and cons now. Going to test it a couple more times as it is. Maybe I could go for a halfway house - the mother could have some dedicated escorts, with a few independent ships patrolling separately as well. I guess if they're actively hunting you they'll try and stay with you, so if you're chasing the mother they sort of will as well. In theory!
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 »

Think the problem with defaulting to escortAI is that under look for buisness, the escorts can be sent into route1patrolAI, which is a certainty to cause them to wander off.
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 »

You COULD put a customised version of escortAI.plist in your OXP/AIs folder, but it will replace the AI of ALL escorts then.

Which looks to me a bit overkill or even like killing innocent bystanders in order to get that rabbit! </Elmer Fudd> :lol:
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 »

LB - nah, they're wandering off when they're *not* generated as escorts.
Arexack - you're right, that would be overkill!

I'm gonna go with the half-and-half solution. As it stands (with them all as generated escorts) it either works perfectly... or not very well.
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 »

I tried changing the standard escortAI to closeescortAI where I changed every set to partrolAI command to a look for mother command (and gave my escorts closeescortAI in their shipdata entry) and STILL found that whilst my Mothership would come up with a bunch of escorts at the w/s becon as a test, when I added her to a particular pwm positions (to hide her somewhere in the system - so the player would actually have to find "the mark"), by the time I got there, she would be pootling along to the planet, like I told her to.

BUT I would often come across her "escorts" completly separted from her, fighting a pirate becuase they had had found a SuperCobra or some other fugitive on the way to the planet and for some reason had gone into, "hey that guy is a crim. Let's go and kill him" mode rather than flying along with mum as they were meant to. (or maybe it is that the pirate attacked and mum made a run for the planet whilst the escorts dealt with the trouble maker). Eitherway, it is really hard to keep mum and escorts together!

I am conviced that for some reason escorts will always follow EscortAI, and therefore possibley they have a chance of going into patrol mode if somthing interesting comes up and won't follow the AI you give them! :shock:

That said, Murgh seems to have pulled it off with his Transports, as I always encounter his transports flanked by a nice tidy group of escorts, flying in formation, but I'm pracked if I can figure out how he did it! :?

When I've tried to do the same thing, they form up nicely when spawned, but the escorts wander off and so when the player encounters them, the escorts have buggered off!

In the end, with 10 victims, plus andother 6 sub-missions to script for assassins plus the support craft, I just thought "keep it fold"! There probabley is a way to do what you want with escorts, but I think I manged to get the same effect in other ways and escorts are really hard to make them do what you want unless you are a Master of AI coding!
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 »

I'm certainly no AI master, but I have managed to improve things a lot in the last couple of hours. My patience has finally been rewarded :)

What I've ended up with is a three-tier protection system for the mother!

1. Three mother-generated escorts (interestingly, it always seems to create one less than the number you specify in shipdata).
2. Independently generated ships following a parallel but slightly different course to that of the mother (too close and there seems to be a risk of collision on the turns; too far and they might not be near enough to defend the mother adequately).
3. Independently generated ships following a totally different course to that of the mother (but still patrolling the same area of space) - thus avoiding having too many ships all together, and lending a bit more randomness to the encounter.

I've also discovered that moving the "player scan" from before the pause to after it in this line...

UPDATE = (setDestinationFromCoordinates, checkCourseToDestination, "pauseAI: 6.0", "scanForNearestShipWithRole: player");

...seems to improve responses dramatically (it certainly looks like it from the tests I've done so far). I guess maybe ships were sometimes forgetting what they were doing during the pause!

All in all, I'm pretty pleased with what I've got now. You seem to be guaranteed a good fight, with your opponents all behaving in different ways, and turning up and choosing to enter the fray at different points. There's no danger of anyone becoming distracted by random traders/pirates either, as it all takes place far from the normal space lane. Plus there's another nice element which I don't want to reveal yet :)

Now if I could just figure out how to trigger that Q-bomb launch... :)
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 »

1: Might be that the number entered in <escorts> is actually group size, including mother.
Riding the Rocket!
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 »

Q bomb is odd!

spawn: specialbomb 1

definatley works as a command in ship data, as I've got this working (and not just q-mining by blowing up the local sun :twisted: BUT only as a comand in shipdata). Maybe you can't have a spawn comand in AI, which is what you what. Think you are right and only the Master & Commander can answer this.
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 »

Arexack - yes, that does seem to be the case. If it's widely confirmed I could amend the Wiki.

LB - yep, it's one for Giles, when he has the time :) It just makes sense for the main bad guy to deploy the mine as a last resort, i.e. when he's low on energy - not randomly during the course of the battle, and not in the instant he explodes!
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 »

You could have him 'explode' then spawn a new real victim and a q-mine...
Last edited by Arexack_Heretic on Tue Sep 12, 2006 11:57 pm, edited 1 time in total.
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 »

God knows how you'd spawn something right where the ship was at that particular moment, though... Plus it probably wouldn't look like the bomb was being "launched" anyway.
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 believe one can specify the spawn coordinates....
(see lord of the racings)
If I'm not totally insane, these are referenced to either the default WPm system or "spawnlocation=o+some coordsystem"
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 don't know how you could get the original ship's coordinates (and speed, and facing) at the moment it reaches low energy and feed them back into the AI, though.

It's just too damn fiddly. I think the ability to get an NPC ship to launch a Q-bomb when it's low on energy would be generally useful, so it ought to be simple to do :) I mean, it's a weapon of last resort, so it ought to be possible to get NPC ships to use it as such.
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 »

Another problem that we may be able to solve - I want all of these ships to have an "offender" rating. What's the best way to do this? Actually, what's *a* way to do this? :)
Last edited by Roberto on Wed Sep 13, 2006 12:12 am, edited 1 time in total.
Post Reply