OXP Concept - Laser Switch
Moderators: winston, another_commander
-
- ---- E L I T E ----
- Posts: 503
- Joined: Sat Jun 11, 2011 7:46 pm
OXP Concept - Laser Switch
I got an idea for an OXP that allows the player to switch between a military and mining laser on their forward. I know this would be very useful for a number of commanders, especially those with only one or two weapon facings.
The OXP would be a (relatively expensive) piece of equipment purchased at the station. When activated (via the "n" key), it would change the laser from military to mining, or mining to military. The player would have to have either a military or mining laser installed on forward to purchase this.
To maintain game balance, the equipment would need to do one or both of two things:
>Drain an energy bank.
>Overheat the initiated laser, preventing a rapid switch.
Thoughts? Code ideas?
The OXP would be a (relatively expensive) piece of equipment purchased at the station. When activated (via the "n" key), it would change the laser from military to mining, or mining to military. The player would have to have either a military or mining laser installed on forward to purchase this.
To maintain game balance, the equipment would need to do one or both of two things:
>Drain an energy bank.
>Overheat the initiated laser, preventing a rapid switch.
Thoughts? Code ideas?
- Okti
- ---- 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: OXP Concept - Laser Switch
Are you into scripting? Just look at the object model and you will see it is not possible and please only post that can be doable not conceptsDragonfire wrote:I got an idea for an OXP that allows the player to switch between a military and mining laser on their forward. I know this would be very useful for a number of commanders, especially those with only one or two weapon facings.
The OXP would be a (relatively expensive) piece of equipment purchased at the station. When activated (via the "n" key), it would change the laser from military to mining, or mining to military. The player would have to have either a military or mining laser installed on forward to purchase this.
To maintain game balance, the equipment would need to do one or both of two things:
>Drain an energy bank.
>Overheat the initiated laser, preventing a rapid switch.
Thoughts? Code ideas?
-
- ---- E L I T E ----
- Posts: 503
- Joined: Sat Jun 11, 2011 7:46 pm
Re: OXP Concept - Laser Switch
Anyone else care to weigh in? I don't give up easily.
My thought would be to check the save file forward laser value, and then change that using the .js. I know a number of savefile changes are reflected immediately, so that should be fairly possible. (In fact, in a bit, I'll try it out.)
My question, more or less, is whether the laser can be overheated through code? That would be the ideal drawback.
My thought would be to check the save file forward laser value, and then change that using the .js. I know a number of savefile changes are reflected immediately, so that should be fairly possible. (In fact, in a bit, I'll try it out.)
My question, more or less, is whether the laser can be overheated through code? That would be the ideal drawback.
-
- ---- E L I T E ----
- Posts: 503
- Joined: Sat Jun 11, 2011 7:46 pm
Re: OXP Concept - Laser Switch
Hoping that he'll post here, but I may wind up PMing him tonight.
Re: OXP Concept - Laser Switch
He'll post here.
Okti's right - you can't award/remove lasers by scripting. You can check what weapon the ship has in each facing (player.ship.forwardWeapon / .aftWeapon / .portWeapon / .starboardWeapon) but all four are read-only.
If you try to award a laser (EQ_WEAPON_PULSE_LASER etc) by script it just returns false. Ditto for removal.
There are ways and means around it (to which Okti refers elsewhere if he means what I think he does) but they would come with extreme complications and wouldn't be worth the effort (and wouldn't work completely anyway).
Okti's right - you can't award/remove lasers by scripting. You can check what weapon the ship has in each facing (player.ship.forwardWeapon / .aftWeapon / .portWeapon / .starboardWeapon) but all four are read-only.
If you try to award a laser (EQ_WEAPON_PULSE_LASER etc) by script it just returns false. Ditto for removal.
There are ways and means around it (to which Okti refers elsewhere if he means what I think he does) but they would come with extreme complications and wouldn't be worth the effort (and wouldn't work completely anyway).
Last edited by Thargoid on Tue Jul 26, 2011 8:00 pm, edited 1 time in total.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
-
- ---- E L I T E ----
- Posts: 503
- Joined: Sat Jun 11, 2011 7:46 pm
Re: OXP Concept - Laser Switch
Hmm, okay, thanks for the input. Perhaps this just warrants another "n" triggered weapon as a backup for the military laser. I'll think on it more. Thanks, Thargoid.
While we're on the topic of lasers and scripting, IS it possible to change the laser temperature? I may end up scripting a "laser cooler" instead, that speeds up the laser cooling at the expense of a few energy banks.
While we're on the topic of lasers and scripting, IS it possible to change the laser temperature? I may end up scripting a "laser cooler" instead, that speeds up the laser cooling at the expense of a few energy banks.
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: OXP Concept - Laser Switch
Do a forum search for 'laser cooler' ....
Dragonfire, I'm surprised you haven't looking the scripting engine stuff on the wiki.
Take a look at these to get a grip on what properties are read only and what can be interacted with on your ship.
http://wiki.alioth.net/index.php/Oolite ... ce:_Player
http://wiki.alioth.net/index.php/Oolite ... ence:_Ship
http://wiki.alioth.net/index.php/Oolite ... PlayerShip
http://wiki.alioth.net/index.php/Oolite ... ce:_Entity
Dragonfire, I'm surprised you haven't looking the scripting engine stuff on the wiki.
Take a look at these to get a grip on what properties are read only and what can be interacted with on your ship.
http://wiki.alioth.net/index.php/Oolite ... ce:_Player
http://wiki.alioth.net/index.php/Oolite ... ence:_Ship
http://wiki.alioth.net/index.php/Oolite ... PlayerShip
http://wiki.alioth.net/index.php/Oolite ... ce:_Entity
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
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
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: OXP Concept - Laser Switch
The easiest way to find out what’s doable is to ask. And sometimes, when the answer is no, that turns out to be wrong. (But in this case, I’d be very surprised.)Okti wrote:please only post that can be doable not concepts
E-mail: [email protected]
-
- ---- E L I T E ----
- Posts: 503
- Joined: Sat Jun 11, 2011 7:46 pm
Re: OXP Concept - Laser Switch
Thank you, Murphy. I've been looking through those, but I've had a little trouble making heads or tails of it. (I'm juggling a number of other non-Oolite projects, atm, one of them programming.) I'll be sure to run that search pronto.Capt. Murphy wrote:Do a forum search for 'laser cooler' ....
Dragonfire, I'm surprised you haven't looking the scripting engine stuff on the wiki.
Take a look at these to get a grip on what properties are read only and what can be interacted with on your ship.
http://wiki.alioth.net/index.php/Oolite ... ce:_Player
http://wiki.alioth.net/index.php/Oolite ... ence:_Ship
http://wiki.alioth.net/index.php/Oolite ... PlayerShip
http://wiki.alioth.net/index.php/Oolite ... ce:_Entity
EDIT: Well, the end result of that laser cooler search seems to be much like with my Wyvern. Some like it, some don't, some hate it with a vengance. So...I'll try and script it, and if people don't want it, they won't download it.
Anyone who thinks it is a viable OXP (even if you don't want to download it yourself), comments and suggestions are more than welcome. If you hate the concept, just know that I already have seen the debate, and I'm moving ahead anyway. :3
As to game balance...it comes at a steep energy bank price, so you have to become more vulnerable to use it. It ain't free power.
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: OXP Concept - Laser Switch
My point was more that it's been discussed quite a lot and as such if it was doable someone would probably have done it by now, rather than any controversy about the idea. My feeling as to any OXP idea is if at least a few people would want it then there is merit in releasing it. Personally I think emergency laser cooling would be a great addition the the game.
However if you look through those links I posted carefully you'll note that the only weapon related properties visible to script are what's in each slot and the primary weapon's range and all are read only. So basically we can't do anything with the players laser in script other than check what the player has got, and it's range. To do a 'laser cooler' properly would require something like a currentWeaponTemp property which is read/write.
What properties are and are not visible to script is set by the core game source code so any new properties would have to be implemented by the devs. You can request additions in the scripting requests thread, but I wouldn't get your hopes up because I think the feature freeze still applies until 1.76 and then who knows how development will progress after that.
edit 2 add - I get the impression that there is some fundamental reason that the devs haven't/ can't make more laser properties available - possibly something to do with the visible laser beam itself technically being a sub-entity of the ship.... (that may be wrong), and changing that would be a major rewrite of a big chunk of code.
Further edit to add -
Not sure if this would work but you could potentially have a feature in a particular ship by messing with view and weapon positions in the shipdata so that say all forward and side weapons and view positions actually face forward. Kind of would (badly) simulate cycling through 3 different (or 3 of the same) forward weapons. Downsides - you'll get anomolous view position console messages and you lose your side weapons and views, and it would have to be for a particular ship only.
However if you look through those links I posted carefully you'll note that the only weapon related properties visible to script are what's in each slot and the primary weapon's range and all are read only. So basically we can't do anything with the players laser in script other than check what the player has got, and it's range. To do a 'laser cooler' properly would require something like a currentWeaponTemp property which is read/write.
What properties are and are not visible to script is set by the core game source code so any new properties would have to be implemented by the devs. You can request additions in the scripting requests thread, but I wouldn't get your hopes up because I think the feature freeze still applies until 1.76 and then who knows how development will progress after that.
edit 2 add - I get the impression that there is some fundamental reason that the devs haven't/ can't make more laser properties available - possibly something to do with the visible laser beam itself technically being a sub-entity of the ship.... (that may be wrong), and changing that would be a major rewrite of a big chunk of code.
Further edit to add -
Not sure if this would work but you could potentially have a feature in a particular ship by messing with view and weapon positions in the shipdata so that say all forward and side weapons and view positions actually face forward. Kind of would (badly) simulate cycling through 3 different (or 3 of the same) forward weapons. Downsides - you'll get anomolous view position console messages and you lose your side weapons and views, and it would have to be for a particular ship only.
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
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
Re: OXP Concept - Laser Switch
When I first read this topic, I initially thought you meant something like this:
Semi-automatic/full-auto laser mode!
https://bb.oolite.space/viewtopic.php?f=6&t=10108
...which sadly is also impossible without the core game being modified.
It's being considered, but only if demand for it is higher.
Semi-automatic/full-auto laser mode!
https://bb.oolite.space/viewtopic.php?f=6&t=10108
...which sadly is also impossible without the core game being modified.
It's being considered, but only if demand for it is higher.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: OXP Concept - Laser Switch
No. Weapon positions do not work that way.Capt. Murphy wrote:Not sure if this would work but you could potentially have a feature in a particular ship by messing with view and weapon positions in the shipdata so that say all forward and side weapons and view positions actually face forward.
E-mail: [email protected]
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: OXP Concept - Laser Switch
Thanks Ahruman - that'll save Dragonfire some time then.
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
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