Search found 54 matches
- Fri Jan 31, 2025 7:04 pm
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
I'd like to avoid tossing any garbage into the global space if it's at all possible... You don't need a global object for that, just use a normal world script:- worldScripts.marketDefs.RLE.CleverlyNamedProperty = this; I can put that line in the market script and then address that market script as:...
- Fri Jan 31, 2025 7:28 am
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
I'd like to avoid tossing any garbage into the global space if it's at all possible... I'm reluctant to do it, but here's what I'm thinking: // ...in the worldScript (outside of any function...) if(!OXP){var OXP = {};} // creates an "OXP" object in the global space OXP.JEM = {}; // A &quo...
- Tue Jan 21, 2025 8:27 pm
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
I'm wracking my brains and coming up empty... How do I get a reference to a non-worldScript script? I want to be able to address/modify a market script from functions in my worldScript... It might seem silly, but I think it's kind of important... and I'd like to avoid tossing any garbage into the gl...
- Sun Mar 21, 2021 11:45 am
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
Say, here's a brain-tickler: My world-script needs to create a timer on a ship (station) script... Do I leave the
this
parameter as-is, referring to the world-script or should I change it to station.script
?- Wed Aug 21, 2019 10:32 am
- Forum: Discussion
- Topic: 281-and-a-half TRILLION galaxies...
- Replies: 4
- Views: 5370
281-and-a-half TRILLION galaxies...
:shock: [shamelessly "lifted" from Wikipedia ] The Elite universe contains eight galaxies, each with 256 planets to explore. Due to the limited capabilities of 8-bit computers, these worlds are procedurally generated. A single seed number is run through a fixed algorithm the appropriate nu...
- Wed Aug 21, 2019 10:11 am
- Forum: Discussion
- Topic: Oooops ... how far can I go?
- Replies: 15
- Views: 15915
Re: Oooops ... how far can I go?
Without having a developer build - is there a way I can interrogate the game state to find out, for example, my DistanceFromSun value? I don't know if your questions were answered by anyone else, but: Distance between any two entities: entityA.position.distanceTo(EntityB) Or (more specific): player...
- Fri Aug 16, 2019 1:25 pm
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
Bingo! Dead on the money!phkb wrote: ↑Fri Aug 16, 2019 4:16 amI'm not JS expert, but shouldn't this line:be this?:Code: Select all
this._CD_addEquipment(equipment)
I just tested this form and that seems to work OK.Code: Select all
this._CD_addEquipment = function(equipment)
It's amazing how you look right at something and not see it...

- Fri Aug 16, 2019 2:54 am
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
I'm experiencing a problem (I think it's a problem) with the equipmentAdded event handler. The argument ("equipmentKey") isn't being passed consistently. Here is the code that doesn't work: this.equipmentAdded = function(equipment) {this._CD_addEquipment(equipment);} this._CD_addEquipment(...
- Fri Aug 09, 2019 6:34 pm
- Forum: Suggestion Box
- Topic: Scripting requests
- Replies: 833
- Views: 350186
Re: Scripting requests
When it's convenient, I'd like to see an event handler that triggers when the Player scans a wormhole (passing the wormhole object). 

- Thu Aug 08, 2019 1:03 pm
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
Just out of curiosity... When looking at the code of people who are smarter than I am, every now and then I see little things I don't quite understand. For instance: [from oolite-trumbles-mission.js ] this.startUp = function startUp() Why is it a good idea to name the function? Is it somehow necessa...
- Tue Jul 31, 2018 8:35 am
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
Two observations: 1. You will see that in your log, arbitraryProperty is shown as undefined. This would not be saved in a usable form, even if it did get saved, The change of system.info.arbitraryProperty = !!1; to si.arbitraryProperty = !!1 fixes the undefinedness, but it still will not save the v...
- Tue Jul 31, 2018 7:39 am
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
Is there a Latest.log we can look at? Opening log for Oolite version 1.86 (x86-64) under Windows 6.2.9200 64-bit at 2018-07-31 02:15:03 -0500. 8 processors detected. Build options: OpenAL, new planets. Note that the contents of the log file can be adjusted by editing logcontrol.plist. 02:15:03.747 ...
- Thu Jul 26, 2018 10:01 pm
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
It used to be possible to define arbitrary properties on the SystemInfo object and have them saved in the planetinfo_overrides section of the saved game file... is this no longer the case? I can still define properties on SystemInfo, but they aren't being saved... :? I cannot figure out what's wron...
- Wed Jul 18, 2018 9:28 pm
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
It used to be possible to define arbitrary properties on the SystemInfo object and have them saved in the
I can still define properties on SystemInfo, but they aren't being saved...
planetinfo_overrides
section of the saved game file... is this no longer the case?I can still define properties on SystemInfo, but they aren't being saved...

- Tue Jul 25, 2017 2:20 pm
- Forum: Expansion Pack
- Topic: Scripters cove
- Replies: 1773
- Views: 805264
Re: Scripters cove
Okay, re: galactic jumps... What's the earliest point in the galactic jump sequence that Oolite knows FOR SURE which system the player will arrive in? Can I, for example, read player.ship.targetSystem in playerEnteredNewGalaxy ? The idea here is to get the system ID before Oolite calculates prices a...