Posted: Sat Nov 13, 2010 12:42 pm
Mmmm. Sounds like a stealth-tax on bigger ships to me.
For information and discussion about Oolite.
https://bb.oolite.space/
Sure, if that applied to all the players all the time. The thing I'm puzzled by is that we're talking about a possible future oxp, which is something anyone has to specifically choose to install.Smivs wrote:That, in my book, is a stealth tax!
Erm, spot the light-hearted throw-away jokey commentSmivs wrote:Mmmm. Sounds like a stealth-tax on bigger ships to me.
I just installed the handler in trunk and tested it against the following station script:Kaks wrote:Sure, if that applied to all the players all the time. The thing I'm puzzled by is that we're talking about a possible future oxp, which is something anyone has to specifically choose to install.Smivs wrote:That, in my book, is a stealth tax!
Code: Select all
this.name = "mayanStation";
this.author = "eric walch";
this.description = "Script for the mayan station";
this.version = "1.0";
this.lastShip = null;
this.fines = 0;
this.shipCollided = function (ship)
{
if (!this.lastShip || ship != this.lastShip)
{
this.lastShip = ship;
this.fines = 5;
}
else
{
this.fines += 5;
}
}
this.otherShipDocked = function (ship)
{
if (this.lastShip && ship == this.lastShip)
{
ship.bounty += this.fines;
if (ship.isPlayer)
{
player.addMessageToArrivalReport("You have been fined " + this.fines + " ₢ for irresponsible docking.")
}
}
this.fines = 0;
this.lastShip = null;
}
I just noticed that it is impossible. We only have event handlers for energy damage (shipAttacked), not for scrape damage or heat damage. The only time when a ship gets notified about scrape or heat damage is as cause when it dies.Kaks wrote:.... but if all else fail you can create a custom player ship script that will check how close you are to the nearest station when taking scrape damage. .....
It could also be written as worldscript: both station as ship get the notification. I just had to revert the AI notification to ships. dockingAI.plist dictates that ships abort docking when receiving a COLLISION message. And some big ships started to abort their docking to often.Switeck wrote:shame it's station specific, though that could at least be customized on a per-station type basis.
I agree, 15Cr is really small as a fine, unless the player is just starting out. It would probably be better if scraping the docking bay got you community service, sweeping/cleaning the docking bay, instead of a fine. The length of time spent cleaning up after the Craboids would depend on how many times you scraped the bay ... say, 4 hours for every clunk? 6, maybe? It's less of a penalty for beginners (they're unlikely to have any time-specific missions) and more of a penalty for experienced pilots who might have somewhere to get to in a hurry and who should know better ... Don't know if this is doable via an OXP, though.Switeck wrote:That's pretty cool code...shame it's station specific, though that could at least be customized on a per-station type basis.
15 credits would seem hardly excessive for a fine for anyone other than a new Jameson. A tiny problem would be going negative if someone had spent all their "liquid" credits. I do that a lot early on from buying up Gold/Plat/Gems with spare credits. I guess if credits ran negative...they could be set back to 0 and the player hit with a time penalty from sweeping/cleaning/repairing the docking bay.
Is this where I point out I've had a request for an event handler that triggers when the player takes damage posted for a few months now?Eric Walch wrote:I just noticed that it is impossible. We only have event handlers for energy damage (shipAttacked), not for scrape damage or heat damage. The only time when a ship gets notified about scrape or heat damage is as cause when it dies.
Although scrape damage activates no handler, it will always be followed by a collision handler. (Only the station dock missed a collision message but will be there in 1.75) Having both a scrape and a collision message is probably two times the same.Thargoid wrote:Admittedly it wasn't for this case (it was to allow armour such as IronHide to work properly), but it would solve this little issue too.