HELP! with Weapon <configuration> code please...

Freeform discussion about anything related to modding Transcendence.
User avatar
Supardi88
Anarchist
Anarchist
Posts: 6
Joined: Fri Oct 12, 2007 12:16 am
Location: Detroit, MI
Contact:

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?
F I G H T T H E P O W E R
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

If you just want a dual weapon:

Code: Select all

    configuration = "dual"
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.
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

or try:

Code: Select all

configuration="spread3"
omnidirectional="true"
multiTarget="true"
just like the IM90, yay!
User avatar
Supardi88
Anarchist
Anarchist
Posts: 6
Joined: Fri Oct 12, 2007 12:16 am
Location: Detroit, MI
Contact:

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:

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

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>
....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)
F I G H T T H E P O W E R
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

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.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Try this:

Code: Select all

     <Configuration aimTolerance="5"> 
        <Shot posAngle="90" posRadius="12" angle="3d5-9"/> 
        <Shot posAngle="270" posRadius="12" angle="3d5-9"/> 
     </Configuration>
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.
User avatar
Periculi
Fleet Officer
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>
darksider
Commonwealth Pilot
Commonwealth Pilot
Posts: 90
Joined: Mon Nov 06, 2006 6:59 am
Location: CSC Asia

May I ask another question about the weapon <configuration> ?

Is there any way to manually set to do the same thing as configuration= "alternating" ?
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

and another one, what is the maximum value for
configuration="spreadxxx" ?

I tested up to spread5 and works great
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

CAn you do multi-omni?
Image
Image
darksider
Commonwealth Pilot
Commonwealth Pilot
Posts: 90
Joined: Mon Nov 06, 2006 6:59 am
Location: CSC Asia

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.
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

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.
Hmm, yeah, I think that would be it. :)

I like me "multi-omni" better. :roll: :P
Image
Image
regroch
Anarchist
Anarchist
Posts: 17
Joined: Sun Dec 30, 2007 5:13 am
Location: Behind you breathing heavily

What do the lifetime and repeating modifiers do?
User avatar
Betelgeuse
Fleet Officer
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.
Crying is not a proper retort!
regroch
Anarchist
Anarchist
Posts: 17
Joined: Sun Dec 30, 2007 5:13 am
Location: Behind you breathing heavily

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:

Code: Select all

			<Device deviceID="&itPlasmaThrower;" 	
				configuration=		"dual"
            			repeating=         	"7"
              			fireRate=         	"30"  
            			lifetime=         	"70"
				omnidirectional=	"true"
				multiTarget=		"true"/>
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.
Last edited by regroch on Fri Jan 04, 2008 11:04 am, edited 3 times in total.
Pink is a delicious colour.
Post Reply