Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development reaction rework to Main #2

Merged
merged 70 commits into from
Dec 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
0e62c1e
Too long to list
kbatbouta Nov 18, 2022
d7202f4
Fixed format issues
kbatbouta Nov 18, 2022
57aa04c
Replace Math.Max/Min with a more optimized implementation
kbatbouta Nov 18, 2022
5911330
Rewrote ITSignalGrid
kbatbouta Nov 18, 2022
e08277e
Recompiled
kbatbouta Nov 18, 2022
56a5691
Remove linq from reaction scanning
kbatbouta Nov 19, 2022
4086cd4
Potential fix for heatgrid.get
kbatbouta Nov 19, 2022
2aed4de
Visibility optimization
kbatbouta Nov 19, 2022
1b4e6c7
Updated the fog of war rendering model
kbatbouta Nov 19, 2022
c78a75b
More graphic changes
kbatbouta Nov 19, 2022
b0d3481
reworked faction relation and the sight tracker
kbatbouta Nov 19, 2022
ed125f5
Updated fog of war. Added settings and support for doors.
kbatbouta Nov 19, 2022
ccd0ebd
Patched the selector for when using fog of war
kbatbouta Nov 20, 2022
b80481d
Added throttling for different sightgrids.
kbatbouta Nov 20, 2022
6e4724d
Tweaked mech throttling
kbatbouta Nov 20, 2022
213635f
Added projectile Interceptors tracker
kbatbouta Nov 21, 2022
04bc2b9
Introduced shield checks for line of sight
kbatbouta Nov 21, 2022
17cf960
Fixed the empty corner bug in shadow casting
kbatbouta Nov 22, 2022
7b006cd
Reworked the reaction system
kbatbouta Nov 23, 2022
ec51fc0
Move back to a pulsing system for best pawn position
kbatbouta Nov 23, 2022
ea58872
Added CE automatic detection
kbatbouta Nov 24, 2022
9c836e7
Implemented los path fog fix
kbatbouta Nov 24, 2022
4bcb07b
Fixed a bug in the retreat system
kbatbouta Nov 24, 2022
b71b185
Fix for diablous
kbatbouta Nov 24, 2022
d029cfe
Changes to the sight drawer
kbatbouta Nov 24, 2022
85690f8
Merge branch 'development-fog-fix' into development-reaction-rework
kbatbouta Nov 24, 2022
7a27ec3
Recompiled for the fog fix
kbatbouta Nov 24, 2022
77a8ecf
Fixed a bug in the fog grid
kbatbouta Nov 24, 2022
9f3f070
Fixed an issue with sieges
kbatbouta Nov 24, 2022
3175dd8
Added support for CE turrets. CE support complete .
kbatbouta Nov 25, 2022
6c8d8b1
A lot of small improvements to the sight grid.
kbatbouta Nov 25, 2022
90ad04e
Fixed a mistake with the new siege fix
kbatbouta Nov 25, 2022
9260364
Added conditions to prevent aim jittering in CE
kbatbouta Nov 25, 2022
5fa4b34
switched to a simpler jitter reduction for CE
kbatbouta Nov 25, 2022
66c82eb
...
kbatbouta Nov 25, 2022
2d5e5ca
Tweaked reaction conditions to include bodysizes.
kbatbouta Nov 25, 2022
14f20c4
Fixed an interruption issue
kbatbouta Nov 25, 2022
ccf882a
..
kbatbouta Nov 25, 2022
1a2c55e
Fixed a reaction issue
kbatbouta Nov 26, 2022
632c4f1
Added Fog of war support for DubsMintMinimap
kbatbouta Nov 26, 2022
7354eac
Smoothed up reactions.
kbatbouta Nov 27, 2022
a5fcf7b
More improvements to reactions
kbatbouta Nov 27, 2022
9f0ad14
Reverted some of the new changes
kbatbouta Nov 27, 2022
d072bcf
Updated cover equations.
kbatbouta Nov 27, 2022
845363a
Updated the killbox killer to prevent digging when being attacked
kbatbouta Nov 27, 2022
1e06c44
Added another fail safe for digging jobs interuption.
kbatbouta Nov 27, 2022
035b0ee
Fixed a bug with the mining fix.
kbatbouta Nov 27, 2022
a348acf
Implemented retreat on taking damage.
kbatbouta Nov 28, 2022
e9d5534
Fixed a small npe
kbatbouta Nov 28, 2022
d072516
Small tweak to facing
kbatbouta Nov 28, 2022
97f2c15
small improvement
kbatbouta Nov 28, 2022
6fce8d8
small performance improvement
kbatbouta Nov 28, 2022
3fe424f
Added pathfinding armor awareness for vanilla.
kbatbouta Nov 29, 2022
c7c1d68
Added CE compatibility to the armor awareness system.
kbatbouta Nov 29, 2022
c697658
Fixed a bug with reacting to dormant turrets.
kbatbouta Nov 29, 2022
187b9b4
Fixed raiders reacting to children.
kbatbouta Nov 30, 2022
9b731f4
Reduced jittering in AI movement
kbatbouta Nov 30, 2022
132fb00
Remove an unused los check.
kbatbouta Nov 30, 2022
9c1a14b
Tweaked loading.
kbatbouta Nov 30, 2022
689d1e4
Reduced the number of callbacks between threads by alot.
kbatbouta Dec 1, 2022
d277e96
Fixed an issue with the armor threat model.
kbatbouta Dec 1, 2022
194fd46
Improvement to the armor threat mode (vanilla).
kbatbouta Dec 2, 2022
30b2718
Now armor threat scales with pain.
kbatbouta Dec 2, 2022
eb4f3ec
Created thread safe RoofGrid mirror.
kbatbouta Dec 4, 2022
ee273b3
A potential fix for player dormant mechs.
kbatbouta Dec 4, 2022
9bf5682
Fixed a bug where downed pawns will try react to new injuries.
kbatbouta Dec 4, 2022
367d5a2
Added some comments and did some refactoring.
kbatbouta Dec 4, 2022
7e7afaf
Refactoring and gitignore
kbatbouta Dec 4, 2022
0e269ef
.gitignore is now working
kbatbouta Dec 4, 2022
d2d7311
.gitignore is now working
kbatbouta Dec 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
432 changes: 432 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

Binary file modified 1.4/Assemblies/CombatAI.dll
Binary file not shown.
Binary file removed 1.4/Assemblies/CombatAI.pdb
Binary file not shown.
37 changes: 37 additions & 0 deletions 1.4/Defs/Stats/Stats_AI.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<!-- <StatDef>
<defName>CombatAI_AggroMul</defName>
<label>Aggressiveness multiplier</label>
<alwaysHide>true</alwaysHide>
<description>Aggressiveness multiplier.</description>
<category>PawnCombat</category>
<displayPriorityInCategory>50</displayPriorityInCategory>
<defaultBaseValue>1.0</defaultBaseValue>
<minValue>0.0</minValue>
<maxValue>3.0</maxValue>
<toStringStyle>Integer</toStringStyle>
<showOnAnimals>true</showOnAnimals>
<parts>
<li Class="StatPart_ApparelStatOffset">
<apparelStat>CombatAI_ApparelOffsetAggroMul</apparelStat>
<includeWeapon>true</includeWeapon>
</li>
</parts>
</StatDef>

<StatDef>
<defName>CombatAI_ApparelOffsetAggroMul</defName>
<label>Aggressiveness multiplier</label>
<alwaysHide>true</alwaysHide>
<description>Aggressiveness multiplier.</description>
<category>Apparel</category>
<displayPriorityInCategory>50</displayPriorityInCategory>
<defaultBaseValue>0.0</defaultBaseValue>
<minValue>-1.0</minValue>
<maxValue>1.0</maxValue>
<toStringStyle>Integer</toStringStyle>
</StatDef> -->

</Defs>
118 changes: 118 additions & 0 deletions 1.4/Defs/ThingDef_Buildings/Buildings_Security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>

<ThingDef Abstract="True" Name="CombatAI_CCTVBase" ParentName="BuildingBase">
<comps>
<li Class="CompProperties_Forbiddable" />
<li Class="CompProperties_Power">
<compClass>CompPowerTrader</compClass>
<basePowerConsumption>250</basePowerConsumption>
</li>
<li Class="CompProperties_Flickable" />
<li Class="CompProperties_Breakdownable" />
</comps>
<tickerType>Normal</tickerType>
<altitudeLayer>Building</altitudeLayer>
<hasInteractionCell>False</hasInteractionCell>
<minifiedDef>MinifiedThing</minifiedDef>
<stealable>false</stealable>
<thingCategories>
<li>BuildingsSecurity</li>
</thingCategories>
<designationCategory>Security</designationCategory>
<researchPrerequisites>
<li>HeavyTurrets</li>
</researchPrerequisites>
<statBases>
<MaxHitPoints>180</MaxHitPoints>
<Flammability>0.7</Flammability>
<WorkToBuild>2500</WorkToBuild>
<Mass>20</Mass>
<Beauty>-20</Beauty>
</statBases>
</ThingDef>

<!-- <ThingDef ParentName="CombatAI_CCTVBase">
<defName>CombatAI_CCTVPole</defName>
<label>Pole CCTV</label>
<drawerType>MapMeshAndRealTime</drawerType>
<graphicData>
<graphicClass>Graphic_Single</graphicClass>
<texPath>Isma/Buildings/CCTV/cctv_pole</texPath>
<drawSize>(3.5,3.5)</drawSize>
<damageData>
<rect>(0.38,0.2,0.56375,0.8)</rect>
<cornerTL>Damage/Corner</cornerTL>
</damageData>
<shadowData>
<offset>(-0.13,-0.87,-0.1)</offset>
<volume>(0.5,2.0,0.5)</volume>
</shadowData>
</graphicData>
<uiIconScale>0.50</uiIconScale>
<stealable>false</stealable>
<rotatable>false</rotatable>
<size>(1,1)</size>
<passability>PassThroughOnly</passability>
<pathCost>50</pathCost>
<fillPercent>0.3</fillPercent>
<researchPrerequisites>
<li>HeavyTurrets</li>
</researchPrerequisites>
<placeWorkers>
<li>PlaceWorker_NotUnderRoof</li>
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
</placeWorkers>
<comps>
<li Class="CombatAI.Comps.CompProperties_Sighter">
<radius>15</radius>
<radiusNight>5</radiusNight>
<powered>true</powered>
<mannable>false</mannable>
</li>
</comps>
</ThingDef> -->

<ThingDef ParentName="CombatAI_CCTVBase">
<defName>CombatAI_CCTVSentinel</defName>
<label>Sentinel CCTV</label>
<drawerType>MapMeshAndRealTime</drawerType>
<graphicData>
<graphicClass>Graphic_Single</graphicClass>
<texPath>Isma/Buildings/CCTV/cctv_sentinel</texPath>
<drawSize>(1.0,1.0)</drawSize>
<damageData>
<rect>(0.38,0.2,0.56375,0.8)</rect>
<cornerTL>Damage/Corner</cornerTL>
</damageData>
<shadowData>
<offset>(-0.13,-0.87,-0.1)</offset>
<volume>(0.5,0.5,0.5)</volume>
</shadowData>
</graphicData>
<uiIconScale>1.2</uiIconScale>
<stealable>false</stealable>
<rotatable>false</rotatable>
<size>(1,1)</size>
<passability>PassThroughOnly</passability>
<pathCost>90</pathCost>
<fillPercent>0.4</fillPercent>
<researchPrerequisites>
<li>HeavyTurrets</li>
</researchPrerequisites>
<placeWorkers>
<li>PlaceWorker_NotUnderRoof</li>
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
</placeWorkers>
<comps>
<li Class="CombatAI.Comps.CompProperties_Sighter">
<radius>8</radius>
<radiusNight>5</radiusNight>
<powered>true</powered>
<mannable>false</mannable>
</li>
</comps>
</ThingDef>


</Defs>
10 changes: 9 additions & 1 deletion 1.4/Languages/English/Keyed/Translations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
<CombatAI.Open>Open</CombatAI.Open>
<CombatAI.Hide>Hide</CombatAI.Hide>
<CombatAI.Expand>Hide</CombatAI.Expand>

<CombatAI.Preparing>Preparing Combat AI</CombatAI.Preparing>
<CombatAI.Settings.Basic>Basic Settings</CombatAI.Settings.Basic>
<CombatAI.Settings.Basic.FogOfWar>[BETA] Fog of war</CombatAI.Settings.Basic.FogOfWar>
<CombatAI.Settings.Basic.FogOfWar.Enable>Enable fog of war</CombatAI.Settings.Basic.FogOfWar.Enable>
<CombatAI.Settings.Basic.FogOfWar.Density>Fog density (how dark the fog of war is)</CombatAI.Settings.Basic.FogOfWar.Density>
<CombatAI.Settings.Basic.FogOfWar.Density.Readouts>{0} Fog desnity</CombatAI.Settings.Basic.FogOfWar.Density.Readouts>
<CombatAI.Settings.Basic.FogOfWar.RangeMul>Fog of war sight radius multiplie (default is 1.0)</CombatAI.Settings.Basic.FogOfWar.RangeMul>
<CombatAI.Settings.Basic.FogOfWar.RangeMul.Readouts>{0}x</CombatAI.Settings.Basic.FogOfWar.RangeMul.Readouts>
<CombatAI.Settings.Basic.FogOfWar.FadeMul>Fog of war sight fade radius multiplier (default is 0.5)</CombatAI.Settings.Basic.FogOfWar.FadeMul>
<CombatAI.Settings.Basic.FogOfWar.FadeMul.Readouts>{0}x</CombatAI.Settings.Basic.FogOfWar.FadeMul.Readouts>
<CombatAI.Settings.Basic.KillBoxKiller>Enable The Killbox killer 5000</CombatAI.Settings.Basic.KillBoxKiller>
<CombatAI.Settings.Basic.CELean>Enable Combat Extended lean profile</CombatAI.Settings.Basic.CELean>
<CombatAI.Settings.Basic.PerformanceOpt>Enable dynamic performance settings</CombatAI.Settings.Basic.PerformanceOpt>
Expand Down
4 changes: 2 additions & 2 deletions 1.4/Patches/Races_Animal_Base.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[@Name="BasePawn"]/comps</xpath>
<xpath>Defs/ThingDef[@Name="BasePawn"]/comps</xpath>
<value>
<li Class="CombatAI.Comps.CompProperties_CombatAI" />
<li Class="CombatAI.Comps.CompProperties_CombatAI" />
<li Class="CombatAI.Comps.CompProperties_Statistics" />
</value>
</Operation>
Expand Down
Binary file added 1.4/Textures/Isma/Buildings/CCTV/cctv_pole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions About/About.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<name>Combat AI 5000</name>
<name>CAI 5000 - Advance Combat AI Mod</name>
<author>Krkr</author>
<supportedVersions>
<li>1.4</li>
Expand Down Expand Up @@ -28,11 +28,7 @@
<li>rwmt.Multiplayer</li>
</incompatibleWith>
<description>
Imperial Stormtrooper Marksmanship Academy

"My Legions of Terror will be trained in basic marksmanship. Any [troops] who cannot learn to hit a man-sized target at 10 meters will be used for target practice."
— Evil Overlord List, Rule #56

*T-800s are not included*
Advance combat AI brought you by the RocketMan Team - Discord: https://discord.gg/Jx8UYNtS24
</description>
</ModMetaData>
Binary file added Resources/Bundles/StandaloneLinux64/isma
Binary file not shown.
17 changes: 17 additions & 0 deletions Resources/Bundles/StandaloneLinux64/isma.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ManifestFileVersion: 0
CRC: 2131158677
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: 160de5b7437a13619d99b6cc06128a7a
TypeTreeHash:
serializedVersion: 2
Hash: 55d48f4ad9c3b13330b9eb5ee5686477
HashAppended: 0
ClassTypes:
- Class: 48
Script: {instanceID: 0}
SerializeReferenceClassIdentifiers: []
Assets:
- Assets/FogShader.shader
Dependencies: []
Binary file added Resources/Bundles/StandaloneOSX/isma
Binary file not shown.
17 changes: 17 additions & 0 deletions Resources/Bundles/StandaloneOSX/isma.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ManifestFileVersion: 0
CRC: 3097180079
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: 11af86c7fe4984d0e48b2d1192f3b9e3
TypeTreeHash:
serializedVersion: 2
Hash: 55d48f4ad9c3b13330b9eb5ee5686477
HashAppended: 0
ClassTypes:
- Class: 48
Script: {instanceID: 0}
SerializeReferenceClassIdentifiers: []
Assets:
- Assets/FogShader.shader
Dependencies: []
Binary file added Resources/Bundles/StandaloneWindows/isma
Binary file not shown.
17 changes: 17 additions & 0 deletions Resources/Bundles/StandaloneWindows/isma.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ManifestFileVersion: 0
CRC: 2175633703
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: af133ff69d2b0648b766b28734692496
TypeTreeHash:
serializedVersion: 2
Hash: 55d48f4ad9c3b13330b9eb5ee5686477
HashAppended: 0
ClassTypes:
- Class: 48
Script: {instanceID: 0}
SerializeReferenceClassIdentifiers: []
Assets:
- Assets/FogShader.shader
Dependencies: []
51 changes: 0 additions & 51 deletions Source/.vs/CombatAI/xs/UserPrefs.xml

This file was deleted.

1 change: 0 additions & 1 deletion Source/.vs/CombatAI/xs/project-cache/CombatAI-Debug.json

This file was deleted.

This file was deleted.

37 changes: 0 additions & 37 deletions Source/.vs/Commune/xs/UserPrefs.xml

This file was deleted.

Loading