weapon_energy useless for lasers

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
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:

weapon_energy useless for lasers

Post by Commander McLane »

Contrary to what the wiki says the shipdata weapon_energy key does not reset the laser energy of ships, neither player nor NPCs. In PlayerEntity.m it isn't even checked, so it never will do anything for the player ship. And in ShipEntity.m (if I read it correctly) it is checked, however it is then overwritten be the default values.

The only things influenced at all seem to be the energy of turrets (only NPC) and dealEnergyDamageWithinDesiredRange (again irrelevant for the player).

(The turret setting could be available for the player in the latest revision, as I have only the 1.71.2 source code at hand. But from that one it looks as if weapon_energy is pretty much useless for the player, and of very limited use for NPCs.)

Playtesting with 1.72.1 shows that indeed lasers of both player and NPC only induce the default energy damage, regardless of the value set by weapon_energy. Which makes any attempt of creating a more powerful primary weapon for either player or NPC dead in the starting blocks.

Question is whether we want it that way (and would have to correct the wiki), or consider this a behaviour-to-be-changed?
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

I vote for change... since you can in regard to dealEnergyDamageWithinRange

You Just spawn a secondary object to detonate just like a missile, give it a wreck model, and no one ever notices, as I do in the fuel collector with derelict ships that it is trying to hack...
Bounty Scanner
Number 935
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Re: weapon_energy useless for lasers

Post by Lestradae »

Commander McLane wrote:
Contrary to what the wiki says the shipdata weapon_energy key does not reset the laser energy of ships, neither player nor NPCs.

...

Question is whether we want it that way (and would have to correct the wiki), or consider this a behaviour-to-be-changed?
I' m shocked :shock:

Truly, I am, because I am relying heavily on that function working as documented in the wiki and it would break any balance I try to create for my future oxp and trigger a rewrite of a scope that I possibly won't do it.

Development version of Oolite or not, basic functions documented in the wiki should work as intended, or it is to be considered a bug, and this one here is a particularly big, ugly one.

This should be changed ASAP for the next version!

Good that you spotted that one, Cmdr McLane, have you filed this as a bug at BERLIOS, too?

Greetings

L
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Bug #15002

Post by Lestradae »

Filed this issue as Bug #15002 on Berlios, citing Cmdr McLane's findings and myself.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

For player ships, there is a very definite list of available weapons, and it isnt possible to create arbitrary powered lasers. This is done, Im pretty sure, with an enumeration of the 4 (plus thargoid) laser types -- I dont see this changing easily/quickly.

For NPCs I think it might be easier, but there are still assumptions on the weapon type.

It is quite a change to the oolite world to have different powered weapons, and while I think its probably a good idea, I think we do need to have some discussion.

Some things to think about: if I have a player whip with a non standard weapon, and I replace it with a mining laser, then want to return to the default for my ship, how will I do that? there is no way. Should non-standard lasers maybe not be upgradable? If my laser is non standard, what range does it have (each of the basic types has both a power and a range)?
Last edited by Cmdr James on Sun Jan 04, 2009 4:00 pm, edited 1 time in total.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

It's been a function documented in the wiki for a long time, used by quite a few ship oxp'ers for years now, and something that opens many options to tweak things.

I don't think there should be a discussion. The core game provides the canvas; the oxp'ers the bigger picture(s); and each and every player chooses their own gallery.

Any artificial limiting of the colour palette of oxp options, especially if done in retrospect after years, would actually be a sorts of foul play towards oxp'ers who use the said function to acquire something in their "picture(s)".

The potential oxp diversity is heart and soul of Oolite and the reason why this game can potentially keep going for decades. Let's not limit that by restricting those possibilities because of someone's taste for everyone else.

My 0.2 Cr

L
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Re: ...

Post by Cmdr James »

Lestradae wrote:
I don't think there should be a discussion. The core game provides the canvas; the oxp'ers the bigger picture(s); and each and every player chooses their own gallery.
Maybe so, but the game has 5 lasers, and ball turrets. The lasers have defined range and power, and its not that simple to change, nor is the correct behaviour actually completely clear to me. What does it mean for my ship to have a power 23 pulse laser? What happens if I upgrade to a military laser. What happens if I go back to a pulse laser?

Documented or otherwise, the fact is there are things to consider before the changes are made.

Edit: This isnt due to my "taste" this is an open subject for discussion, and I trying to indicate the situation as is. As is, I would say that for whatever reason the documentation is wrong, and I suspect has been wrong for a long time.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Weapon energy belongs to a weapon, not to a ship. So for a player ship it should do nothing and think it was never read in for a player in the past.

For NPC ships it is read in but looking at the code, it was only mend for missiles. It is a bug in the wiki that is says it changes laser energy and the wiki even fails to mention its use for missile detonations.

However, it would be nice if weapon_energy would be used for the NPC front laser. As it was clearly never intended to be used for lasers it is not a quick fix.
User avatar
wackyman465
---- E L I T E ----
---- E L I T E ----
Posts: 831
Joined: Thu Nov 06, 2008 10:15 pm
Location: Currently hunting you down in an Imperial Courier

Post by wackyman465 »

Yeah, I was thinking about this before, when I thought about making a "sniper laser" - the general answer is: NO, don't even think about it. Lasers are unchangeable and it would break the game forever! BAH!
I shot him back first. That is to say, I read his mind and fired before he would have fired on me. No, sir, he wasn't a fugitive.
Post Reply