Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <!DOCTYPE TranscendenceExtension
- [
- ;63A0-Mothership mod code request
- <!ENTITY unidMothershipPOC "0xE12863A0">
- <!ENTITY scMothership "0xE12863A1">
- <!ENTITY ecRUs "0xE12863A2">
- <!ENTITY dsMothershipManufacturing "0xE12863A3">
- ]>
- <TranscendenceExtension UNID="&unidMothershipPOC;" APIversion="22" name="Mothership POC" credit="RPC, FourFire for ideas">
- <!-- Player Ship: Sapphire-class Yacht -->
- <ShipClass UNID="&scMothership;"
- manufacturer= "Zubrin Systems"
- class= "Mothership"
- type= "Proof of Concept"
- dockScreen= "&dsShipInterior;"
- attributes= "00200000_PlayerShip"
- characterClass= "&unidPilgrimClass;"
- mass= "30"
- thrustRatio= "6.6"
- maxSpeed= "20"
- cargoSpace= "50"
- reactorPower= "150"
- fuelCapacity= "37500"
- maxArmor= "6000"
- maxCargoSpace= "150"
- maxDevices= "8"
- leavesWreck= "30"
- >
- <!-- Configuration -->
- <Armor
- armorID= "&itReactiveArmor;"
- count= "4"
- />
- <Devices>
- <DeviceSlot criteria="w" posAngle="0" posRadius="20"/>
- <Device deviceID="&itRecoillessCannon;"/>
- <Device deviceID="&itClass1Deflector;"/>
- </Devices>
- <Maneuver
- maxRotationRate= "9.0"
- rotationAccel= "1.5"
- rotationStopAccel= "9.0"
- />
- <Items>
- <Item count="4d6" item="&itHelium3FuelRod;"/>
- </Items>
- <!-- Image and Effects -->
- <Image imageID="&rsSapphireYachtHD;" imageX="0" imageY="0" imageWidth="48" imageHeight="48" rotationCount="120"/>
- <Effects>
- <Effect type="thrustMain" posAngle="160" posRadius="7" posZ="0" rotation="180" bringToFront="*"/>
- <Effect type="thrustMain" posAngle="-160" posRadius="7" posZ="0" rotation="180" bringToFront="*"/>
- <Effect type="rotateRight" posAngle="12" posRadius="20" posZ="0" rotation="90"/>
- <Effect type="rotateRight" posAngle="-130" posRadius="18" posZ="0" rotation="270"/>
- <Effect type="rotateLeft" posAngle="-12" posRadius="20" posZ="0" rotation="270"/>
- <Effect type="rotateLeft" posAngle="130" posRadius="18" posZ="0" rotation="90"/>
- </Effects>
- <!-- AI and Behavior -->
- <AISettings
- fireRateAdj= "30"
- fireAccuracy= "90"
- perception= "4"
- />
- <PlayerSettings
- desc= "The versatile Sapphire yacht strikes a good balance between a gunship and a freighter."
- largeImage= "&rsZubrinLarge;"
- initialClass= "true"
- startingCredits= "10d100+1500"
- >
- <ArmorDisplay>
- <ShipImage imageID="&rsArmorHUDShip_Sapphire;" imageWidth="136" imageHeight="136"/>
- <ArmorSection name="forward"
- segment="0"
- imageID="&rsZubrinArmor;"
- imageX="0" imageY="0" imageWidth="52" imageHeight="29"
- destX="42" destY="15" hpX="55" hpY="14"
- nameY="8" nameBreakWidth="200" nameDestX="0" nameDestY="10" />
- <ArmorSection name="starboard"
- segment="3"
- imageID="&rsZubrinArmor;"
- imageX="52" imageY="0" imageWidth="22" imageHeight="59"
- destX="92" destY="45" hpX="95" hpY="60"
- nameY="30" nameBreakWidth="360" nameDestX="12" nameDestY="0" />
- <ArmorSection name="port"
- segment="1"
- imageID="&rsZubrinArmor;"
- imageX="142" imageY="0" imageWidth="22" imageHeight="59"
- destX="22" destY="45" hpX="15" hpY="60"
- nameY="52" nameBreakWidth="200" nameDestX="0" nameDestY="8" />
- <ArmorSection name="aft"
- segment="2"
- imageID="&rsZubrinArmor;"
- imageX="74" imageY="0" imageWidth="68" imageHeight="14"
- destX="34" destY="103" hpX="55" hpY="105"
- nameY="74" nameBreakWidth="360" nameDestX="12" nameDestY="0" />
- </ArmorDisplay>
- <ShieldDisplay shieldLevelEffect="&efShieldHUDDefault;">
- </ShieldDisplay>
- <ReactorDisplay>
- <Image imageID="&rsZubrinReactor;"
- imageX="0" imageY="0" imageWidth="256" imageHeight="60"/>
- <PowerLevelImage imageID="&rsZubrinReactor;"
- imageX="0" imageY="60" imageWidth="202" imageHeight="14"
- destX="54" destY="9"/>
- <FuelLevelImage imageID="&rsZubrinReactor;"
- imageX="0" imageY="74" imageWidth="194" imageHeight="14"
- destX="54" destY="37"/>
- <FuelLowLevelImage imageID="&rsZubrinReactor;"
- imageX="0" imageY="88" imageWidth="194" imageHeight="14"/>
- <ReactorText x="62" y="22" width="154" height="14"/>
- <PowerLevelText x="62" y="0" width="154" height="9"/>
- <FuelLevelText x="62" y="51" width="154" height="9"/>
- </ReactorDisplay>
- <WeaponDisplay>
- <Image imageID="&rsZubrinTargeting;" imageX="0" imageY="0" imageWidth="360" imageHeight="120"/>
- </WeaponDisplay>
- </PlayerSettings>
- <DockingPorts>
- <Port x="25" y="45" />
- <Port x="25" y="25" />
- <Port x="25" y="-25" />
- <Port x="25" y="-45" />
- <Port x="-25" y="45" />
- <Port x="-25" y="25" />
- <Port x="-25" y="-25" />
- <Port x="-25" y="-45" />
- </DockingPorts>
- <Events>
- <OnCreate>
- (block Nil
- ;trigger the scuttle events to clear the field
- (sysAddObjRecurringTimerEvent 450 gSource "Scuttle")
- (ObjSetData gSource "Scuttlersout" 0)
- ;init scuttle radius
- (ObjSetData gSource "ScuttleRadius" 150)
- ;(ObjSetData gSource "ScuttleRadius" 1500)
- )
- </OnCreate>
- <Scuttle>
- (block (PingsList wrecklist)
- ;(Plymessage gPlayer "scuttle?")
- ;identify wrecks in the area
- ;list before barricades:
- ;(sysFindObject gSource "N:65; Mt -b; -m;")
- ;the list should include the radius from mining rigs and solar collectors
- (setq wrecklist (filter (sysFindObject gSource (cat "N:" (ObjGetData gSource "ScuttleRadius") "; Mt -b; -m;")) wreckCandidate
- (block Nil
- (or
- (not (eq (ObjGetType wreckCandidate) &stBarricade1; ))
- )
- )
- ))
- (enum
- wrecklist
- wreck (block Nil
- ;(Plymessage gPlayer (count (sysFindObject gSource "N:50; Mt -b; -m;")))
- ;(PrintTo 'log (count (sysFindObject gSource "N:50; Mt -b; -m;")))
- (switch
- (and
- ;object is abandoned so it's a wreck:
- (objisabandoned wreck)
- ;not already marked:
- (Not (eq (ObjGetData wreck "Marked_for_Scuttling") true))
- )
- (block Nil
- ;send a ship to scuttle the wreck (max 5 ships out scuttling, can be upgraded but will add later)
- (if (leq (ObjGetData gSource "ScuttlersOut") 5)
- (block (scuttleship)
- (setq Scuttleship (SysCreateShip &scEarthzone; gSource (ObjGetSovereign gPlayership)))
- ;register the ship
- (objRegisterForEvents gSource Scuttleship)
- (shpOrder Scuttleship 'dock wreck)
- ;initialize data that tells the scuttle base if the scuttler has docked with the wreck yet
- (ObjSetData Scuttleship "Docked_with_wreck" "False")
- ;in the onobjdocked, detonate the wreck
- ;set data on the scuttleship of the wreck target so we can check in OnObjDocked
- (ObjSetData ScuttleShip "wreck_target" (ObjGetID wreck))
- ;set home base on the scuttleship
- (ObjSetData ScuttleShip "home_base" (ObjGetID gSource))
- ;tell the ship to dock with home base in case the wreck is destroyed
- (shpOrder Scuttleship 'dock gSource)
- ;when the scuttle wreck comes back add credits
- (ObjIncData gSource "ScuttlersOut" 1)
- (ObjSetData wreck "Marked_for_Scuttling" true)
- )
- Nil
- )
- )
- )
- ;for each wreck, add scrap
- ;each wreck is worth the combatpower of the object in scrap
- ))
- ;this should be an upgrade though
- ;reduce scuttle count by one so that you don't run out of scuttlers:
- (ObjSetData gSource "ScuttlersOut" (subtract (ObjGetData gSource "ScuttlersOut") 1))
- ;optional:
- ;send ships to fill docking spaces for the wreck
- ;more ships means that the wreck gets moved faster
- ;move the wreck closer to the scuttle station
- ;when it's on top of the graphic, scuttle the wreck
- ;add scrap to the player
- )
- </Scuttle>
- <OnObjDocked>
- (block Nil
- (switch
- ;if the scuttle ship docked with the target object, destroy the wreck and tell the ship to go back to home station
- (eq aDockTarget (ObjGetObjByID (ObjGetData aObjdocked "wreck_target")))
- (block Nil
- ;set the combatpower on the scuttle ship so you can credit the right amount of scrap when it comes back to the home station
- ;can't get combatpower of a wreck since it's 0
- (ObjSetData aObjdocked "Scrap_recovered" (objGetMass aDockTarget))
- ;set data so you know that the scuttle ship has docked with wreck
- (ObjSetData aObjdocked "Docked_with_wreck" "True")
- ;go back to home station
- (ShpOrder aObjdocked 'dock (ObjGetObjByID (ObjGetData aObjdocked "home_base")))
- ;destroy wreck
- (ObjDestroy (ObjGetObjByID (ObjGetData aObjdocked "wreck_target")) aObjdocked)
- )
- (eq aDockTarget (ObjGetObjByID (ObjGetData aObjdocked "home_base")))
- (block Nil
- ;add scrap to the player's scrap pile
- (plyCredit gPlayer &ecRUs; (ObjGetData aObjdocked "Scrap_recovered"))
- ;reduce scuttlecount by 1
- (ObjSetData gSource "ScuttlersOut" (subtract (ObjGetData gSource "ScuttlersOut") 1))
- ;get rid of the ship
- (ObjDestroy aObjdocked)
- )
- )
- )
- </OnObjDocked>
- <OnObjDestroyed>
- (block Nil
- (switch
- ;if the scuttle ship hasn't docked with wreck yet
- (eq (ObjGetData aObjDestroyed "Docked_with_wreck") "False")
- (block Nil
- ;unmark the wreck target
- (ObjSetData (ObjGetObjByID (ObjGetData aObjDestroyed "wreck_target")) "Marked_for_Scuttling" "False")
- ;decrease number of max scuttlers out
- (ObjSetData gSource "ScuttlersOut" (subtract (ObjGetData gSource "ScuttlersOut") 1))
- )
- )
- )
- </OnObjDestroyed>
- </Events>
- </ShipClass>
- <!-- Player ship's interior -->
- <DockScreen UNID="&dsShipInterior;"
- name= "Ship's Interior"
- >
- <Panes>
- <Default
- desc= "You are inside the main compartment of your ship. A hatch in front of you opens into the cargo hold. To the side there is a small ladder that leads to the reactor and the ship's engines.">
- <OnPaneInit>
- (block Nil
- (scrSetDesc gScreen (cat
- "The ship's computer displays vital statistics:"
- "\n We have " (plyGetCredits gPlayer &ecRUs;) " RUs to spare."
- ))
- )
- </OnPaneInit>
- <Actions>
- <Action name="Ship Configuration" key="S">
- (scrShowScreen gScreen &dsShipConfig;)
- </Action>
- <Action name="View Ship's Construction" key="V" >
- (block Nil
- (setq gDest Nil)
- (scrShowScreen gScreen &dsCargoHold;)
- )
- </Action>
- <Action name="Refuel Reactor" key="R" >
- (scrShowScreen gScreen &dsManualRefuel;)
- </Action>
- <Action name="Back to Cockpit" cancel="1" key="B">
- (scrExitScreen gScreen)
- </Action>
- </Actions>
- </Default>
- </Panes>
- </DockScreen>
- <DockScreen UNID="&dsMothershipManufacturing;"
- name= "Ship's Interior"
- nestedScreen= "true"
- >
- <Panes>
- <Default
- desc= "You are inside the main compartment of your ship. A hatch in front of you opens into the cargo hold. To the side there is a small ladder that leads to the reactor and the ship's engines.">
- <OnPaneInit>
- (block Nil
- (scrSetDesc gScreen (cat
- "The ship's computer displays vital statistics:"
- "\n We have " (plyGetCredits gPlayer &ecRUs;) " RUs to spare."
- ))
- )
- </OnPaneInit>
- <Actions>
- <Action name="Recycle Items" key="S">
- (scrSetDesc gScreen (cat
- "This currently does nothing"
- ))
- </Action>
- <Action name="Manufacture Items" key="S">
- (scrSetDesc gScreen (cat
- "This currently does nothing"
- ))
- </Action>
- <Action name="Leave Manufacturing" cancel="1" key="L">
- (scrExitScreen gScreen)
- </Action>
- </Actions>
- </Default>
- </Panes>
- </DockScreen>
- <EconomyType UNID="&ecRUs;"
- id= "RU"
- currency= "RU|RUs"
- conversion= "10"
- />
- </TranscendenceExtension>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement