Page 4 of 5
Re: Idea for Smugglers OXP
Posted: Wed Aug 12, 2015 6:02 am
by Diziet Sma
"Smugglers-R-Us" would work better.
SteveKing wrote:"Smugglers - The Galactic Underworld"
This one, I quite like!
Re: Idea for Smugglers OXP
Posted: Wed Aug 12, 2015 11:22 am
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.
Re: Idea for Smugglers OXP
Posted: Thu Aug 13, 2015 7:27 am
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?
Re: Idea for Smugglers OXP
Posted: Thu Aug 13, 2015 9:26 am
by Norby
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!
Re: Idea for Smugglers OXP
Posted: Thu Aug 13, 2015 10:23 am
by phkb
Thanks, Norby. I guess I should just get on and write the thing, eh?
Re: Idea for Smugglers OXP
Posted: Sat Aug 15, 2015 8:04 am
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.
Re: Idea for Smugglers OXP
Posted: Sat Aug 15, 2015 9:11 am
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.
Re: Idea for Smugglers OXP
Posted: Sat Aug 15, 2015 9:12 am
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.
Re: Idea for Smugglers OXP
Posted: Sat Aug 15, 2015 9:13 am
by phkb
Thanks cim and Norby.
Re: Idea for Smugglers OXP
Posted: Sun Aug 16, 2015 7:53 am
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"
?
Re: Idea for Smugglers OXP
Posted: Sun Aug 16, 2015 8:33 am
by cim
The main station's own market is ignored and it uses the system market - use system.info.market_script
to set that.
Re: Idea for Smugglers OXP
Posted: Sun Aug 16, 2015 8:50 am
by phkb
Thanks, cim! That's saved me a lot of hair-pulling!
Re: Idea for Smugglers OXP
Posted: Wed Aug 19, 2015 7:05 am
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?
Re: Idea for Smugglers OXP
Posted: Wed Aug 19, 2015 11:37 am
by spara
Check how Bloomberg OXP does it.
Re: Idea for Smugglers OXP
Posted: Wed Aug 19, 2015 5:03 pm
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)