Bang

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

Moderators: winston, another_commander

User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2310
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Re: Nuts >:-/

Post by Captain Hesperus »

Killer Wolf wrote:
put it in, hyped, went to the sun and there was my ship in the distance. got up to her, lo and behold were four Asp escorts. Get in there. i thought...
decided to playtest a bit more, jumped to Ensoreus, heading to the planet i saw another - they're pretty damn big - and WFI'd up to her. no escorts. :-/
next time around, was one heading for Ararus - 3 escorts, 2 nearby, one had been off wandering and was coming back.
Have you set it up to *always* have escorts? Because if not, then chances are it randomly generated a ship without escorts. As for the coming back, maybe the ship had been attacked and the escorts were returning from blatting the attacker.

Isn't it that the pirateAI has the ship attack other ships until it's cargo hold is full? In that case, the Asp wouldn't attack other ships as it has a 0TC capacity. It would only attack if the mothership was attacked. I think LB made his Renegades have a minimum 1T cargo capacity but altered the shipdata.plist to prevent them having fuel scoops so they would always be 'hungry'.

Captain Hesperus
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

That's a good tip Doc - I'll try and remember that for the TBC oxp (once I've sorted the cargo out).

LB pointed out that he modded some AIs to make Escorts actually behave like escorts - so it might be worth going through the Assassins AIs to try and work out what he did... (which might be like reading the bible to try and decide what God has in store for us all...)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2280
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

cheers for the answers people :-)

@Doc - re the "escort_Role" in the big ship's entry, and "Roles" in the escort's - i'm just using Asps which already have a shipdata buried in the main code, how do i add a new role to that? in the OXP folder i only have data on my ship cos the rest are existing ones (was thinking of a dedicated Vampire w/ a new livery etc, don't think i'll go there tho. another thought was having an official police escort - anyone know how i do this? just define Vipers as the escort ship?

@Capt - "Have you set it up to *always* have escorts? Because if not, then chances are it randomly generated a ship without escorts." er....huh?! i never even knew that random genning was a possibility! did i miss something on the wiki etc? :-/ i've simply copied the SetUpEscorts, Escorts and Escort-ship ~ what else do i need for always genning them??

cheers,
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

regarding AI's for escorts, i think LB worked out that whenever a ship gets added as an escort to another ship it is always assigned the escortAI.plist despite whatever AI is specified in it's shipdata.plist.

eg, the cobramk1 has 'pirateAI' as it's AI_type in it's shipdata.plist entry,
but if you or oolite added a cobramk1 as an escort then this specified AI is ignored and the ship follows the escortAI instead - i suppose this is done because if the escorts were left following the pirateAI, then they would just attack the ship they're supposed to be guarding and make off with it's cargo!
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2280
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

did the dump thing last night for a couple jumps, no Asps listed at all :-/

still can't find stuff about the 100% creation thing Captain, is that a script thing or what?
User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2310
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Post by Captain Hesperus »

Killer Wolf wrote:
did the dump thing last night for a couple jumps, no Asps listed at all :-/

still can't find stuff about the 100% creation thing Captain, is that a script thing or what?
As I've previously said, I have no skill or experience with scripting, but I have encountered ships (like Coachwhips, Anaconda Spaceways, etc) that have had escorts on one encounter and none on another. I can't say that it's because they were generated or that they were destroyed/off fighting pirates :)

Captain Hesperus
"Piracy is the bane of my existance. Except when I have the chance to perform it."
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2280
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

nooooooo! and all this time i was awaiting an informative response w/ some AI code to Cut & Paste! Denied! >:-/

:-D

i've decided to frick about w/ an AI. first time ever so expect more rants in the upcoming days. for the big ship, i've decided to do a bog simple :-

global : set up escorts --> set AI to "SunskimExitAI" (or whatever it's called)

hopefully that will set up the escorts (ie take that out the shipdata bit, see if it's more consistent) and then leave the ship to continue on it's merry way. due to it's mega size, i really want it to be genned somewhere in mid-space as opposed to launching (they're twice the size of a station!!) and after sunskimming come back near a station and park but i think that might be more than i can handle. save following the bugger around for hours on end too, i dunno how to prove the AI is functioning.

LittleBear had an interesting snippet on the other thread too :-
check for ships : teamdef.
ships found less than 5 (I wanted 4 escorts)
addshipswithinRadius teamdef 4 [the co-ordinaters of the mothership] 150
not sure of the official syntax of that one but i'm off to wiki now to see if i can suss it!

<ten mins later!>
that actually doesn't look too bad, cept one thing - this "add to w/in x metres of the ship's co-ordinates : how do i find the ship's coordinates?

ta!
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 can use a spawn method, that always warps in ships in a globe around the calling entity.

You cannot know the location of the mothership (I think) unless you include checks for being close to certain objects (as in the behemothAI).

edit: maybe you can...
IIRC there is a getCoordinatesFromTarget method.

However you may need to make the fresh escort roam around the spacelanes first in order to get within scanning range of the mother
Riding the Rocket!
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2280
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

However you may need to make the fresh escort roam around the spacelanes first in order to get within scanning range of the mother
you what now? i want the escort to gen beside teh mothership, he ain't gonna be a good escort if they need to run about looking for who they're supposed to be escorting :-/
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 »

then 'spawn' is D methed 4 u feller.
Riding the Rocket!
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2280
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

Well, i tried "spawn" in the shipdata (like spawning my explosion fragments, which work) and it still seems hit and miss, according to the STDERR dump :-(
does it work better in an AI (i *did* try but it didn't seem to be working at all so i dumped it to try the shipdata option), and/or do i still need the ESCORTS/ESCORT-SHIP bits?

cheers


PS : bah, just found this from LB : "That was Roberto's problem! They would work in Shipdata as death_actions, but if you tried to tell Oolite to Spawn a ship in AI (where you need it to be to launch ships when attacked), Oolite won't do it. "

tch!
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 »

Oolite can do any scripting method in AI, but you have to put scriptActionOnTarget: before the method.

Example from henchmanAI in Anarchies.oxp:

Code: Select all

        "TARGET_FOUND" = (setTargetToFoundTarget, "sendTargetCommsMessage: Problems with the cops? Try and visit the Hacker Outpost behind the witchpoint.", "scriptActionOnTarget: spawnShip: hacker-outpost", "scriptActionOnTarget: addShipsWithinRadius: asteroid 20 wpm 0 0 -80000 30000", "pauseAI: 10.0", "switchAITo: pirateAI.plist");
Works fine every time.
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 »

that one would be REALLY easy to find won't it?

The cops would be blasting at it in minutes. :lol:

why not have a number of duplicate entries of hacker-hermit, with different spawn locations. this makes the location semi-random.

Have the player find it by advanced scanner or following the henchman back to the hermit?


didn't know it needed the scriptactionontarget... those methods will be performed on the current target though (the player).
Riding the Rocket!
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

Arexack_Heretic wrote:
didn't know it needed the scriptactionontarget... those methods will be performed on the current target though (the player).
Scriptactionontarget is really neat. I used it to communicate from the escorted ship's AI to the mission variables in the Oo-Haul escort missions. In which case it doesn't matter what the target is :)

an example

Code: Select all

"DESIRED_RANGE_ACHIEVED" = (setTargetToSystemStation, "scriptActionOnTarget: set: mission_mymissionvariable 1", "setAITo: mynextAI.plist");
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
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 »

Arexack_Heretic wrote:
that one would be REALLY easy to find won't it?

The cops would be blasting at it in minutes. :lol:

why not have a number of duplicate entries of hacker-hermit, with different spawn locations. this makes the location semi-random.

Have the player find it by advanced scanner or following the henchman back to the hermit?


didn't know it needed the scriptactionontarget... those methods will be performed on the current target though (the player).
1) Well, yes, but there are no cops in Anarchy systems, are they? And if so they would be way to busy to ever reach the witchpoint.

2) I can think about that semi-random thing. One reason I chose a location behind the witchpoint is that I don't want it to interfere with rock hermits or asteroid fields called by the engine.

3) It does need scriptActionOnTarget, and, indeed, that does somehow limit the possibilities you have. But for spawnShip or addShipsAt the target just doesn't matter, as Dr. Nil also wrote.
Post Reply