(EDIT: Clarification; Transcendence is saying the error is on line 227, not jedit.)
Code: Select all
<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
<!ENTITY unidExtension "0xDAF10200" >
<!ENTITY itValenGaussCannon "0xDAF10201" >
<!ENTITY itValenGaussMG "0xDAF10202" >
<!ENTITY itOmniValenGaussCannon "0xDAF10203" >
<!ENTITY itOmniValenGaussMG "0xDAF10204" >
]>
<TranscendenceExtension UNID="&unidExtension;" version="1.0" name="EI Variable Kinetic Weapons" credits="Patupi">
<!-- defining weapon switch routine -->
<Globals>
; Define the function for switching shields.
; This Global code based on Atarlost's help. Thanks!
(setq WeaponMode
(lambda (theweapon)
(block (nil)
(if (eq (itmIsDamaged theitem) Nil)
(block (status enhweapon theitem)
(setq theitem gItem)
(setq status (ItmIsEnhanced theitem))
(setq enhweapon (itmSetEnhanced theweapon status))
(objAddItem gSource enhweapon)
; Install weapon
(shpInstallDevice gSource enhweapon)
; Remove previous weapon
(shpRemoveDevice gSource (itmSetEnhanced theitem status))
(objRemoveItem gSource (itmSetEnhanced (itmCreate (itmGetUNID theitem) 1) status) 1)
)
(objSendMessage gSource Nil "Weapon is too damaged to change fire modes")
)
)
)
)
</Globals>
<!-- Valen Gauss Cannon -->
<ItemType UNID="&itValenGaussCannon;"
name= "Valen Gauss gun: Cannon mode"
level= "5"
value= "9500"
mass= "2500"
frequency= "common"
attributes= "MajorItem; EI; Specialty"
description= "The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
>
<Image imageID="&rsItemsNAMI1;" imageX="0" imageY="192" imageWidth="96" imageHeight="96"/>
<Weapon
type= "missile"
damage= "kinetic:8d4; momentum2"
fireRate= "50"
missileSpeed= "65"
interaction= "80"
lifetime= "80"
powerUse= "300"
sound= "&snRecoillessCannon;"
>
<Effect>
<Bolt
length= "20"
width= "4"
primaryColor= "0xff, 0xef, 0xef"
secondaryColor= "0x60, 0x15, 0x15"
/>
</Effect>
</Weapon>
<Invoke key="V" installedOnly="true">
(block Nil
(WeaponMode (itmCreate &itValenGaussMG; 1))
(objSendMessage gSource Nil (cat "Valen Gauss Gun set to rapid fire mode"))
)
</Invoke>
</ItemType>
<!-- Valen Gauss Machine Gun -->
<ItemType UNID="&itValenGaussMG;"
name= "Valen Gauss gun: Rapid Fire mode"
level= "5"
value= "9500"
mass= "2500"
frequency= "notrandom"
attributes= "MajorItem; EI; Specialty"
description= "The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
>
<Image imageID="&rsItemsNAMI1;" imageX="0" imageY="192" imageWidth="96" imageHeight="96"/>
<Weapon
type= "missile"
damage= "kinetic:4d4; momentum1"
fireRate= "5"
missileSpeed= "65"
interaction= "80"
lifetime= "30"
powerUse= "300"
sound= "&snRecoillessCannon;"
>
<Effect>
<Bolt
length= "20"
width= "4"
primaryColor= "0xff, 0xef, 0xef"
secondaryColor= "0x60, 0x15, 0x15"
/>
</Effect>
</Weapon>
<Invoke key="V" installedOnly="true">
(block Nil
(WeaponMode (itmCreate &itValenGaussCannon; 1))
(objSendMessage gSource Nil (cat "Valen Gauss Gun set to Cannon mode"))
)
</Invoke>
</ItemType>
<!-- Omni Valen Gauss Cannon -->
<ItemType UNID="&itOmniValenGaussCannon;"
name= "Omni Valen Gauss gun: Cannon mode"
level= "6"
value= "23000"
mass= "3500"
frequency= "common"
attributes= "MajorItem; EI; Specialty"
description= "The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
>
<Image imageID="&rsItemsNAMI1;" imageX="0" imageY="192" imageWidth="96" imageHeight="96"/>
<Weapon
type= "missile"
damage= "kinetic:8d4; momentum2"
fireRate= "50"
missileSpeed= "65"
interaction= "80"
lifetime= "80"
powerUse= "300"
sound= "&snRecoillessCannon;"
>
<Effect>
<Bolt
length= "20"
width= "4"
primaryColor= "0xff, 0xef, 0xef"
secondaryColor= "0x60, 0x15, 0x15"
/>
</Effect>
</Weapon>
<Invoke key="O" installedOnly="true">
(block Nil
(WeaponMode (itmCreate &itOmniValenGaussMG; 1))
(objSendMessage gSource Nil (cat "Valen Gauss Gun set to rapid fire mode"))
)
</Invoke>
</ItemType>
<!-- Omni Valen Gauss Machine Gun -->
<ItemType UNID="&itOmniValenGaussMG;"
name= "Omni Valen Gauss gun: Rapid Fire mode"
level= "6"
value= "23000"
mass= "3500"
frequency= "notrandom"
attributes= "MajorItem; EI; Specialty"
description= "The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
>
<Image imageID="&rsItemsNAMI1;" imageX="0" imageY="192" imageWidth="96" imageHeight="96"/>
<Weapon
type= "missile"
damage= "kinetic:4d4; momentum1"
fireRate= "5"
missileSpeed= "65"
interaction= "80"
lifetime= "30"
powerUse= "300"
sound= "&snRecoillessCannon;"
>
<Effect>
<Bolt
length= "20"
width= "4"
primaryColor= "0xff, 0xef, 0xef"
secondaryColor= "0x60, 0x15, 0x15"
/>
</Effect>
</Weapon>
<Invoke key="O" installedOnly="true">
(block Nil
(WeaponMode (itmCreate &itOmniValenGaussCannon; 1))
(objSendMessage gSource Nil (cat "Valen Gauss Gun set to Cannon mode"))
)
</Invoke>
</ItemType>