Thank you, a_c - you fixed it for me! I just could not work out what was wrong (I terminated the list early because it all worked up to there, and the next three entries didn't - and I failed to see what was wrong with them). Plutil on the AppleMac's Terminal is pretty good - but did not tell me what was wrong this time.another_commander wrote: ↑Wed Nov 02, 2022 5:29 pmThat closing bracket above your comment marker terminates the list early. Move it at the end of everything and it should (hopefully) work. Also, remove the comma at the end of the very last entry.
(a couple of commas found missing)
Tinkerer's Workshop - OXP tweaking for fun and profit!
Moderators: winston, another_commander
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Question: Is there a shiplibrary_overrides.plist or some such? Or can one include a new ship's description and specs tweaks in a copy of shiplibrary.plist and include that in one's OXP's Config folder? - I confess I've always been in the dark about this, which is why I never made one for the changes FE Ships introduces...
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
It seems that there is no way to change the shiplibrary entries from outside - there is no overrides file, and each entry in the shiplibrary.plist is a separate entry on the library screen and does not affect others in any way.Reval wrote: ↑Sun Nov 06, 2022 8:53 amQuestion: Is there a shiplibrary_overrides.plist or some such? Or can one include a new ship's description and specs tweaks in a copy of shiplibrary.plist and include that in one's OXP's Config folder? - I confess I've always been in the dark about this, which is why I never made one for the changes FE Ships introduces...
But, if the description text (or the text of another key) is placed in description.plist, you can try to redefine it there, but whether this will work or not depends on the order in which the plists are loaded.
And one more thing, about specs - if they are not set in the shiplibrary.plist, they are automatically taken from shipdata, so you probably don't need to do anything to show your specs tweaks.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
I asked similar some time ago.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Many thanks to you both - much light has been shed for me! I'll experiment to see what, if anything, works...
In any case, all I'm aiming to do is replace the Oolite descriptions with ones reflecting the characteristics and roles of the ('same') ships as offered by Frontier: First Encounters.
In any case, all I'm aiming to do is replace the Oolite descriptions with ones reflecting the characteristics and roles of the ('same') ships as offered by Frontier: First Encounters.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
For a long time I've been noticing that Oolite Javascript's modulo (%) operator gives no result whatever. Quite simply, it doesn't work (for me) with any of my numeric variables.
The following would seem to be correctly coded:
I suspect also that multiplication (*) doesn't work with numeric variables.
This 'feature' of Oolite JS (if indeed it is one) prevents us implementing some rather elementary stuff that would be a breeze to do in C, or even standard JS for that matter.
Is it a known issue at all? Am I using the right syntax?
The following would seem to be correctly coded:
Code: Select all
var runs = this.$Runs;
var intv = this.$Interval;
// do something every <intv> runs
if ( (runs > 0) && ((runs % intv)==0) ) this._doSomething();
This 'feature' of Oolite JS (if indeed it is one) prevents us implementing some rather elementary stuff that would be a breeze to do in C, or even standard JS for that matter.
Is it a known issue at all? Am I using the right syntax?
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
This is the ouput from the Oolite debug console after running this, once for runs = 22 and once for runs = 24.
Looks like it's working here. The multiplication operator also works, as can be seen. I would suggest checking that your initial variables hold valid values.
Looks like it's working here. The multiplication operator also works, as can be seen. I would suggest checking that your initial variables hold valid values.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Thanks a lot for testing it a_c. I really can't see what the problem is then, since my two global variables are set up correctly as numeric (ie. runs = 0 for startup, and then incremented every witchpoint exit with runs+=1; the interval (divisor) is also set up as an 'integer' in startup. I've never been able to get % to work!
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Try logging the two variables just before the modulus operation occurs. Do they appear as expected before they are used?
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
I'm attempting, without any luck, to determine whether player.ship is carrying a particular piece of equipment. Even being able to list out the equipment array would be a help...
JS Wiki says, under ship:
equipment
equipment : Array of EquipmentInfo (read-only)
The equipment a ship is carrying.
I've tried to access an element in this 'array', like so:
but log just gives [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Equipment Test 1.0): TypeError: player.ship.equipment[0] is undefined'.
What is the correct syntax for accessing the elements of the equipment array? Anyone?
JS Wiki says, under ship:
equipment
equipment : Array of EquipmentInfo (read-only)
The equipment a ship is carrying.
I've tried to access an element in this 'array', like so:
Code: Select all
// or any other number as the index
var eq = player.ship.equipment[0].name;
log(this.name, eq);
What is the correct syntax for accessing the elements of the equipment array? Anyone?
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Massively Locked
- Dangerous
- Posts: 84
- Joined: Tue Nov 20, 2012 12:20 pm
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Try:
Code: Select all
if (player.ship.equipmentStatus ("EQ_RELAXAPADS") === "EQUIPMENT_OK") {…}
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Just the ticket M_L - thank you!
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Alnivel and I have been working on Spara's version of Xeptatl's Sword.
There is a problem: we replaced the old monitor stations with a new model snitched from elsewhere. BUT. The model is much bigger than the monitor station - and when we shrink it to size, the docking bay becomes too small to take a Cobra Mk. III
Can anybody help?
Download: as OXP and as OXZ.
If you want to check out how the new station model looks in-game, Diso has one.
There is a problem: we replaced the old monitor stations with a new model snitched from elsewhere. BUT. The model is much bigger than the monitor station - and when we shrink it to size, the docking bay becomes too small to take a Cobra Mk. III
Can anybody help?
Download: as OXP and as OXZ.
If you want to check out how the new station model looks in-game, Diso has one.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
I'm trying to shrink and reposition a model in Runscreen:
I have:
mission.runScreen({
title: "Royal Court",
messageKey: "feudal_mission_accepted",
model:"feudal-tournament-buoy",
background:{name:"Feudal_Screen_C.png",height:512}
});
setScreenOverlay({ name: (this.$message1), height: 512 });
but would like to move the model to the space on the right and shrink it down
I believe there is a command - mission.displayModel.orientation
Is there also commands for position and size?
and if so how would it be scripted?
I have:
mission.runScreen({
title: "Royal Court",
messageKey: "feudal_mission_accepted",
model:"feudal-tournament-buoy",
background:{name:"Feudal_Screen_C.png",height:512}
});
setScreenOverlay({ name: (this.$message1), height: 512 });
but would like to move the model to the space on the right and shrink it down
I believe there is a command - mission.displayModel.orientation
Is there also commands for position and size?
and if so how would it be scripted?
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Total cheat/workaround idea here as I don't know how to do what you're asking exactly the way you're describing it but...
Imagine your image as part of a larger canvas with an alpha channel providing a transparent background.
The shield/medal/whatever placed on the far right of the image, vertically centred.
Result I'd have thought would be that the image is positioned where you want while the alpha channel avoids interfering with other overlays/image placements.