49ers OXP - The Oolite Gold Rush (was: Ore processor)

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

Moderators: another_commander, winston

User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 985
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

Griff wrote:i just wonder if it's best to place the beacon first, then addshipwithinradius the station then give the station an AI to
1. scan for and target the beacon,
2. setDestinationToTarget
3.performFaceDestination
"FACING_DESTINATION"= switch the ai to the normal stationAI, with a bit of luck that should line them up.
I like that idea. :D

It might work to have the beacon spawn the station in the GLOBAL part of the AI. Not quite sure how well this will work though (Astromines seem to run the spawn commando twice - I use it to add the mining pods to get some instant activity around the mines instead of having to wait for it to launch enough craft).
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.

User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 985
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

LittleBear wrote:"And I beheld a pale Commander;
Commanding a pale ship:
And of Him that Commanded the Ship;
His name was Death;
And Hell Followed with Him." :evil:
Ooh yeah. Good stuff :D

In Galaxy 8 the systems claim to have all the usual different forms of government, but as anybody who has visited that frontier knows, they are all in reality closer to what would be called anarchies in the 7 old galaxies.
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.

User avatar
TGHC
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

I'm thinking of giving up sex, and it's your fault Griff!!

Astounding.
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
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2303
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Post by Griff »

whilst we all allow ourselves a quiet moment to allow TGHC's announcement to sink in (!) i thought i'd post to let you know that it looks as if the 'spawnship:' command combined with a <key>spawn</key> dict in the shipdata.plist is working, the station is always pointing in a fixed direction now.

Code: Select all

<key>spawn</key>
<dict> 
<key>position</key>
<string>pwm -104637.88 -71408.84 552582.81</string> 
<key>facing_position</key>
<string>pwm -99710.28  -68559.51 550078.50</string> 
</dict>	
the facing_position co-ordinates are roughly where the navbuoy is being spawned, although i've found that it helps oolite line up objects better if the facing position co-ordinates are quite far away from the object you want to face them, if they're too close the angle is always off

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2303
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Post by Griff »

I've uploaded the mining equipment files here:-
http://www.box.net/public/um19jjbp1s

Image
they're supposed to pop out a cargo pod of gold or minerals every now and again but they don't seem to be doing so, must have a bug in the AI. Ah, just spotted Roberto's thread about trying to get the q_mine ejected by one of his ships - it looks like ejectItem: / ejectCargo: are available only for the player, and spawn: isn't available from inside AI scripts, i wonder if the autominers can be given cargo pods as a missile type then, prehaps they could fire them a short distance into space for players and other npcs to scoop... maybe have a bit of equipment that allows you to hack the autominers to eject all their precious metals
Last edited by Griff on Sun Feb 18, 2007 10:58 am, edited 3 times in total.

User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 985
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

:whistles:

Screenshots like that would do good in Wikipedia.org article on Oolite (imo) - just as an example of a user modification and perhaps a mention of the planet branch.


I don't know if this would fit in with the other things for the station, but you could launch the autominers from the AI, by giving them the role as scavengers for the station.

Something like this (from Commies) in the station's entry:

Code: Select all

		<key>scavenger_role</key>
		<string>astromine-scavenger</string>
		<key>max_scavengers</key>
		<integer>3</integer>
		<key>likely_scavengers</key>
		<integer>3</integer>
and then give the autominers the scavenger role you used for the station.

Not sure how to go about having the station spit out cargo (I did think briefly about it a while back but I don't think I came up with anything). Sounds interesting with your missile idea.
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.

User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2718
Joined: Tue Apr 04, 2006 7:02 pm
Location: I escaped The Labyrinth with the assistance of my fledgling. After many battles, I'm in the Nexus.

Post by LittleBear »

Perhaps if you gave the Unit a tweaked stationAI, that had a pauseAI (whatever) followed by a launchDefence ship.

Then in the shipdata have the DefenceShip as:-

<key>defense_ship_role</key>
<string>minerpod</string>
<key>max_defense_ships</key>
<integer>20</integer>

Define the minerpods in the same way the Doc did for his special splinters and that should get it launching a pod every x seconds.

Only trouble would be I guess you'd have to add a docking port. But if you made the port small (just bigger than a pod), then they should come popping out of the slit, but the slit would be too small for anybody to dock with. Might also have to give the pods a simple AI that caused them to move a short distance and then performTumble, so they'd need a low top speed.

Only trouble with the missile idea would be I think you'd have to get the ship to attack somthing to fire. Could have it attack the player, but then it would turn red on the scanner, or if it attacked another ship then it would be attacked.

The ClusterBombs in Assassins have no lasers (but lots of missiles) and so spew missiles out when the attack, but this does mean they turn red when attacking. Fine for a hostile automated missile launcher, but not whats wanted here!
My OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits and Renegade Pirates can be downloaded from the Elite Wiki here.

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2303
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Post by Griff »

thanks for the ideas, i've rescaled the objects a bit since i uploaded those files. i don't think the missile idea is going to work afterall, i thought i could spawn a 'miningbeacon' (basically just a 'likeship-ed' nav point with a new role) near the asteroid cluster that the autominers would rolldice, and if successful, target this beacon and do a 'performattack' on it to fire their 'missiles'. the missiles would then travel close to the miningbeacon and explode (dealing no damage, just a simple 'becomeExplosion' command) spawning scoopable cargo pods stuffed full of minerals as a death action.
The AI at the moment seems to be rolling its dice correctly ("MINING"), occasionaly getting a result that sends it to the fire_missile branch ("EJECT_MINERALS") of the script, the autominers then re-orientate themselves to point at the beacon but they never fire a missile unless i blast them with a few laser shots - which is odd because the "attacked" command should send the autominer to the ("SHUTDOWN") branch untill hostiles have moved on, i hope you guys don't mind me posting so many requests for help!

anyway here's the ai script (with place holder comms messages to help debug the script and very good odds at rolling a 1) - is there a different way to launch a missile other than performattack? - i've made sure the autominers don't have lasers fitted only 3 missiles.

Code: Select all

{
    GLOBAL = {
        ENTER = (performTumble, "setStateTo: MINING"); 
        EXIT = (); 
        UPDATE = (); 
}; 

"MINING" = {
ENTER = (switchLightsOn); 
      "ROLL_1" = ("scanForNearestShipWithRole: player");
	  "TARGET_FOUND" = (setTargetToFoundTarget, "sendTargetCommsMessage: Hey, I rolled a 1!", "setStateTo: EJECT_MINERALS"); 
      "ATTACKED" = (setTargetToPrimaryAggressor, "commsMessage: [griff_proc_alert]", "setStateTo: SHUTDOWN");  
	  EXIT = ();
	  UPDATE = ("rollD: 3", "pauseAI: 4.0");
}; 

"SHUTDOWN" = {
ENTER = (switchLightsOff, "pauseAI: 20.0", "setDesiredRangeTo: 30000.0", scanForHostiles);
"NOTHING_FOUND" = ("setStateTo: MINING");  
EXIT = ();
UPDATE = ("pauseAI: 20.0", scanForHostiles);
}; 

"EJECT_MINERALS" = {
ENTER = ("setDesiredRangeTo: 30000.0", "scanForNearestShipWithRole: griff_buoy");
"TARGET_FOUND" = (setTargetToFoundTarget, performAttack, "pauseAI: 20.0", "setStateTo: MINING"); 
"NOTHING_FOUND" = ("setStateTo: WHERE_BUOY");   
UPDATE = (); 
EXIT = ();
}; 

"WHERE_BUOY" = {
ENTER = ("scanForNearestShipWithRole: player");
"TARGET_FOUND" = (setTargetToFoundTarget, "sendTargetCommsMessage: Can't find the Griff_buoy!", "setStateTo: MINING");  
EXIT = ();
UPDATE = ("pauseAI: 20.0", scanForHostiles);
}; 
}

again, thanks for all the help on this and sorry for de-railing the thread yet again!
Last edited by Griff on Tue Feb 13, 2007 12:02 pm, edited 1 time in total.

User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2718
Joined: Tue Apr 04, 2006 7:02 pm
Location: I escaped The Labyrinth with the assistance of my fledgling. After many battles, I'm in the Nexus.

Post by LittleBear »

Nice workaround!

I think your code is fine, its just that they only have 3 missiles so are reluctant to fire them, saving their missiles untill they are in real danger. In code the ship is in Attack Ship state, just as a NPC ship attacking only fires missiles occasionally, usinging its lasers 90% of the time, your ship is doing the same thing (even though it doesn't have any lasers to fire). I reckon if you gave it 100 missiles (just as test) then it would start spewing them out. Then reduce the number of missiles till it is firing them at the rate you want. The Clusterbombs in assassins have 20 missiles and this causes them to fire one off every 20 seconds or so. (they are always in the Attack Ship state though, so you might want to give yours more).
My OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits and Renegade Pirates can be downloaded from the Elite Wiki here.

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2303
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Post by Griff »

ah, i'm the same, at 30cr per missile and very poor odds at mining something profitable it's no wonder they'd rather die that fire off a missile.

LB, thank you for the fix! i gave them 30 missiles and now it's like firework night out there with cargo pods launching all over the place

User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2718
Joined: Tue Apr 04, 2006 7:02 pm
Location: I escaped The Labyrinth with the assistance of my fledgling. After many battles, I'm in the Nexus.

Post by LittleBear »

Cool!

Just a thought, you might want to keep the scan for player bit in, so it dosen't start doing this until the player is nearby. Otherwise, by the time the player arrived at the bit of the system were the unit is, it would probabley have run out of pods!

BTW, as an optimisation, you could just have the missile role as the cargo pod rather than adding the pods with death actions!
My OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits and Renegade Pirates can be downloaded from the Elite Wiki here.

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2303
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Post by Griff »

I've updated the link to the mining equipment in the post above
it's still very much work in progress (thanks guys for the help!) but at least the autominers are working now and releasing cargo. I've got my usual problem in that i'm having to use cargo_scripted items to to award the player some cargo after scooping the pods and the following script:-

Code: Select all

<key>processor_cargopod_gold</key>
	<dict>
		<key>like_ship</key>
		<string>barrel</string>
		<key>roles</key>
		<string>processor_cargopod</string>
	<key>cargo_type</key>
	<string>CARGO_SCRIPTED_ITEM</string>
	<key>script_actions</key>
		<array>
			<string>debugOn</string>
			<string>testForEquipment: EQ_FUEL_SCOOPS</string>
			<dict>
				<key>conditions</key>
				<array>
					<string>foundEquipment_bool equal YES</string>
				</array>
				<key>do</key>
				<array>
					<string>awardCargo: 2 Gold</string>
				</array>
			</dict>
			<string>debugOff</string>
		</array>
			<key>scanClass</key>
			<string>CLASS_CARGO</string>
			<key>thrust</key>
			<real>1</real>
			<key>name</key>
			<string>AutoMiner Pod</string>			
	</dict>
the problem with this is it's possible to keep scooping and keep being awarded cargo even though your hold is full, is there a way to change the testForEquipment: EQ_FUEL_SCOOPS to a 'testForCargoSpace' instead.

I think i'll try adding a few scavengers next, as they autominers are generating so many pods i need something to hoover them up, and possible some security turrets to ward off pirates.

User avatar
Commander McLane
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Dr. Nil wrote:
LittleBear wrote:"And I beheld a pale Commander;
Commanding a pale ship:
And of Him that Commanded the Ship;
His name was Death;
And Hell Followed with Him." :evil:
Ooh yeah. Good stuff :D
Yes, good stuff, as most of the stuff from that origin. I hope you realize that the original quotation is from the Bible:
Rev. 6:8
And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him.
(King James Version)
:)

User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 985
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

Commander McLane wrote:
Dr. Nil wrote:
LittleBear wrote:"And I beheld a pale Commander;
Commanding a pale ship:
And of Him that Commanded the Ship;
His name was Death;
And Hell Followed with Him." :evil:
Ooh yeah. Good stuff :D
Yes, good stuff, as most of the stuff from that origin. I hope you realize that the original quotation is from the Bible:
Rev. 6:8
And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him.
(King James Version)
:)

Yeah. The Egyptians were great storytellers. The Romans really did a great job picking up the coolest stories from other sun worshipers when they made the collage religion about worshiping the Son/Sun which is really a trinity. At dawn the holy spirit breathing life into everything, at noon the Father highest in (on) the heavens and at dusk the dying Sun that is resurrected the next morning. And of course in the course of the year dies at 33 degrees (reaches the lowest point on the horizon) and stays dead (rising within a degree or so) for 3 days until resurrected and born on the 25th of December. And over the years passing through the zodiac (twelve followers) and the cross made from the equinoxes and solstices while burning up, sacrificing himself for men to live 'eternally' (though not as individuals). And when did the Romans think it was a good time to do a major update of the sun worship religion? Well just about as the Son started rising in the zodiacal sign of Pisces. Why didn't they use the cross straight away? Because that didn't distinguish it from other religions which also used the cross for their sun worship (and put halos behind the head in depictions of the Son gods also). Instead they used the fish to signify the Son risen in Pisces. And can the Sun stand on the water? Yes! And can the Sun turn rainwater into grapes for wine? Oh yeah. Can we get an Amen to that (or should it be an 'Amon' like many Egyptian priests used to end their prayers?)

NB: Imo Jesus and Paulus are mythological figures and the early Christians probably weren't persecuted any more than the Germans were persecuted by the Jews prior to Hitlers rise (to which I'm sure that they would have been able to fabricate 'evidence' had they been given power over Europe for 1-2000 years like the Christians had).

And yeah. All this really belongs in Outworld :)
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.

User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2718
Joined: Tue Apr 04, 2006 7:02 pm
Location: I escaped The Labyrinth with the assistance of my fledgling. After many battles, I'm in the Nexus.

Post by LittleBear »

As the Character in "Pale Rider" was reading from the Bible when she says this (as Eastwood appears on his pale horse), I'd kinda figured that! :D :D

I'm not religious, but I have read it and I totally agree, there is some beutifull poetry and a good moral message in that book, even if you don't hold a religious view. "Love thy neighbour as thy self", is a good principle regarless! :wink:
Last edited by LittleBear on Sun Feb 18, 2007 3:10 pm, edited 2 times in total.
My OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits and Renegade Pirates can be downloaded from the Elite Wiki here.

Post Reply