HELP! with Weapon <configuration> code please...
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
how often a weapon can be fired. Think of repeating like a gun firing out bursts of three shots.
Crying is not a proper retort!
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
I think that you cannot use
The code posted above seems to work fine for me:
![Image](http://img229.imageshack.us/img229/4035/test5ff2.th.jpg)
http://img229.imageshack.us/img229/4035/test5ff2.jpg
[EDIT] I did some tests: the custom configuration works with beam, particles and missile types, with additional effects and with vaportrails, but it completely crashes when I add
and the code posted above by George in the same weapon.configuration= "dual"
The code posted above seems to work fine for me:
![Image](http://img229.imageshack.us/img229/4035/test5ff2.th.jpg)
http://img229.imageshack.us/img229/4035/test5ff2.jpg
[EDIT] I did some tests: the custom configuration works with beam, particles and missile types, with additional effects and with vaportrails, but it completely crashes when I add
I don't know why.fireEffect= "&efMediumCannonFlash;"
Where does one stick that code exactly? And It wont let me use omnidirectional and multitarget in the code... i think... it wont get past the code for the firing angles...
Pink is a delicious colour.
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
the <Configuration> tag should be added after the ">" of the Weapon tag and before any effect tag.
mmmh...omnidirectional seems to work, but the shots retain the configuration. Nice.
For example download from xelerus.de my weapons pack1 and add omni and multitarget to the stellar cannon (the horrible not useful one, but good for testing now)
when there is 1 enemy ship, the 4 shots retain their 4-way configuration, but follow the enemy ship.
with 2 enemy ships the back shot follow the second ship and the other 3 retain the configuration and follow the first one.
with 3 ships: 2 shots follow 2 ships and the other 2 retain configuration and follow the first one.
(not a very good explanation, tell me if you need a screenshot)
mmmh...omnidirectional seems to work, but the shots retain the configuration. Nice.
For example download from xelerus.de my weapons pack1 and add omni and multitarget to the stellar cannon (the horrible not useful one, but good for testing now)
when there is 1 enemy ship, the 4 shots retain their 4-way configuration, but follow the enemy ship.
with 2 enemy ships the back shot follow the second ship and the other 3 retain the configuration and follow the first one.
with 3 ships: 2 shots follow 2 ships and the other 2 retain configuration and follow the first one.
(not a very good explanation, tell me if you need a screenshot)
Here is how I have it:
There are other devices, and it is closed off properly at the bottom. What about this code is making it not work with omnidirection?
Code: Select all
<Devices>
<Device deviceID="&itPlasmaThrower;"
<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>
Pink is a delicious colour.
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
I believe that the <Configuration> tag isn't meant to be used in the <Device> tag.
This device tag places the configuration directly in the device tag.
To do what you want to do place that <Configuration> tag in the weapon tag itself, which is separate from the devices in ships- you can find most weapons in the StdWeapons.xml.
Here is an example of a weapon using the configuration tag:
Your configuration tag seems like it would fit in somewhere like the above configuration tag does- inside the <Weapon> tag. Here it is in the PlasmaThrower weapon tag:
This won't crash the game, but the configuration="wall" seems to make the custom config not matter, or perhaps not allowing it. I took the config="wall" line out and it did a similar shot, but the angle="3d5-9" was adding wavy shots, so it was finally working.
If you take out configuration= "wall" and place omnidirectional= "true" in its place then try your config, should be good to go.
Code: Select all
<Devices>
<Device deviceID="&itRasiermesserLauncher;" secondaryWeapon="true" minFireArc="340" maxFireArc="200" posAngle="120" posRadius="60"/>
<Device deviceID="&itRasiermesserLauncher;" secondaryWeapon="true" minFireArc="160" maxFireArc="20" posAngle="240" posRadius="60"/>
</Devices>
To do what you want to do place that <Configuration> tag in the weapon tag itself, which is separate from the devices in ships- you can find most weapons in the StdWeapons.xml.
Here is an example of a weapon using the configuration tag:
Code: Select all
<ItemType UNID="&itDevastator;"
name= "devastating dual laser cannon"
level= "4"
value= "75000"
mass= "2000"
frequency= "notrandom"
modifiers= "EnergyWeapon; MajorItem; Advanced; NotForSale"
showReference= "true"
description= "Devastating laser cannons with linked fire controls."
sortName= "laser cannon, dual"
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
type= "beam"
damage= "laser:1d2; mining3"
fireRate= "17"
lifetime= "30"
powerUse= "20"
deviceSlots= "2"
beamType= "heavyblaster"
primaryColor= "0xff, 0xcc, 0xff"
secondaryColor= "0x00, 0x33, 0xff"
intensity= "3"
sound= "&snLaserCannon;"
>
<Configuration aimTolerance="0">
<Shot posAngle="90" posRadius="10" angle="0"/>
<Shot posAngle="90" posRadius="18" angle="0"/>
<Shot posAngle="270" posRadius="10" angle="0"/>
<Shot posAngle="270" posRadius="18" angle="0"/>
</Configuration>
</Weapon>
Code: Select all
<!-- Kytryn Plasma Thrower -->
<ItemType UNID="&itPlasmaThrower;"
name= "Kytryn plasma thrower"
level= "12"
value= "1000000"
mass= "50000"
modifiers= "Alien; MajorItem"
frequency= "rare"
unknownType= "&itUnknownAlienDevice10;"
description= "This weapon is used on Iocrym capital ships."
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
fireRate= "20"
configuration= "wall"
type= "missile"
missileSpeed= "20"
lifetime= "40"
damage= "plasma:3d12; WMD5"
powerUse= "6000"
sound= "&snMissileLauncher;"
>
<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>
<Effect>
<Image imageID="&rsMediumExplosions;" imageX="0" imageY="64" imageWidth="64" imageHeight="64" imageFrameCount="16" imageTicksPerFrame="5" blend="brighten" />
</Effect>
</Weapon>
</ItemType>
If you take out configuration= "wall" and place omnidirectional= "true" in its place then try your config, should be good to go.
I am probably going to feel retarded when you answer this because I should/do know what it is but it doesn't come to mind, as things seem to go for me lately, what do you mean "wall" tag? Example, if you don't mind?
Pink is a delicious colour.
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
There is no wall tag.
That is from inside the weapon tags, you can read the bits of code and find that configuration is in both of the weapon tag code examples I posted.
Code: Select all
configuration= "wall"
gee how did i know that was coming? lol so, for the code you posted:
It looks like your basically making your own weapon from stats. Where would i put that in my ship configuration?
Code: Select all
<!-- Kytryn Plasma Thrower -->
<ItemType UNID="&itPlasmaThrower;"
name= "Kytryn plasma thrower"
level= "12"
value= "1000000"
mass= "50000"
modifiers= "Alien; MajorItem"
frequency= "rare"
unknownType= "&itUnknownAlienDevice10;"
description= "This weapon is used on Iocrym capital ships."
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
fireRate= "20"
configuration= "wall"
type= "missile"
missileSpeed= "20"
lifetime= "40"
damage= "plasma:3d12; WMD5"
powerUse= "6000"
sound= "&snMissileLauncher;"
>
<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>
<Effect>
<Image imageID="&rsMediumExplosions;" imageX="0" imageY="64" imageWidth="64" imageHeight="64" imageFrameCount="16" imageTicksPerFrame="5" blend="brighten" />
</Effect>
</Weapon>
</ItemType>
Pink is a delicious colour.
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
Essentially, you don't put the item definition in any ship tags. Because more than one ship can use the same equipment, and for lots of other reasons, the items are separate.
Items are found in a variety of places in the xml, for weapons- and specifically for the weapon you are modding- StdWeapons.xml is the file with the weapon item definitions.
Ships use the item in either the <Device> tag for installed equipment or the <Item> tag for inventory in the cargo hold. The ship just refers to the item data holder by the name of the item such as &itPlasmaThrower.
Additional configuration information can be added into the device tag for the specific install- this is so that AI ships can have omni weapons that aren't normally omni to help them target, or have the shot angle adjusted for the capital ships to make the graphics look right.
Basic data for the weapons are separate, as mentioned most of the weapons are handily located in the StdWeapons file.
You can easily copy a weapon definition, paste it in an extension file and give it a new name and entity then mod the new weapon to your heart's content. This helps to keep StdWeapons.xml bug free, too.
The same extension can have a mod ship- using the new weapon. Check out the many examples at the mod site Xelerus.de (You can find a link around the forums somewhere)
Items are found in a variety of places in the xml, for weapons- and specifically for the weapon you are modding- StdWeapons.xml is the file with the weapon item definitions.
Ships use the item in either the <Device> tag for installed equipment or the <Item> tag for inventory in the cargo hold. The ship just refers to the item data holder by the name of the item such as &itPlasmaThrower.
Additional configuration information can be added into the device tag for the specific install- this is so that AI ships can have omni weapons that aren't normally omni to help them target, or have the shot angle adjusted for the capital ships to make the graphics look right.
Basic data for the weapons are separate, as mentioned most of the weapons are handily located in the StdWeapons file.
You can easily copy a weapon definition, paste it in an extension file and give it a new name and entity then mod the new weapon to your heart's content. This helps to keep StdWeapons.xml bug free, too.
The same extension can have a mod ship- using the new weapon. Check out the many examples at the mod site Xelerus.de (You can find a link around the forums somewhere)
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
Periculi is right, any configuration= "xxx" inside the <weapon> tag overrides the <Configuration> tag.
creating an extension is the best way for your new devices/weapons, using unique UNIDs possibly. So this will be easily shared.
creating an extension is the best way for your new devices/weapons, using unique UNIDs possibly. So this will be easily shared.
- Ttech
- Fleet Admiral
- Posts: 2767
- Joined: Tue Nov 06, 2007 12:03 am
- Location: Traveling in the TARDIS
- Contact:
Cool... This saves me a lot of time.digdug wrote:Periculi is right, any configuration= "xxx" inside the <weapon> tag overrides the <Configuration> tag.
creating an extension is the best way for your new devices/weapons, using unique UNIDs possibly. So this will be easily shared.
![Smile :)](./images/smilies/icon_smile.gif)
Ok, I made a seperate extension for the weapon, and it said "Extension UNID d211c026 already loaded" and I cant figure out what it means. Here is what the code looks like:
I dont see the UNID anywhere in my other ship either, and when I added this to my ship as a weapon, it just wont start the game at all. Is it all the effects or something??
Code: Select all
<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension>
[
<!ENTITY itSlaughterCannon "0x0011F007">
<!-- Slaughter Cannon -->
<ItemType UNID="&itSlaughterCannon;"
name= "Slaughter Cannon"
level= "10"
value= "400000"
mass= "5000"
frequency= "veryrare"
modifiers= "EnergyWeapon; MajorItem"
description= "Game over man, game over!"
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
type= "missile"
configuration= "dual; spread5"
omnidirectional= "true"
damage= "plasma:42; momentum6; radiation1; laser:16; ion:22; blinding3; thermo:62; "
fireRate= "70"
repeating= "3"
missileSpeed= "90"
lifetime= "100"
powerUse= "300"
sound= "&snRecoillessCannon;"
vaporTrailLength= "50"
vaporTrailWidth= "110"
vaporTrailWidthInc= "1"
vaporTrailColor= "0xff, 0x65, 0x21"
>
<Effect>
<MoltenBolt
width= "3"
length= "16"
growth= "3"
primaryColor= "0xff, 0xfd, 0xad"
secondaryColor= "0xff, 0x65, 0x21"
/>
</Effect>
</Weapon>
</ItemType>
Pink is a delicious colour.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
you forgot the TranscendenceExtension tags and to end the doctype section.
put that before <!-- Slaughter Cannon -->
and put </TranscendenceExtension> at the end
Of course you also have to make an entity for unidExtension
Code: Select all
]>
<TranscendenceExtension UNID="&unidExtension;" version="0.98d">
and put </TranscendenceExtension> at the end
Of course you also have to make an entity for unidExtension
Crying is not a proper retort!