Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
346e789
Script actions 99-109
FS-21 Oct 9, 2021
9e2435e
small fix
FS-21 Oct 9, 2021
4d68d9a
Changes suggested by the last review
FS-21 Oct 9, 2021
875fe97
Reverted some code that make crashes
FS-21 Oct 9, 2021
f8bab1e
Merge branch 'develop' into feature/new-script-actions
FS-21 Oct 10, 2021
9b9db38
Fix small mistakes
FS-21 Oct 10, 2021
5e8906a
restore missing hook
FS-21 Oct 10, 2021
d81bd10
Merge branch 'develop' into feature/new-script-actions
FS-21 Oct 10, 2021
f56995a
post-merge fix in Readme file
FS-21 Oct 10, 2021
a5f58fb
Added the last Action 110
FS-21 Oct 11, 2021
642dfaa
Fixed bug in Action Argument 20 & new argument 35
FS-21 Oct 16, 2021
5b2ac69
Merge branch 'develop' into feature/new-script-actions
FS-21 Oct 22, 2021
3700ac5
Merge branch 'develop' into feature/new-script-actions
FS-21 Oct 27, 2021
4ba9b38
Fixes and small improvements
FS-21 Oct 27, 2021
c2e917f
Changed the 103,0 behavior due to feedback
FS-21 Oct 27, 2021
65ee2fa
Merge branch 'develop' into feature/new-script-actions
FS-21 Nov 14, 2021
7fce07e
Point to latest YRpp
FS-21 Nov 14, 2021
51373f4
Changes in how is stored the selected target
FS-21 Nov 15, 2021
6fc4130
Merge branch 'develop' into feature/new-script-actions
FS-21 Nov 15, 2021
137259a
Added function for finding the Team Leader
FS-21 Nov 15, 2021
a8ced1a
Fix a potential crash
FS-21 Nov 16, 2021
4fae22d
fix missing break statement
FS-21 Nov 16, 2021
cd0f65f
Merge branch 'develop' into feature/new-script-actions
FS-21 Nov 24, 2021
479295c
FS-21 Nov 28, 2021
924d2e7
improvement for unknown actions
FS-21 Nov 30, 2021
0b78701
Merge branch 'develop' into feature/new-script-actions
FS-21 Dec 27, 2021
5be6b39
small change
FS-21 Dec 27, 2021
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Credits
- **secsome (SEC-SOME)** - debug info dump hotkey, refactoring & porting of Ares helper code, introducing more Ares-derived stuff, disguise removal warhead, Mind Control removal warhead, Mind Control enhancement, shields, AnimList.PickRandom, MoveToCell fix, unlimited waypoints, Build At trigger action buildup anim fix, Undeploy building into a unit plays `EVA_NewRallyPointEstablished` fix, custom ore gathering anim, TemporaryClass related crash, Retry dialog on mission failure, Default disguise for individual InfantryTypes, PowerPlant Enhancer, SaveGame Trigger Action, QuickSave command, Numeric variables, Custom gravity for projectiles, Retint map actions bugfix
- **Otamaa (Fahroni, BoredEXE)** - help with CellSpread, ported and fixed custom RadType code, togglable ElectricBolt bolts, customizable Chrono Locomotor properties per TechnoClass, DebrisMaximums fixes, Anim-to-Unit, NotHuman anim sequences improvements, Customizable OpenTopped Properties, hooks for ScriptType Actions 92 & 93, ore stage threshold for `HideIfNoOre`
- **E1 Elite** - TileSet 255 and above bridge repair fix
- **FS-21** - Dump Object Info enhancements, Powered.KillSpawns, Spawner.LimitRange, ScriptType Actions 71, 72, 73, 74 to 81, 92, 93, 94, 95 to 98, 111, 112, MC deployer fixes, help with docs, Automatic Passenger Deletion
- **FS-21** - Dump Object Info enhancements, Powered.KillSpawns, Spawner.LimitRange, ScriptType Actions 71 to 112, MC deployer fixes, help with docs, Automatic Passenger Deletion
- **AutoGavy** - interceptor logic, warhead critical damage system
- **ChrisLv_CN** - interceptor logic, LaserTrails, laser fixes, general assistance (work relicensed under [following permission](images/ChrisLv-relicense.png))
- **Xkein** - general assistance, YRpp edits
Expand Down
2 changes: 1 addition & 1 deletion YRpp
Submodule YRpp updated 2 files
+7 −1 GenericList.h
+19 −2 TacticalClass.h
46 changes: 42 additions & 4 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ In `aimd.ini`:
x=83,n
```

### `84-91` `AITargetTypes` Attack Action
### `84-91`, `104-105` `AITargetTypes` Attack Action

- These Actions instruct the TeamType to use the TaskForce to approach and attack the target specified by the second parameter which is an index of a modder-defined group from `AITargetTypess`. Look at the tables below for the possible Actions (first parameter value) and Arguments (the second parameter value).
- For threat-based attack actions `TargetSpecialThreatCoefficientDefault` and `EnemyHouseThreatBonus` tags from `rulesmd.ini` are accounted.
Expand All @@ -878,7 +878,7 @@ x=83,n
In `aimd.ini`:
```ini
[SOMESCRIPTTYPE] ; ScriptType
x=i,n ; where 84 <= i <= 91
x=i,n ; where 84 <= i <= 91 or 104 <= i <= 105
```

| *Action* | *Argument* | *Repeats* | *Target Priority* | *Description* |
Expand All @@ -891,6 +891,8 @@ x=i,n ; where 84 <= i <= 91
89 | `AITargetTypes` index# | No | Farther, higher threat | Ends when a team member kill the designated target |
90 | `AITargetTypes` index# | No | Closer | Ends when a team member kill the designated target |
91 | `AITargetTypes` index# | No | Farther | Ends when a team member kill the designated target |
104 | `AITargetTypes` index# | Yes | Closer | Picks 1 random target from the list |
105 | `AITargetTypes` index# | Yes | Farther | Picks 1 random target from the list |

- The second parameter with a 0-based index for the `AITargetTypes` section specifies the list of possible `VehicleTypes`, `AircraftTypes`, `InfantryTypes` and `BuildingTypes` that can be evaluated. The new `AITargetTypes` section must be declared in `rulesmd.ini` for making this script work:

Expand Down Expand Up @@ -942,14 +944,14 @@ In `rulesmd.ini`:
; ...
```

### `95-98` Moving Team to techno location
### `95-98`, `106-109` Moving Team to techno location

- These Actions instructs the TeamType to use the TaskForce to approach the target specified by the second parameter. Look at the tables below for the possible Actions (first parameter value).

In `aimd.ini`:
```ini
[SOMESCRIPTTYPE] ; ScriptType
x=i,n ; where 95 <= i <= 98
x=i,n ; where 95 <= i <= 98 or 106 <= i <= 109
```

| *Action* | *Argument* | Target Owner | *Target Priority* | *Description* |
Expand All @@ -958,6 +960,42 @@ x=i,n ; where 95 <= i <= 98
96 | Target Type# | Enemy | Farther, higher threat | |
97 | Target Type# | Friendly | Closer | |
98 | Target Type# | Friendly | Farther | |
99 | [AITargetType] index# | Enemy | Closer, higher threat | |
100 | [AITargetType] index# | Enemy | Farther, higher threat | |
101 | [AITargetType] index# | Friendly | Closer | |
102 | [AITargetType] index# | Friendly | Farther | |
106 | [AITargetType] index# | Enemy | Closer | Picks 1 random target from the selected list |
107 | [AITargetType] index# | Enemy | Farther | Picks 1 random target from the selected list |
108 | [AITargetType] index# | Friendly | Closer | Picks 1 random target from the selected list |
109 | [AITargetType] index# | Friendly | Farther | Picks 1 random target from the selected list |

### `103` Modify Target Distance

- By default Movement actions `95-102` & `106-109` ends when the Team Leader reaches a distance declared in rulesmd.ini called CloseEnough. When this action is executed before the Movement actions `95-102` overwrites CloseEnough value. This action works only the first time and CloseEnough will be used again the next Movement action.

In `aimd.ini`:
```ini
[SOMESCRIPTTYPE] ; ScriptType
x=103,n
```

### `110` Set Move Action End Mode

- Sets how the Movement actions ends and jumps to the next line. This action works only the first time and CloseEnough will be used again the next Movement action.

In `aimd.ini`:
```ini
[SOMESCRIPTTYPE] ; ScriptType
x=110,n
```

- The possible argument values are:

| *Argument* | *Action ends when...* |
| :------: | :-------------------------------------------: |
0 | Team Leader reaches the minimum distance |
1 | One unit reaches the minimum distance |
2 | All team members reached the minimum distance |

### `111` Un-register Team success

Expand Down
6 changes: 4 additions & 2 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,14 @@ New:
- XDrawOffset for animations (by Morton)
- Customizable OpenTopped properties (by Otamaa)
- Automatic Passenger Deletion (by FS-21)
- Script Action 74 to 81 and 84 to 91 for new AI attacks (by FS-21)
- Script Action 74 to 81, 84 to 91 and 104 to 105 for new AI attacks (by FS-21)
- Script Actions 82 & 83 for modifying AI Trigger Current Weight (by FS-21)
- Script Action 92 for waiting & repeat the same new AI attack if no target was found (by FS-21)
- Script Action 93 that modifies the Team's Trigger Weight when ends the new attack action (by FS-21)
- Script Action 94 for picking a random script from a list (by FS-21)
- Script Action 95 to 98 for new AI movements towards certain objects (by FS-21)
- Script Action 95 to 102 and 106 to 109 for new AI movements towards certain objects (by FS-21)
- Script Action 103 that Modify Target Distance in the new move actions (by FS-21)
- Script Action 110 that Modify how ends the new move actions (by FS-21)
- Script Action 111 that un-register Team success, is just the opposite effect of Action 49 (by FS-21)
- Script Action 112 to regroup temporarily around the Team Leader (by FS-21)
- ObjectInfo now shows current Target and AI Trigger data (by FS-21)
Expand Down
2 changes: 1 addition & 1 deletion src/Ext/Rules/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void RulesExt::ExtData::LoadBeforeTypeData(RulesClass* pThis, CCINIClass* pINI)
this->MissingCameo.Read(pINI, "AudioVisual", "MissingCameo");
this->JumpjetAllowLayerDeviation.Read(exINI, "JumpjetControls", "AllowLayerDeviation");

// Section AITargetType
// Section AITargetTypes
int itemsCount = pINI->GetKeyCount(sectionAITargetTypes);
for (int i = 0; i < itemsCount; ++i)
{
Expand Down
Loading