Jump to content


Shaon1992

Member Since 20 Apr 2021
Offline Last Active Apr 26 2021 11:44 AM

Topics I've Started

AI not obeying restriction

20 April 2021 - 04:28 PM

Hi,

I am a small time modder for personal amusement. Recently I tried to add the Mandator Dreadnought for rebel to balance them out with empire's Executor. I used the models from Empire at War Revised, In the xml code I clearly defined that build limit for current player is 1 and lifetime limit is -1 with requiring 4 tech level and level 5 star base. However AI builds the ship at even starbase level 2 and even worse they build and take into battle even 6 of them simultaneously. Can anybody kindly see the xml and advise me what's going wrong here. 

 

The xml

 

<SpaceUnit Name="Mandator_II_Class_SSD">
<Text_ID>TEXT_UNIT_SSD_MANDATOR_II</Text_ID>
<Encyclopedia_Good_Against> Calamari_Cruiser Star_Destroyer Krayt_Class_Destroyer </Encyclopedia_Good_Against>
<Encyclopedia_Vulnerable_To> TIE_Defender B-Wing Skipray_Blastboat </Encyclopedia_Vulnerable_To>
<GUI_Row> 1 </GUI_Row>
<Space_Model_Name>REP_MandatorMKII.ALO</Space_Model_Name>
 
        <Custom_Hard_XExtent> 100.0 </Custom_Hard_XExtent>
        <Custom_Hard_YExtent> 100.0 </Custom_Hard_YExtent>
<Ranking_In_Category>5</Ranking_In_Category>
 
<GUI_Bracket_Size>2</GUI_Bracket_Size>
 
<Select_Box_Scale>800</Select_Box_Scale>
<Select_Box_Z_Adjust>-50</Select_Box_Z_Adjust>
 
<Scale_Factor>2.0</Scale_Factor>
<Mass>0.999</Mass>
<Dense_FOW_Reveal_Range_Multiplier>0.24</Dense_FOW_Reveal_Range_Multiplier>
<Multisample_FOW_Check>Yes</Multisample_FOW_Check>
 
<Visible_On_Radar_When_Fogged>true</Visible_On_Radar_When_Fogged>
<Armor_Type> Armor_SSD </Armor_Type>
<Shield_Armor_Type> Shield_SSD </Shield_Armor_Type>
 
<Max_Speed>0.9</Max_Speed>
<Max_Rate_Of_Turn>0.1</Max_Rate_Of_Turn>
<MovementClass> Space </MovementClass>
<Space_Layer> SuperCapital </Space_Layer>
<Layer_Z_Adjust>-500.0</Layer_Z_Adjust>
<Max_Rate_Of_Roll>0.1</Max_Rate_Of_Roll>
<Bank_Turn_Angle>3</Bank_Turn_Angle>
<OverrideAcceleration> .02 </OverrideAcceleration>
<OverrideDeceleration> .02 </OverrideDeceleration>
 
<Max_Thrust>0.1</Max_Thrust>
<Hyperspace>Yes</Hyperspace>
<Hyperspace_Speed>1</Hyperspace_Speed>
<Maintenance_Cost>0.3</Maintenance_Cost>
 
<Affiliation>Rebel</Affiliation>
<Build_Cost_Credits>13000</Build_Cost_Credits>
<Build_Time_Seconds>180</Build_Time_Seconds>
<Required_Timeline>0</Required_Timeline>
<Required_Ground_Base_Level>0</Required_Ground_Base_Level>
<Required_Star_Base_Level>5</Required_Star_Base_Level>
<Build_Limit_Current_Per_Player>1</Build_Limit_Current_Per_Player>
<Build_Limit_Lifetime_Per_Player>-1</Build_Limit_Lifetime_Per_Player>
<!--Required_Planets>MonCalimari, Kuat, Fondor, Sullust, Hypori, Mandalore</Required_Planets-->
 
<Build_Tab_Space_Units>Yes</Build_Tab_Space_Units>
<Tech_Level>4</Tech_Level>
 
<Starting_Spawned_Units_Tech_0>Z95_Headhunter_Rebel_Squadron, 3</Starting_Spawned_Units_Tech_0>
<Starting_Spawned_Units_Tech_0>Rebel_X-Wing_Squadron, 4</Starting_Spawned_Units_Tech_0>
<Starting_Spawned_Units_Tech_0>Y-Wing_Squadron, 3</Starting_Spawned_Units_Tech_0>
 
<Spawned_Squadron_Delay_Seconds>5</Spawned_Squadron_Delay_Seconds>
<Reserve_Spawned_Units_Tech_0>Z95_Headhunter_Rebel_Squadron, 6</Reserve_Spawned_Units_Tech_0> 
<Reserve_Spawned_Units_Tech_0>Rebel_X-Wing_Squadron, 8</Reserve_Spawned_Units_Tech_0> 
<Reserve_Spawned_Units_Tech_0>Y-Wing_Squadron, 6</Reserve_Spawned_Units_Tech_0>
 
<SFXEvent_Build_Started>RHD_Build_Vehicle</SFXEvent_Build_Started>
<SFXEvent_Build_Cancelled>RHD_Unit_Canceled</SFXEvent_Build_Cancelled>
<SFXEvent_Build_Complete>Unit_Complete_Star_Destroyer</SFXEvent_Build_Complete>
<SFXEvent_Tactical_Build_Started> RHD_Reinforcements_En_Route </SFXEvent_Tactical_Build_Started>
<SFXEvent_Tactical_Build_Complete> RHD_Reinforcements_Available </SFXEvent_Tactical_Build_Complete>
<SFXEvent_Tactical_Build_Cancelled> RHD_Reinforcements_Cancelled  </SFXEvent_Tactical_Build_Cancelled>
 
<Damage>70</Damage>
<Autoresolve_Health>14500</Autoresolve_Health>
<Shield_Points>7000</Shield_Points>
<Tactical_Health>7500</Tactical_Health>
<Shield_Refresh_Rate>150</Shield_Refresh_Rate>
<Energy_Capacity>99000</Energy_Capacity>
<Energy_Refresh_Rate>1000</Energy_Refresh_Rate>
<Ship_Class>super</Ship_Class>
<Surface_Bombardment_Capable>yes</Surface_Bombardment_Capable>
<Squadron_Capacity>40</Squadron_Capacity>
 
<Piracy_Value_Credits>15000</Piracy_Value_Credits>
<AI_Combat_Power>25000</AI_Combat_Power>
 
<Size_Value>8</Size_Value>
 
<Behavior> SELECTABLE, DUMMY_STARSHIP </Behavior>
<SpaceBehavior>ABILITY_COUNTDOWN, SIMPLE_SPACE_LOCOMOTOR, POWERED, SHIELDED, HIDE_WHEN_FOGGED, REVEAL, TARGETING, UNIT_AI, ASTEROID_FIELD_DAMAGE, SPAWN_SQUADRON, DAMAGE_TRACKING, NEBULA </SpaceBehavior>
 
<Death_Clone>Damage_Normal, Mandator_II_Death_Clone</Death_Clone>
<Collidable_By_Projectile_Living>Yes</Collidable_By_Projectile_Living>
<Death_Explosions>Friggin_Huge_Explosion_Space_Empire</Death_Explosions>
<Asteroid_Damage_Hit_Particles>Large_Damage_Space</Asteroid_Damage_Hit_Particles>
 
<Space_FOW_Reveal_Range>3000.0</Space_FOW_Reveal_Range>   <!--from 6000-->
<Targeting_Max_Attack_Distance>2200.0</Targeting_Max_Attack_Distance>
 
<HardPoints>
HP_Mandator_II_MISL,
HP_Mandator_II_MISR,
HP_Mandator_II_TorpFL,
HP_Mandator_II_TorpFR,
HP_Mandator_II_Weapon_TFL,
HP_Mandator_II_Weapon_TFR,
HP_Mandator_II_Weapon_IonFL,
HP_Mandator_II_Weapon_IonFR,
HP_Mandator_II_Weapon_THML,
HP_Mandator_II_Weapon_THMR,
HP_Mandator_II_Weapon_IonML,
HP_Mandator_II_Weapon_IonMR,
HP_Mandator_II_Weapon_THBL,
HP_Mandator_II_Weapon_THBR,
HP_Mandator_II_Weapon_TBM,
HP_Mandator_II_Shield_Generator,
HP_Mandator_II_Engines,
HP_Mandator_II_Fighter_Bay
</HardPoints>
 
<SFXEvent_Select>Unit_Select_Star_Destroyer</SFXEvent_Select>
<SFXEvent_Move>Unit_Move_Star_Destroyer</SFXEvent_Move>
<SFXEvent_Fleet_Move>Unit_Fleet_Move_Star_Destroyer</SFXEvent_Fleet_Move>
<SFXEvent_Attack>Unit_Attack_Star_Destroyer</SFXEvent_Attack>
<SFXEvent_Guard>Unit_Guard_Star_Destroyer</SFXEvent_Guard>
<SFXEvent_Move_Opposite>Unit_Move_Opposite_Star_Destroyer</SFXEvent_Move_Opposite>
<SFXEvent_Barrage>Unit_Barrage_Star_Destroyer</SFXEvent_Barrage>
<SFXEvent_Stop>Unit_Stop_Star_Destroyer</SFXEvent_Stop>
<SFXEvent_Move_Into_Asteroid_Field> Unit_Asteroids_Star_Destroyer </SFXEvent_Move_Into_Asteroid_Field>
<SFXEvent_Move_Into_Nebula> Unit_Nebula_Star_Destroyer </SFXEvent_Move_Into_Nebula>
<SFXEvent_Damaged_By_Asteroid> SFX_Asteroid_Detonation </SFXEvent_Damaged_By_Asteroid>
<SFXEvent_Bombard_Select_Target> EHD_Bombard_Select_Target </SFXEvent_Bombard_Select_Target>
<SFXEvent_Bombard_Incoming> EHD_Bombard_Incoming  </SFXEvent_Bombard_Incoming>
 
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_LASER, Unit_HP_LASER_Star_Destroyer </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_MISSILE, Unit_HP_MISSILE_Star_Destroyer </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_TORPEDO, Unit_HP_TORP_Star_Destroyer </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_ION_CANNON, Unit_HP_ION_Star_Destroyer </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_SHIELD_GENERATOR, Unit_HP_SHIELDS_Star_Destroyer </SFXEvent_Attack_Hardpoint>
<SFXEvent_Attack_Hardpoint> HARD_POINT_ENGINE, Unit_HP_ENGINES_Star_Destroyer </SFXEvent_Attack_Hardpoint>
 
<SFXEvent_Ambient_Loop>Unit_Star_Destroyer_Idle_Engine_Loop</SFXEvent_Ambient_Loop>
 
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_WEAPON_LASER, Unit_Lost_Laser_Star_Destroyer </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_Star_Destroyer </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_SHIELD_GENERATOR, Unit_Lost_Shields_Star_Destroyer </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_ENGINE, Unit_Lost_Engines_Star_Destroyer </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_GRAVITY_WELL, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_FIGHTER_BAY, Unit_Lost_Bay_Star_Destroyer </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_TRACTOR_BEAM, </SFXEvent_Hardpoint_Destroyed>
<SFXEvent_Hardpoint_Destroyed> HARD_POINT_ENABLE_SPECIAL_ABILITY, </SFXEvent_Hardpoint_Destroyed>
 
<Death_SFXEvent_Start_Die>SFX_Death_Bombard</Death_SFXEvent_Start_Die>
<SFXEvent_Engine_Idle_Loop> Unit_Star_Destroyer_Idle_Engine_Loop </SFXEvent_Engine_Idle_Loop>
<SFXEvent_Engine_Moving_Loop> Unit_Star_Destroyer_Moving_Engine_Loop </SFXEvent_Engine_Moving_Loop>
<SFXEvent_Engine_Cinematic_Focus_Loop> Unit_Star_Destroyer_Cinematic_Engine_Loop </SFXEvent_Engine_Cinematic_Focus_Loop>
 
<CategoryMask> Capital | AntiFrigate </CategoryMask>
<Icon_Name>I_BUTTON_MANDATOR.TGA</Icon_Name>
<Victory_Relevant>yes</Victory_Relevant>
<Space_Full_Stop_Command> Yes </Space_Full_Stop_Command>
<Has_Space_Evaluator>True</Has_Space_Evaluator>
 
<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>
 
<Is_Visible_On_Radar>Yes</Is_Visible_On_Radar>
<Radar_Icon_Name>i_radar_Executor.tga</Radar_Icon_Name>
<Radar_Icon_Scale_Land>1.0</Radar_Icon_Scale_Land>
<Radar_Icon_Scale_Space>0.8</Radar_Icon_Scale_Space>
<Radar_Icon_Size>0.3  0.3</Radar_Icon_Size>
 
<Tactical_Bribe_Cost>10000</Tactical_Bribe_Cost>
<Encyclopedia_Text> TEXT_TOOLTIP_MANDATOR_II TEXT_TOOLTIP_REQUIRED_PLANETS_CAPITAL_SHIPS </Encyclopedia_Text>
<Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_SSD </Encyclopedia_Unit_Class>
<Score_Cost_Credits> 100000</Score_Cost_Credits>
<Population_Value>9</Population_Value>
 
<Unit_Abilities_Data SubObjectList="Yes">
<!-- Primary ability -->
<Unit_Ability>
<Type>DEFEND</Type>
<Expiration_Seconds>25</Expiration_Seconds>
<Recharge_Seconds>60</Recharge_Seconds>
<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>
 
<SFXEvent_GUI_Unit_Ability_Activated>Unit_Defend_Assault_Frigate</SFXEvent_GUI_Unit_Ability_Activated>
</Unit_Ability>
 
</Unit_Abilities_Data>
 
<!--<MULTIPLAYER SKIRMISH VALUES BEGIN>-->
<Tactical_Build_Cost_Multiplayer>13000</Tactical_Build_Cost_Multiplayer>
<Tactical_Build_Time_Seconds>90</Tactical_Build_Time_Seconds>
<Tactical_Build_Prerequisites />
<Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue>
<Build_Limit_Current_Per_Player>1</Build_Limit_Current_Per_Player>
<Build_Limit_Lifetime_Per_Player>3</Build_Limit_Lifetime_Per_Player>  
<!--<MULTIPLAYER SKIRMISH VALUES END>-->
 
</SpaceUnit>
 
<SpaceUnit Name="Mandator_II_Death_Clone">
<Text_ID>TEXT_UNIT_SSD_MANDATOR_II</Text_ID>
<Space_Model_Name>REP_MandatorMKII_D.ALO</Space_Model_Name>
<Death_SFXEvent_Start_Die>SFX_Death_Bombard</Death_SFXEvent_Start_Die>
<Scale_Factor>2.0</Scale_Factor>
<Layer_Z_Adjust>-330.0</Layer_Z_Adjust>
<Max_Speed>0.1</Max_Speed>
<Max_Rate_Of_Turn>0.1</Max_Rate_Of_Turn>
<Max_Thrust>0.1</Max_Thrust>
<Max_Rate_Of_Roll>0.1</Max_Rate_Of_Roll>
<Bank_Turn_Angle>5</Bank_Turn_Angle>
<Affiliation>Neutral</Affiliation>
<Ship_Class>super</Ship_Class>
<Remove_Upon_Death>true</Remove_Upon_Death>
</SpaceUnit>