DeepSpacePirates.oxp

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

Moderators: winston, another_commander

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

DeepSpacePirates.oxp

Post by Eric Walch »

I adapted my DeepSpacePirates.oxp to Oolite version 1.72. The last test release should still work fine with 1.72 but will log warnings.

This version will only work with 1.72+. To be downloaded at: DeepSpacePirates

DeepSpacePirates.OXP was designed to add ships outside the space lanes--based on the player's location, direction and speed. Random ships can be encountered anywhere in the universe, bringing a realism to the player's experience.
Without this OXP the area outside the space lanes is free of piracy. Players often make a small detour and leave the lanes to avoid lurking pirates within.
This OXP makes travel within the lanes a better option by increasing the player's chance of getting assistance from GalCop (the police) and/or from bounty hunters who are only too willing to make a kill. Leaving the lanes is more like a short-cut through a dark alley: no more guarantees of a risk-free flight.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

New test version of Deep Space Pirates 1.03 available.

This is really a test version and only available by above link. Not yet at the wiki. I just want your opinion first before making it general available.

Screet pointed me at two weak point of the current version:

A) I added the pirates exactly in front of the player, in the hope he could crash into it. I never realised that when the player started to shoot immediately, he already had the first pirate lined up with its laser. Now the pirates are scattered like I did with the rocks.

B) I only added 8 pirates as maximum. Screet told he had often over 20 pirates. He called it a pro, I called it a bug. Cause was that I used the internal tickle timer for evaluation of addition. That only fires once every second. He had RS installed that made that the internal timer was fired much more often. That is bad as this also start up a lot of more scripts much to often and slows down your computer. Result was that it added a few times the random number of pirates. Symptom of this is the appearance of ships with (ds)(ds) behind their name instead of only a single (ds). When you see the (ds)(ds) appearing, you should open your logfile and look for the warning of the use of scriptActionOnTarget. This command should only be used on rare occasions. If there is a large amount of these warnings, try to remove the oxp that causes this. It will improve your overall speed performance.

Anyhow, to become independent of this bug in other oxp's I switched to a timer of my own with this version. Now other oxp's can't change my timing.

Screet liked the large pirate numbers so I had two testversions tested by Screet with a much higher pirate count than max of 8. I think all new bugs are removed now.

1) Maximum pirate count now depends on: the government, the overall killcount of the (ds) ships (number is stored in save file) and the total group encounters since startup. Players that more active go on (ds) pirate hunting will on average get more than players that accidentally drift away from the safe lane. (Screet: keep your test version 1.02 as I lowered the max count in this test version a bit)

2) Escorts now work better. When loosing their mother they don't turn into hunters like most other escorts, but become real pirates themselves. In this test version the escort have a suffix (dse). I probably change that to (ds) in the release version, but for now I want to better track escort behaviour.

3) As suggested by Screet, there are now ships with cargo. This will mainly be the clean ones. As stated in the readme, the pirates reload the loot into clean ships to bring it to a station. Ship behaviour is now more I accordance with the readme.
(there is just a bug with cargo in oolite. Some cargo pods will be empty. This is a bug that was fixed in 1.70 but re-appeared in 1.72.1 but is already fixed again by A_C for the next Oolite release. When you have also Cargo_Wreck installed, this bug is less of a problem for you.)
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: DeepSpacePirates.oxp

Post by Screet »

Eric Walch wrote:
Leaving the lanes is more like a short-cut through a dark alley: no more guarantees of a risk-free flight.
I *really* can recommend this OXP for everyone who liked the original elite and went bounty hunting there. Outside the lanes, it creates pretty much the old Elite-experience with mostly a few opposing ships, but with the possibility of big battles. Furthermore, there's really a notable difference in pirate activity between different systems.

For everyone who wants to fill his cargo bay, the lanes are a better choice to hunt pirates, as there's much more cargo to gain and this OXP makes the milk-run tactic of leaving the lane more risky. Before installing that OXP, I had my Cobra Mark III equipped with 2 military lasers and the nice available eq (no OXP stuff, no cloak, naval energy unit, MASC and filter) - and 4 kills at all, if I recall correctly. Off-lane flight was so extremely safe, that I just did never get the feeling of slowly upgrading.

When I heavily tested those versions, I made 1000 kills within little more time than 24 hours (I did sleep a little in between, though!)...and many of those kills came from leaving the lane searching for DS-pirates (consider that I had a version with bigger pirate groups due to OXP conflicts).

If anyone is curious as how I survived such encounters, I suggest to test the Merlin ;) At some point I thought the game was too easy with that ship and modified the Jabberwocky-info for similar specs...and things became much more interesting afterwards, as the Jabberwocky is a ship that can be hit easily. I guess the Merlin is, due to it's insane size, very nice speed and pitch/roll the toughest cargo-carrying ship one could get. It made me think pretty often of how the game would feel if all the basic ships would be adapted to a little bit more difference and higher speeds for the ships that once were considered fast...but I doubt that such a different setup of the ships could be easily balanced and my experience shows that a size-balancing is much more necessary. It's really strange to fly a craft so small that ships with multiple lasers typically miss because their lasers are too widely spaced to hit me.

As I wrote before: This OXP re-creates the old Elite-feeling and makes life much more interesting. I suggest to give it a try!

Screet
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Re: DeepSpacePirates.oxp

Post by Lestradae »

Screet wrote:
It made me think pretty often of how the game would feel if all the basic ships would be adapted to a little bit more difference and higher speeds for the ships that once were considered fast...but I doubt that such a different setup of the ships could be easily balanced and my experience shows that a size-balancing is much more necessary.
Exactly that's what I intend to do with the RS-successor - concerning both topics - just going to need help concerning the size problem from someone who has Drydock :wink:

Thanks by the way for your bugs report - it was greatly appreciated, and one or the other observation now finds itself in my To-Do list 8)

Cheers

L
DeathKnyte
Dangerous
Dangerous
Posts: 95
Joined: Fri Aug 31, 2012 7:31 pm

Re: DeepSpacePirates.oxp

Post by DeathKnyte »

Well...

After having read this thread, I don't know what a "Merlin" is like for a ship, but I have been using a stock Fer-de-Lance, and have not encountered any deep space pirate group that I can't handle. In fact, these deep space pirates are what I consider "easy kills" to bolster my kill count.

Method (rot13):

Xrrc fcrrq ng 0, ratntr whzc qevir. Jura znff ybpxrq lbh fgbc qrnq va fcnpr. Qb abg pybfr qvfgnapr gb ubfgvyr pbagnpgf.
Fgnl fgngvbarel - gnetrg ybpx pybfrfg be zbfg vzzvarag guerng jvgu cbeg/fgneobneq ynfre (Nfc Zx. VV'f, S-q-Y'f, rgp. V fnir Clguba'f, Pboen ZX V'f, naq VVV'f sbe ynfg) - sver ynfre gvyy qrfgeblrq - fjvgpu gb arkg gnetrg, rgp. Vs ynfre bireurngrq, ebyy fuvc gb bccbfvgr fvqr naq hfr gung (serfu) ynfre. Fnir sbejneq svevat ynfre sbe punfvat qbja nalbar jub ehaf. Erne ynfre vf xrcg sbe nal uneqrarq zvffvyrf gur RPZ qbrf abg trg.

Even a large group of 'deep space' pirates can be handled that way.

The pirate groups, along the space lane(s), offer me much more of a challenge. V qba'g xabj vs vg vf orpnhfr gur abezny cvengrf ner cebtenzzrq gb nggnpx qvssreragyl, be vs vg vf orpnhfr gurl hfr n fjnezvat (be rairybcvat) fgengrtl.

I was hoping to make the game more difficult, because leaving the space lanes allowed me to quicken refueling time, and/or quick booty / mission, drop off stops, while maintaining a tight schedule for various missions.

Proposed solution: Program the 'deep space' pirate packs to behave like the regular pirate packs in the space lanes.

The most dangerous aspect after installing this oxp, I have found, is when sun skimming: I used to set speed to 0, point at star, engage jump drives, and go to the washroom / make a coffee / feed the cat, etc. But an (deep space imposed) asteroid directly in my path can obliterate me now. Solution to this, is to pause the game while away from computer.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: DeepSpacePirates.oxp

Post by Eric Walch »

Spara notified that this OXP is no longer working as planned with Oolite 1.80 because of the changed AI's for pirates. The reason is that I double check the AI of the spawned pirates to make sure I don't change custom scripts. Now all pirates with the new JS based AI are not changed.

I'll just changed the code and will test it for a few days before uploading. If there are other issues let me know as this is a good moment to add more changes.

Thanks to Spara for pointing me to the offending lines.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2687
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: DeepSpacePirates.oxp

Post by Redspear »

Firstly, I'd like to say thanks, for what is an essential oxp in my game :)
Eric Walch wrote:
If there are other issues let me know as this is a good moment to add more changes.
Not an issue as such but what about a small chance to encounter a lone trader or (perhaps an even smaller chance) a viper?
After all, the player left the space lane for whatever reason, so might others.
User avatar
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: DeepSpacePirates.oxp

Post by Venator Dha »

Redspear wrote:
Firstly, I'd like to say thanks, for what is an essential oxp in my game :)
And mine :)

Am I right in guessing that the changes are linked to some of the discussions on Assassins?
https://bb.oolite.space/viewtopic.php?f= ... 75#p225538
If not there are some ideas in there you might like to look at.
Taurus Driving through the galaxy since... .
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: DeepSpacePirates.oxp

Post by UK_Eliter »

Redspear wrote:
Not an issue as such but what about a small chance to encounter a lone trader or (perhaps an even smaller chance) a viper?
After all, the player left the space lane for whatever reason, so might others.
I second that.
User avatar
mossfoot
---- E L I T E ----
---- E L I T E ----
Posts: 827
Joined: Fri May 30, 2014 4:07 pm
Contact:

Re: DeepSpacePirates.oxp

Post by mossfoot »

I'd like to see a way to have more traffic between stations once you expand with other planets, create new spacelanes basically. I never encounter anything between planets.
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: DeepSpacePirates.oxp

Post by spara »

I, on the other hand, wouldn't want this oxp to spawn anything but dangers to the player. I see that this oxp's function is to discourage the player to leave the lanes. There are no traders out there because they don't go there and secondly if they did they have already been obliterated. The police don't go out there because all their resources go to patrolling the lanes. There might rarely be bounty hunters out there though.

Mossfoot's idea about the other lanes is an interesting one and something that I've been pondering about too. But that's something I feel is out of the scope of this oxp.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: DeepSpacePirates.oxp

Post by Eric Walch »

Venator Dha wrote:
Am I right in guessing that the changes are linked to some of the discussions on Assassins?
Yes. The pirates always had a custom AI based on the default pirate AI with the addition of the leader giving a 'welcome' message to the player. And the AI contained some cleanup code that removed the pirate from the system when the player was far away.
Since Oolite 1.80, most pirates now don't get the custom AI, resulting in the new pirate behaviour. Solitaire pirates are therefor less likely to attack the player. Not a real problem as this is in line with the new AI, but the cleanup code is now also missing. So for now I will make sure the pirates get the custom AI I always gave them.
what about a small chance to encounter a lone trader or (perhaps an even smaller chance) a viper?
I think that would be no problem. Currently the oxp is first calculating a change to add something. Only after the code decides to add something, the pirates or asteroids are added. In the safer systems it will be more often an asteroid. Instead of the occasional asteroid, I could add an occasional Viper/Trader/Hunter. This won't affect the amount of dangerous pirates.

Currently I was never pleased with the fact that only the pirates had a cleanup code and not the asteroids. Thinking about it yesterday, I decided that the cleanup code must by moved from the ship script towards the main script. There I can put all added ships in a list that I check once every minute. In the current Oolite that will much easier to do than the Oolite version I wrote the oxp for.
In the current Oolite versions the isVisible boolean is exposed to JS. that means is will be very easy to check if a ship is so far away from the player that the player can't see it anymore. That is a good moment to remove the ship from the universe.

By removing the ships in the main script, I don't need to change ship AI's and it will be easy to add an occasional trader/hunter/viper, instead of the asteroids. That also means that I can keep the original pirate AI's. I only need to change the AI of the leader to let it send the 'welcome' message.
User avatar
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: DeepSpacePirates.oxp

Post by Venator Dha »

Thank you Eric :D
The suggestions you have outlined sound great to me. I'm already looking forward to it.

I think it adds a further level of realism to the game, as for me (and I expect most others) we encounter DeepSpacePirates whilst traveling around the system from extra station to extra station, so would expect to see some non-hostiles, at least in safer systems. These route would however be the best places for pirates to hang out as well :D
Taurus Driving through the galaxy since... .
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: DeepSpacePirates.oxp

Post by spara »

Now that we're going this route, here's a suggestion that's based on mossfoot's idea. One might assume that a working system with multiple dockables would have all sorts of traffic between those dockables. And some patrolling too. This oxp could mimic that with it's probability calculations. There could be imaginary routes from WP to all stations that have beacons. And there could be imaginary routes from the main station to all stations with a beacon. There could be more routes of course, but I think that these would suffice for this purpose. Then traders and vipers would only be spawned when close to those routes to mimic normal trade traffic and patrolling. Pirates and occasional hunters would be spawned everywhere.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: DeepSpacePirates.oxp

Post by Diziet Sma »

spara wrote:
Now that we're going this route, here's a suggestion that's based on mossfoot's idea. One might assume that a working system with multiple dockables would have all sorts of traffic between those dockables. And some patrolling too. This oxp could mimic that with it's probability calculations. There could be imaginary routes from WP to all stations that have beacons. And there could be imaginary routes from the main station to all stations with a beacon. There could be more routes of course, but I think that these would suffice for this purpose. Then traders and vipers would only be spawned when close to those routes to mimic normal trade traffic and patrolling. Pirates and occasional hunters would be spawned everywhere.
I'd still rather see this as a separate OXP.. give players the choice of being able to have without the other, if they prefer.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply