Author Topic: Cannot properly select space unit (NOT UNIT SELECTION FREEZE)  (Read 804 times)

Offline Bucman55

  • Regular Member
  • Ensign
  • *
  • Posts: 21
I've coded hundreds of space units but for some reason this one in particular doesn't want to be selected normally. I have to do the click-drag thing to select it. When I put my cursor over it, it acts like nothing's there, showing no unit info or hardpoints. All hardpoints are set as targetable and destroyable. Here's the code, hopefully you guys can tell me where I went wrong so I can fix it. I used the vanilla MC80 as a base and modified the necessary information.
Code: [Select]

<SpaceUnit Name="Wingless_Calamari_Cruiser">
<Text_ID>TEXT_UNIT_CALAMARI_CRUISER_WINGLESS</Text_ID>
<Encyclopedia_Good_Against> Victory_Destroyer Acclamator_Assault_Ship Interceptor4_Frigate </Encyclopedia_Good_Against>
<Encyclopedia_Vulnerable_To> TIE_Bomber Skipray_Blastboat </Encyclopedia_Vulnerable_To>
<GUI_Row> 1 </GUI_Row>
<Space_Model_Name>RV_MC80a_Wingless.ALO</Space_Model_Name>
<Select_Box_Scale>600</Select_Box_Scale>
<Select_Box_Z_Adjust>-50</Select_Box_Z_Adjust>
<Mass>0.995</Mass>
<Scale_Factor>1.0</Scale_Factor>
<Damage>60</Damage>
<Dense_FOW_Reveal_Range_Multiplier>0.24</Dense_FOW_Reveal_Range_Multiplier>
<Visible_On_Radar_When_Fogged>true</Visible_On_Radar_When_Fogged>
<Multisample_FOW_Check>Yes</Multisample_FOW_Check>
<Ranking_In_Category>5</Ranking_In_Category>
<Max_Speed>1.65</Max_Speed>
<Max_Rate_Of_Turn>0.45</Max_Rate_Of_Turn>
<MovementClass> Space </MovementClass>
<Space_Layer> Capital </Space_Layer>
<Layer_Z_Adjust>-290.0</Layer_Z_Adjust>
<OverrideAcceleration> .028 </OverrideAcceleration>
<OverrideDeceleration> .028 </OverrideDeceleration>

<Armor_Type> Armor_Calamari_Cruiser </Armor_Type>
<Shield_Armor_Type>Shield_Capital</Shield_Armor_Type>
<Max_Rate_Of_Roll>0.25</Max_Rate_Of_Roll>
<Bank_Turn_Angle>25</Bank_Turn_Angle>
<Max_Thrust>0.2</Max_Thrust>
<Hyperspace>Yes</Hyperspace>
<Hyperspace_Speed>4.0</Hyperspace_Speed>
<Maintenance_Cost>0.3</Maintenance_Cost>

<Death_Clone>Damage_Normal, Large_Explosion_Space</Death_Clone>

<Remove_Upon_Death>true</Remove_Upon_Death>

<Affiliation>Rebel</Affiliation>
<Build_Initially_Locked>Yes</Build_Initially_Locked>
<Build_Can_Be_Unlocked_By_Slicer>Yes</Build_Can_Be_Unlocked_By_Slicer>
<Slice_Cost_Credits>2000</Slice_Cost_Credits>
<Tech_Level>2</Tech_Level>
<Required_Timeline>0</Required_Timeline>
<Required_Ground_Base_Level>0</Required_Ground_Base_Level>
<Required_Star_Base_Level>4</Required_Star_Base_Level>
<Required_Special_Structures />
<Required_Planets>Bestine, Bilbringi, Byss, Corellia, Duro, Fondor, Hypori, Kuat, Mandalore, MonCalimari, OrdTrasi, Raxus, Rendili, Roche_Asteroids, Rothana, Serenno, Sluis_Van, Sullust, Yaga_Minor</Required_Planets>
<Autoresolve_Health>7500</Autoresolve_Health>
<Tactical_Health>14975</Tactical_Health>
<Shield_Points>16500</Shield_Points>
<Shield_Refresh_Rate>500</Shield_Refresh_Rate>
<Energy_Capacity>8000</Energy_Capacity>
<Energy_Refresh_Rate>800</Energy_Refresh_Rate>
<Ship_Class>capital</Ship_Class>
<Formation_Priority>5</Formation_Priority>
<Political_Faction>Rebel</Political_Faction>
<Squadron_Capacity>40</Squadron_Capacity>
<Build_Cost_Credits>11400</Build_Cost_Credits>
<Piracy_Value_Credits>250</Piracy_Value_Credits>
<AI_Combat_Power>4250</AI_Combat_Power>
<Build_Time_Seconds>90</Build_Time_Seconds>
<Build_Tab_Space_Units>Yes</Build_Tab_Space_Units>
<Size_Value>360</Size_Value>
<Behavior> SELECTABLE, DUMMY_STARSHIP </Behavior>
<SpaceBehavior>ABILITY_COUNTDOWN, SIMPLE_SPACE_LOCOMOTOR, POWERED, SHIELDED, TARGETING, HIDE_WHEN_FOGGED, REVEAL, UNIT_AI, ASTEROID_FIELD_DAMAGE, DAMAGE_TRACKING, ION_STUN_EFFECT, NEBULA, SPAWN_SQUADRON </SpaceBehavior>

<Collidable_By_Projectile_Living>Yes</Collidable_By_Projectile_Living>
<Death_Explosions>Large_Explosion_Space</Death_Explosions>
<Asteroid_Damage_Hit_Particles>Large_Damage_Space</Asteroid_Damage_Hit_Particles>
<No_Colorization_Color> 255, 255, 255, 255 </No_Colorization_Color>

<Space_FOW_Reveal_Range>1200.0</Space_FOW_Reveal_Range>
<Targeting_Max_Attack_Distance>2000.0</Targeting_Max_Attack_Distance>
<CategoryMask> Capital | AntiFrigate </CategoryMask>

        <!-- Fighter complement -->
        <Starting_Spawned_Units_Tech_0>Z95_Headhunter_Rebel_Squadron, 2</Starting_Spawned_Units_Tech_0>
        <Starting_Spawned_Units_Tech_0>Y-Wing_Squadron, 1</Starting_Spawned_Units_Tech_0>
        <Spawned_Squadron_Delay_Seconds>7</Spawned_Squadron_Delay_Seconds>
        <Reserve_Spawned_Units_Tech_0>Z95_Headhunter_Rebel_Squadron, 1</Reserve_Spawned_Units_Tech_0>
        <Reserve_Spawned_Units_Tech_0>Y-Wing_Squadron, 2</Reserve_Spawned_Units_Tech_0>

        <Starting_Spawned_Units_Tech_2>Rebel_X-Wing_Squadron, 2</Starting_Spawned_Units_Tech_2>
        <Starting_Spawned_Units_Tech_2>Y-Wing_Squadron, 1</Starting_Spawned_Units_Tech_2>
        <Spawned_Squadron_Delay_Seconds>7</Spawned_Squadron_Delay_Seconds>
        <Reserve_Spawned_Units_Tech_2>Rebel_X-Wing_Squadron, 1</Reserve_Spawned_Units_Tech_2>
        <Reserve_Spawned_Units_Tech_2>Y-Wing_Squadron, 2</Reserve_Spawned_Units_Tech_2>

        <Starting_Spawned_Units_Tech_3>Rebel_X-Wing_Squadron, 1</Starting_Spawned_Units_Tech_3>
        <Starting_Spawned_Units_Tech_3>A_Wing_Squadron, 1</Starting_Spawned_Units_Tech_3>
        <Starting_Spawned_Units_Tech_3>Y-Wing_Squadron, 1</Starting_Spawned_Units_Tech_3>
        <Spawned_Squadron_Delay_Seconds>7</Spawned_Squadron_Delay_Seconds>
        <Reserve_Spawned_Units_Tech_3>Rebel_X-Wing_Squadron, 1</Reserve_Spawned_Units_Tech_3>
        <Reserve_Spawned_Units_Tech_3>Y-Wing_Squadron, 2</Reserve_Spawned_Units_Tech_3>

<HardPoints>
HP_MC80A_MC_MTL_11,
HP_MC80A_MC_MTL_10,
HP_MC80A_MC_MTL_09,
HP_MC80A_MC_MTL_08,
HP_MC80A_MC_MTL_07,
HP_MC80A_MC_MTL_06,
HP_MC80A_MC_MTL_05,
HP_MC80A_MC_MTL_04,
HP_MC80A_MC_MTL_03,
HP_MC80A_MC_MTL_02,
HP_MC80A_MC_MTL_01,
HP_MC80A_MCHDTLT_09,
HP_MC80A_MCHDTLT_08,
HP_MC80A_MCHDTLT_07,
HP_MC80A_MCHDTLT_06,
HP_MC80A_MCHDTLT_05,
HP_MC80A_MCHDTLT_04,
HP_MC80A_MCHDTLT_03,
HP_MC80A_MCHDTLT_02,
HP_MC80A_MCHDTLT_01,
HP_MC80A_HTLB_14,
HP_MC80A_HTLB_13,
HP_MC80A_HTLB_12,
HP_MC80A_HTLB_11,
HP_MC80A_HTLB_10,
HP_MC80A_HTLB_09,
HP_MC80A_HTLB_08,
HP_MC80A_HTLB_07,
HP_MC80A_HTLB_06,
HP_MC80A_HTLB_05,
HP_MC80A_HTLB_04,
HP_MC80A_HTLB_03,
HP_MC80A_HTLB_02,
HP_MC80A_HTLB_01,
HP_MC80A_HICB_06,
HP_MC80A_HICB_05,
HP_MC80A_HICB_04,
HP_MC80A_HICB_03,
HP_MC80A_HICB_02,
HP_MC80A_HICB_01,
HP_MC80A_Bridge,
HP_MC80A_Hangar,
HP_MC80A_Engines
</HardPoints>

<Icon_Name>i_button_mon_calimari_cruiser_wingless.tga</Icon_Name>
<GUI_Model_Name>RV_MC80a_Wingless.ALO</GUI_Model_Name>
<GUI_Distance>1650</GUI_Distance>
<GUI_Offset>0 0 0</GUI_Offset>
<GUI_Velocity>45</GUI_Velocity>
<Victory_Relevant>yes</Victory_Relevant>
<Has_Space_Evaluator>True</Has_Space_Evaluator>

<SFXEvent_Build_Started>RHD_Build_Vehicle</SFXEvent_Build_Started>
<SFXEvent_Build_Cancelled>RHD_Unit_Canceled</SFXEvent_Build_Cancelled>
<SFXEvent_Build_Complete>Unit_Complete_Calamari</SFXEvent_Build_Complete>
<SFXEvent_Ambient_Loop>Unit_Calamari_Moving_Engine_Loop</SFXEvent_Ambient_Loop>

<SFXEvent_Select>Unit_Select_Calamari</SFXEvent_Select>
<SFXEvent_Move>Unit_Move_Calamari</SFXEvent_Move>
<SFXEvent_Fleet_Move>Unit_Fleet_Move_Calamari</SFXEvent_Fleet_Move>
<SFXEvent_Attack>Unit_Attack_Calamari</SFXEvent_Attack>
<SFXEvent_Guard>Unit_Guard_Calamari</SFXEvent_Guard>
<SFXEvent_Stop>Unit_Stop_Calamari</SFXEvent_Stop>
<SFXEvent_Barrage>Unit_Barrage_Calamari</SFXEvent_Barrage>
<SFXEvent_Move_Into_Asteroid_Field> Unit_Asteroids_Calamari </SFXEvent_Move_Into_Asteroid_Field>
<SFXEvent_Move_Into_Nebula> Unit_Nebula_Calamari </SFXEvent_Move_Into_Nebula>
<SFXEvent_Damaged_By_Asteroid> SFX_Asteroid_Detonation </SFXEvent_Damaged_By_Asteroid>
<SFXEvent_Bombard_Select_Target> RHD_Bombard_Select_Target </SFXEvent_Bombard_Select_Target>
<SFXEvent_Bombard_Incoming> RHD_Bombard_Incoming  </SFXEvent_Bombard_Incoming>


<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_LASER, Unit_HP_LASER_Calamari </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_MISSILE, Unit_HP_MISSILE_Calamari </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_TORPEDO, Unit_HP_TORP_Calamari </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_ION_CANNON, Unit_HP_ION_Calamari </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_SHIELD_GENERATOR, Unit_HP_SHIELDS_Calamari </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_ENGINE, Unit_HP_ENGINES_Calamari </SFXEvent_Attack_Hardpoint>

<SFXEvent_Hardpoint_Destroyed> HARD_POINT_WEAPON_LASER, Unit_Lost_Laser_Calamari </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, Unit_Lost_Ion_Calamari </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_SHIELD_GENERATOR, Unit_Lost_Shields_Calamari </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_ENGINE, Unit_Lost_Engines_Calamari </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>

<Space_Full_Stop_Command> Yes </Space_Full_Stop_Command>
       
<Is_Visible_On_Radar>Yes</Is_Visible_On_Radar>
<Radar_Icon_Scale_Land>1.0</Radar_Icon_Scale_Land>
<Radar_Icon_Scale_Space>1.0</Radar_Icon_Scale_Space>
<Radar_Icon_Name>i_radar_capital_ship.tga</Radar_Icon_Name>

<Guard_Chase_Range>1000.0</Guard_Chase_Range>
<Idle_Chase_Range>0.0</Idle_Chase_Range>
<Attack_Move_Response_Range>400.0</Attack_Move_Response_Range>
<Targeting_Stickiness_Time_Threshold>5.0</Targeting_Stickiness_Time_Threshold>
<Targeting_Priority_Set>Capital</Targeting_Priority_Set>

<Tactical_Bribe_Cost>3000</Tactical_Bribe_Cost>

<!-- Non-Hero unit abilities description -->
<Unit_Abilities_Data SubObjectList="Yes">
<!-- Primary ability -->
<Unit_Ability>
<Type>DEFEND</Type>
<Mod_Multiplier>WEAPON_DELAY_MULTIPLIER, 1.0f</Mod_Multiplier>
<Mod_Multiplier>SHIELD_REGEN_MULTIPLIER, 1.0f</Mod_Multiplier>
<Mod_Multiplier>SHIELD_REGEN_INTERVAL_MULTIPLIER, 0.10f</Mod_Multiplier> <!-- make it faster to recharge -->
<Mod_Multiplier>ENERGY_REGEN_INTERVAL_MULTIPLIER, 0.10f</Mod_Multiplier> <!-- make it faster to recharge -->
<Mod_Multiplier>ENERGY_REGEN_MULTIPLIER, 3.0f</Mod_Multiplier>
<Mod_Multiplier>SPEED_MULTIPLIER, 0.8f</Mod_Multiplier>
<Recharge_Seconds>40</Recharge_Seconds>
<Expiration_Seconds>15</Expiration_Seconds>

<SFXEvent_GUI_Unit_Ability_Activated>Unit_Defend_Calamari</SFXEvent_GUI_Unit_Ability_Activated>
<Supports_Autofire>True</Supports_Autofire>
</Unit_Ability>

</Unit_Abilities_Data>
       
<Encyclopedia_Text> TEXT_TOOLTIP_MON_CALAMARI_CRUISER_WINGLESS </Encyclopedia_Text>
<Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_CAPITAL </Encyclopedia_Unit_Class>
<Score_Cost_Credits> 42500 </Score_Cost_Credits>

<!--<MULTIPLAYER SKIRMISH VALUES BEGIN>-->
<Tactical_Build_Cost_Multiplayer>4500</Tactical_Build_Cost_Multiplayer>
<Tactical_Build_Time_Seconds>30</Tactical_Build_Time_Seconds>
<Tactical_Build_Prerequisites />
<Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue>
<!--<Build_Limit_Current_Per_Player>0</Build_Limit_Current_Per_Player>-->
<!--<Build_Limit_Lifetime_Per_Player>0</Build_Limit_Lifetime_Per_Player>--> 
<!--<MULTIPLAYER SKIRMISH VALUES END>-->
<Population_Value>4</Population_Value>
<Lua_Script>ObjectScript_PowerToShields</Lua_Script>
</SpaceUnit>

Offline Sergeant Barlex

  • Regular Member
  • Foreigner
  • *
  • Posts: 1
Re: Cannot properly select space unit (NOT UNIT SELECTION FREEZE)
« Reply #1 on: March 11, 2017, 12:15:00 am »
I personally don't see any issue, granted I quickly skimmed through that.

Only thing I could see as an issue, is a lack of a collision mesh. Are you sure there is one?

Offline Bucman55

  • Regular Member
  • Ensign
  • *
  • Posts: 21
Re: Cannot properly select space unit (NOT UNIT SELECTION FREEZE)
« Reply #2 on: March 11, 2017, 12:23:41 am »
The issue has been resolved. As you suspected Barlex, It was a collision mesh issue.

Offline Kad_Venku

  • Administrator
  • Senior Lt.
  • ******
  • Posts: 85
Re: Cannot properly select space unit (NOT UNIT SELECTION FREEZE)
« Reply #3 on: March 12, 2017, 02:32:44 pm »
Moderation action: Topic locked
Reason: The issue has been resolved.
« Last Edit: March 14, 2017, 10:29:32 pm by Kad_Venku »