Page 1 of 2
OXP Suggestion?
Posted: Mon Oct 14, 2013 9:13 pm
by Celt
Being new to the ooniverse I have thought about trying my hand at an equipment OXP but being a bit too old school (C rather than C++, and Java is an island off Indonesia surely?) have so little idea how to start I thought I'd start to a thread here instead!
So the idea is an equipment add-on activated via the same interface as things like the Ore Processor OXP or the Naval Energy Grid . . . A laser cooler. Now before everyone shouts "cheat" and "balance" at me, there is a catch . . . And it's a biggie! The Laser Cooler radiates the heat energy through the shields. To cool a military laser by 50% would drain the appropriate shield (front/rear, or both for port/starboard lasers) completely (at which point the cooler deactivates). Even if you have OXPs like shield equalisers, shield capacitors, military shield enhancements. The drain rate would be vicious . . . You'll get a few seconds more blasting at the cost of lowering your defences (which, according to Darth Vader is unwise)! The heating rate should always be greater than the cooling so firing with the coolers on won't give you a non stop blast until the shields go down . . . Maybe you can't fire with the coolers on?
Would that balance risk vs reward enough?
Re: OXP Suggestion?
Posted: Mon Oct 14, 2013 9:36 pm
by Commander McLane
Celt wrote:Being new to the ooniverse I have thought about trying my hand at an equipment OXP but being a bit too old school (C rather than C++, and Java is an island off Indonesia surely?) have so little idea how to start I thought I'd start to a thread here instead!
First of all, OXPs contain neither C, nor C++, nor Java. Oolite itself is written in ObjC (which is neither C nor C++), but OXPs are written in JavaScript (which is not Java), with some OpenStep or XML for the static property lists.
I recommend that you begin by studying the relevant documentation on the Oolite section of the Elite Wiki.
http://wiki.alioth.net/index.php/Catego ... _scripting is an index page that contains everything relevant for scripting in general (although some of it is outdated, because it refers to the so-called "legacy" scripting engine, which was replaced by the JS-scripting engine).
http://wiki.alioth.net/index.php/Catego ... _Reference contains the reference for the JavaScript scripting engine. You need to read and digest these,
all of them.
[wiki]Scripting Oolite with JavaScript[/wiki] (which is listed on the first index page above) is a good starting point for the basics. It has links to further pages.
Now, as far as your idea goes: I hate to break the bad news to you, but it's a non-starter. Laser Coolers are not possible in Oolite, and that's deliberately so, because the potential for abuse is so high. Specifically, the laser temperature
cannot be set or influenced by script (and therefore by OXP) which you can easily see on the relevant documentation page:
http://wiki.alioth.net/index.php/Oolite ... atLevel.2A
Documentation wrote:laserHeatLevel*
This property was added in Oolite test release 1.77.
Code: Select all
laserHeatLevel : Number (read-only, 0 to 1)
The temperature of the ship's currently active weapon. Thermal cut-out is active above 0.85. For non-player ships, if their forward weapon is empty, then the temperature of the forward weapon may be the temperature of a subentity forward weapon.
Code: Select all
laserHeatLevelAft : Number (read-only, 0 to 1)
laserHeatLevelForward : Number (read-only, 0 to 1)
laserHeatLevelPort : Number (read-only, 0 to 1)
laserHeatLevelStarboard : Number (read-only, 0 to 1)
The temperature of specific laser mounts can also be queried.
The relevant bit here is the "read-only" in the first small box.
Re: OXP Suggestion?
Posted: Mon Oct 14, 2013 9:42 pm
by Celt
I guess the sarcasm of my self-deprecation was lost . . .
And that kills that idea . . . Well I'll have more free time to play instead!
Re: OXP Suggestion?
Posted: Mon Oct 14, 2013 10:19 pm
by Smivs
Celt wrote:
And that kills that idea . . . Well I'll have more free time to play instead!
Until another idea pops into your head
Ideas are a good thing, even if they turn out to be non-starters.
Celt wrote:I guess the sarcasm of my self-deprecation was lost . . .
Don't worry. Remember English is a second language to many of our members so sublety can sometimes get lost. It's credit to the non native English speakers that most of the time we don't notice.
Re: OXP Suggestion?
Posted: Mon Oct 14, 2013 10:36 pm
by JazHaz
Smivs wrote:Celt wrote:I guess the sarcasm of my self-deprecation was lost . . .
Don't worry. Remember English is a second language to many of our members so sublety can sometimes get lost. It's credit to the non native English speakers that most of the time we don't notice.
Celt, so Commander McLane's "
Location: a Hacker Outpost in a moderately remote area" wasn't a big enough hint that he's not a native Brit?
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 8:37 am
by Disembodied
JazHaz wrote:Celt, so Commander McLane's "Location: a Hacker Outpost in a moderately remote area" wasn't a big enough hint that he's not a native Brit?
I don't see why it should be: it's not like there aren't lots of forum members based in the UK who have a whimsical "location"
... and it's not like you have to be a native Brit to have English as a first language, either.
Whatever: not to worry, Celt! My first post on these boards was a proposal for a laser cooler. My "balancing" idea was that the heat would be pumped into the cabin, and cause the cabin temperature to soar to dangerous levels. Another non-starter: increasingly, too, as players and NPCs become closer in capabilities, all these bits of kit would need to be factored in to NPC AIs, which is a lot of work to do to allow players to partially circumvent what is actually a really clever bit of game-mechanic, that forces players to be careful how they fight. Nothing's ever a total waste, though: my idea did, eventually, in a modified form, resurface elsewhere, in a piece of fiction ...
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 8:38 am
by Diziet Sma
JazHaz wrote:Smivs wrote:Celt wrote:I guess the sarcasm of my self-deprecation was lost . . .
Don't worry. Remember English is a second language to many of our members so sublety can sometimes get lost. It's credit to the non native English speakers that most of the time we don't notice.
Celt, so Commander McLane's "
Location: a Hacker Outpost in a moderately remote area" wasn't a big enough hint that he's not a native Brit?
Well, to be fair, for a lot of you Brits, the north of Scotland counts as a "remote area"..
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 8:41 am
by Disembodied
Diziet Sma wrote:Well, to be fair, for a lot of you Brits, the north of Scotland counts as a "remote area"..
For some of them it's anywhere north of Watford ...
http://www.bbc.co.uk/news/uk-politics-23505723
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 8:49 am
by Smivs
What! There is something north of Watford ?!
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 8:50 am
by Diziet Sma
So he thinks trashing the environment is ok so long as it's "desolate" or uninhabited? Charming. I hope the idiot gets voted out pronto.
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 9:03 am
by Disembodied
Diziet Sma wrote:So he thinks trashing the environment is ok so long as it's "desolate" or uninhabited? Charming. I hope the idiot gets voted out pronto.
Vote? Vote? What do you think this is, a democracy? No, he has a seat in our upper legislature for life ... The only (very recent - like, 1999) concession to democracy is that any offspring he has won't automatically inherit said seat.
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 9:10 am
by Diziet Sma
Oh.. a member of the Parasite class.. I should have known..
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 10:25 am
by Capt. Reynolds
From "cooling lasers" to "damn the privileged classes" via "spotting foreigners" in less than a page.
I love this place
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 1:20 pm
by Commander McLane
Celt wrote:I guess the sarcasm of my self-deprecation was lost . . .
The problem wasn't the sarcasm as such, but that it didn't positively convey your actual level of knowledgeability (wow, that seems to be an actual word; I just typed it to see what happens
). Thus I responded on a quite basic level.
However, apart from my futile attempt to differentiate between Oolite and its scripting engine, and between Java and JavaScript (by the way, you wouldn't believe how often we've had to clear that misunderstanding; thus I can perhaps be forgiven), the links I provided are
still useful and the necessary starting point for
everybody's OXPing career. So, this part of my reply was and is a dead-serious advice, regardless of your prior experiences with programming. You need to know the syntax and the commands that are at your disposal.
Had you known about the JS-reference in the Wiki, you could have looked up the properties of
laserHeatLevel
and its derivatives early on, before spending too much time in detailing an idea that wasn't going to fly anyway. With your next idea, you'll at least be able to look some things up yourself. Or perhaps browsing through the reference pages gives you some ideas of what can be done in the first place.
Re: OXP Suggestion?
Posted: Tue Oct 15, 2013 1:23 pm
by Commander McLane
JazHaz wrote:Celt, so Commander McLane's "Location: a Hacker Outpost in a moderately remote area" wasn't a big enough hint that he's not a native Brit?
I'm interested why it would be. Is there a giveaway in the syntax or choice of words? Any obvious mistake that a native speaker wouldn't make? I'd be grateful for corrections.