Page 120 of 120
Re: Scripters cove
Posted: Sun May 25, 2025 8:32 pm
by Cholmondely
More like a castle than a manse, sorry.
It's those Mountain Seoids, you see. They can do a lot of damage to a manse. Something more defensive has a better chance to protect those inside. As happened a century back - Duke Dorian and his entourage were then attacked by one in the castle and survived the experience. The castle survived too, just needing some pointing and a repaint of the inside of the drawing room.
Re: Scripters cove
Posted: Mon May 26, 2025 2:38 pm
by Wildeblood
Cholmondely wrote: ↑Sun May 25, 2025 8:32 pm
I look forward to seeing an illustration of Cousin Digby's pile on Digebiti.
Gimme bigga piccy. At least 1024 x 512.
Re: Scripters cove
Posted: Fri Jun 20, 2025 7:33 pm
by Redspear
It's a simple matter to prevent a player buying a commodity at a station (set market quantity to 0) but is there a simple way to prevent a player from selling a commodity at a station?
I'm trying to simulate a no demand situation without just lowering the market price significantly.
I want to not only discourage the player from selling but to actually prevent them from doing so without confiscation.
Re: Scripters cove
Posted: Fri Jun 20, 2025 9:10 pm
by cbr
Wildeblood wrote: ↑Mon May 26, 2025 2:38 pm
Cholmondely wrote: ↑Sun May 25, 2025 8:32 pm
I look forward to seeing an illustration of Cousin Digby's pile on Digebiti.
Gimme bigga piccy. At least 1024 x 512.

Re: Scripters cove
Posted: Fri Jun 20, 2025 9:30 pm
by phkb
Redspear wrote: ↑Fri Jun 20, 2025 7:33 pm
It's a simple matter to prevent a player buying a commodity at a station (set market quantity to 0) but is there a simple way to prevent a player from selling a commodity at a station?
I'm trying to simulate a no demand situation without just lowering the market price significantly.
I want to not only discourage the player from selling but to actually prevent them from doing so without confiscation.
I’ve always used the playerSoldCargo world event, and just reversed the effects of the passed parameters. If I remember I’ll post a code snippet doing this later this morning.
Re: Scripters cove
Posted: Sat Jun 21, 2025 12:50 pm
by Wildeblood
Redspear wrote: ↑Fri Jun 20, 2025 7:33 pm
It's a simple matter to prevent a player buying a commodity at a station (set market quantity to 0) but is there a simple way to prevent a player from selling a commodity at a station?
I'm trying to simulate a no demand situation without just lowering the market price significantly.
I want to not only discourage the player from selling but to actually prevent them from doing so without confiscation.
Set capacity to 0. And, see the market script in this, for my experiments:
https://wiki.alioth.net/index.php/File: ... difier.oxz
Re: Scripters cove
Posted: Sat Jun 21, 2025 9:19 pm
by Redspear
That looks like what I was after (forgot to check plist options), thanks!
phkb wrote: ↑Fri Jun 20, 2025 9:30 pm
I’ve always used the playerSoldCargo world event, and just reversed the effects of the passed parameters. If I remember I’ll post a code snippet doing this later this morning.
That would still be of interest if not inconvenient for you.
Re: Scripters cove
Posted: Sat Jun 21, 2025 10:29 pm
by phkb
Redspear wrote: ↑Sat Jun 21, 2025 9:19 pm
That would still be of interest if not inconvenient for you.
Code: Select all
//-------------------------------------------------------------------------------------------------------------
// stop the player from selling cargo (in this case, slaves)
this.playerSoldCargo = function (commodity, units, price) {
var p = player.ship;
var stn = p.dockedStation;
if (commodity === "slaves") {
var refund = units;
// take credits off player
player.credits -= ((price / 10) * refund);
// give commodity back to player
p.manifest[commodity] += refund;
// take commodity away from station
stn.setMarketQuantity(commodity, stn.market[commodity].quantity - refund);
// Market Observer interface - make sure this doesn't impact on it's data
if (worldScripts.market_observer3) {
this._sale = {
commodity: commodity,
units: units,
price: price
};
this._mo_timer = new Timer(this, this.$reverseMOSale, 0.25, 0);
}
}
}
//-------------------------------------------------------------------------------------------------------------
this.$reverseMOSale = function $reverseMOSale() {
var mo = worldScripts.market_observer3;
mo.playerBoughtCargo(this._sale.commodity, this._sale.units, this._sale.price);
this._sale = {};
}
Re: Scripters cove
Posted: Sun Jun 22, 2025 9:32 pm
by Redspear
phkb wrote: ↑Sat Jun 21, 2025 10:29 pm
Thanks.