Weapon Energy

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Weapon Energy

Post by Thargoid »

I'm just having a play with creating a player/NPC Combat Drone for my next trick (well why should we Thargoid's have all the fun with such things?), and have come across a rather irritating little issue. I was going to have it based on a ECM-hardened missile but with a laser (cue Dr Evil jokes) for some target-blasting first.

However it seems that both the laser damage and the missile yield are controlled by the "weapon_energy" shiplist entry. So I either get a missile-strength laser blast or a laser-strength warhead, which rather makes the thing either far too deadly or too weak. I know I could probably get around it via spawning a missile just before impact, but that seems rather a clunky work-around.

So I was wondering if it would be possible to have different weapon_energy keys for different uses, and indeed perhaps for the different gun mounts too (e.g. have weapon_energy_fore, _aft, _port, _starboard and _missile for example)?
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

I think you can do this by putting the laser, or the warhead on different subentities.
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:

Post by Commander McLane »

As you can't change weapon_energy on the fly, Cmdr James' solution seems the best (if you don't want to re-spawn). Although I am by no means sure that it actually would work. I think you just have to try.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I've had the same suggestion from a couple of sources, and it does sound like it would work. I've got the drone code almost there, so a trial is imminent. I'll then throw it open to people to look at, as I'm not convinced the AI is as tuned as it might be.

Editted to add - trial for AI advice is detailed here.
Post Reply