Here is the Random Equipment mod, version 2- Mod on Xelerus
In this version the following ships make use of a dynamic weapon and shield selection:
Corsair, Corsair-II, Viking, Viking-II, Zulu, Zulu-II, Oromo, Sotho, Raider, Centauri Commandship, Corp Cruiser, Hammerhead, Hammerhead-II, Wind Slaver, Steel Slaver, Earth Slaver, Xeno Fighter, Himal Interceptor, Meth Enforcer, Helio Gunship, Ranx Gunship, Barbary Gunship.
The weapons are chosen with a filter and are compatible with weapons mods. Future versions may need to tighten up the filters for selections so the weapon and shield choice script is located in a convenient global rather than in each individual ship.
The ships make use of an OnCreate that passes a code to the weapon script, and a percent chance and code to the shield script. It is fairly self explanatory if you have some experience with the mod scripting.
Suggestions on improving this mod are welcome, please test it! It is easy to install, just drop in the extensions folder- runs with either the XML or TDB game versions.
Random Equipment Version 2!
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
<Globals> works in an extension.george moromisato
Posted: Sat Jan 26, 2008 7:53 am
The ones that work as of 0.98d are:
<DockScreen>
<EncounterTable>
<Globals>
<Image>
<ItemTable>
<ItemType>
<ShipClass>
<ShipEnergyField>
<Sound>
<Sovereign>
<SpaceEnvironmentType>
<StationType>
<SystemType>
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
I can even say for myself I have been the Globals element for testing in extensions.
Crying is not a proper retort!
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
No way! How do you implement it then?
Or, why won't this work? :
It works fine when the Globals tag is removed and the intSetWeaponConfig is placed in the <Globals> tag in Trans.xml
I have seen no working globals in extensions, but they do work in modules.
Or, why won't this work? :
Code: Select all
<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
<!ENTITY unidExtension "0xDDDD0099">
<!ENTITY scCorporateCruiser "0x00153001">
<!ENTITY scCorsair "0x00163001">
<!ENTITY scViking "0x00163002">
<!ENTITY scCorsair-II "0x00163003">
<!ENTITY scZulu "0x08030004">
<!ENTITY scSotho "0x08030005">
<!ENTITY scOromo "0x08030006">
<!ENTITY scZulu-II "0x08030007">
<!ENTITY scCentauriRaider "0x08020042">
<!ENTITY scCentauriCommandShip "0x08020043">
<!ENTITY scHammerhead "0x08040005">
<!ENTITY scHammerhead-II "0x08040006">
<!ENTITY scWindSlaver "0x00193002">
<!ENTITY scSteelSlaver "0x00193003">
<!ENTITY scEarthSlaver "0x00193004">
<!ENTITY scXenophobeFighter "0x08010082">
<!ENTITY scHimalInterceptor "0x08030101">
<!ENTITY scHeliotropeGunship "0x08010042">
<!ENTITY scMethEnforcer "0x08020001">
<!ENTITY scViking-II "0x08030045">
<!ENTITY scBarbary "0x08030047">
<!ENTITY scRanxGunship "0x080400C2">
]>
<TranscendenceExtension UNID="&unidExtension;" version="0.98d">
<!--- Begin Existing Ship Overrides --->
<!-- CorporateCruiser -->
<ShipClass UNID="&scCorporateCruiser;"
manufacturer= "Corporate"
class= ""
type= "cruiser"
score= "2160"
techOrder= "mech"
mass= "8000"
cargoSpace= "1000"
thrust= "5000"
maneuver= "12"
maxSpeed= "20"
cyberDefenseLevel= "8"
leavesWreck= "100"
>
<Armor>
<ArmorSection start="345" span="15" armorID="&itQuadroCarbideArmor;" />
<ArmorSection start="330" span="15" armorID="&itQuadroCarbideArmor;" />
<ArmorSection start="315" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="300" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="285" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="270" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="255" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="240" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="225" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="210" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="195" span="15" armorID="&itQuadroCarbideArmor;" />
<ArmorSection start="180" span="15" armorID="&itQuadroCarbideArmor;" />
<ArmorSection start="165" span="15" armorID="&itQuadroCarbideArmor;" />
<ArmorSection start="150" span="15" armorID="&itQuadroCarbideArmor;" />
<ArmorSection start="135" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="120" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="105" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="90" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="75" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="60" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="45" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="30" span="15" armorID="&itQuadroCarbideArmor;" nonCritical="general"/>
<ArmorSection start="15" span="15" armorID="&itQuadroCarbideArmor;" />
<ArmorSection start="0" span="15" armorID="&itQuadroCarbideArmor;" />
</Armor>
<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>
<Image imageID="&rsLargeShips1;" imageX="576" imageY="0" imageWidth="192" imageHeight="192" imageFrameCount="0" imageTicksPerFrame="0"/>
<Items>
<Item count="40d20" item="&itGotha10Missile;"/>
<Item count="2d12" item="&itPteracniumFuelRod;"/>
</Items>
<AISettings
fireRateAdj= "25"
fireAccuracy= "95"
perception= "4"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 4b)
</OnCreate>
</Events>
</ShipClass>
<!-- Corsair-class Gunship -->
<ShipClass UNID="&scCorsair;"
manufacturer= "Charon Pirates"
class= "Corsair"
type= "gunship"
score= "25"
techOrder= "mech"
mass= "45"
cargoSpace= "5"
thrust= "250"
maneuver= "4"
maxSpeed= "25"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itLightTitaniumPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itLightTitaniumPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Image imageID="&rsMediumShips1;" imageX="288" imageY="0" imageWidth="48" imageHeight="48" rotationOffset="-10" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "40"
fireAccuracy= "75"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-30" y="-7"/>
<NozzlePos x="-30" y="7"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 1a)
</OnCreate>
</Events>
</ShipClass>
<!-- Corsair II-class Gunship -->
<ShipClass UNID="&scCorsair-II;"
manufacturer= "Charon Pirates"
class= "Corsair II"
type= "gunship"
score= "110"
techOrder= "mech"
mass= "45"
cargoSpace= "5"
thrust= "250"
maneuver= "4"
maxSpeed= "25"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itReactiveArmor;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itReactiveArmor;" areaSet="1,4" />
</Armor>
<Devices>
<Device deviceID="&itNAMIMissileLauncher;"/>
</Devices>
<Image imageID="&rsMediumShips1;" imageX="288" imageY="0" imageWidth="48" imageHeight="48" rotationOffset="-10" imageFrameCount="0" imageTicksPerFrame="0"/>
<Items>
<Item count="2d6" item="&itKM100Missile;"/>
</Items>
<AISettings
fireRateAdj= "30"
fireAccuracy= "80"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-30" y="-7"/>
<NozzlePos x="-30" y="7"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 2a)
</OnCreate>
</Events>
</ShipClass>
<!-- Viking-class Gunship -->
<ShipClass UNID="&scViking;"
manufacturer= "Charon Pirates"
class= "Viking"
type= "gunship"
score= "95"
techOrder= "mech"
mass= "150"
cargoSpace= "5"
thrust= "250"
maneuver= "5"
maxSpeed= "20"
leavesWreck= "35"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itReactiveArmor;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itReactiveArmor;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Items>
<Item count="2d6" item="&itHelium3FuelRod;"/>
</Items>
<Image imageID="&rsMediumShips1;" imageX="336" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "50"
fireAccuracy= "85"
perception= "4"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 2b)
</OnCreate>
</Events>
</ShipClass>
<!-- Viking II-class Gunship -->
<ShipClass UNID="&scViking-II;"
manufacturer= "Charon Pirates"
class= "Viking II"
type= "gunship"
score= "240"
techOrder= "mech"
mass= "150"
cargoSpace= "5"
thrust= "250"
maneuver= "5"
maxSpeed= "20"
leavesWreck= "35"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itAdvancedReactiveArmor;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itAdvancedReactiveArmor;" areaSet="1,4" />
</Armor>
<Devices>
<Device deviceID="&itDualTurbolaserCannon;"/>
<Device deviceID="&itClass2Deflector;"/>
</Devices>
<Items>
<Item count="2d6" item="&itHelium3FuelRod;"/>
</Items>
<Image imageID="&rsMediumShips1;" imageX="336" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "30"
fireAccuracy= "90"
perception= "4"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 3a)
</OnCreate>
</Events>
</ShipClass>
<!-- Oromo-class Gunship -->
<ShipClass UNID="&scOromo;"
manufacturer= "United African States"
class= "Oromo"
type= "gunship"
score= "105"
techOrder= "mech"
mass= "75"
cargoSpace= "25"
thrust= "500"
maneuver= "4"
maxSpeed= "20"
leavesWreck= "30"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itCeramicPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itCeramicPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Items>
<Item count="1d6" item="&itHelium3FuelRod;"/>
</Items>
<Image imageID="&rsMediumShips1;" imageX="240" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-46" y="0"/>
</DriveImages>
<AISettings
fireRateAdj= "30"
fireAccuracy= "85"
perception= "4"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 2a)
</OnCreate>
</Events>
</ShipClass>
<!-- Sotho-class Gunship -->
<ShipClass UNID="&scSotho;"
manufacturer= "United African States"
class= "Sotho"
type= "gunship"
score= "175"
techOrder= "mech"
mass= "100"
cargoSpace= "25"
thrust= "500"
maneuver= "3"
maxSpeed= "20"
leavesWreck= "50"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itHeavyCeramicPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itHeavyCeramicPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Items>
<Item count="3d6" item="&itHelium3FuelRod;"/>
</Items>
<Image imageID="&rsMediumShips2;" imageX="256" imageY="0" imageWidth="64" imageHeight="64" imageFrameCount="0" imageTicksPerFrame="0"/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-52" y="6"/>
<NozzlePos x="-52" y="-6"/>
</DriveImages>
<AISettings
fireRateAdj= "20"
fireAccuracy= "90"
perception= "4"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 2b)
</OnCreate>
</Events>
</ShipClass>
<!-- Zulu-class Gunship -->
<ShipClass UNID="&scZulu;"
manufacturer= "United African States"
class= "Zulu"
type= "gunship"
score= "45"
techOrder= "mech"
mass= "25"
cargoSpace= "5"
thrust= "150"
maneuver= "4"
maxSpeed= "20"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itCeramicPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itCeramicPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Image imageID="&rsSmallShips1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "50"
fireAccuracy= "80"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-37" y="-7"/>
<NozzlePos x="-37" y="7"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 1b)
</OnCreate>
</Events>
</ShipClass>
<!-- Zulu II-class Gunship -->
<ShipClass UNID="&scZulu-II;"
manufacturer= "United African States"
class= "Zulu II"
type= "gunship"
score= "70"
techOrder= "mech"
mass= "25"
cargoSpace= "5"
thrust= "200"
maneuver= "4"
maxSpeed= "20"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itCeramicPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itCeramicPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Image imageID="&rsSmallShips1;" imageX="160" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "30"
fireAccuracy= "90"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-37" y="-7"/>
<NozzlePos x="-37" y="7"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 2b)
</OnCreate>
</Events>
</ShipClass>
<!-- Hammerhead-class Gunship -->
<ShipClass UNID="&scHammerhead;"
manufacturer= "Earth Industries"
class= "Hammerhead"
type= "gunship"
score= "35"
techOrder= "mech"
mass= "30"
cargoSpace= "10"
thrust= "120"
maneuver= "2"
maxSpeed= "18"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itTitaniumPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itTitaniumPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Image imageID="&rsSmallShips1;" imageX="32" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "50"
fireAccuracy= "80"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-36" y="0"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 2a)
</OnCreate>
</Events>
</ShipClass>
<!-- Hammerhead II-class Gunship -->
<ShipClass UNID="&scHammerhead-II;"
manufacturer= "Earth Industries"
class= "Hammerhead II"
type= "gunship"
score= "165"
techOrder= "mech"
mass= "30"
cargoSpace= "10"
thrust= "200"
maneuver= "2"
maxSpeed= "18"
leavesWreck= "25"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itHeavyTitaniumPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itHeavyTitaniumPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Image imageID="&rsSmallShips1;" imageX="64" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "30"
fireAccuracy= "90"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-36" y="-2"/>
<NozzlePos x="-36" y="2"/>
</DriveImages>
</ShipClass>
<Events>
<OnCreate>
(intSetWeaponConfig 3b)
</OnCreate>
</Events>
<!-- Centauri Commandship -->
<ShipClass UNID="&scCentauriCommandShip;"
manufacturer= "Centauri"
class= ""
type= "command ship"
score= "140"
techOrder= "mech"
mass= "100"
cargoSpace= "50"
thrust= "200"
maneuver= "8"
maxSpeed= "15"
leavesWreck= "50"
>
<Armor>
<ArmorSection start="315" span="90" armorID="&itLightPlasteelPlate;" areaSet="0,2" />
<ArmorSection start="225" span="90" armorID="&itLightPlasteelPlate;" areaSet="3,4" />
<ArmorSection start="135" span="90" armorID="&itLightPlasteelPlate;" areaSet="1,6" />
<ArmorSection start="45" span="90" armorID="&itLightPlasteelPlate;" areaSet="7,13" />
</Armor>
<Devices>
<Device deviceID="&itPartisanCannon;" secondaryWeapon="true" omnidirectional="true"/>
</Devices>
<Image imageID="&rsMediumShips2;" imageX="384" imageY="0" imageWidth="64" imageHeight="64" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "30"
fireAccuracy= "70"
perception= "4"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 4a)
</OnCreate>
</Events>
</ShipClass>
<!-- Centauri Raider -->
<ShipClass UNID="&scCentauriRaider;"
manufacturer= "Centauri"
class= ""
type= "raider"
score= "30"
techOrder= "mech"
mass= "35"
cargoSpace= "5"
thrust= "200"
maneuver= "2"
maxSpeed= "25"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itTitaniumPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itTitaniumPlate;" areaSet="1,4" />
</Armor>
<Devices>
</Devices>
<Image imageID="&rsSmallShips1;" imageX="192" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-36" y="0"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 2b)
</OnCreate>
</Events>
</ShipClass>
<!-- Slaver, Wind -->
<ShipClass UNID="&scWindSlaver;"
manufacturer= ""
class= "Wind slaver"
type= ""
score= "320"
techOrder= "mech"
mass= "50"
cargoSpace= "10"
thrust= "400"
maneuver= "1"
maxSpeed= "30"
cyberDefenseLevel= "4"
leavesWreck= "35"
>
<Armor>
<ArmorSection start="315" span="90" armorID="&itHeavyCeramicPlate;" areaSet="0,2" />
<ArmorSection start="225" span="90" armorID="&itHeavyCeramicPlate;" areaSet="3,4" />
<ArmorSection start="135" span="90" armorID="&itHeavyCeramicPlate;" areaSet="1,6" />
<ArmorSection start="45" span="90" armorID="&itHeavyCeramicPlate;" areaSet="7,13" />
</Armor>
<Devices>
</Devices>
<Image imageID="&rsMediumShips1;" imageX="480" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "20"
fireAccuracy= "90"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-30" y="-4"/>
<NozzlePos x="-30" y="5"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 4b)
</OnCreate>
</Events>
</ShipClass>
<!-- Slaver, Steel -->
<ShipClass UNID="&scSteelSlaver;"
manufacturer= ""
class= "Steel slaver"
type= ""
score= "475"
techOrder= "mech"
mass= "250"
cargoSpace= "10"
thrust= "800"
maneuver= "8"
maxSpeed= "15"
cyberDefenseLevel= "6"
leavesWreck= "65"
>
<Armor>
<ArmorSection start="315" span="90" armorID="&itCeralloyArmor;" areaSet="0,2" />
<ArmorSection start="225" span="90" armorID="&itCeralloyArmor;" areaSet="3,4" />
<ArmorSection start="135" span="90" armorID="&itCeralloyArmor;" areaSet="1,6" />
<ArmorSection start="45" span="90" armorID="&itCeralloyArmor;" areaSet="7,13" />
</Armor>
<Devices>
<Device deviceID="&itParticleBeamWeapon;" omnidirectional="true"/>
<Device deviceID="&itCyberDeckDisarm;"/>
<Device deviceID="&itYoroiS100;"/>
</Devices>
<Image imageID="&rsMediumShips2;" imageX="512" imageY="0" imageWidth="64" imageHeight="64" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "40"
fireAccuracy= "90"
perception= "4"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 5a)
</OnCreate>
</Events>
</ShipClass>
<!-- Slaver, Earth -->
<ShipClass UNID="&scEarthSlaver;"
manufacturer= ""
class= "Earth Slaver"
type= ""
score= "885"
techOrder= "mech"
mass= "9500"
cargoSpace= "500"
thrust= "1600"
maneuver= "8"
maxSpeed= "12"
cyberDefenseLevel= "6"
leavesWreck= "100"
>
<Armor>
<ArmorSection start="345" span="30" armorID="&itCeralloyArmor;" />
<ArmorSection start="315" span="30" armorID="&itCeralloyArmor;" />
<ArmorSection start="285" span="30" armorID="&itCeralloyArmor;" />
<ArmorSection start="255" span="30" armorID="&itCeralloyArmor;" nonCritical="general" />
<ArmorSection start="225" span="30" armorID="&itCeralloyArmor;" />
<ArmorSection start="195" span="30" armorID="&itCeralloyArmor;" nonCritical="drive" />
<ArmorSection start="165" span="30" armorID="&itCeralloyArmor;" nonCritical="drive" />
<ArmorSection start="135" span="30" armorID="&itCeralloyArmor;" nonCritical="drive" />
<ArmorSection start="105" span="30" armorID="&itCeralloyArmor;" />
<ArmorSection start="75" span="30" armorID="&itCeralloyArmor;" nonCritical="general" />
<ArmorSection start="45" span="30" armorID="&itCeralloyArmor;" />
<ArmorSection start="15" span="30" armorID="&itCeralloyArmor;" nonCritical="dev0" />
</Armor>
<Devices>
<Device deviceID="&itParticleBoltCannon;"/>
<Device deviceID="&itCyberDeckLowerShields;"/>
<Device deviceID="&itParticleBeamWeapon;" secondaryWeapon="true" minFireArc="350" maxFireArc="190" posAngle="90" posRadius="50"/>
<Device deviceID="&itParticleBeamWeapon;" secondaryWeapon="true" minFireArc="170" maxFireArc="10" posAngle="270" posRadius="50"/>
</Devices>
<Items>
<Item count="2d6" item="&itHeliumAssembly;"/>
<Item count="20d20" item="&itParticleBoltCartridge;"/>
<Table>
<Lookup chance="40" count="1" table="&trConsumables6;"/>
<Lookup chance="40" count="1" table="&trMinorItem6;"/>
<Lookup chance="20" count="1" table="&trMajorItem6;"/>
</Table>
</Items>
<Image imageID="&rsMediumShips4;" imageX="384" imageY="0" imageWidth="128" imageHeight="128" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "25"
fireAccuracy= "95"
perception= "5"
/>
<Events>
<OnCreate>
(intSetWeaponConfig 5a)
</OnCreate>
</Events>
</ShipClass>
<ShipClass UNID="&scXenophobeFighter;"
manufacturer= "Xenophobe"
class= ""
type= "fighter"
score= "425"
techOrder= "mech"
mass= "40"
cargoSpace= "0"
thrust= "300"
maneuver= "2"
maxSpeed= "25"
leavesWreck= "25"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itLightMeteorsteel;" />
<ArmorSection start="90" span="180" armorID="&itLightMeteorsteel;" />
</Armor>
<Devices>
<Device deviceID="&itLancerCannon;"/>
</Devices>
<Image imageID="&rsMediumShips1;" imageX="528" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "25"
fireAccuracy= "90"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-32" y="0"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 4a)
</OnCreate>
</Events>
</ShipClass>
<!-- Meth Enforcer -->
<ShipClass UNID="&scMethEnforcer;"
manufacturer= "Meth"
class= ""
type= "enforcer"
score= "320"
techOrder= "mech"
mass= "250"
cargoSpace= "10"
thrust= "1000"
maneuver= "2"
maxSpeed= "20"
leavesWreck= "35"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itPolyceramicPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itPolyceramicPlate;" areaSet="1,4" />
</Armor>
<Devices>
<!-- <Device deviceID="&itSlamCannon;" minFireArc="345" maxFireArc="15"/>-->
<Device deviceID="&itSlamCannon;"/>
</Devices>
<Items>
<Item count="2d6" item="&itHelium3FuelRod;"/>
</Items>
<Image imageID="&rsMediumShips2;" imageX="192" imageY="0" imageWidth="64" imageHeight="64" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "20"
fireAccuracy= "95"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-48" y="0"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 5b)
</OnCreate>
</Events>
</ShipClass>
<!-- Heliotrope Gunship -->
<ShipClass UNID="&scHeliotropeGunship;"
manufacturer= "Heliotrope"
class= ""
type= "gunship"
score= "220"
techOrder= "mech"
mass= "25"
cargoSpace= "5"
thrust= "250"
maneuver= "3"
maxSpeed= "20"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itLightPlasteelPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itLightPlasteelPlate;" areaSet="1,4" />
</Armor>
<Devices>
<Device deviceID="&itBlinderCannon;"/>
<Device deviceID="&itTurbolaserCannon;"/>
<Device deviceID="&itSolarPanelArray;"/>
</Devices>
<Image imageID="&rsSmallShips1;" imageX="224" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "20"
fireAccuracy= "85"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="0" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-34" y="0"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 4b)
</OnCreate>
</Events>
</ShipClass>
<!-- Himal Interceptor -->
<ShipClass UNID="&scHimalInterceptor;"
manufacturer= "Himal"
class= ""
type= "interceptor"
score= "55"
techOrder= "mech"
mass= "25"
cargoSpace= "5"
thrust= "150"
maneuver= "4"
maxSpeed= "30"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itLightTitaniumPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itLightTitaniumPlate;" areaSet="1,4" />
</Armor>
<Devices>
<Device deviceID="&itBlaster;"/>
</Devices>
<Image imageID="&rsMediumShips1;" imageX="720" imageY="0" imageWidth="48" imageHeight="48" rotationOffset="5" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "40"
fireAccuracy= "75"
perception= "4"
combatStyle= "flyby"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-40" y="-3"/>
<NozzlePos x="-40" y="3"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 5b)
</OnCreate>
</Events>
</ShipClass>
<!-- Barbary-class Gunship -->
<ShipClass UNID="&scBarbary;"
manufacturer= "Charon Pirates"
class= "Barbary"
type= "gunship"
score= "520"
techOrder= "mech"
mass= "50"
cargoSpace= "5"
thrust= "250"
maneuver= "4"
maxSpeed= "25"
leavesWreck= "20"
>
<Armor>
<ArmorSection start="270" span="180" armorID="&itLightBlastPlate;" areaSet="0,2,3,7" />
<ArmorSection start="90" span="180" armorID="&itLightBlastPlate;" areaSet="1,4" />
</Armor>
<Devices>
<Device deviceID="&itIonCannon;"/>
<Device deviceID="&itDualTurbolaserCannon;"/>
<Device deviceID="&itClass2Deflector;"/>
</Devices>
<Image imageID="&rsMediumShips1;" imageX="432" imageY="0" imageWidth="48" imageHeight="48" rotationOffset="-9" imageFrameCount="0" imageTicksPerFrame="0"/>
<AISettings
fireRateAdj= "30"
fireAccuracy= "90"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-30" y="-4"/>
<NozzlePos x="-30" y="4"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 5a)
</OnCreate>
</Events>
</ShipClass>
<!-- Ranx Gunship -->
<ShipClass UNID="&scRanxGunship;"
manufacturer= "Ranx"
class= ""
type= "gunship"
score= "520"
techOrder= "mech"
mass= "100"
cargoSpace= "10"
thrust= "800"
maneuver= "3"
maxSpeed= "21"
leavesWreck= "30"
>
<Armor>
<ArmorSection start="315" span="90" armorID="&itHardenedPlasteelPlate;" areaSet="0,2" />
<ArmorSection start="225" span="90" armorID="&itHardenedPlasteelPlate;" areaSet="3,4" />
<ArmorSection start="135" span="90" armorID="&itHardenedPlasteelPlate;" areaSet="1,6" />
<ArmorSection start="45" span="90" armorID="&itHardenedPlasteelPlate;" areaSet="7,13" />
</Armor>
<Devices>
<Device deviceID="&itAkan30Cannon;"/>
<Device deviceID="&itClass3Deflector;"/>
</Devices>
<Items>
<Item count="20d20" item="&itAkan30CannonShell;" />
<Item count="2d6" item="&itHeliumAssembly;"/>
</Items>
<Image imageID="&rsMediumShips1;" imageX="624" imageY="0" imageWidth="48" imageHeight="48"/>
<AISettings
fireRateAdj= "25"
fireAccuracy= "90"
perception= "4"
/>
<DriveImages>
<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
<NozzlePos x="-32" y="10"/>
<NozzlePos x="-32" y="-10"/>
</DriveImages>
<Events>
<OnCreate>
(intSetWeaponConfig 6b)
</OnCreate>
</Events>
</ShipClass>
<Globals>
(setq intSetWeaponConfig (lambda (levelChoice)
(block (choiceWeapon)
(switch
(eq levelChoice 1a)
(setq choiceWeapon (itmCreateRandom "w,-m" "cv--- ----- ----- -----"))
(eq levelChoice 1b)
(setq choiceWeapon (itmCreateRandom "w,-m" "cu--- ----- ----- -----"))
(eq levelChoice 2a)
(setq choiceWeapon (itmCreateRandom "w,-m" "vcv-- ----- ----- -----"))
(eq levelChoice 2b)
(setq choiceWeapon (itmCreateRandom "w,-m" "vcuv- ----- ----- -----"))
(eq levelChoice 3a)
(setq choiceWeapon (itmCreateRandom "w,-m" "-vcv- ----- ----- -----"))
(eq levelChoice 3b)
(setq choiceWeapon (itmCreateRandom "w,-m" "-vcu- ----- ----- -----"))
(eq levelChoice 4a)
(setq choiceWeapon (itmCreateRandom "w,-m" "--vcv ----- ----- -----"))
(eq levelChoice 4b)
(setq choiceWeapon (itmCreateRandom "w,-m" "--vcu v---- ----- -----"))
(eq levelChoice 5a)
(setq choiceWeapon (itmCreateRandom "w,-m" "---vc v---- ----- -----"))
(eq levelChoice 5b)
(setq choiceWeapon (itmCreateRandom "w,-m" "---vc uv--- ----- -----"))
(eq levelChoice 6a)
(setq choiceWeapon (itmCreateRandom "w,-m" "----v cv--- ----- -----"))
(eq levelChoice 6b)
(setq choiceWeapon (itmCreateRandom "w,-m" "----v cuv-- ----- -----"))
)
(if choiceWeapon
(block Nil
(objAddItem gSource choiceWeapon)
(shpInstallDevice gSource choiceWeapon)
)
)
)
)
)
</Globals>
</TranscendenceExtension>
I have seen no working globals in extensions, but they do work in modules.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
an example of Global in an extension
http://xelerus.de/index.php?s=mod&id=66
looks fine to me the only guess that I have is that you need the globals defined before they are used or that you need it to be in a block (no idea why that would be though)
http://xelerus.de/index.php?s=mod&id=66
looks fine to me the only guess that I have is that you need the globals defined before they are used or that you need it to be in a block (no idea why that would be though)
Crying is not a proper retort!
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
oh... duh!
<Globals>
(block
....
)
</Globals>
add that, then check out the new and improved RandEquip- just copy code, adjust and go!
-you were right Betel, just needed a block put around it.
<Globals>
(block
....
)
</Globals>
add that, then check out the new and improved RandEquip- just copy code, adjust and go!
-you were right Betel, just needed a block put around it.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
one thing that will make your code shorter instead of passing stuff like 5b pass "---vc uv--- ----- -----" that way you don't have the switch and it is more flexible for the levels
Crying is not a proper retort!
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
hmm... but then the ships contain their own data anyhow, so why go for a global level control at all?
I was building this with the intention that other interrupts can be added to the global to affect entire ship classes or faction styles, or whatever- the concept was to remove control from the ship to a general source that can then be tapped into by other methods, or giving it a switchable On/Off feature.
I was building this with the intention that other interrupts can be added to the global to affect entire ship classes or faction styles, or whatever- the concept was to remove control from the ship to a general source that can then be tapped into by other methods, or giving it a switchable On/Off feature.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Global ship functions would work because you can store the data in a static data in the ship (you are storing data in ships when you say 5b). The whole reason to make Globals is to not repeat code.
OnCreate can be called with event fire so that is not a problem. (if you take it out of events you need to define gsource anyway, maybe pass it in)
OnCreate can be called with event fire so that is not a problem. (if you take it out of events you need to define gsource anyway, maybe pass it in)
Crying is not a proper retort!
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
Yes, I suppose. Anyways, I did it like that. Anyone is invited to improve the method.
For now, the tables to adjust ships are all in one place, easy to read and mod.
The ships use a single global, with very little actual impact on the memory and the entire set up is simple to expand on.
Or, in other words- everything we wanted to see in a version 2 of the Random Equip concept...
For now, the tables to adjust ships are all in one place, easy to read and mod.
The ships use a single global, with very little actual impact on the memory and the entire set up is simple to expand on.
Or, in other words- everything we wanted to see in a version 2 of the Random Equip concept...
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
I am not saying its bad, if you have more than one ship using a certain thing like 4b then your way would be better. It really depends on how you see it working and how do you want it adjusted.
To tell the truth I wasn't thinking of the case where you wanted to adjust multiple ships at the same time that is a good idea 8)
edit: in that case I would make stuff like 4b as global functions that just pass back a string you have the flexibility of changing multiple ships at once and you get rid of the switch.
To tell the truth I wasn't thinking of the case where you wanted to adjust multiple ships at the same time that is a good idea 8)
edit: in that case I would make stuff like 4b as global functions that just pass back a string you have the flexibility of changing multiple ships at once and you get rid of the switch.
Crying is not a proper retort!
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
I was also thinking that the flags (4b, 4a, etc) could evolve a little over time- perhaps some major factions could have their own tags like 'ranx' which could have the equipment selected from a new function that offered dynamic evolving configurations.
The luminous could be treated in the same manner- compiling the function they use into the equipment manager script set would be easy, and could then be more freely ported to other mod ships, don't you think?
The luminous could be treated in the same manner- compiling the function they use into the equipment manager script set would be easy, and could then be more freely ported to other mod ships, don't you think?
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
if you want them to evolve over time then make them functions (you can delay the running of the function by making it a string then using one of the function functions to run it)
that way each group can evolve in different ways you can even change what you pass in over time too (not that you need to but still)
this would be easier on irc
that way each group can evolve in different ways you can even change what you pass in over time too (not that you need to but still)
this would be easier on irc

Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
that is what notes and logging are for 8)
if you want weapons to evolve over time then you want to remove the old weapon and to do that I would store the random weapon created in the ships data (I would call it currentWeapon) that way you can call onCreate every so often (or whatever the global event would be called) every time you want the weapons to change. If you want weapons to change at different rates then I would also store a data saying how long you want to keep it (a conditional). This way you can call all the weapon changing code often and weapons can change at different rates for different groups.
any thoughts on this?
if you want weapons to evolve over time then you want to remove the old weapon and to do that I would store the random weapon created in the ships data (I would call it currentWeapon) that way you can call onCreate every so often (or whatever the global event would be called) every time you want the weapons to change. If you want weapons to change at different rates then I would also store a data saying how long you want to keep it (a conditional). This way you can call all the weapon changing code often and weapons can change at different rates for different groups.
any thoughts on this?
Crying is not a proper retort!