Offender_traders.oxp now available

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

Moderators: another_commander, winston

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:

Offender_traders.oxp now available

Post by Commander McLane »

A small alteration to the game mechanics, following a suggestion made by El Viejo:

Introduction

This OXP gives bounties to some of the normal trade ships in Oolite.

Overview

In unaltered Oolite traders added by the system populator are always clean. The player, however, gets marked as offender or fugitive for instance for hauling illicit commodities, or committing small violations.

On the other hand, quite a few traders do have illicit goods in their holds. Have they all scooped these goods, or bought them somewhere else than in the main station? Unlikely. This OXP attaches random bounties between 1 and 55 credits to some traders (currently 12% of all ordinary traders). It does nothing to non-traders, and it does nothing if the trader already has a bounty. Moray Medical Boats are excluded, because they're expected to legally carry narcotics.

The OXP does not change the cargo of ships with bounties. So they are not more likely to carry illicit commodities than without the OXP. It only attaches a random bounty to them and leaves it to the player's imagination how each single ship could have obtained its bounty.

Minimum Requirements

Offender_traders.oxp requires at least Oolite 1.74.

Download Location

This OXP is available for download via the [EliteWiki] Elite Wiki.

Enjoy! :D
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16058
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Offender_traders.oxp now available

Post by Cody »

Thanks McLane... I'll enjoy adding this to my game.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Offender_traders.oxp now available

Post by Mauiby de Fug »

Ooh, excellent! I hadn't realised this wasn't done in-game. A simple tweak for added immersion! Thanks!
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Offender_traders.oxp now available

Post by Svengali »

Oh, yes, fine. Cannon fodder and 'cheap' cargo*.

Better exclude ships with custom scripts.-)

**mumbles something about whitewashed cheating*
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16058
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Offender_traders.oxp now available

Post by Cody »

I don't see it as that, Svengali... I have no need of cannon fodder, or cheap cargo. It's purely for immersion purposes, in my game.
Granted, some players may cash-in, I suppose, but 'whitewashed cheating'? Surely not.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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:

Re: Offender_traders.oxp now available

Post by Commander McLane »

Svengali wrote:
Oh, yes, fine. Cannon fodder and 'cheap' cargo*.
I am a little worried about easy bounties, too. I think I may tinker with this aspect. Perhaps the bounty should usually be in the range of 1-15 credits, with only rare fugitives (51-55), and only ships with larger cargo space being eligible for higher bounties? Currently it's just a random value from 1-55 which makes for a higher average.
Svengali wrote:
Better exclude ships with custom scripts.-)
Fair point. Seems a good way of excluding special OXP ships.

*****

I was toying with the idea of giving traders with bounties contraband as cargo, but decided against it. The biggest reason is that it would make things to complicated. Populator-added ships don't have cargo at all before they're killed. I would have to amend all ship scripts again, and add some cargopods in the shipDied-handler, depending on bounty. I don't want to go this way with every OXP. Also, I don't want additional cargo, but rather to determine a general chance for the spawned cargo to be one of the illicit commodities. And I want it on-the-fly, without creating shipdata. I think that's way to ambitious for a small adding-to-immersion OXP.

Therefore the cargo created for offender traders is still purely random. I think that's fine and doesn't break immersion. After all they will have illicit goods sometimes, and if they don't, you can easily explain that the cargo got destroyed in the explosion. After all, it's always only a fraction of the ship's total cargo which survives the blast.

All this OXP wants is give an option for the player who is wondering why he is the only one ever becoming offender after launching from a main station with illicit commodities aboard.
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:

Re: Offender_traders.oxp now available

Post by Commander McLane »

Okay, proposed new bounty calculation:

Code: Select all

this.shipSpawned = function(ship)
{
    if((ship.primaryRole === "trader" || ship.primaryRole === "sunskim_trader") && ship.script.name === "oolite-default-ship-script" && ship.name !== "Moray Medical Boat" && ship.bounty === 0 && Math.random() < 0.12)
    {
        ship.bounty = Math.ceil(Math.random() * 12);
        if(PS.target.cargoSpaceCapacity > 75 && Math.random() < 0.2)
        {
            ship.bounty += 43;
        }
    }
}
So ships with custom scripts are excluded. The bounty is limited to 1-12. Only for 20% of the ships with more than 75 tons capacity it will be from 44-55.

Does that sound more reasonable?
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Offender_traders.oxp now available

Post by Zireael »

Commander McLane wrote:
Okay, proposed new bounty calculation:

Code: Select all

this.shipSpawned = function(ship)
{
    if((ship.primaryRole === "trader" || ship.primaryRole === "sunskim_trader") && ship.script.name === "oolite-default-ship-script" && ship.name !== "Moray Medical Boat" && ship.bounty === 0 && Math.random() < 0.12)
    {
        ship.bounty = Math.ceil(Math.random() * 12);
        if(PS.target.cargoSpaceCapacity > 75 && Math.random() < 0.2)
        {
            ship.bounty += 43;
        }
    }
}
So ships with custom scripts are excluded. The bounty is limited to 1-12. Only for 20% of the ships with more than 75 tons capacity it will be from 44-55.

Does that sound more reasonable?
Yes, it does. Still, I find the idea great.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Offender_traders.oxp now available

Post by Svengali »

Commander McLane wrote:
Does that sound more reasonable?
Yep! Muchas gracias .-)
The Black Albatross
Above Average
Above Average
Posts: 22
Joined: Thu Mar 10, 2011 8:24 pm

Re: Offender_traders.oxp now available

Post by The Black Albatross »

Maybe make high-bounty ships more likely to have escorts (or vice versa)?
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: Offender_traders.oxp now available

Post by Eric Walch »

Commander McLane wrote:
Moray Medical Boats are excluded, because they're expected to legally carry narcotics.
Actually has every ship with the string "Medical" in the ship name has narcotics on board. Assuming they all carry it legally, you should probably include them all by changing

Code: Select all

ship.name !== "Moray Medical Boat"
into

Code: Select all

ship.name.search("Medical") === -1
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Re: Offender_traders.oxp now available

Post by Cmdr Wyvern »

If a trader captian was stupid enough to load contraband, then he deserves an offender tag.
But not all offender tags are earned by hauling illegal cargo - it's just as easy to be branded an offender or worse by accidently shooting a Viper. No such thing as friendly fire in the eyes of Johnny Law...
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
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:

Re: Offender_traders.oxp now available

Post by Commander McLane »

Eric Walch wrote:
Commander McLane wrote:
Moray Medical Boats are excluded, because they're expected to legally carry narcotics.
Actually has every ship with the string "Medical" in the ship name has narcotics on board. Assuming they all carry it legally, you should probably include them all by changing

Code: Select all

ship.name !== "Moray Medical Boat"
into

Code: Select all

ship.name.search("Medical") === -1
Are there more ships with 'Medical' in their name? The only medical ship I can remember off the top of my head is Amen Brick's 'Hospitalship', which ironically doesn't have 'Medical' in its name.

Anyway, as it's an easy code change, it's done (and I corrected the bug from c&p'ing from the console, in case anybody noticed). Version 1.1 will be up soon.
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:

Re: Offender_traders.oxp now available

Post by Commander McLane »

Commander McLane wrote:
Version 1.1 will be up soon.
[EliteWiki] Done.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Re: Offender_traders.oxp now available

Post by Switeck »

An idea to consider... sunskim_trader ships are probably MORE likely to be offenders or fugitives. Most are certainly trying to get clean "off the radar" without causing a disruption by avoiding fights with bounty hunters and police ships. I'm assuming all but the most foolish have some smarts to them -- a trader with a fugitive rating going straight down the middle of the space lane to the main station is just BEGGING someone to attack them, not even having protection from "fellow pirates". (no honor among thieves! :lol: )
So only minor offenders and really dumb(tm) offender traders are likely to do that.
For them, you could change their offender calculation to something like this:
ship.bounty = Math.ceil(Math.random() * Math.random() * 55);
In theory, a bounty of 55 would still be possible, but it will be very unlikely...as Math.random() would have to be ~0.991-1 two times in a row. There's quite a few math tricks to generate "weighted curve" results. 8)

We can assume these offender traders have already done at least 1 jump, so even the sunskim_trader ships have a lower max bounty than run-of-the-mill pirates. But if you want, you could raise their bounty and use a double Math.random() for them as well.

Since the detection rate (via scanForOffenders in AI.plist) and "lawlessness" of systems also depends on the system's government type, it might be possible to increase/decrease the bounties based on that...and even have a higher proportion of sunskim_trader ships have a bounty in Corporate States -- and far fewer regular traders with a bounty...at least not for long. :twisted: In Anarchy systems they just don't care, because what few bounty hunters and police ships are around only attack if you're attacking other ships. Random Hits Space Bar bounty hunters might be an exception to that though...but it's usually not situated directly on the main space lane.

In my Switeck Mod OXP, the AI profiles for enteringPirateAI.plist, enteringTraderAI.plist, pirateAI.plist, and route1traderAI.plist try to change over to more appropriate AI types based on their bounty values. Check hold (checkForFullHold) doesn't work very well on newly spawned ships, so I didn't use that as well.
Post Reply