Page 30 of 30
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Thu Apr 24, 2025 9:13 pm
by Reval
Interesting! (never heard of that one)
I like to standardize on the Lave Metre (Lm) - I wish Oolite did!
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Thu Apr 24, 2025 9:26 pm
by Cholmondely
Reval wrote: ↑Thu Apr 24, 2025 9:13 pm
Interesting! (never heard of that one)
Oolite enables the Cavezzo of
La Serenissima before Napoleon laid waste to it.
Reval wrote: ↑Thu Apr 24, 2025 9:13 pm
I like to standardize on the Lave Metre (Lm) - I wish Oolite did!
No way! Metric degeneracy!! Fight it to the bitter end!!!

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Thu Apr 24, 2025 9:48 pm
by Reval
All right - the Lave Yard, then, and the Lave Mile - just as long as it is standardized (preferably to Lave, since that's the lovely planet where we all start). At least we can't quibble about the Lave Hour, Lave Minute, and Lave Second - they are dependent on the planet's rotation etc.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Thu Apr 24, 2025 10:16 pm
by Reval
ooh I just figured it out and it all seems to fall into place... I put this inside a timer:
Code: Select all
this.$ctLastDist = this.$ctDist;
var ps = player.ship;
// present distance to station
var spos = system.mainStation.position;
this.$ctDist = ps.position.distanceTo(spos);
// distance travelled in one second
var travelledSecond = this.$ctLastDist - this.$ctDist;
and the distance travelled in one second on the timer
matches the current ship speed as shown in the GETter HUD. Woohoo! So now, getting the
time to Station at present speed is trivial.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Thu Apr 24, 2025 11:19 pm
by Cholmondely
Reval wrote: ↑Thu Apr 24, 2025 10:16 pm
ooh I just figured it out and it all seems to fall into place... I put this inside a timer:
Code: Select all
this.$ctLastDist = this.$ctDist;
var ps = player.ship;
// present distance to station
var spos = system.mainStation.position;
this.$ctDist = ps.position.distanceTo(spos);
// distance travelled in one second
var travelledSecond = this.$ctLastDist - this.$ctDist;
and the distance travelled in one second on the timer
matches the current ship speed as shown in the GETter HUD. Woohoo! So now, getting the
time to Station at present speed is trivial.
Are you trying to replicate the
Updating TSC oxp?
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Thu Apr 24, 2025 11:59 pm
by Reval
Not especially (I haven't tried that OXP)... I created two Convoy OXPs (one of Cob IIIs and one of Python IIs, where the convoy pays the leader 10% of their trade earnings, in return for 'protection' and basic wages), and it can be quite tedious shepherding these groups (top speeds of 350) to the Main Station from Witchpoint. I'm unable to use injectors (much) or Torus drive (at all). So I like to have an indication of how many minutes remain until we make station dock, at present speed. Now it all works nicely and I'll doubtless be uploading to the Wiki fairly soon.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Fri Apr 25, 2025 12:44 am
by phkb
Reval wrote: ↑Thu Apr 24, 2025 11:59 pm
So I like to have an indication of how many minutes remain until we make station dock, at present speed.
The
Navigation MFD has that information already. If you're targeting the main station on your space compass, and you're facing in that direction, it will give you the estimated travel time.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Fri Apr 25, 2025 1:04 am
by Reval
Useful! - I didn't know that. But anyway, now I've worked it out on my own and it gave me plenty of good practice familiarizing myself with methods I didn't know about in the J-script Reference

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Fri Apr 25, 2025 5:50 am
by Cholmondely
Reval wrote: ↑Thu Apr 24, 2025 11:59 pm
I'm unable to use ... Torus drive (at all).
Synchronised Torus OXP
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Fri Apr 25, 2025 1:42 pm
by Reval
hmm that looks promising.... If only there were a way to get all of the convoy ships in my array to use their Torus drives when I want them to! - but I'm not sure if non-player NPC ships even have the ability to use the T-drive. I don't know how to designate
myself as player 'official convoy leader' of the group I have spawned...
Edit: I just discovered that you can form a group with any ship as 'leader':
Code: Select all
this.$ctShips = system.addShips("ct_convoy", this.$ctNumCompanion,[0,0,0]);
var ships = this.$ctShips;
// make each Companion a member of a Group
this.$ctGroup = new ShipGroup("COBRA Convoy",player.ship);
for(var x=0; x<ships.length; x++) {
this.$ctGroup.addShip(ships[x]);
}
I'm not sure what ultimate use it could have in the context of my OXP, but I did it anyway just to see if any behaviour changes and whether any glitches are introduced (JS Reference Wiki says there might be problems if you set your own ship as group leader, although I haven't noticed any yet).
Also, setting the convoy ship-type's max_speed in the shipdata.plist allows them to keep up if the player engages injectors or has Overdrive installed...
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Jul 01, 2025 12:12 pm
by Cholmondely
montana05 wrote: ↑Thu Mar 25, 2021 11:14 am
Redspear wrote: ↑Sat Mar 20, 2021 12:52 pm
montana05 wrote: ↑Thu Mar 18, 2021 8:41 am
Sorry for the late reply, somehow I missed your message.
No worries
You might be able to divert to a simple mission screen: "No shipyard facility present", or similar.
Finally, found some time to refresh my Gui coding and found a simple solution:
Code: Select all
this.guiScreenChanged = function(to, from)
{
if(to == "GUI_SCREEN_EQUIP_SHIP" && player.ship.dockedStation.primaryRole === "baakili_trader")
{
var options =
{
"01_DONE": "Sorry for asking"
};
mission.runScreen
(
{
screenID: "baakili_equipment",
title: "Ship Outfitting",
message: "We do not need or trade in your inferior technology !",
overlay: "FA_baakili_image.png",
choices: options,
exitScreen: "GUI_SCREEN_STATUS"
}
)
};
};
This is replacing the "Ship Outfitting" with a mission screen and therefore blocking any transaction:
Thanks again for the tip.
Montana - did you ever publish your update for this one?
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Jul 15, 2025 12:54 pm
by montana05
Cholmondely wrote: ↑Tue Jul 01, 2025 12:12 pm
montana05 wrote: ↑Thu Mar 25, 2021 11:14 am
Redspear wrote: ↑Sat Mar 20, 2021 12:52 pm
No worries
You might be able to divert to a simple mission screen: "No shipyard facility present", or similar.
Finally, found some time to refresh my Gui coding and found a simple solution:
Code: Select all
this.guiScreenChanged = function(to, from)
{
if(to == "GUI_SCREEN_EQUIP_SHIP" && player.ship.dockedStation.primaryRole === "baakili_trader")
{
var options =
{
"01_DONE": "Sorry for asking"
};
mission.runScreen
(
{
screenID: "baakili_equipment",
title: "Ship Outfitting",
message: "We do not need or trade in your inferior technology !",
overlay: "FA_baakili_image.png",
choices: options,
exitScreen: "GUI_SCREEN_STATUS"
}
)
};
};
This is replacing the "Ship Outfitting" with a mission screen and therefore blocking any transaction:
Thanks again for the tip.
Montana - did you ever publish your update for this one?
No, I never did, like usually I included a lot of new features but never actually finished to remove the remaining bugs. I still have the code somewhere so I could upload it.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Jul 15, 2025 12:56 pm
by Cholmondely
montana05 wrote: ↑Tue Jul 15, 2025 12:54 pm
Cholmondely wrote: ↑Tue Jul 01, 2025 12:12 pm
montana05 wrote: ↑Thu Mar 25, 2021 11:14 am
Finally, found some time to refresh my Gui coding and found a simple solution:
Code: Select all
this.guiScreenChanged = function(to, from)
{
if(to == "GUI_SCREEN_EQUIP_SHIP" && player.ship.dockedStation.primaryRole === "baakili_trader")
{
var options =
{
"01_DONE": "Sorry for asking"
};
mission.runScreen
(
{
screenID: "baakili_equipment",
title: "Ship Outfitting",
message: "We do not need or trade in your inferior technology !",
overlay: "FA_baakili_image.png",
choices: options,
exitScreen: "GUI_SCREEN_STATUS"
}
)
};
};
This is replacing the "Ship Outfitting" with a mission screen and therefore blocking any transaction:
Thanks again for the tip.
Montana - did you ever publish your update for this one?
No, I never did, like usually I included a lot of new features but never actually finished to remove the remaining bugs. I still have the code somewhere so I could upload it.
Please!
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Jul 15, 2025 1:04 pm
by montana05
Cholmondely wrote: ↑Tue Jul 15, 2025 12:56 pm
montana05 wrote: ↑Tue Jul 15, 2025 12:54 pm
Cholmondely wrote: ↑Tue Jul 01, 2025 12:12 pm
Montana - did you ever publish your update for this one?
No, I never did, like usually I included a lot of new features but never actually finished to remove the remaining bugs. I still have the code somewhere so I could upload it.
Please!
Let me check my external drives. Since I don't have much to do next week, I could probably fix the bugs as well.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Thu Aug 07, 2025 11:32 pm
by Wildeblood
"scripted-item-scooped" is used by this line (12965) of ShipEntity.m:
Code: Select all
[UNIVERSE addMessage:OOExpandKey(@"scripted-item-scooped", shipName) forCount:4];
What happens here is quite interesting. As you can see, there is an argument called shipName in tbe addMessage selector. At the same time, the expansion of the string "scripted-item-scooped" contains the term [shipName]. In order for the expansion to occur correctly, the argument and the term inside the square brackets in the expansion must both be called "shipName". Changing any of the two to something else will cause the exapnsion to fail.
But that is for scripted cargo only and is not the line that generates the "1t Furs" (or whatever) message normally. This happens further down, at line 13035 of ShipEntity.m, which reads:
Code: Select all
[UNIVERSE addMessage:[UNIVERSE describeCommodity:co_type amount:co_amount] forCount:4.5];
. The describeCommodity method in Universe.m builds the string that is displayed.
I hope this helps. This was by just looking at what happens in the source and without any actual testing on my part, so I hope I got it right.
Noted for later. #encabulator
Edit: Realized too late I hadn't removed the original link from the quote tag; sorry if you got an unwelcome notification, a_c.