Page 2 of 8

Posted: Wed Dec 27, 2006 12:58 pm
by Griff
Hi Doc
Sorry, i should have checked my facts before posting!
A daft idea i know, but I wonder if another way of making mining profitable would be to add 'ore refinery' stations to some systems that pay out more credits for minerals/alloys etc than the main system stations do? pehaps the player would have to have an ore processor fitted to their ship before being allowed to dock at a refinery? if you do go the custom asteroid route (although i hope you can get your solution working as it's much more elegant) prehaps a benefit of having an ore processor on your ship would be that it would also modify the space compass to direct you to ore rich asteroids?
oo, and maybe these ore rich asteroid fields would be jealously guarded by some prospectors already mining there so there's lots of opportunity to muscle in on innocent ships trying to make a meagre legal living!

Posted: Wed Dec 27, 2006 1:39 pm
by Dr. Nil
LittleBear wrote:
This is a bit of a workaround, but should work:-

Give the special_asteroid an AI that includes a scanforshipwithrole : asteroid, Target found = scriptactionontarget: landonPlanet.

That way, if special asteroids are added, they become the only asteroids in the game, as they remove the normal asteroids! So they player without the special scoop attachment encounters the normal non-profitable rocks, but the player with the scoop attachment only meets profitable rocks.
It's really a clever workaround. I does leave one problem though. How to get the new asteroids clustered around Hermits, Coves and Mines from within this oxp (as it would leave dockable asteroids floating all alone in desolate places). Or is there already a workaround for this (I was looking for one without coming up with any when working on an earlier project).
Griff wrote:
Hi Doc
Sorry, i should have checked my facts before posting!
A daft idea i know, but I wonder if another way of making mining profitable would be to add 'ore refinery' stations to some systems that pay out more credits for minerals/alloys etc than the main system stations do? pehaps the player would have to have an ore processor fitted to their ship before being allowed to dock at a refinery? if you do go the custom asteroid route (although i hope you can get your solution working as it's much more elegant) prehaps a benefit of having an ore processor on your ship would be that it would also modify the space compass to direct you to ore rich asteroids?
Hi. I've also been thinking of the trade station/ space factory route. But not using equipment which is an interesting new idea. It could also be a license to mine. Whether this equipment ever gets working or not, trade stations and factories would still make it profitable to trade a wider variety of goods. Like Q enrichment plants buying radioactives at a noticable higher price than stations or things like that. I'm not really up to doing such a thing right now, but I hope to see a lot of different options like that added in oxps.

One way to locate asteroid fields I thought of, would be to make a variant asteroid (like one in 20 or so) which was owned. I.e. tagged for later extraction with a beacon and illegal to shoot at.

--

Please keep the ideas coming. Even if some of them can't be immediately used for exactly this kind of Ore Processor, then they are still very valuable for the many necessary oxps that haven't been made yet. And they might also recombine into something totally unexpected. :D

Posted: Wed Dec 27, 2006 2:01 pm
by LittleBear
Hmm, tricky!

Perhaps a "scriptactionontarget: becomeSpecialAsteroid" to turn them into special asteroids. If the special asteroid had a hugh scanner range, like 999999999999 then it should find and convert all the rocks in the system.

Only trouble is, I don't know if this is a valid command. becomeUncontrolThargon works but I don't know if a custom role is allowed.

I think the adding in clumps is done by the game engine. PirateCove.oxp piggy backs this by calling the Cove by the same role as the native hermit.

Posted: Wed Dec 27, 2006 2:22 pm
by Dr. Nil
LittleBear wrote:
Hmm, tricky!

Perhaps a "scriptactionontarget: becomeSpecialAsteroid" to turn them into special asteroids. If the special asteroid had a hugh scanner range, like 999999999999 then it should find and convert all the rocks in the system.

Only trouble is, I don't know if this is a valid command. becomeUncontrolThargon works but I don't know if a custom role is allowed.

I think the adding in clumps is done by the game engine. PirateCove.oxp piggy backs this by calling the Cove by the same role as the native hermit.
Another good idea there! Thanks.

Perhaps it could be done like this: Replacing all asteroids through a high role value, with something which has an AI which checks for the equipment and then either spawns an asteroid of one or another type according to the result, before performing a land on planet itself. What do you think?

(btw The Astromines piggy back on both Hermits and Coves to be close to asteroids without making new fields)

Posted: Wed Dec 27, 2006 3:27 pm
by ArkanoiD
Dr.-SPACE-Nil wrote:
LittleBear wrote:
Hmm, tricky!

Perhaps a "scriptactionontarget: becomeSpecialAsteroid" to turn them into special asteroids. If the special asteroid had a hugh scanner range, like 999999999999 then it should find and convert all the rocks in the system.

Only trouble is, I don't know if this is a valid command. becomeUncontrolThargon works but I don't know if a custom role is allowed.

I think the adding in clumps is done by the game engine. PirateCove.oxp piggy backs this by calling the Cove by the same role as the native hermit.
Another good idea there! Thanks.

Perhaps it could be done like this: Replacing all asteroids through a high role value, with something which has an AI which checks for the equipment and then either spawns an asteroid of one or another type according to the result, before performing a land on planet itself. What do you think?

(btw The Astromines piggy back on both Hermits and Coves to be close to asteroids without making new fields)
Well, i don't think converting all asteroids to useful ones is realistic; actually many of those are just worthless pieces of stone.

But - a good ore processor should come with explosion spectrum analyser, feeding data to scanner targeting system. So, after asteroid explodes, you should see if a splinter has something valuable inside or not, at least approximately. ;-)

Posted: Wed Dec 27, 2006 3:59 pm
by Dr. Nil
ArkanoiD wrote:
Well, i don't think converting all asteroids to useful ones is realistic; actually many of those are just worthless pieces of stone.

But - a good ore processor should come with explosion spectrum analyser, feeding data to scanner targeting system. So, after asteroid explodes, you should see if a splinter has something valuable inside or not, at least approximately. ;-)
The easiest way to make scanning splinters possible would still be to replace all asteroids. The models could be a mix between the ones from Charlie's Asteroids.oxp and the one(s) from the basic game.

I'm starting to consider to bundle this with an expensive mining laser enhancement and some other related ideas under the name 49'ers.oxp

Posted: Wed Dec 27, 2006 6:35 pm
by Dr. Nil
I just remembered another reason why I'd really like to target the splinters for replacement rather than boulders and asteroids. Does anybody know how the game goes about making asteroids and boulder break up only when hit by a mining laser and vaporize when hit by any other type?

The splitting up of asteroids and boulders is in the exe, right? I can't find anything hinting at it in their shipdata entries.

Posted: Wed Dec 27, 2006 7:28 pm
by LittleBear
Pretty sure the spliting into bolders and then splinters is hard wired in.

In the Asteroid Storm OXP i'd copied and pasted in Charlies code form Asteroids, just having 13 entries, like_shiped to asteroids with a different model speified and all with the role asteroid. For 2 extra k of code I'd reckoned it was worth having the new models appear randomly. Doing the same for splinters would put the special asteroids spinters into the game easily. If you had a lot of entires, then it would be only occasionally a "duff" normal asteroid was encountered. Trouble is that'd happen wheather the player has the Equipment or not! :roll:

Can't think of another way to trigger the special asteroids on when the player has the equipment, other than by scripting them to outnumber the normal ones. Maybe a scanforships: asteroid, number found lessthan 5, addsystemships specialasteroid 10, shipfound less than 10 add special 20 and so on.

Posted: Wed Dec 27, 2006 7:39 pm
by Dr. Nil
If the splitting is hardwired, then it is probably only possible to achieve all this by targeting the splinters instead of boulders and asteroids, since they are the ones that are scooped and award the cargo.

Now how can the splinters be made to appear only if the equipment is present. Mission variables doesn't seem to be an option. Can conditions in shipdata entries have multiple lines somehow like:

Code: Select all

	<key>op_splinter</key>
	<dict>
		<key>conditions</key> 
		<array> 
			<string>testForEquipment: EQ_ORE_PROCESSOR</string>
			<string>foundEquipment_bool equal YES</string>
      </array>
		<key>ai_type</key>
		<string>dumbAI.plist</string>
		<key>bounty</key>
		<integer>1</integer>
		<key>cargo_type</key>
		<string>CARGO_MINERALS</string>
		<key>energy_recharge_rate</key>
		<real>0.0</real>
		<key>forward_weapon_type</key>
		<string>WEAPON_NONE</string>
		<key>has_ecm</key>
		<false/>
		<key>has_escape_pod</key>
		<false/>
		<key>has_scoop</key>
		<false/>
		<key>likely_cargo</key>
		<integer>0</integer>
		<key>max_cargo</key>
		<integer>0</integer>
		<key>max_energy</key>
		<real>5</real>
		<key>max_flight_pitch</key>
		<real>1</real>
		<key>max_flight_roll</key>
		<real>1</real>
		<key>max_flight_speed</key>
		<real>10</real>
		<key>missiles</key>
		<integer>0</integer>
		<key>model</key>
		<string>splinter.dat</string>
		<key>name</key>
		<string>Splinter</string>
		<key>roles</key>
		<string>baseforopsplinter</string>
		<key>smooth</key>
		<true/>
		<key>thrust</key>
		<real>0.0</real>
		<key>unpiloted</key>
		<true/>
		<key>weapon_energy</key>
		<real>0.0</real>
		<key>weapon_offset_x</key>
		<real>0.0</real>
	</dict>
(which doesn't work)

Posted: Wed Dec 27, 2006 7:58 pm
by LittleBear
Giles splinters have the role "splinter". So if you did say 9 entries like the above with the role splinter and a differnt cargo entries, the OXP splinters would outnumber Giles's, 9 times out of 10 you'd scoop a valuable splinter. Trouble is, we really only want Oolite to read the entry and add it to the list with the equipment flag up. Not sure that can be done.

A special asteroid (just like_shiped to an asteroid) that spawned ships with the role "special_splinter" under death actions would always give a vaulable splinter. If the specail asteroids were scripted to always outnumber the normal ones, but only with the EQ installed, Mining would still be more worthwhile.

As Griff suggests puting a beacon on the valuable ones would allow the player with the equipment installed to target the valuable ones. Could make the equipment be some sort of comined scanner and processing device that not only does the processing but detects the rocks worth mining! :wink:

Would be a good sales pitch for the Device:- "Commanders, sick of mining worthless rocks? Make that a thing of the past with Easy Mine (TM). Just drop out of witchspace, flick on your easy miner and all the valuable sites are shown on your instrument panel through your advanced space compase." 8)

Posted: Wed Dec 27, 2006 9:23 pm
by ArkanoiD
LittleBear wrote:

As Griff suggests puting a beacon on the valuable ones would allow the player with the equipment installed to target the valuable ones. Could make the equipment be some sort of comined scanner and processing device that not only does the processing but detects the rocks worth mining! :wink:

Would be a good sales pitch for the Device:- "Commanders, sick of mining worthless rocks? Make that a thing of the past with Easy Mine (TM). Just drop out of witchspace, flick on your easy miner and all the valuable sites are shown on your instrument panel through your advanced space compase." 8)
Well, i think beacons are to be installed by prospectors and some may be still around to protect their property. And you cannot know if asteroid worth mining until you laser it to get spectrum analysis, right?

Posted: Wed Dec 27, 2006 9:53 pm
by Dr. Nil
LittleBear wrote:
Giles splinters have the role "splinter". So if you did say 9 entries like the above with the role splinter and a differnt cargo entries, the OXP splinters would outnumber Giles's, 9 times out of 10 you'd scoop a valuable splinter. Trouble is, we really only want Oolite to read the entry and add it to the list with the equipment flag up. Not sure that can be done.

A special asteroid (just like_shiped to an asteroid) that spawned ships with the role "special_splinter" under death actions would always give a vaulable splinter. If the specail asteroids were scripted to always outnumber the normal ones, but only with the EQ installed, Mining would still be more worthwhile.
I already did the splinters with roles (see first post in this thread for shipdata). I could remove the condition and tune down the roles values and simply release the shipdata.plist as Splinters.oxp, which would make mining more profitable without any equipment (which is not as much fun though I might still do it).

I really don't like the idea of adding more asteroid fields, since it would be a bit strange to have the number of asteroids vary wildly depending on whether a piece of equipment is installed and working or not.

Perhaps it could be solved by giving the splinters scriptedItem as cargoType (as in the Fuel Pods oxp) and then make the script in the shipdata test for whether the ore Processor is present and decide the cargo awarded..?

@ArkanoiD: making sure that the Ore Processor doesn't turn every splinter into something more valuable than minerals will simply be a matter of tuning the roles values down, once it works.

Posted: Wed Dec 27, 2006 9:58 pm
by LittleBear
Perhaps it could be solved by giving the splinters scriptedItem as cargoType (as in the Fuel Pods oxp) and then make the script in the shipdata test for whether the ore Processor is present and decide the cargo awarded..?
I think thats the answer! 8)

Griff did somthing similar with his "santa letter" in santa.oxp. Reckon if you had em with splinter role but the cargo type only determined with a check for equipment, then the splinters would only be valuable if the item was installed. Multipile entries with the role splinter, but with a EQ found = YES Cargo_type gold, else cargo_type minerals, entery2, Cargo_type radioactives else minerals should do it!

Maybe something like:-

Code: Select all


<key>DRsplinter1</key>
<dict>
<key>ai_type</key> 
<string>dumbAI.plist</string> 
<key>model</key>
<string>splinter.dat</string>
<key>name</key>
<string>Splinter</string>
<key>roles</key>
<string>splinter</string>
<key>smooth</key> 
<true/>
<key>scanClass</key>
<string>CLASS_CARGO</string>
<key>cargo_type</key>
<string>CARGO_SCRIPTED_ITEM</string>
<key>script_actions</key>
<array>
<string>debugOn</string>
<string>testForEquipment: EQ_**** NAME OF MINING THING***</string>
<dict>
<key>conditions</key>
<array>
<string>foundEquipment_bool equal YES</string>
</array>
<key>do</key>
<array>
<string>awardCargo: Gold 1</string>
</array>

*** need to put an else awardCargo: minerals 1 here****

</dict>
<string>debugOff</string>
</array>
</dict>

Multiple entries changing the cargo awarded to gem stones, radioactives etc with the role splinter should do it!

Posted: Wed Dec 27, 2006 11:06 pm
by Dr. Nil
Probably right about the key instead of role. I'll have to give that a try right away.

Posted: Wed Dec 27, 2006 11:07 pm
by LittleBear
Think there is a problem with the like_shiping as the like ship has to be to the KEY not the role. EG you have:-

Code: Select all


<key>op_alloys</key> 
<dict> 
<key>like_ship</key> 
<string>baseforopsplinter</string> 
   
This is the role not the key. Think you need a like_ship Op_splinter as that was the key you gave the ship.

I know from cursing Oolite many times, that if even one ship in shipdata is wrong Oolite won't read any of it!