From 5997793f7694198c67e54f49ba4f7043019ea687 Mon Sep 17 00:00:00 2001 From: dnqbob Date: Sun, 7 May 2023 22:54:07 +0800 Subject: [PATCH] Add AI yaml for LoadCargoBotModule --- mods/ca/rules/ai.yaml | 90 +++++++++++++++++++------------------ mods/ca/rules/defaults.yaml | 6 +++ mods/ca/rules/scrin.yaml | 2 +- mods/ca/rules/vehicles.yaml | 21 +++++---- 4 files changed, 64 insertions(+), 55 deletions(-) diff --git a/mods/ca/rules/ai.yaml b/mods/ca/rules/ai.yaml index 7a04de8580..82f0391833 100644 --- a/mods/ca/rules/ai.yaml +++ b/mods/ca/rules/ai.yaml @@ -1961,22 +1961,18 @@ Player: bori: 15 yuri: 15 mast: 15 - apc.ai: 20 - sapc.ai: 10 - sapc.ai2: 10 - intl.ai: 10 - intl.ai2: 10 + apc: 20 + sapc: 10 + intl: 10 jeep: 30 - apc2.nodai: 20 - apc2.gdiai: 20 - rapc.ai: 20 - vulc.ai: 10 + apc2: 20 + rapc: 20 + vulc: 10 hmmv: 30 gdrn: 30 mdrn: 20 xo: 20 btr: 20 - btr.ai: 10 gunw: 20 shrw: 20 bggy: 30 @@ -1993,7 +1989,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2032,7 +2028,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -2088,17 +2084,15 @@ Player: mgg: 1 cdrn: 1 nhaw: 1 - apc.ai: 2 - apc2.nodai: 2 - apc2.gdiai: 2 - rapc.ai: 2 - vulc.ai: 5 - btr.ai: 5 + apc: 2 + apc2: 2 + rapc: 2 + vulc: 5 + btr: 5 + sapc: 1 hmmv: 2 bggy: 2 jeep: 2 - sapc.ai: 1 - sapc.ai2: 1 e6: 1 n6: 1 s6: 1 @@ -2231,21 +2225,17 @@ Player: bori: 15 yuri: 15 mast: 15 - apc.ai: 20 - sapc.ai: 10 - sapc.ai2: 10 - intl.ai: 10 - intl.ai2: 10 + apc: 20 + sapc: 10 + intl: 10 jeep: 30 - apc2.nodai: 20 - apc2.gdiai: 20 - vulc.ai: 10 + apc2: 20 + vulc: 10 hmmv: 30 gdrn: 30 mdrn: 20 xo: 20 btr: 20 - btr.ai: 10 gunw: 20 shrw: 20 bggy: 30 @@ -2262,7 +2252,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2301,7 +2291,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -2357,17 +2347,15 @@ Player: mgg: 1 cdrn: 1 nhaw: 1 - apc.ai: 2 - apc2.nodai: 2 - apc2.gdiai: 2 - rapc.ai: 2 - vulc.ai: 5 - btr.ai: 5 + apc: 2 + apc2: 2 + rapc: 2 + vulc: 5 + btr: 5 + sapc: 1 hmmv: 2 bggy: 2 jeep: 2 - sapc.ai: 1 - sapc.ai2: 1 e6: 1 n6: 1 s6: 1 @@ -2498,7 +2486,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2537,7 +2525,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -2731,7 +2719,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2770,7 +2758,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -2944,3 +2932,19 @@ Player: deva: 3 pac: 3 mshp: 1 + LoadCargoBotModule: + RequiresCondition: enable-brutal-ai || enable-vhard-ai || enable-hard-ai || enable-normal-ai || enable-easy-ai || enable-naval-ai + TransportTypesAndLoadRequirement: + apc: IdleUnit + sapc: IdleUnit + intl: IdleUnit + apc2: IdleUnit + apc2.reinforce: IdleUnit + rapc: IdleUnit + vulc: IdleUnit + btr: IdleUnit + ifv: All + batf: All + PassengerTypes: e1, e1r1, e2, e3, e3r1, e4, n1, n1r1, n2, n2r1, n3, n3r1, n4, n5, n5r1, n1c, n3c, s1, s2, s3, s4, feed, u3, rmbc, enli, mort, shok, e8, snip, bjet, acol, tplr, bh, ivan, rmbo, e7, seal, bori + ScanTick: 203 + ValidTransportOwner: AlliedBot diff --git a/mods/ca/rules/defaults.yaml b/mods/ca/rules/defaults.yaml index 7328588222..db7ebc4554 100644 --- a/mods/ca/rules/defaults.yaml +++ b/mods/ca/rules/defaults.yaml @@ -3766,6 +3766,12 @@ UnloadOnCondition@AIUNLOAD: RequiresCondition: damage || aiming +^AIEJECT: + GrantConditionOnDamageState@AIEJECT: + Condition: damage + UnloadOnCondition@AIEJECT: + RequiresCondition: damage + ^QueueUpdater: FreeActor@QUEUEUPDATER: Actor: QueueUpdaterDummy diff --git a/mods/ca/rules/scrin.yaml b/mods/ca/rules/scrin.yaml index 529b10c09e..40b3f7610f 100644 --- a/mods/ca/rules/scrin.yaml +++ b/mods/ca/rules/scrin.yaml @@ -1207,6 +1207,7 @@ INTL: Inherits@HOVERTRAIL: ^HoverTrail Inherits@TANKBUSTERVULN: ^TankBusterVulnerability Inherits@SCRINVEHICLEVOICE: ^ScrinVehicleVoice + Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: PlayerPalette: playerscrin Valued: @@ -1300,7 +1301,6 @@ INTL.AI: INTL.AI2: Inherits: INTL.AI - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: INTL Buildable: diff --git a/mods/ca/rules/vehicles.yaml b/mods/ca/rules/vehicles.yaml index 22e7ad1f3d..2e01a3a2de 100644 --- a/mods/ca/rules/vehicles.yaml +++ b/mods/ca/rules/vehicles.yaml @@ -1321,6 +1321,7 @@ SAPC: Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove Inherits@BERSERK: ^Berserk Inherits@TRANSPORT: ^Transport + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 255 @@ -1401,7 +1402,6 @@ SAPC: SAPC.AI: Inherits: SAPC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: sapc Buildable: @@ -1411,7 +1411,6 @@ SAPC.AI: SAPC.AI2: Inherits: SAPC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: sapc Buildable: @@ -1690,6 +1689,7 @@ APC: Inherits@BERSERK: ^Berserk Inherits@TRANSPORT: ^Transport Inherits@SLOWCRUSH: ^SlowedByCrushing + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 50 @@ -1783,7 +1783,6 @@ RAPC: APC.AI: Inherits: APC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: APC Buildable: @@ -1795,7 +1794,6 @@ APC.AI: RAPC.AI: Inherits: RAPC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: RAPC Buildable: @@ -2784,6 +2782,7 @@ APC2: Inherits@BERSERK: ^Berserk Inherits@TRANSPORT: ^Transport Inherits@SLOWCRUSH: ^SlowedByCrushing + Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: FactionImages: nod: apc2.nod @@ -2857,7 +2856,6 @@ APC2: APC2.NODAI: Inherits: APC2 - Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Prerequisites: ~botplayer, ~vehicles.nod, ~!vulcan.upgrade, ~vehicles.apc2, ~techlevel.low RenderSprites: @@ -2869,7 +2867,6 @@ APC2.NODAI: APC2.GDIAI: Inherits: APC2 - Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Prerequisites: ~botplayer, ~vehicles.gdi, ~!vulcan.upgrade, ~vehicles.apc2, ~techlevel.low RenderSprites: @@ -2881,7 +2878,6 @@ APC2.GDIAI: APC2.Reinforce: Inherits: APC2 - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: APC2 -Buildable: @@ -2901,6 +2897,7 @@ VULC: Inherits@TRANSPORT: ^Transport Inherits@SLOWCRUSH: ^SlowedByCrushing Inherits@A2GPROTECTION: ^AirToGroundProtection + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 52 @@ -3020,7 +3017,6 @@ VULC: VULC.AI: Inherits: VULC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: VULC Buildable: @@ -3030,7 +3026,6 @@ VULC.AI: VULC.Reinforce: Inherits: VULC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: vulc -Buildable: @@ -4285,6 +4280,7 @@ BTR: Inherits@TRANSPORT: ^Transport Inherits@SLOWCRUSH: ^SlowedByCrushing Inherits@A2GPROTECTION: ^AirToGroundProtection + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 21 @@ -4348,7 +4344,6 @@ BTR: BTR.AI: Inherits: BTR - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: BTR Buildable: @@ -4364,6 +4359,7 @@ IFV: Inherits@SLOWCRUSH: ^SlowedByCrushing Inherits@COMMANDOSKULL: ^CommandoSkull Inherits@A2GPROTECTION: ^AirToGroundProtection + Inherits@AIEJECT: ^AIEJECT Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 120 @@ -6046,6 +6042,7 @@ BATF: Inherits@SHRAPNEL: ^ThrowsShrapnel Inherits@COMMANDOSKULL: ^CommandoSkull Inherits@TANKBUSTERVULN: ^TankBusterVulnerability + Inherits@AIEJECT: ^AIEJECT Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 340 @@ -6196,7 +6193,9 @@ BATF: Palette: effect Position: TopLeft ValidRelationships: Ally, Enemy, Neutral - -Targetable@HERO: + -Targetable@HERO: + GrantConditionOnDamageState@AIEJECT: + ValidDamageStates: Critical BATF.AI: Inherits: BATF