Skip to content

Commit 5b4225b

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into force-weapon-by-type
# Conflicts: # CREDITS.md # docs/New-or-Enhanced-Logics.md # src/Ext/Techno/Body.h # src/Ext/Techno/Hooks.Firing.cpp # src/Ext/Techno/WeaponHelpers.cpp # src/Ext/TechnoType/Body.cpp
2 parents 3e86fbe + f7d7591 commit 5b4225b

File tree

171 files changed

+16529
-6458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+16529
-6458
lines changed

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020

2121
jobs:
2222
build:
23-
runs-on: windows-2019
23+
runs-on: windows-latest
2424

2525
steps:
2626
- uses: actions/checkout@v4

.github/workflows/pr-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
build:
19-
runs-on: windows-2019
19+
runs-on: windows-latest
2020

2121
steps:
2222
- uses: actions/checkout@v4

.vsconfig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"version": "1.0",
3-
"components": [
4-
"Microsoft.VisualStudio.Component.CoreEditor",
5-
"Microsoft.VisualStudio.Workload.CoreEditor",
6-
"Microsoft.VisualStudio.Component.VC.CoreIde",
7-
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
8-
"Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64",
9-
"Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
10-
]
3+
"components": [
4+
"Microsoft.VisualStudio.Component.CoreEditor",
5+
"Microsoft.VisualStudio.Workload.CoreEditor",
6+
"Microsoft.VisualStudio.Component.VC.CoreIde",
7+
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
8+
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
9+
"Microsoft.VisualStudio.Component.VC.ATL"
10+
]
1111
}

CREDITS.md

Lines changed: 135 additions & 76 deletions
Large diffs are not rendered by default.

Phobos.vcxproj

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,25 @@
1818
</ProjectConfiguration>
1919
</ItemGroup>
2020
<ItemGroup>
21+
<ClCompile Include="src\Ext\Infantry\Hooks.Firing.cpp" />
22+
<ClCompile Include="src\Ext\Unit\Hooks.Firing.cpp" />
23+
<ClCompile Include="src\New\Type\Affiliated\CreateUnitTypeClass.cpp" />
2124
<ClCompile Include="src\Blowfish\blowfish.cpp" />
2225
<ClCompile Include="src\Blowfish\Hooks.Blowfish.cpp" />
26+
<ClCompile Include="src\Ext\Cell\Body.cpp" />
27+
<ClCompile Include="src\Ext\House\Hooks.ForceEnemy.cpp" />
28+
<ClCompile Include="src\Commands\ToggleSWSidebar.cpp" />
29+
<ClCompile Include="src\Ext\Sidebar\SWSidebar\SWColumnClass.cpp" />
30+
<ClCompile Include="src\Ext\Sidebar\SWSidebar\SWSidebarClass.cpp" />
31+
<ClCompile Include="src\Ext\Sidebar\SWSidebar\SWButtonClass.cpp" />
32+
<ClCompile Include="src\Ext\Sidebar\SWSidebar\ToggleSWButtonClass.cpp" />
2333
<ClCompile Include="src\Ext\TechnoType\Hooks.MatrixOp.cpp" />
34+
<ClCompile Include="src\Ext\Techno\Hooks.Airstrike.cpp" />
35+
<ClCompile Include="src\Ext\Unit\Hooks.Harvester.cpp" />
2436
<ClCompile Include="src\Ext\Unit\Hooks.Sinking.cpp" />
2537
<ClCompile Include="src\Misc\Hooks.AlphaImage.cpp" />
2638
<ClCompile Include="src\New\Entity\AttachEffectClass.cpp" />
39+
<ClCompile Include="src\New\Type\Affiliated\TiberiumEaterTypeClass.cpp" />
2740
<ClCompile Include="src\New\Type\AttachEffectTypeClass.cpp" />
2841
<ClCompile Include="src\Commands\Commands.cpp" />
2942
<ClCompile Include="src\Commands\DamageDisplay.cpp" />
@@ -55,6 +68,7 @@
5568
<ClCompile Include="src\Ext\Sidebar\Hooks.cpp" />
5669
<ClCompile Include="src\Ext\Surface\Body.cpp" />
5770
<ClCompile Include="src\Ext\SWType\FireSuperWeapon.cpp" />
71+
<ClCompile Include="src\Ext\SWType\NewSWType\NewSWType.cpp" />
5872
<ClCompile Include="src\Ext\SWType\SWHelpers.cpp" />
5973
<ClCompile Include="src\Ext\SWType\Hooks.cpp" />
6074
<ClCompile Include="src\Ext\TAction\Body.cpp" />
@@ -79,7 +93,9 @@
7993
<ClCompile Include="src\Misc\RetryDialog.cpp" />
8094
<ClCompile Include="src\New\Type\Affiliated\DroppodTypeClass.cpp" />
8195
<ClCompile Include="src\New\Type\DigitalDisplayTypeClass.cpp" />
96+
<ClCompile Include="src\New\Type\InsigniaTypeClass.cpp" />
8297
<ClCompile Include="src\New\Type\RadTypeClass.cpp" />
98+
<ClCompile Include="src\New\Type\SelectBoxTypeClass.cpp" />
8399
<ClCompile Include="src\New\Type\ShieldTypeClass.cpp" />
84100
<ClCompile Include="src\New\Type\LaserTrailTypeClass.cpp" />
85101
<ClCompile Include="src\New\Type\Affiliated\InterceptorTypeClass.cpp" />
@@ -168,6 +184,7 @@
168184
<ClCompile Include="src\Misc\Hooks.Timers.cpp" />
169185
<ClCompile Include="src\Misc\Hooks.INIInheritance.cpp" />
170186
<ClCompile Include="src\Misc\Hooks.SkirmishColors.cpp" />
187+
<ClCompile Include="src\Misc\Hooks.Overlay.cpp" />
171188
<ClCompile Include="src\New\Type\Affiliated\TypeConvertGroup.cpp" />
172189
<ClCompile Include="src\Ext\BuildingType\Hooks.Upgrade.cpp" />
173190
<ClCompile Include="src\Phobos.COM.cpp" />
@@ -187,8 +204,17 @@
187204
<ClCompile Include="YRpp\StaticInits.cpp" />
188205
</ItemGroup>
189206
<ItemGroup>
207+
<ClInclude Include="src\New\Type\Affiliated\CreateUnitTypeClass.h" />
190208
<ClInclude Include="src\Blowfish\blowfish.h" />
209+
<ClInclude Include="src\Ext\Cell\Body.h" />
210+
<ClInclude Include="src\Commands\FireTacticalSW.h" />
211+
<ClInclude Include="src\Commands\ToggleSWSidebar.h" />
212+
<ClInclude Include="src\Ext\Sidebar\SWSidebar\SWColumnClass.h" />
213+
<ClInclude Include="src\Ext\Sidebar\SWSidebar\SWSidebarClass.h" />
214+
<ClInclude Include="src\Ext\Sidebar\SWSidebar\SWButtonClass.h" />
215+
<ClInclude Include="src\Ext\Sidebar\SWSidebar\ToggleSWButtonClass.h" />
191216
<ClInclude Include="src\New\Entity\AttachEffectClass.h" />
217+
<ClInclude Include="src\New\Type\Affiliated\TiberiumEaterTypeClass.h" />
192218
<ClInclude Include="src\New\Type\AttachEffectTypeClass.h" />
193219
<ClInclude Include="src\Commands\FrameByFrame.h" />
194220
<ClInclude Include="src\Commands\FrameStep.h" />
@@ -210,6 +236,7 @@
210236
<ClInclude Include="src\Ext\Sidebar\Body.h" />
211237
<ClInclude Include="src\Ext\Anim\Body.h" />
212238
<ClInclude Include="src\Ext\Surface\Body.h" />
239+
<ClInclude Include="src\Ext\SWType\NewSWType\NewSWType.h" />
213240
<ClInclude Include="src\Ext\TAction\Body.h" />
214241
<ClInclude Include="src\Ext\Team\Body.h" />
215242
<ClInclude Include="src\Ext\TEvent\Body.h" />
@@ -222,7 +249,9 @@
222249
<ClInclude Include="src\New\Type\Affiliated\TypeConvertGroup.h" />
223250
<ClInclude Include="src\New\Type\Affiliated\DroppodTypeClass.h" />
224251
<ClInclude Include="src\New\Type\DigitalDisplayTypeClass.h" />
252+
<ClInclude Include="src\New\Type\InsigniaTypeClass.h" />
225253
<ClInclude Include="src\New\Type\RadTypeClass.h" />
254+
<ClInclude Include="src\New\Type\SelectBoxTypeClass.h" />
226255
<ClInclude Include="src\New\Type\ShieldTypeClass.h" />
227256
<ClInclude Include="src\New\Type\LaserTrailTypeClass.h" />
228257
<ClInclude Include="src\New\Type\Affiliated\InterceptorTypeClass.h" />
@@ -295,21 +324,21 @@
295324
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
296325
<ConfigurationType>DynamicLibrary</ConfigurationType>
297326
<UseDebugLibraries>false</UseDebugLibraries>
298-
<PlatformToolset>v142</PlatformToolset>
327+
<PlatformToolset>v143</PlatformToolset>
299328
<CharacterSet>NotSet</CharacterSet>
300329
<XPDeprecationWarning>false</XPDeprecationWarning>
301330
</PropertyGroup>
302331
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DevBuild|Win32'" Label="Configuration">
303332
<ConfigurationType>DynamicLibrary</ConfigurationType>
304333
<UseDebugLibraries>false</UseDebugLibraries>
305-
<PlatformToolset>v142</PlatformToolset>
334+
<PlatformToolset>v143</PlatformToolset>
306335
<CharacterSet>NotSet</CharacterSet>
307336
<XPDeprecationWarning>false</XPDeprecationWarning>
308337
</PropertyGroup>
309338
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
310339
<ConfigurationType>DynamicLibrary</ConfigurationType>
311340
<UseDebugLibraries>false</UseDebugLibraries>
312-
<PlatformToolset>v142</PlatformToolset>
341+
<PlatformToolset>v143</PlatformToolset>
313342
<CharacterSet>NotSet</CharacterSet>
314343
<XPDeprecationWarning>false</XPDeprecationWarning>
315344
</PropertyGroup>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ UIDescription=<none> ; CSF entry key
8282
Building manually
8383
-----------------
8484

85-
0. Install **Visual Studio** (2022 is recommended, 2019 is minimum) with the dependencies listed in `.vsconfig` (it will prompt you to install missing dependences when you open the project, or you can run VS installer and import the config). If you prefer to use **Visual Studio Code** you may install **VS Build Tools** with the dependencies from `.vsconfig` instead. Not using a code editor or IDE and building via **command line scripts** included with the project is also an option.
85+
0. Install **Visual Studio** (2022 is minimum) with the dependencies listed in `.vsconfig` (it will prompt you to install missing dependences when you open the project, or you can run VS installer and import the config). If you prefer to use **Visual Studio Code** you may install **VS Build Tools** with the dependencies from `.vsconfig` instead. Not using a code editor or IDE and building via **command line scripts** included with the project is also an option.
8686
1. Clone this repo recursively via your favorite git client (that will also clone YRpp).
8787
2. To build the extension:
8888
- in Visual Studio: open the solution file in VS and build it (`Debug` build config is recommended);

docs/AI-Scripting-and-Mapping.md

Lines changed: 65 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Ranking.OverParMessage= ; CSF entry key
7878

7979
### Show briefing dialog on startup
8080

81-
- You can now have the briefing dialog screen show up on singleplayer campaign mission startup by setting `ShowBriefing` to true in map file's `[Basic]` section, or in the map file's section in `missionmd.ini` (latter takes precedence over former if available). This can be disabled by user by setting `ShowBriefing` to false in `RA2MD.INI`.
82-
- `BriefingTheme` (In order of precedence from highest to lowest: `missionmd.ini`, map file, side entry in `rulesmd.ini`) can be used to define a custom theme to play on this briefing screen. If not set, the loading screen theme will keep playing until the scenario starts properly.
81+
- You can now have the briefing dialog screen show up on singleplayer campaign mission startup by setting `ShowBriefing` to true in map file's `[Basic]` section, or in the map file's section in `missionmd.ini` (former takes precedence if available). This can be disabled by user by setting `ShowBriefing` to false in `RA2MD.INI`.
82+
- `BriefingTheme` (In order of precedence from highest to lowest: map file, `missionmd.ini`, side entry in `rulesmd.ini`) can be used to define a custom theme to play on this briefing screen. If not set, the loading screen theme will keep playing until the scenario starts properly.
8383
- String labels for the startup briefing dialog screen's resume button as well as the button's status bar text can be customized by setting `ShowBriefingResumeButtonLabel` and `ShowBriefingResumeButtonStatusLabel` respectively. They default to the same labels used by the briefing screen dialog when opened otherwise.
8484

8585
In `missionmd.ini`:
@@ -169,7 +169,7 @@ x=i,n ; For i values check the next table
169169
| 9 | Power Plants | Any enemy `BuildingTypes` with positive `Power=` values |
170170
| 10 | Occupied | Any `BuildingTypes` with garrisoned infantry |
171171
| 11 | Tech Buildings | Any `BuildingTypes` with `Unsellable=yes`, `Capturable=yes`, negative `TechLevel=` values or appears in `[AI] -> NeutralTechBuildings=` list |
172-
| 12 | Refinery | Any enemy `BuildingTypes` with `Refinery=yes` or `ResourceGatherer=yes`, `VehicleTypes` with `ResourceGatherer=yes` & `Harvester=no` (i.e. Slave Miner) |
172+
| 12 | Refinery | Any enemy `BuildingTypes` with `Refinery=yes` or `ResourceGatherer=yes`, `VehicleTypes` with `ResourceGatherer=yes` & `Harvester=no` (i.e. Slave Miner) |
173173
| 13 | Mind Controller | Anything `VehicleTypes`, `AircraftTypes`, `InfantryTypes` and `BuildingTypes` with `MindControl=yes` in the weapons Warheads |
174174
| 14 | Air Units (incl. landed) | Any enemy, `AircraftTypes` and `Jumpjet=yes` `VehicleTypes` or `InfantryTypes`, including landed ones as well as any other currently airborne units |
175175
| 15 | Naval | Any enemy `BuildingTypes` and `VehicleTypes` with a `Naval=yes`, any enemy `VehicleTypes`, `AircraftTypes`, `InfantryTypes` in a water cell |
@@ -611,6 +611,61 @@ ID=ActionCount,[Action1],510,0,0,[MCVRedeploy],0,0,0,A,[ActionX]
611611
...
612612
```
613613

614+
### `606` Edit Hate-Value
615+
616+
- Edit the hate-value that trigger houses to other houses.
617+
- -1 works for all houses.
618+
619+
In `mycampaign.map`:
620+
```ini
621+
[Actions]
622+
...
623+
ID=ActionCount,[Action1],606,0,[HouseIndex],[Operation],[Number],0,0,A,[ActionX]
624+
...
625+
```
626+
627+
| *Operation* | *Description* |
628+
|------------:|:----------------------------------------------|
629+
| 0 | CurrentValue = Number |
630+
| 1 | CurrentValue = CurrentValue + Number |
631+
| 2 | CurrentValue = CurrentValue - Number |
632+
| 3 | CurrentValue = CurrentValue * Number |
633+
| 4 | CurrentValue = CurrentValue / Number |
634+
| 5 | CurrentValue = CurrentValue % Number |
635+
| 6 | CurrentValue = CurrentValue leftshift Number |
636+
| 7 | CurrentValue = CurrentValue rightshift Number |
637+
| 8 | CurrentValue = ~CurrentValue |
638+
| 9 | CurrentValue = CurrentValue xor Number |
639+
| 10 | CurrentValue = CurrentValue or Number |
640+
| 11 | CurrentValue = CurrentValue and Number |
641+
642+
### `607` Clear Hate-Value
643+
644+
- Clear the hate-value that trigger houses to other houses.
645+
- -1 works for all houses.
646+
647+
In `mycampaign.map`:
648+
```ini
649+
[Actions]
650+
...
651+
ID=ActionCount,[Action1],607,0,[HouseIndex],0,0,0,0,A,[ActionX]
652+
...
653+
```
654+
655+
### `608` Set Force Enemy
656+
657+
- Force an enemy, it will not change with the change of hate-value.
658+
- -1 will remove the forced enemy.
659+
- -2 will never have any enemies.
660+
661+
In `mycampaign.map`:
662+
```ini
663+
[Actions]
664+
...
665+
ID=ActionCount,[Action1],608,0,0,[HouseIndex],0,0,0,A,[ActionX]
666+
...
667+
```
668+
614669
## Trigger events
615670

616671
### `500-511` Variable comparation
@@ -729,13 +784,13 @@ ID=EventCount,...,[EVENTID],2,[HouseIndex],[TechnoType],...
729784
- `HouseIndex` can be customized to focus in a specified house.
730785

731786
In `mycampaign.map`:
732-
```ini
733-
[Events]
734-
...
735-
ID=EventCount,...,604,2,[HouseIndex],[TechnoType],...
736-
ID=EventCount,...,605,2,[HouseIndex],[AITargetTypes index#],...
737-
...
738-
```
787+
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[Events]</span>
788+
<span class="na">...</span>
789+
<span class="na">ID</span><span class="o">=</span><span class="s">EventCount,...,604,2,[HouseIndex],[TechnoType],...</span>
790+
<span class="na">ID</span><span class="o">=</span><span class="s">EventCount,...,605,2,[HouseIndex],[AITargetTypes index#],...</span>
791+
<span class="na">...</span>
792+
</pre></div>
793+
</div>
739794

740795
| *House Index* | *Description* |
741796
|:-------------:|:------------------------------------------:|

docs/Contributing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ To distribute the workload and make the project more manageable, we have establi
2525
- `T1` complexity by default
2626
- Unhardcodings/customizations - contributions that only make something customizable through the INI or other way (by the modder usually), without adding too much code to handle the customization
2727
- `T1` complexity by default
28+
- Restored featues (from TS, RA2 etc.), assuming no extra changes or additions apart from the ones necessary to function in YR with extensions (the reviewer has to verify that)
29+
- `T1` complexity by default
2830
- New features
2931
- Extensions of existing systems - add logic to existing systems, doesn't warrant it's own entity or type classes generally, but may introduce new hooks
3032
- Examples: feedback weapon logic, superweapon launch warhead logic, a new type of trajectory that uses existing custom trajectory framework, etc.

0 commit comments

Comments
 (0)