for weapons with unique configurations such as the shtormrepeater or the ionflamecannon, is it possible to make more than one turret for the weapon (like how dual weapons work)?
pretty much Im trying to make a shtorm repeater type of weapon, but with dual cannons that fire at the same time.
im not sure what the posangle and posradius do for the <shot> tag, but i dont think its what im looking for.
is this even possible?
HELP! with Weapon <configuration> code please...
F I G H T T H E P O W E R
If you just want a dual weapon:
and add it to the shtorm repeater code.
or something of that sort. Don't have any XML in front of me or the time to look it up.
Code: Select all
configuration = "dual"
or something of that sort. Don't have any XML in front of me or the time to look it up.
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
or try:
just like the IM90, yay!
Code: Select all
configuration="spread3"
omnidirectional="true"
multiTarget="true"
no0o...
i already tried that, but those just cancel out the shtorm repeater "effect" (that shoots out missiles at random angles)
the xml looks like this for the shtorm repeater:
If i add configuration="dual" to it, the <configuration> code doesnt apply...
I think there is a way to do this because with the ion flame cannon the code looks like this:
....sooooo, im thinking that maybe there is another value that moves the position of the laser, but i just dont know what it is (I dont even know what "posAngle" or "posRadius" does...nothing to my knowledge)
i already tried that, but those just cancel out the shtorm repeater "effect" (that shoots out missiles at random angles)
the xml looks like this for the shtorm repeater:
Code: Select all
<Weapon
type= "missile"
repeating= "3"
damage= "blast:1d6+1; momentum1; WMD3"
fireRate= "15"
missileSpeed= "40"
lifetime= "40"
powerUse= "250"
sound= "&snRecoillessCannon;"
>
<Configuration aimTolerance="5">
<Shot angle="3d5-9"/>
</Configuration>
I think there is a way to do this because with the ion flame cannon the code looks like this:
Code: Select all
<Configuration aimTolerance="5">
<Shot posAngle="0" posRadius="0" angle="0"/>
<Shot posAngle="0" posRadius="0" angle="-8"/>
<Shot posAngle="0" posRadius="0" angle="-5"/>
<Shot posAngle="0" posRadius="0" angle="-2"/>
<Shot posAngle="0" posRadius="0" angle="2"/>
<Shot posAngle="0" posRadius="0" angle="5"/>
<Shot posAngle="0" posRadius="0" angle="8"/>
</Configuration>
F I G H T T H E P O W E R
As far as I know PosAngle and radius move the position from which the weapon fires.
So posangle 25 and posradius 50 puts the weapon 50 units away at an angle of 25 degrees (I believe all the angles start from the right side so 0 is starboard and 90 is forward but don't quote me on that)
So a way to do a dual shtorm is something like
<Shot posAngle="0" posRadius="10" angle="3d5-9"/>
<Shot posAngle="180" posRadius="10" angle="3d5-9"/>
gives you two random sprays 20 pixels apart
Assuming 0 is directly starboard that will put one 10 units (I think the units are pixels) right and one 10 units left. If 10 is too many or few adjust as needed.
If I was wrong about 0 being starbaord then just adjust posangles to 90 and 270.
So posangle 25 and posradius 50 puts the weapon 50 units away at an angle of 25 degrees (I believe all the angles start from the right side so 0 is starboard and 90 is forward but don't quote me on that)
So a way to do a dual shtorm is something like
<Shot posAngle="0" posRadius="10" angle="3d5-9"/>
<Shot posAngle="180" posRadius="10" angle="3d5-9"/>
gives you two random sprays 20 pixels apart
Assuming 0 is directly starboard that will put one 10 units (I think the units are pixels) right and one 10 units left. If 10 is too many or few adjust as needed.
If I was wrong about 0 being starbaord then just adjust posangles to 90 and 270.
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Try this:
I confess that I have not tried it, but I think it will do what you want.
posAngle and posRadius control the position from which the shots will eminate. The position is expressed in polar coordinates with the origin at the device location (often the center of the ship).
Edit: Just saw OddBob's post--he is right, but 90 and 270 are the correct values for posAngle. 0 is the direction that the ship is pointing. 90 is 90 degrees counter-clockwise, etc.
Code: Select all
<Configuration aimTolerance="5">
<Shot posAngle="90" posRadius="12" angle="3d5-9"/>
<Shot posAngle="270" posRadius="12" angle="3d5-9"/>
</Configuration>
posAngle and posRadius control the position from which the shots will eminate. The position is expressed in polar coordinates with the origin at the device location (often the center of the ship).
Edit: Just saw OddBob's post--he is right, but 90 and 270 are the correct values for posAngle. 0 is the direction that the ship is pointing. 90 is 90 degrees counter-clockwise, etc.
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
wow, that works great. I tried that on a few weapons, then I tried a little alteration for a dual laser which was a lot of fun:
Code: Select all
<Configuration aimTolerance="5">
<Shot posAngle="90" posRadius="12" angle="3d5-9"/>
<Shot posAngle="90" posRadius="16" angle="3d5-9"/>
<Shot posAngle="270" posRadius="12" angle="3d5-9"/>
<Shot posAngle="270" posRadius="16" angle="3d5-9"/>
</Configuration>
Though I don't really understand what you mean by "multi-omni" but I think you can copy the IM90 code and modify it.
It seems like you need both omnidirectional= "true" and multiTarget= "true"
besides the usual <configuration> lines.
It seems like you need both omnidirectional= "true" and multiTarget= "true"
besides the usual <configuration> lines.
- Ttech
- Fleet Admiral
- Posts: 2767
- Joined: Tue Nov 06, 2007 12:03 am
- Location: Traveling in the TARDIS
- Contact:
Hmm, yeah, I think that would be it.darksider wrote:Though I don't really understand what you mean by "multi-omni" but I think you can copy the IM90 code and modify it.
It seems like you need both omnidirectional= "true" and multiTarget= "true"
besides the usual <configuration> lines.

I like me "multi-omni" better.


- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
lifetime means how many ticks (basically seconds/100) the weapons shot lasts
repeating means whenever the weapon is fired it fires that many times in a row.
repeating means whenever the weapon is fired it fires that many times in a row.
Crying is not a proper retort!
If thats what repeating is, then what is firerate? Also, how do I apply the modifiers to the code for weapons on my modded ship? Ive got this code:
The only thing that is applied is the dual, even though it still looks single, but with 2 shots in one. What would apply the rest of the code? Also the code above for 2 turrets has a flaw in it somewhere that causes "attribute expected" error. Or did i apply it wrong? I put it under the code above for modifying the weapon.
Code: Select all
<Device deviceID="&itPlasmaThrower;"
configuration= "dual"
repeating= "7"
fireRate= "30"
lifetime= "70"
omnidirectional= "true"
multiTarget= "true"/>
Last edited by regroch on Fri Jan 04, 2008 11:04 am, edited 3 times in total.
Pink is a delicious colour.