From b7c06c9504f9a49fe6dd3a1dd862bdd0cb23375a 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 | 96 +++++++++++++++++++------------------ mods/ca/rules/defaults.yaml | 6 +++ mods/ca/rules/scrin.yaml | 2 +- mods/ca/rules/vehicles.yaml | 19 ++++---- 4 files changed, 65 insertions(+), 58 deletions(-) diff --git a/mods/ca/rules/ai.yaml b/mods/ca/rules/ai.yaml index a3bc5bdf97..c55b56b9d0 100644 --- a/mods/ca/rules/ai.yaml +++ b/mods/ca/rules/ai.yaml @@ -1972,24 +1972,19 @@ 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 btr.yuri: 20 - btr.yuri.ai: 10 gunw: 20 shrw: 20 bggy: 30 @@ -2006,7 +2001,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2047,7 +2042,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -2107,18 +2102,16 @@ Player: mrj: 1 cdrn: 1 nhaw: 1 - apc.ai: 2 - apc2.nodai: 2 - apc2.gdiai: 2 - rapc.ai: 2 - vulc.ai: 5 - btr.ai: 5 - btr.yuri.ai: 5 + apc: 2 + apc2: 2 + rapc: 2 + vulc: 5 + btr: 5 + btr.yuri: 5 + sapc: 1 hmmv: 2 bggy: 2 jeep: 2 - sapc.ai: 1 - sapc.ai2: 1 e6: 1 n6: 1 s6: 1 @@ -2253,23 +2246,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 - vulc.ai: 10 + apc2: 20 + vulc: 10 hmmv: 30 gdrn: 30 mdrn: 20 xo: 20 btr: 20 - btr.ai: 10 btr.yuri: 20 - btr.yuri.ai: 10 gunw: 20 shrw: 20 bggy: 30 @@ -2286,7 +2274,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2327,7 +2315,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -2387,18 +2375,16 @@ Player: mrj: 1 cdrn: 1 nhaw: 1 - apc.ai: 2 - apc2.nodai: 2 - apc2.gdiai: 2 - rapc.ai: 2 - vulc.ai: 5 - btr.ai: 5 - btr.yuri.ai: 5 + apc: 2 + apc2: 2 + rapc: 2 + vulc: 5 + btr: 5 + btr.yuri: 5 + sapc: 1 hmmv: 2 bggy: 2 jeep: 2 - sapc.ai: 1 - sapc.ai2: 1 e6: 1 n6: 1 s6: 1 @@ -2534,7 +2520,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2575,7 +2561,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -2778,7 +2764,7 @@ Player: ruin: 20 atmz: 20 1tnk: 70 - ifv.ai: 70 + ifv: 70 2tnk: 45 gtnk.squad: 20 tnkd: 45 @@ -2819,7 +2805,7 @@ Player: nhaw: 3 ctnk: 3 chpr: 3 - batf.ai: 10 + batf: 10 wtnk: 3 ttnk: 25 ttra: 25 @@ -3002,3 +2988,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 990ef23b49..9ed1b8f4fd 100644 --- a/mods/ca/rules/defaults.yaml +++ b/mods/ca/rules/defaults.yaml @@ -3971,6 +3971,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 9a5c856157..cfe4d92e8d 100644 --- a/mods/ca/rules/scrin.yaml +++ b/mods/ca/rules/scrin.yaml @@ -1200,6 +1200,7 @@ INTL: Inherits@HOVERTRAIL: ^HoverTrail Inherits@TANKBUSTERVULN: ^TankBusterVulnerability Inherits@SCRINVEHICLEVOICE: ^ScrinVehicleVoice + Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: PlayerPalette: playerscrin Valued: @@ -1291,7 +1292,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 169c0aaeb0..c38edc5d2e 100644 --- a/mods/ca/rules/vehicles.yaml +++ b/mods/ca/rules/vehicles.yaml @@ -1470,6 +1470,7 @@ SAPC: Inherits@BERSERK: ^Berserk Inherits@TRANSPORT: ^Transport Inherits@NOUNLOADCHRONO: ^NoUnloadWhenChronoshifted + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 255 @@ -1548,7 +1549,6 @@ SAPC: SAPC.AI: Inherits: SAPC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: sapc Buildable: @@ -1558,7 +1558,6 @@ SAPC.AI: SAPC.AI2: Inherits: SAPC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: sapc Buildable: @@ -1879,6 +1878,7 @@ APC: Inherits@TRANSPORT: ^Transport Inherits@NOUNLOADCHRONO: ^NoUnloadWhenChronoshifted Inherits@SLOWCRUSH: ^SlowedByCrushing + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 50 @@ -1970,7 +1970,6 @@ RAPC: APC.AI: Inherits: APC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: APC Buildable: @@ -1982,7 +1981,6 @@ APC.AI: RAPC.AI: Inherits: RAPC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: RAPC Buildable: @@ -3151,6 +3149,7 @@ APC2: Inherits@TRANSPORT: ^Transport Inherits@NOUNLOADCHRONO: ^NoUnloadWhenChronoshifted Inherits@SLOWCRUSH: ^SlowedByCrushing + Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: FactionImages: nod: apc2.nod @@ -3222,7 +3221,6 @@ APC2: APC2.NODAI: Inherits: APC2 - Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Prerequisites: ~botplayer, ~vehicles.nod, ~!vulcan.upgrade, ~vehicles.apc2, ~techlevel.low RenderSprites: @@ -3234,7 +3232,6 @@ APC2.NODAI: APC2.GDIAI: Inherits: APC2 - Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Prerequisites: ~botplayer, ~vehicles.gdi, ~!vulcan.upgrade, ~vehicles.apc2, ~techlevel.low RenderSprites: @@ -3246,7 +3243,6 @@ APC2.GDIAI: APC2.Reinforce: Inherits: APC2 - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: APC2 -Buildable: @@ -3267,6 +3263,7 @@ VULC: Inherits@NOUNLOADCHRONO: ^NoUnloadWhenChronoshifted Inherits@SLOWCRUSH: ^SlowedByCrushing Inherits@A2GPROTECTION: ^AirToGroundProtection + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 52 @@ -3407,7 +3404,6 @@ VULC: VULC.AI: Inherits: VULC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: VULC Buildable: @@ -3417,7 +3413,6 @@ VULC.AI: VULC.Reinforce: Inherits: VULC - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: vulc -Buildable: @@ -4701,6 +4696,7 @@ BTR: Inherits@NOUNLOADCHRONO: ^NoUnloadWhenChronoshifted Inherits@SLOWCRUSH: ^SlowedByCrushing Inherits@A2GPROTECTION: ^AirToGroundProtection + Inherits@AIUNLOAD: ^AIUNLOAD Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 21 @@ -4768,7 +4764,6 @@ BTR: BTR.AI: Inherits: BTR - Inherits@AIUNLOAD: ^AIUNLOAD RenderSprites: Image: BTR Buildable: @@ -4917,6 +4912,7 @@ IFV: Inherits@SLOWCRUSH: ^SlowedByCrushing Inherits@COMMANDOSKULL: ^CommandoSkull Inherits@A2GPROTECTION: ^AirToGroundProtection + Inherits@AIEJECT: ^AIEJECT Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 120 @@ -6820,6 +6816,7 @@ BATF: Inherits@SHRAPNEL: ^ThrowsShrapnel Inherits@COMMANDOSKULL: ^CommandoSkull Inherits@TANKBUSTERVULN: ^TankBusterVulnerability + Inherits@AIEJECT: ^AIEJECT Buildable: Queue: VehicleSQ, VehicleMQ BuildPaletteOrder: 340 @@ -6990,6 +6987,8 @@ BATF: Color: 00FF0080 Range: 4c512 RequiresCondition: loaded-medic + GrantConditionOnDamageState@AIEJECT: + ValidDamageStates: Critical BATF.AI: Inherits: BATF