Page 1 of 1

Useful Plasma Cannons OXP

Posted: Sun Mar 24, 2013 3:57 pm
by ToBeFree
I am currently trying to create an OXP which makes Plasma Cannons actually available to the player, and hopefully more useful than they are at the moment.

Plasma Cannons are a core feature (you can test this by opening a savegame with a text editor, replacing the "forward_weapon" number with "1". Military laser would be "5", for example). Open the savegame to see how this weapon works.

At the moment, Plasma Cannons are quite useless - even if they were available to the player, nobody would buy them because even a pulse laser is more effective than this thing. It drains energy like a monster, overheats quickly, is hard to aim and - that's the worst thing - does not really damage the target.

The OXP should change that. I started creating an equipment.plist containing the following:

Code: Select all

(
        (
                10, 60000, "Twin Plasma Cannon",
                "EQ_WEAPON_TWIN_PLASMA_CANNON",
                "Cannon delivering charged plasma bursts at sublight speed, useful for defense but inferior to military lasers when used to attack."
                {
                        available_to_all = true;
                        strict_mode_compatible = false;
                }
        ),

)
...and a crosshairs.plist - currently copied from the military laser, but allowing a custom crosshair:

Code: Select all

{
	WEAPON_TWIN_PLASMA_CANNON =
	(
		(0.25, 0.25, 1.0,		0.50, 0.0, 0.75),
		(0.25, 0.25, -1.0,		0.50, 0.0, -0.75),
		(0.25, 1.0, 0.25,		0.50, 0.75, 0.0),
		(0.25, -1.0, 0.25,		0.50, -0.75, 0.0),
		(0.25, -0.25, 1.0,		0.50, 0.0, 0.75),
		(0.25, -0.25, -1.0,		0.50, 0.0, -0.75),
		(0.25, 1.0, -0.25,		0.50, 0.75, 0.0),
		(0.25, -1.0, -0.25,		0.50, -0.75, 0.0),
		(0.50, 0.0, 0.75,		0.75, 0.0, 0.50),
		(0.50, 0.0, -0.75,		0.75, 0.0, -0.50),
		(0.50, 0.75, 0.0,		0.75, 0.50, 0.0),
		(0.50, -0.75, 0.0,		0.75, -0.50, 0.0)
	);
}
Now I need to change the weapon's damage and the OXP is finished - and that, exactly, is the problem.

#oolite, recently wrote:
<ToBeFree> ha, I have got an idea^^
<ToBeFree> I will try to create an OXP that modifies the plasma cannons to be:
<ToBeFree> 1. better and more expensive, 2. available at TechLevel... umm... no idea, but actually available
<ToBeFree> and I need some ideas.^^
<Corny> buy lasers? :D
<Corny> seriously - you want to make them fly faster, or what's the plan?
<ToBeFree> no,
<ToBeFree> I just want to increase the damage and the cost
<Corny> ah
<Corny> okay
<ToBeFree> ^^
<ToBeFree> not really intended as offensive weapon,
<ToBeFree> more for defense when fleeing - in this case, they would be really useful^^
<ToBeFree> the price should be balanced, however; it should not be a cheat
<ToBeFree> just a more defensive replacement for a military laser, adding some variation to the weapon slots
<Corny> sounds interesting!
<ToBeFree> :D
<Corny> spraying an area to scare off pursuers seems more like a "proper" purpose for those
<ToBeFree> heh
<ToBeFree> I need help creating a crosshair for that thing, I think
<Corny> I'm not the one with crosshair experience, though...
<Corny> better ask on the boards
<ToBeFree> okay, another question:
<ToBeFree> I found the needed plists in /usr/lib/GNUstep/Applications/oolite.app/Resources/Config/ and created some which replace the necessary parts
<ToBeFree> I found no way to modify the strength of a weapon, however
<ToBeFree> is that hard-coded?! O.O
<Corny> I never did a weapon OXP…
<Corny> did you check the wiki?
<ToBeFree> I am browsing the wiki the entire time and I find nothing about that :-/
<ToBeFree> http://wiki.alioth.net/index.php/Equipment.plist is the closest thing, but that isn't enough
<Corny> sorry, I can only direct you to the boards :(
<ToBeFree> heh ok, at least I have something to post
<ToBeFree> thanks anyway^^
<Corny> np

Re: Useful Plasma Cannons OXP

Posted: Sun Mar 24, 2013 4:27 pm
by cim
ToBeFree wrote:
Plasma Cannons are a core feature
Well, the equipment item exists in the core game. It was never finished, though.
ToBeFree wrote:
Now I need to change the weapon's damage and the OXP is finished - and that, exactly, is the problem.
Weapon range, rate of fire, energy usage and heating are all fixed values which cannot be edited by OXP. Weapon damage can sometimes be edited by OXP, but only for the forward weapon of an NPC ship.

There might be something you can do with world/ship scripts to change the damage done, but not straightforwardly.

Re: Useful Plasma Cannons OXP

Posted: Sun Mar 24, 2013 6:41 pm
by ToBeFree
I have sent a feature request now:
http://developer.berlios.de/feature/?fu ... up_id=3577

...if it gets implemented, we will see it in Debian some years later. :mrgreen:

Re: Useful Plasma Cannons OXP

Posted: Sun Mar 24, 2013 7:56 pm
by Duggan
I have subscribed to this thread as it is of particular interest . :)

Re: Useful Plasma Cannons OXP

Posted: Sun Mar 24, 2013 9:12 pm
by aegidian
A historical note.

The plasma cannon were introduced because I'd seen similar weapons in Atari ST Elite, and I modified them a lot for use as turretted weapons on the early Behemoths. So they are/were intended to be there as part of my multi-source Elite canon.

Re: Useful Plasma Cannons OXP

Posted: Sun Mar 24, 2013 9:18 pm
by Griff
It was such a great idea to take all the best bits from the different versions of the games - was there any particular reason why the extra Archimedes ships didn't make it into the default Oolite shipset?

Re: Useful Plasma Cannons OXP

Posted: Sun Mar 24, 2013 10:00 pm
by another_commander
aegidian wrote:
A historical note.

The plasma cannon were introduced because I'd seen similar weapons in Atari ST Elite, and I modified them a lot for use as turretted weapons on the early Behemoths. So they are/were intended to be there as part of my multi-source Elite canon.
It would be fine enabling the plasma cannons in the game but before doing that, I think we need to introduce prediction-capable AIs. The players can probably learn how to use the projectile style weapon fairly easily, but for the NPCs we will need some modifications to the targeting and shooting code.

Re: Useful Plasma Cannons OXP

Posted: Mon Mar 25, 2013 8:06 am
by aegidian
Griff wrote:
It was such a great idea to take all the best bits from the different versions of the games - was there any particular reason why the extra Archimedes ships didn't make it into the default Oolite shipset?
With time and spoons, it would've/should've happened.

Re: Useful Plasma Cannons OXP

Posted: Mon Mar 25, 2013 8:21 am
by JensAyton
another_commander wrote:
It would be fine enabling the plasma cannons in the game but before doing that, I think we need to introduce prediction-capable AIs. The players can probably learn how to use the projectile style weapon fairly easily, but for the NPCs we will need some modifications to the targeting and shooting code.
We already have leading code for the turrets. If AIs flew and shot at the predicted target/shot intersection point rather than the target (when in range), you should have something reasonable.

(I’d also like to see a HUD leading indicator for the player w/ advanced targeting system.)