Difference between revisions of "The Dark Side"

From Elite Wiki
(Added introductory explanation)
m (Understanding what really goes on: Oops!)
Line 29: Line 29:
 
Spoiler (why what happened made sense and how the game programmes it)---->  
 
Spoiler (why what happened made sense and how the game programmes it)---->  
 
<div class="mw-collapsible mw-collapsed"  data-expandtext="Show spoiler" data-collapsetext="Hide details" style="overflow:auto;">
 
<div class="mw-collapsible mw-collapsed"  data-expandtext="Show spoiler" data-collapsetext="Hide details" style="overflow:auto;">
Pirates use a "scanformerchentmen" (traders, miners and the player), they then use a "Oddsgood" / "Oddseven" / "Oddsbad" to decide if they attack and who. The pirates are "smart" enough to "know" that a ship with the role "escort" will defend its mother. To put it in plain English:- That fer-de-lance considered attacking all the ships it saw, but it knew that if it attacked the convoy it would have to deal with the the Traders escorts as well as the Trader if it attacked him. When it scanned you, it knew you were without escorts and so chose to attack the easier prey (''ie'' you!).
+
Pirates use a "scanForNearestMerchantmen" (traders, miners and the player), they then use a "Oddsgood" / "Oddseven" / "Oddsbad" to decide if they attack and who. The pirates are "smart" enough to "know" that a ship with the role "escort" will defend its mother. To put it in plain English:- That fer-de-lance considered attacking all the ships it saw, but it knew that if it attacked the convoy it would have to deal with the the Traders escorts as well as the Trader if it attacked him. When it scanned you, it knew you were without escorts and so chose to attack the easier prey (''ie'' you!).
  
If he had a few wing-men, he might have decided that his side was well enough equiped to make attacking the convay (bigger risk but better rewards) worth it! (done with random numbers against an Odds risk)
+
If he had a few wing-men, he might have decided that his side was well enough equipped to make attacking the convoy (bigger risk but better rewards) worth it! (done with random numbers against an Odds risk)
  
If he had missed his intended target (you!) and hit the Trader, then the trader would have responded. He consults his own AI to decide how to respond, but having cowardly TraderAI he might have decided to run for the planet rather than returning fire or he might have returned fire on the fer-de-lance. The Escorts would probabley have attacked the fer-de-lance (as their AI is pretty brave - Someone attacking our mothership - Get Him, even if Mum runs away!). Had there been some cargo pods lying about the Fer-de-lance would probabley not have attacked at all and scooped the free cargo, rather than risk a fight (as his AI also includes a scanforloot, found = setstate to scooploot). Equally had his hold been full, he would have gone to the Station to sell his ill-gotten gains, as he "knows" that there is no point blowing up a trader if you can't scoop his stuff! (done in code by a simple HOLD_FULL = switchAI to route1taderAI)
+
If he had missed his intended target (you!) and hit the Trader, then the trader would have responded. He consults his own AI to decide how to respond, but having cowardly TraderAI he might have decided to run for the planet rather than returning fire or he might have returned fire on the fer-de-lance. The Escorts would probably have attacked the fer-de-lance (as their AI is pretty brave - Someone attacking our mothership - Get Him, even if Mum runs away!). Had there been some cargo pods lying about the Fer-de-lance would probably not have attacked at all and scooped the free cargo, rather than risk a fight (as his AI also includes a scanForLoot, found = setstate to scooploot). Equally had his hold been full, he would have gone to the Station to sell his ill-gotten gains, as he "knows" that there is no point blowing up a trader if you can't scoop his stuff! (done in code by a simple HOLD_FULL = switchAI to route1traderAI)
  
Obviosuly it's Giles's code that does all this, but us players can write AIs that the code will follow. You then assain this to a new ship you have built to make it behave as you want. If you want your ship to be a typical pirate / policeship / miner / escort etc, then you just give it one of the native AIs. Fiddiling with Oolite is almost as much fun as playing it!
+
Obviously it's Giles's code that does all this, but us players can write AIs that the code will follow. You then assign this to a new ship you have built to make it behave as you want. If you want your ship to be a typical pirate / policeship / miner / escort ''etc'', then you just give it one of the native AIs. Fiddling with Oolite is almost as much fun as playing it!
  
By [[User:LittleBear‎|LittleBear‎]] in [http://www.aegidian.org/bb/viewtopic.php?f=2&t=2619 Any benefits in flying near/with other ships?] (2006)
+
By [[User:LittleBear‎|LittleBear‎]] in [http://www.aegidian.org/bb/viewtopic.php?f=2&t=2619 Any benefits in flying near/with other ships?] (2006) Note that this is all in "[[Legacy Scripting]]".
 
</div>
 
</div>
  

Revision as of 09:57, 29 November 2022

2560px-Two women operating ENIAC (full resolution).jpg








"Modding" or tweaking and writing OXPs - and eventually maybe even the Vanilla game code if you get to be good enough!

Sneak a peek at How to tweak OXZ's ... and see where it leads you!

Just for shock effect, the older OXPs are written in legacy code - either XML or OpenStep. Javascript was slowly introduced after 2006 as an option, and then as the best way of writing OXPs.

Oolite is currently written in Objective-C (72.5%), C (19%), JavaScript (7%) and fragments in other stuff.


Understanding what really goes on

So I'm on my way to Erlaza, I decide to fly in along the main route and see what I can pick up along the way and the first thing I meet is a Boa with four escorts. Now it strikes me that if I join them I might see a bit more action but at the same time I wouldn't have to deal with it entirely on my own. Sure enough, within minutes there's a Fer-de-Lance shooting at us.

Erm... did I say us?

I'm a Python in formation with a Boa and four escourts and he's completely ignoring the others and has locked on to me. What's more, when I turn to deal with him, what to the others do? They go on their own sweet way leaving me to deal with him on my own. B*****ds!
 

The Fer-de-Lance suffered the consequences and having picked up the ton of luxuries that he left me in his will, I'm following the Boa back to the space station. I'm wondering whether to rejoin them and give them an energy bomb as a token of thanks for their assistance when one of the escorts breaks formation and heads off at 11 o'clock. The others soon follow and I realise that they are under attack from a Python and a couple of smaller ships.

The next thing I know, the Boa is on the radio asking for help!

Yeah. Right. Count the fingers mate.  ("AndySlater", 2006)


Spoiler (why what happened made sense and how the game programmes it)---->

Pirates use a "scanForNearestMerchantmen" (traders, miners and the player), they then use a "Oddsgood" / "Oddseven" / "Oddsbad" to decide if they attack and who. The pirates are "smart" enough to "know" that a ship with the role "escort" will defend its mother. To put it in plain English:- That fer-de-lance considered attacking all the ships it saw, but it knew that if it attacked the convoy it would have to deal with the the Traders escorts as well as the Trader if it attacked him. When it scanned you, it knew you were without escorts and so chose to attack the easier prey (ie you!).

If he had a few wing-men, he might have decided that his side was well enough equipped to make attacking the convoy (bigger risk but better rewards) worth it! (done with random numbers against an Odds risk)

If he had missed his intended target (you!) and hit the Trader, then the trader would have responded. He consults his own AI to decide how to respond, but having cowardly TraderAI he might have decided to run for the planet rather than returning fire or he might have returned fire on the fer-de-lance. The Escorts would probably have attacked the fer-de-lance (as their AI is pretty brave - Someone attacking our mothership - Get Him, even if Mum runs away!). Had there been some cargo pods lying about the Fer-de-lance would probably not have attacked at all and scooped the free cargo, rather than risk a fight (as his AI also includes a scanForLoot, found = setstate to scooploot). Equally had his hold been full, he would have gone to the Station to sell his ill-gotten gains, as he "knows" that there is no point blowing up a trader if you can't scoop his stuff! (done in code by a simple HOLD_FULL = switchAI to route1traderAI)

Obviously it's Giles's code that does all this, but us players can write AIs that the code will follow. You then assign this to a new ship you have built to make it behave as you want. If you want your ship to be a typical pirate / policeship / miner / escort etc, then you just give it one of the native AIs. Fiddling with Oolite is almost as much fun as playing it!

By LittleBear‎ in Any benefits in flying near/with other ships? (2006) Note that this is all in "Legacy Scripting".

Links