The New Order - Halo Role Playing Forum


Go Back   The New Order - Halo Role Playing Forum > TNO Studios > Galaxies at War > Coding Tutorials
New! Halo RPG Community Quick Links Search New Posts Register


 
Thread Tools Display Modes
Old Tutorial 2: Coding a Ship
Default 04-15-2011
  #1
Naked Crook
Naked Crook is well known to TNONaked Crook is well known to TNONaked Crook is well known to TNONaked Crook is well known to TNONaked Crook is well known to TNO
Naked Crook's Avatar

Naked Crook is going back in time
 

Achievements Three Red LightsMan of the PeopleRehab is Needed
User Title: TNO God
Posts: 27,497
Credits:



This tutorial will show you the basics and explain ship XML files. All of these tags are needed to make a functioning ship in Empire at War and Forces of Corruption.

Green text signifies out of context comments that are simply there for explanation purpose.

==========================================

<?xml version="1.0"?>

<Kedalbe_Battleship_Data>
<SpaceUnit Name="Kedalbe_Battleship"> *XML SpaceUnit Name. used to reference this ship in other XML files.*
<Text_ID>TEXT_UNIT_KEDALBE_BATTLESHIP</Text_ID>
<Encyclopedia_Good_Against> Victory_Destroyer Alliance_Assault_Frigate </Encyclopedia_Good_Against> *Used for the tooltip when higlighting a ship in game to tell the player what ships are weak against the Keldabe. You must use XML SpaceUnit Name in this tag.*
<Encyclopedia_Vulnerable_To> TIE_Defender B-Wing </Encyclopedia_Vulnerable_To> *Same as above, only for ships strong against the keldabe*
<Encyclopedia_Text> TEXT_TOOLTIP_KEDALBE_BATTLESHIP</Encyclopedia_Text> *More tooltip information. This is used for general info. This is a string defined in the DAT file*
<Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_CAPITAL </Encyclopedia_Unit_Class> *More tooltip information. This is used for general info. This is a string defined in the DAT file*
<Icon_Name>i_button_UV_Keldabe.tga</Icon_Name> *A TGA picture stored in the MT_Commandbar file or in the Art/Textures directory*

<GUI_Row> 1 </GUI_Row> *Used for GC icon placement. This is either a 1 or 0. 0 is for bottom row, 1 is for top row*
<Space_Model_Name>UV_KedalbeBattleship.alo</Space_Model_Name> *The .ALO model used for the ship*
<Select_Box_Scale>890</Select_Box_Scale> *Scales the size of the selection circle around the ship in-game*
<Select_Box_Z_Adjust>-50</Select_Box_Z_Adjust> *Adjusts the height of the selection circle*
<Mass>0.995</Mass> *This tag has no know use. ignore it.*
<Scale_Factor>1</Scale_Factor> *changes the size of the model. Can only use positive numbers. values less than 1 will make it smaller*
<Size_Value>360</Size_Value> *This tag has no know use. ignore it.*
<No_Colorization_Color> 255, 0, 0, 255 </No_Colorization_Color> *Changes the default non-team color of the ship. Values are Red, Green, Blue, Alpha. Alpha should always be 255.*

<Custom_Hard_XExtent> 300.0 </Custom_Hard_XExtent> *Overrides collision on the X axis. Smaller values means smaller collision*
<Custom_Hard_YExtent> 300.0 </Custom_Hard_YExtent> *Overrides collision on the Y axis. Smaller values means smaller collision*

<Max_Rate_Of_Turn>0.8</Max_Rate_Of_Turn> *How fast the ship turns*
<Max_Rate_Of_Roll>0.3</Max_Rate_Of_Roll> *If the ship rolls when turning, this determines how fast it rolls*
<Bank_Turn_Angle>65</Bank_Turn_Angle> *Maximum degree of rolling. Max is 180*


<Max_Speed>4.0</Max_Speed> *The speed*
<Max_Thrust>0.2</Max_Thrust> *Thrust of the ship. How well it decelerates and accelerates.*
<Hyperspace>Yes</Hyperspace> *GC boolean for if the ship can yperspace for retreat*
<Hyperspace_Speed>1</Hyperspace_Speed> *Speed of the sypwerspace window*
<Maintenance_Cost>0.3</Maintenance_Cost> *Cost of haviong the ship on the map*
<MovementClass> Space </MovementClass> *Tells the game this is a space ship*
<Space_Layer> Frigate </Space_Layer> *Tells the game which layer this ship should move in. Layers are fighter, frigate, and Capital*
<Ship_Class>Capital</Ship_Class> *Classification of the ship. Used to tell the game what kind of ship it is. Used for damage modifier calculating*
<Layer_Z_Adjust>200</Layer_Z_Adjust> *Adjusts the height of the ship*
<OverrideAcceleration> 0.06 </OverrideAcceleration> *Acceleration override. Has higher priority than <Max_Thrust>*
<OverrideDeceleration> 0.06 </OverrideDeceleration> *Deceleration override. Has higher priority than <Max_Thrust>*

<Build_Initially_Locked>Yes</Build_Initially_Locked> *GC Boolean to tell the game if the ship is locked from being built by default*
<Build_Can_Be_Unlocked_By_Slicer>No</Build_Can_Be_Unlocked_By_Slicer> *Slicers are GC units that can unlock ships*

<Tech_Level>1</Tech_Level> *GC value. used to tell the game at which GC tech level this ship is unlocked at*
<Required_Star_Base_Level>1</Required_Star_Base_Level> *Same as above but for Starbase level*
<Required_Planets></Required_Planets> *Which planet is needed to build this ship. No planet listed means the ship can be built at every planet and no planet is needed to unlock it*

<Affiliation>Underworld</Affiliation> *Which faction this ship is affiliated with. This is required for Skirmish and GC. This must be the faction that owns the ship*
<Required_Timeline>0</Required_Timeline> **
<Required_Ground_Base_Level>0</Required_Ground_Base_Level> *GC Value. Same as Starbase above*
<Required_Special_Structures /> *GC value. Tells the game which special structures are needed to build this ship*
<Build_Tab_Space_Units>Yes</Build_Tab_Space_Units> *GC boolean. Tells the game this ship is built in space*

<Armor_Type> Armor_Underworld_Capital </Armor_Type> *Used for damage modifying.*
<Shield_Armor_Type>Shield_Underworld_Capital</Shield_Armor_Type> *Same as above*
<Autoresolve_Health>8000</Autoresolve_Health> *GC value. Used for auto-resolve*
<Tactical_Health>8000</Tactical_Health> *Used to tell the game how much health this ship has*
<Shield_Points>5000</Shield_Points> *Same as above, but for shields*
<Shield_Refresh_Rate>60</Shield_Refresh_Rate> *How fast the ship recharges shields*
<Energy_Capacity>99999</Energy_Capacity> *Maximum energy*
<Energy_Refresh_Rate>800</Energy_Refresh_Rate> *same as shields but for energy*
<Damage>60</Damage> *Redundant value, overridden by hardpoints and projectiles. Commonly used by fighters, but every ship has this tag it seems*
<AI_Combat_Power>4250</AI_Combat_Power> *Tells the AI how powerful this ship is. Factored into AI Logic*
<Formation_Priority>5</Formation_Priority> *Ship battle formation. AI logic telling the game how the ship should be postioned. Lower numbers signify priority*
<Squadron_Capacity>40</Squadron_Capacity> *usually a fighter squad value. Redundant on this ship. Tells the game the maximum number of squads that can be selected at a time.*

<Behavior> SELECTABLE, DUMMY_STARSHIP </Behavior> *Tells the game bow the ship acts in general*
<SpaceBehavior>ABILITY_COUNTDOWN, SIMPLE_SPACE_LOCOMOTOR, POWERED, SHIELDED, TARGETING, HIDE_WHEN_FOGGED, REVEAL, UNIT_AI, DAMAGE_TRACKING, ION_STUN_EFFECT, NEBULA </SpaceBehavior> *Tells the game how the ship acts in space*

<Collidable_By_Projectile_Living>Yes</Collidable_By_Projectile_Living> *I do not really know what this does. Just keep it set to yes*
<Death_Explosions>Large_Explosion_Space</Death_Explosions> *Particle system generated when the ship explodes*
<Asteroid_Damage_Hit_Particles>Large_Damage_Space</Asteroid_Damage_Hit_Particles> *Damage done to this ship when hit by asteroids*
<Death_Clone>Damage_Normal, Big_Explosion_Death</Death_Clone> *The death model generated upon death*

<Space_FOW_Reveal_Range>1500.0</Space_FOW_Reveal_Range> *How far the ship can see*
<Targeting_Max_Attack_Distance>2000.0</Targeting_Max_Attack_Distance> *How far the ship can shoot and aquire targets*
<Dense_FOW_Reveal_Range_Multiplier>0.24</Dense_FOW_Reveal_Range_Multiplier> *Multiplier for nebulas*

<HardPoints>
HP_KEDALBE_LEFT_TURBO_00,
HP_KEDALBE_LEFT_TURBO_01,
HP_KEDALBE_RIGHT_TURBO_00,
HP_KEDALBE_RIGHT_TURBO_01,
HP_KEDALBE_LEFT_ION_00,
HP_KEDALBE_RIGHT_ION_00,
HP_KEDALBE_CENTER_TOP_TURBO,
HP_KEDALBE_CENTER_BOTTOM_TURBO,
HP_KEDALBE_MASS_DRIVER_FRONT,
HP_KEDALBE_MASS_DRIVER_BACK,
HP_KEDALBE_SHIELD_LEECH_00,
HP_KEDALBE_ENGINES_00,
HP_KEDALBE_ENGINES_01
</HardPoints> *Hardpoints defined in Hardpoints.XML*

*The following is just sound effects. Very straight forward and self explanatory*

<SFXEvent_Build_Started>UHD_Build_Vehicle</SFXEvent_Build_Started>
<SFXEvent_Build_Cancelled>UHD_Unit_Canceled</SFXEvent_Build_Cancelled>
<SFXEvent_Build_Complete>Unit_Complete_Kadalbe</SFXEvent_Build_Complete>
<SFXEvent_Ambient_Loop>Unit_Calamari_Moving_Engine_Loop</SFXEvent_Ambient_Loop>

<SFXEvent_Select>Unit_Select_Kadalbe</SFXEvent_Select>
<SFXEvent_Move>Unit_Move_Kadalbe</SFXEvent_Move>
<SFXEvent_Fleet_Move>Unit_Fleet_Move_Kadalbe</SFXEvent_Fleet_Move>
<SFXEvent_Attack>Unit_Attack_Kadalbe</SFXEvent_Attack>
<SFXEvent_Guard>Unit_Guard_Kadalbe</SFXEvent_Guard>
<SFXEvent_Barrage>Unit_Barrage_Kadalbe</SFXEvent_Barrage>
<SFXEvent_Move_Into_Nebula> Unit_Nebula_Kadalbe </SFXEvent_Move_Into_Nebula>

<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_LASER, Unit_HP_LASER_Kadalbe </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_MISSILE, Unit_HP_MISSILE_Kadalbe </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_TORPEDO, Unit_HP_TORP_Kadalbe </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_ION_CANNON, Unit_HP_ION_Kadalbe </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_SHIELD_GENERATOR, Unit_HP_SHIELDS_Kadalbe </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_ENGINE, Unit_HP_ENGINES_Kadalbe </SFXEvent_Attack_Hardpoint>

<SFXEvent_Hardpoint_Destroyed> HARD_POINT_WEAPON_LASER, Unit_Lost_Laser_Kadalbe </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_WEAPON_MISSILE, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_WEAPON_TORPEDO, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_WEAPON_ION_CANNON, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_SHIELD_GENERATOR, Unit_Lost_Shields_Kadalbe </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_ENGINE, Unit_Lost_Engines_Kadalbe </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_GRAVITY_WELL, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_FIGHTER_BAY, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_TRACTOR_BEAM, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_ENABLE_SPECIAL_ABILITY, </SFXEvent_Hardpoint_Destroyed>

<SFXEvent_Engine_Idle_Loop> Unit_Calamari_Idle_Engine_Loop </SFXEvent_Engine_Idle_Loop>
<SFXEvent_Engine_Moving_Loop> Unit_Calamari_Moving_Engine_Loop </SFXEvent_Engine_Moving_Loop>
<SFXEvent_Engine_Cinematic_Focus_Loop> Unit_Calamari_Cinematic_Engine_Loop </SFXEvent_Engine_Cinematic_Focus_Loop>

<Death_SFXEvent_Start_Die>Unit_Calamari_Death_SFX</Death_SFXEvent_Start_Die>

<CategoryMask> Capital | AntiFrigate </CategoryMask> *Tells the game which category this shipis in. Used for upgrades*
<Space_Full_Stop_Command> Yes </Space_Full_Stop_Command> *This ship can use the full stop command*
<Is_Visible_On_Radar>Yes</Is_Visible_On_Radar> *If yes, this ship can be seen on radar even if covered by fog of war*
<Radar_Icon_Scale_Land>1.0</Radar_Icon_Scale_Land> *makes the radar icon bigger for values bigger than 1. 1.0 is default*
<Radar_Icon_Scale_Space>1.0</Radar_Icon_Scale_Space> *Same as above but for space units*
<Radar_Icon_Name>i_radar_capital_ship.tga</Radar_Icon_Name>
<Guard_Chase_Range>1000.0</Guard_Chase_Range> *How far this ship will chase an enemy when on guard duty*
<Idle_Chase_Range>0.0</Idle_Chase_Range> *If the ship is idle, it will chase a ship this far*
<Attack_Move_Response_Range>400.0</Attack_Move_Response_Range> *This ship will respond to an attack if the attacker is this close*
<Targeting_Stickiness_Time_Threshold>5.0</Targeting_Stickiness_Time_Threshold> *I do not really know...*
<Targeting_Priority_Set>Capital</Targeting_Priority_Set> *Targets Capital ships before anything else. if there are no capital ships nearby, it will target the first ship it sees automatically*
<Visible_On_Radar_When_Fogged>true</Visible_On_Radar_When_Fogged> *This means the ship can be seen under fog of war on the gameboard*
<Multisample_FOW_Check>Yes</Multisample_FOW_Check> *Beats the hell out of me. I ignore this tag.*
<Ranking_In_Category>5</Ranking_In_Category>
<Score_Cost_Credits> 42500 </Score_Cost_Credits>
<Victory_Relevant>yes</Victory_Relevant> *This ship has to die to win/lose*
<Has_Space_Evaluator>True</Has_Space_Evaluator> *I dunno*

<!--<MULTIPLAYER SKIRMISH VALUES BEGIN>-->
<Population_Value>6</Population_Value>
<Tactical_Build_Cost_Multiplayer>4800</Tactical_Build_Cost_Multiplayer> *Used for skirmish*
<Tactical_Build_Time_Seconds>28</Tactical_Build_Time_Seconds> *Used for skirmish*
<Tactical_Build_Prerequisites /> *Used for skirmish...needed units/buildings before this can be built.*
<Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue> **This either places the build counter in the upgrades or tactical queue
<Build_Limit_Current_Per_Player>2</Build_Limit_Current_Per_Player> *Maximum of this ship that can be built at a time*
<Build_Limit_Lifetime_For_All_Allies>-1</Build_Limit_Lifetime_For_All_Allies> *Maximum of this ship that can be built per game. -1 = infinite*
<!--<MULTIPLAYER SKIRMISH VALUES END>-->

<!-- Non-Hero unit abilities description -->
<Unit_Abilities_Data SubObjectList="Yes">

<!-- Primary ability -->
<Unit_Ability>
<Type>LEECH_SHIELDS</Type>
<Recharge_Seconds>20.0</Recharge_Seconds> *TIme needed to recharge the ability*
<GUI_Activated_Ability_Name> Kadalbe_Leech_Shields </GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
<Effective_Radius> 500.0 </Effective_Radius> *How far the ability reaches*
<SFXEvent_GUI_Unit_Ability_Activated>Unit_Leech_Sheilds_Kadalbe</SFXEvent_GUI_Unit_Ability_Activated>
<SFXEvent_Target_Ability> Unit_Leech_Sheilds_Kadalbe </SFXEvent_Target_Ability>
<SFXEvent_Special_Ability_Loop> Unit_Star_Destroyer_Tractor_Beam </SFXEvent_Special_Ability_Loop>
<Must_Be_Bought_On_Black_Market>Yes</Must_Be_Bought_On_Black_Market>
<Supports_Autofire>True</Supports_Autofire>
</Unit_Ability>

</Unit_Abilities_Data>

<Abilities SubObjectList="Yes">
<Leech_Shields_Ability Name="Kadalbe_Leech_Shields">
<Activation_Style> User_Input </Activation_Style>
<Applicable_Unit_Categories> Corvette | Frigate | Capital | Super | SpaceHero</Applicable_Unit_Categories> *Which category of ship this ability works on*
<Applicable_Unit_Types>Millennium_Falcon</Applicable_Unit_Types>
<Activation_Min_Range>10</Activation_Min_Range> *Minimum range at which is needed for this to work*
<Activation_Max_Range>2500</Activation_Max_Range> *Max range*
<Duration_In_Secs> 40.0 </Duration_In_Secs> *How long it lasts*
<Shield_Damage_Per_Second> 150.0 </Shield_Damage_Per_Second> *How much shield damage is done per second*
<Damage_Multiplier> 4.5 </Damage_Multiplier> *How much this amplified the damage done by the ship USING this ability*
<Beam_Color>34, 34, 235, 255</Beam_Color> *Red, green, Blue, Alpha*
<Beam_Bone_Name>HP_SHL_00_BONE</Beam_Bone_Name> *the location of the turret on the ALO file. If unsure, use ROOT. Every ship has the root bone*
<Beam_Frames>10</Beam_Frames>
<Beam_Width>40.0</Beam_Width>
<Beam_Texture_Name>tractor_beam00.tga</Beam_Texture_Name>
<Beam_Effect_Name>Leech_Shields</Beam_Effect_Name>
<Must_Be_Bought_On_Black_Market>Yes</Must_Be_Bought_On_Black_Market>
<Leech_Effect>Leech_Effect</Leech_Effect>
</Leech_Shields_Ability>
</Abilities>

<Abilities SubObjectList="Yes">
<Redirect_Blaster_Ability Name="US_Magnetically_Sealed_Armor_Bonus_L3">
<Initially_Enabled> No </Initially_Enabled> <!-- Must be enabled via the EL_Heavy_Reflective_Armor_L2_Upgrade -->
<Activation_Style>Take_Damage</Activation_Style>
<!-- Redirection chance is rolled first. If failed, we roll block chance. If failed, we take the damage. -->
<Redirect_Chance>0.0</Redirect_Chance>
<Block_Chance>0.30</Block_Chance>
<Reaction_Arc_In_Degrees>360.0</Reaction_Arc_In_Degrees>
<Max_Projectile_Redirection_Angle_In_Degrees> 30.0 </Max_Projectile_Redirection_Angle_In_Degrees>
<Turn_To_Face_Unblockable_Shots>No</Turn_To_Face_Unblockable_Shots>
<!-- We can block/redirect shots from the following units types: -->
<Applicable_Unit_Categories>Fighter | Bomber | Corvette | Frigate | Capital | Structure</Applicable_Unit_Categories>
<Applicable_Unit_Types />
<SFXEvent_Activate>Unit_Lightsaber_Projectile_Block</SFXEvent_Activate>
</Redirect_Blaster_Ability>
</Abilities>
</SpaceUnit>


<SpaceUnit Name="Unity_Kedalbe_Battleship">
<Variant_Of_Existing_Type>Kedalbe_Battleship</Variant_Of_Existing_Type> *Special tag used to create minor variants of the ship*
<Affiliation>Unity</Affiliation>
</SpaceUnit>
</Kedalbe_Battleship_Data>

==========================================

Naked Crook is offline  


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


vBCredits II Deluxe v2.0.0 Copyright © 2010 DragonByte Technologies
Forum created by Naked Crook - The New Order - Online Role Playing Forum

All times are GMT -5. The time now is 06:06 PM.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.