Idea for Smugglers OXP

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

Moderators: another_commander, winston

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Idea for Smugglers OXP

Post by Diziet Sma »

SteveKing wrote:
"Smuggle-R-Us"
"Smugglers-R-Us" would work better.
SteveKing wrote:
"Smugglers - The Galactic Underworld"
This one, I quite like!
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
Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

Re: Idea for Smugglers OXP

Post by Rustem »

Equipment - Smugglers Hold may be convert smuggling contracts (limited - 15 TC)
1) smuggling narcotics (new vaccines, powders, etc) to Food or LiquorWines
2) smuggling firearms (turrets, robots, etc) to Machinery or Computers

Result solve problems with IGT (temporarily).

If damaged Smugglers Hold, then cargo contracts moved(reconvert) to illegal types.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Idea for Smugglers OXP

Post by phkb »

Thanks for the suggestions everyone. "Smugglers - The Galactic Underworld" it is! SGU for short?

Another question, this time relating to the phase setting of the compartment (see my post a few posts back for details). Should I make each system have a separate weak point (which you learn about either through trial and error or via some other interface), or base it on government/tech level? I'm actually leaning towards the individual system version (meaning there will be 256 different settings per galaxy). The other method yields only 120 different settings (8 government types times 15 tech levels). But I'm open to suggestions!

Another thought - perhaps to add a very rare and expensive equipment item (that perhaps even has a limited shelf life) that will allow you to scan the main station and detect the perfect sweet spot for your smuggling compartment phase setting. Prime and activate type equipment, during flight. This item would only be available at certain locations (maybe rock hermits in Anarchy systems with a tech level >= 10) and not all the time. Use it too close to the station and it will be detected (too far away and it won't work). Use it within range of a police vessel it will be detected. If you do an overhaul at a main station with it installed it will be detected. If it's detected you will get a bounty and it will be confiscated (on docking it it was detected in space). What do you think?
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Idea for Smugglers OXP

Post by Norby »

phkb wrote:
<many ideas>
Once my Towbar got a very good opinion in an Oolite review: "an example to the opportunities available only restricted by the imagination of those creating, or thinking of new ideas".
I think your plans deserves the same, so go ahead! :)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Idea for Smugglers OXP

Post by phkb »

Thanks, Norby. I guess I should just get on and write the thing, eh?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Idea for Smugglers OXP

Post by phkb »

OK, technical questions start...now! (Wait... I think I just had déjà vu)

Is it possible to determine when the player dumps cargo? The cargoDumpedNearby doesn't appear to fire for the player ship.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Idea for Smugglers OXP

Post by cim »

phkb wrote:
Is it possible to determine when the player dumps cargo? The cargoDumpedNearby doesn't appear to fire for the player ship.
cargoDumpedNearby isn't sent to the ship dumping the cargo.

I've added a shipDumpedCargo event for tonight's build.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Idea for Smugglers OXP

Post by Norby »

phkb wrote:
Is it possible to determine when the player dumps cargo?

Code: Select all

this.shipSpawned = function(ship) {
 var p = player.ship;
  if( p && ship && ship.isCargo && ship.position && p.position
      && p.position.distanceTo( ship.position ) < 300 ) {
      //gotcha
  }
}
Assuming other ships not so often dump cargo within 300m or other checks increase the odds that this cargo was on the player ship before but missing now. Most ships dump within 100m but Andromeda dump to 260m.
Last edited by Norby on Sat Aug 15, 2015 9:14 am, edited 1 time in total.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Idea for Smugglers OXP

Post by phkb »

Thanks cim and Norby.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Idea for Smugglers OXP

Post by phkb »

I know I can apply the updateLocalCommodityDefinition when defining a station, via the "market_script" property, but can I do that after the station has been defined? For instance, if I wanted to update the definition on the main station, is it just system.mainStation.marketScript = "myfile.js"?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Idea for Smugglers OXP

Post by cim »

The main station's own market is ignored and it uses the system market - use system.info.market_script to set that.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Idea for Smugglers OXP

Post by phkb »

Thanks, cim! That's saved me a lot of hair-pulling!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Idea for Smugglers OXP

Post by phkb »

OK, hair-pulling has now commenced...

The only way I found I could set the market script was through a plist file of some sort (I'm using planetinfo.plist at the moment). I tried doing it through the systemWillPopulate and attempting to set "system.info.market_script" but nothing ever happened. Is that right?

And if I use planetinfo.plist, should I do it this way:

Code: Select all

{
	"universal" = {
		market_script = "myscript.js";
	}
}	
or is there a less of a "blunt-force-trauma" way to do it? Am I going to break something else by doing that? Or scratch that, what am I going to break by doing that?
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Idea for Smugglers OXP

Post by spara »

Check how Bloomberg OXP does it.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Idea for Smugglers OXP

Post by cim »

phkb wrote:
I tried doing it through the systemWillPopulate and attempting to set "system.info.market_script" but nothing ever happened. Is that right?
The reason this doesn't (appear to) work is that by the time systemWillPopulate runs, you're already in the system and the system market has already been initialised. If you then leave and return to the system, the second time you enter it the market script will already be set and should run. Generally if you want to make changes to system.info you need to do it at latest in shipWillEnterWitchspace (when it isn't yet system.info as that's still the old system - you need to use System.infoForSystem(galaxy,destination) instead)
phkb wrote:
Or scratch that, what am I going to break by doing that?
It'll be incompatible with any other OXP which makes universal-level market changes, but that's going to be true by definition of this sort of OXP. Other than that it should be fine (and is a better way to apply the changes than by JS if you do want them to be applied to every system)
Post Reply