Scripting requests

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
timer
---- E L I T E ----
---- E L I T E ----
Posts: 336
Joined: Sat Mar 17, 2012 8:26 pm
Location: Laenin spiv club
Contact:

Re: Scripting requests

Post by timer »

Wildeblood wrote:
But there are two buttons - N to select mode, and n to activate - maybe you just want to edit your key configuration to change the N to a different - lower case - button, so you don't need to hold the shift key?
N - CHOOSE DEVICE, NOT mode of prime equipment
Kaks wrote:
It should allow for a fairly natural 'double click' effect...
Well... you all need the second button too, but you choose "hack solution", you choose "double click" on keyboard - it is a crutch.

ok... I remained not understood, it is a pity.
Cobra MK III owner since 1994
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Scripting requests

Post by Mauiby de Fug »

I may be misunderstanding, but what I think timer is asking for is another key so that the set-up is as follows:

Key 1) Cycle and choose between the primeable equipment; Currently done with N/Control-N.
Key 2) Cycle and choose between the modes of the currently selected equipment; As far as I am aware, this is has to be done via N/Control-N, thereby clogging up the selection process.
Key 3) Activate/deactivate the currently selected equipment; Currently done with n.
User avatar
timer
---- E L I T E ----
---- E L I T E ----
Posts: 336
Joined: Sat Mar 17, 2012 8:26 pm
Location: Laenin spiv club
Contact:

Re: Scripting requests

Post by timer »

Mauiby de Fug wrote:
I may be misunderstanding, but what I think timer is asking for is another key so that the set-up is as follows:

Key 1) Cycle and choose between the primeable equipment; Currently done with N/Control-N.
Key 2) Cycle and choose between the modes of the currently selected equipment; As far as I am aware, this is has to be done via N/Control-N, thereby clogging up the selection process.
Key 3) Activate/deactivate the currently selected equipment; Currently done with n.
almost exactly so :) Thanks a lot, Mauiby de Fug

Key 1) Cycle and choose between the primeable equipment; Currently done with N/Control-N.
Key 2) Select mode of selected prime equipment - for example key m - that call predefine JS function switchMode in equipment script
Key 3) Activate/deactivate the currently selected equipment; Currently done with n.

Almost all devices round us in real life have at least pair of buttons - 1) action 2) mode

I at all don't suggest to appoint to devices separate buttons on keyboard or to allow OXP scripts to handle key pressing - NO NO NO

I want to have a normal handler of change of an operating mode of the prime equipment, instead of a "double click solution"
Cobra MK III owner since 1994
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Scripting requests

Post by Kaks »

Hmm, I'd be more inclined to use already existing mechanisms ( I'm thinking OXPConfig ) to change oxp equipment settings... a dedicated 'change primable equipment settings' key seems to me to just increase interface complexity in exchange for little extra functionality.

Sorry timer, I totally misunderstood what you meant!
I could see the double click concept being of use with something along the lines of a hypothetical 'advanced chaff equipment': single click to activate a single chaff release, double click to release all on-board chaff at once.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Scripting requests

Post by cim »

Thargoid wrote:
  • Making beacon code read/write rather than just read - so beacons can be added to existing ships without having to do a swap-over to a like_ship version with it set. So ships can be tagged and untagged on the fly.
[/color]
ship.setBeacon(code) is made available in r4840. Using the empty string will clear an existing beacon.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Scripting requests

Post by Wildeblood »

cim wrote:
Thargoid wrote:
  • Making beacon code read/write rather than just read - so beacons can be added to existing ships without having to do a swap-over to a like_ship version with it set. So ships can be tagged and untagged on the fly.
[/color]
ship.setBeacon(code) is made available in r4840. Using the empty string will clear an existing beacon.
------------------------------------------------------------------------
r4840 | cim | 2012-04-11 13:20:29 +0300 | 3 lines

- fix bug in ASC where destruction of first or last beacon broke compass
- add ship.setBeacon(code) to scripting

------------------------------------------------------------------------
Good one, cim. I only discovered that bug yesterday, I meant to ask today whether it was a known one or not.
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Scripting requests

Post by Okti »

cim wrote:
ship.setBeacon(code) is made available in r4840. Using the empty string will clear an existing beacon.
Good one. Damn, I need to rewrite LongRangeScanner again then :lol:
My OXP's
And Latest Mission Coyote's Run
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Scripting requests

Post by Capt. Murphy »

And Escape Pod Locator - nice one cim.....
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Scripting requests

Post by Thargoid »

And maybe Tracker.oxp too, although the way that's currently done has a couple of advantages which would need script solutions instead. Hmm, to ponder, but thanks cim for the new feature :)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Scripting requests

Post by cim »

Phasted wrote:
An event-handler (well, two actually) that triggers when the player buys or sells cargo (passing commoditiy name, quantity, and price).
playerBoughtCargo(commodity,units,price) and playerSoldCargo(commodity,units,price) are available as of r4851.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Scripting requests

Post by Capt. Murphy »

cim wrote:
Phasted wrote:
An event-handler (well, two actually) that triggers when the player buys or sells cargo (passing commoditiy name, quantity, and price).
playerBoughtCargo(commodity,units,price) and playerSoldCargo(commodity,units,price) are available as of r4851.
Nice one cim - maybe don't need to think about CabalCommonEventHandlers then.....

Are you going to do...

this.equipmentRepaired = function(equipment) which is another outstanding request and would be useful (lots of OXPs currently need to use Timer's to monitor for repair).

I also know someone who would appreciate a

this.playerBountyIncreased = function(penalty,reason)
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Scripting requests

Post by Wildeblood »

cim wrote:
Phasted wrote:
An event-handler (well, two actually) that triggers when the player buys or sells cargo (passing commoditiy name, quantity, and price).
playerBoughtCargo(commodity,units,price) and playerSoldCargo(commodity,units,price) are available as of r4851.
Price per unit or total price?
Capt. Murphy wrote:
I also know someone who would appreciate a

this.playerBountyIncreased = function(penalty,reason)
Not nearly as much as I'd appreciate this one:-
Wildeblood wrote:
I'd like a way to be able to script galaxy jumps with more than one shift, specifically, with a parameter defining the number of shifts from either 0-7 or 1-8 so that the player can be jumped straight from galaxy 1 to galaxy 2, 3, 4, 5, 6, 7, 8, or back to a point in galaxy 1.

For people who like the eight galaxies in a ring scenario, seven shifts would allow the creation of a "reverse direction" galactic hyperdrive. For those of us who think the eight galaxies and one-shot galactic hyperdrive look suspiciously like "finish level 1 being proceeding to level 2", scripting that varied the number of shifts depending on the departure system would allow the eight galactic sectors to be arranged in any apparent relationship.

When returning the player to his starting galaxy, the process should proceed normally including that the playerEnteredNewGalaxy event should still fire, rather than create any special "jump failed" alternative. That would allow time travel/alternative universe/twilight zone scenarios to be created. "Unexpectedly, you arrive back where you departed from, everything is the same, yet somehow subtly different." [Cue spooky music.]
Really I didn't think it would be particularly difficult...?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Scripting requests

Post by cim »

Wildeblood wrote:
cim wrote:
Phasted wrote:
An event-handler (well, two actually) that triggers when the player buys or sells cargo (passing commoditiy name, quantity, and price).
playerBoughtCargo(commodity,units,price) and playerSoldCargo(commodity,units,price) are available as of r4851.
Price per unit or total price?
Per-unit
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Scripting requests

Post by Commander McLane »

Wildeblood wrote:
Not nearly as much as I'd appreciate this one:-
Wildeblood wrote:
I'd like a way to be able to script galaxy jumps with more than one shift, specifically, with a parameter defining the number of shifts from either 0-7 or 1-8 so that the player can be jumped straight from galaxy 1 to galaxy 2, 3, 4, 5, 6, 7, 8, or back to a point in galaxy 1.

For people who like the eight galaxies in a ring scenario, seven shifts would allow the creation of a "reverse direction" galactic hyperdrive. For those of us who think the eight galaxies and one-shot galactic hyperdrive look suspiciously like "finish level 1 being proceeding to level 2", scripting that varied the number of shifts depending on the departure system would allow the eight galactic sectors to be arranged in any apparent relationship.

When returning the player to his starting galaxy, the process should proceed normally including that the playerEnteredNewGalaxy event should still fire, rather than create any special "jump failed" alternative. That would allow time travel/alternative universe/twilight zone scenarios to be created. "Unexpectedly, you arrive back where you departed from, everything is the same, yet somehow subtly different." [Cue spooky music.]
Really I didn't think it would be particularly difficult...?
Perhaps not difficult, but unwanted? Not each feature request is automatically granted by the developers, just because someone would like to have it and therefore is requesting it. If that would be the case, we'd have laser coolers since long ago.

Personally I'd be opposed to making the galactic jump arbitrary. The jump-one-galaxy-forward-only rule seems to me as one of the core rules that define what Elite/Oolite is, similar to the 7LY rule. Changing it would create a different game. I have no idea how the developers think about this, it's just what I am feeling. I notice, however, that there are no replies to the post you're linking to. This could be evidence that the request didn't resonate with other people.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Scripting requests

Post by cim »

Capt. Murphy wrote:
Are you going to do...
this.equipmentRepaired = function(equipment) which is another outstanding request and would be useful (lots of OXPs currently need to use Timer's to monitor for repair).

I also know someone who would appreciate a

this.playerBountyIncreased = function(penalty,reason)
this.equipmentRepaired is in the pile already from earlier in this thread. I hadn't seen any requests for this.playerBountyIncreased before, but I'll add it now.
Post Reply