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

Expand the Building Actions #1335

Open
wants to merge 70 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
bc5a84c
Core
CrimRecya Aug 4, 2024
fc18cf2
Update docs
CrimRecya Aug 5, 2024
34c1526
Optimize
CrimRecya Aug 9, 2024
574b5d2
Merge branch 'develop' into develop-building
CrimRecya Aug 9, 2024
2977db8
Now can use for AI building + Stop deploying in stop event
CrimRecya Aug 11, 2024
8a762fd
Fix base node update
CrimRecya Aug 12, 2024
11ffd64
Merge branch 'develop' into develop-building
CrimRecya Aug 12, 2024
9c85527
Notes
CrimRecya Aug 15, 2024
a94f6f6
Update Hooks.Placing.cpp
CrimRecya Aug 24, 2024
4f4ac9a
Update Hooks.cpp
CrimRecya Aug 24, 2024
3440c9d
Update Hooks.Upgrade.cpp
CrimRecya Aug 24, 2024
a6292eb
Update Hooks.cpp
CrimRecya Aug 24, 2024
ac9c5c9
Merge branch 'develop' into develop-building
CrimRecya Aug 24, 2024
16954c2
Update Body.cpp
CrimRecya Aug 24, 2024
a8882de
New functions and prepare for splits
CrimRecya Sep 8, 2024
af22bf9
Merge branch 'develop' into develop-building
CrimRecya Sep 8, 2024
6cdac17
Fix doc
CrimRecya Sep 8, 2024
9ed5e47
Small change and a new function
CrimRecya Sep 9, 2024
ae71543
Simplified and fix line offset
CrimRecya Sep 15, 2024
af7c3c6
Merge branch 'develop' into develop-building
CrimRecya Sep 15, 2024
1b87bd0
Merge branch 'develop' into develop-building
CrimRecya Sep 18, 2024
d927962
Update CREDITS.md
CrimRecya Sep 18, 2024
13c62c5
Count upgrade building
CrimRecya Sep 19, 2024
2202b71
Small fix
CrimRecya Oct 7, 2024
6f93517
Fix AI MCV wander like a headless chicken
CrimRecya Oct 8, 2024
dba6539
Optimize loop
CrimRecya Oct 8, 2024
85c4f08
Merge branch 'develop' into develop-building
CrimRecya Oct 10, 2024
87ec15d
Delete useless
CrimRecya Oct 10, 2024
54ff9d9
Merge branch 'develop' into develop-building
CrimRecya Oct 13, 2024
025df03
Fix merge
CrimRecya Oct 13, 2024
d7e50a4
Delete Useless
CrimRecya Oct 13, 2024
1e74d2a
Merge branch 'develop' into develop-building
CrimRecya Oct 14, 2024
a442eea
Support `PrerequisiteForCameo` to conduct deep search
CrimRecya Oct 16, 2024
7c3e80c
Merge branch 'develop' into develop-building
CrimRecya Oct 16, 2024
2c11ad2
Check occupation flags
CrimRecya Oct 18, 2024
a9ff9c7
Merge branch 'develop' into develop-building
CrimRecya Oct 20, 2024
60ace99
Fix can be built on
CrimRecya Oct 20, 2024
3bb747a
Update the drawing grid and fix a potential issue
CrimRecya Oct 24, 2024
464f5a5
Fix a mistake and a vanilla bug
CrimRecya Oct 25, 2024
9eb262a
Merge branch 'develop' into develop-building
CrimRecya Oct 31, 2024
f387b98
`AutoUpgrade`, `LimboBuild` and fix original place wall on terrain if…
CrimRecya Oct 31, 2024
78d282d
Fix doc
CrimRecya Oct 31, 2024
1b0a324
Safer removal
CrimRecya Oct 31, 2024
a9108f0
Merge branch 'develop' into develop-building
CrimRecya Nov 6, 2024
a022026
Check can upgrade
CrimRecya Nov 6, 2024
b2dedef
Delete some things that are out of thin air, and fix a mistake
CrimRecya Nov 6, 2024
4dfb8ec
Merge branch 'develop' into develop-building
CrimRecya Nov 6, 2024
9b97f27
Delete useless
CrimRecya Nov 6, 2024
eb8e059
Delete useless
CrimRecya Nov 6, 2024
bdad244
Const auto
CrimRecya Nov 7, 2024
5de7557
Merge branch 'develop' into develop-building
CrimRecya Nov 7, 2024
02a49e8
Supplement missing function
CrimRecya Nov 7, 2024
471b8d3
Const auto
CrimRecya Nov 7, 2024
7045482
Rename keys
CrimRecya Nov 9, 2024
201e2a1
Cameo aux and neg types
CrimRecya Nov 9, 2024
fb57eac
Fix a mistake
CrimRecya Nov 10, 2024
bd3b299
Fix read
CrimRecya Nov 10, 2024
2ab4bc0
Resolve conflicts between two types of buildings
CrimRecya Nov 18, 2024
e90db7b
Merge branch 'develop' into develop-building
CrimRecya Nov 18, 2024
681ac1d
Fix merge
CrimRecya Nov 18, 2024
4db8a25
Placing other buildings accomplish will not clear the current buildin…
CrimRecya Nov 18, 2024
7fbf419
Fix a mistake in draw grids
CrimRecya Nov 20, 2024
3321294
Simplified auto upgrade
CrimRecya Nov 20, 2024
24f3ee8
Placing buildings timeout will not affect the behavior of AI in campaign
CrimRecya Nov 21, 2024
de74712
Fix a mistake in dealing with building behavior in campaign
CrimRecya Nov 22, 2024
31c2aa2
Change to store in ScenarioExt
CrimRecya Nov 23, 2024
91a8ef0
Fix a mistake that will make AI won't clean up building place if time…
CrimRecya Nov 24, 2024
52916a6
Change the check from not to only
CrimRecya Nov 28, 2024
40c648a
Simplify
CrimRecya Nov 29, 2024
580c7f9
Merge branch 'develop' into develop-building
CrimRecya Nov 29, 2024
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
3 changes: 3 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ This page lists all the individual contributions to the project by their author.
- Allow to change the speed of gas particles
- **CrimRecya**
- Fix `LimboKill` not working reliably
- Building placing and deploying logic enhancement
- Unit base normal and new placing grids
- Grey cameo preview and cameo overlays
- **Ollerus**
- Build limit group enhancement
- Customizable rocker amplitude
Expand Down
1 change: 1 addition & 0 deletions Phobos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<ClCompile Include="src\Misc\Hooks.SkirmishColors.cpp" />
<ClCompile Include="src\New\Type\Affiliated\TypeConvertGroup.cpp" />
<ClCompile Include="src\Ext\BuildingType\Hooks.Upgrade.cpp" />
<ClCompile Include="src\Ext\BuildingType\Hooks.Placing.cpp" />
<ClCompile Include="src\Phobos.COM.cpp" />
<ClCompile Include="src\Phobos.CRT.cpp" />
<ClCompile Include="src\Phobos.Ext.cpp" />
Expand Down
26 changes: 26 additions & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,32 @@ ForbidParallelAIQueues.Building=no ; boolean
ForbidParallelAIQueues=false ; boolean
```

### Check building adjacent by using units

- You can now set `CheckUnitBaseNormal` to true to use units to expand the construction scope of the base.
- `UnitBaseNormal` controls whether our own buildings can be place around it like vanilla `BaseNormal` do.
- `UnitBaseForAllyBuilding` controls whether ally buildings can be place around it like vanilla `EligibileForAllyBuilding` do.

In `rulesmd.ini`:
```ini
[General]
CheckUnitBaseNormal=false ; boolean

[SOMEUNIT] ; UnitType
UnitBaseNormal=false ; boolean
UnitBaseForAllyBuilding=false ; boolean
```

### Buildable-upon TechnoTypes

- Now technos have `CanBeBuiltOn=true` can simply removed when building is placed on them.

In `rulesmd.ini`:
```ini
[SOMETECHNO] ; TechnoType
CanBeBuiltOn=false ; boolean
```

## Terrains

### Animated TerrainTypes
Expand Down
18 changes: 18 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,24 @@ SpyEffect.VictimSuperWeapon= ; SuperWeaponType
SpyEffect.InfiltratorSuperWeapon= ; SuperWeaponType
```

### Building placing and deploying logic enhancement

- In vanilla games, buildings are always cannot placing or deploying on the cells that other infantries or units on. Now this can be changed by setting `ExpandBuildingPlace` to true, when you try to place the building on these cells, it will check whether the occupiers can be scatter by yourself (include your own technos and allies non-player technos) and whether there are enough spaces to scatter. If can, it will record which building you are placing and show a preview to you and your allies, then start a timer to record this placement and order the occupiers to leave this building area. When the area is cleared, the building will be truly place down and the production queue will be restored to original state. But when the timer expires or an unexpected situation has occurred which make the building impossible be constructed here anymore, it will stop the action and play "cannot deploy here", then you should re-place or re-deploy the building in a valid space. Note that when the building has been recorded and is trying to place, unless the production queue has vanished (such as construction yard is no longer exist), it will continue to function normally until the conditions are not met.
- `AutoUpgrade` controls whether building upgrades can be automatically placed on the correct and earliest built building.
- `LimboBuild` controls whether building can be automatically placed like `LimboDelivery`.
- `LimboBuildID` defines the numeric ID of the building placed by `LimboBuild`.

In `rulesmd.ini`:
```ini
[General]
ExpandBuildingPlace=false ; boolean

[SOMEBUILDING] ; BuildingType
AutoUpgrade=false ; boolean
LimboBuild=false ; boolean
LimboBuildID=-1 ; boolean
```

## Infantry

### Customizable FLH When Infantry Is Prone Or Deployed
Expand Down
59 changes: 59 additions & 0 deletions docs/User-Interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,26 @@ In `rulesmd.ini`:
SelectionFlashDuration=0 ; integer, number of frames
```

### More display styles for placing grids

- This feature is highly compatible with `ExpandBuildingPlace`. If set `DrawAdjacentBoundary` to true, it will display the four corners of the `Adjacent` boundary. If set `PlacementGrid.Expand` to true, it will display the placing grids with `place.shp` and following corresponding frame number.
- `PlacementGrid.LandFrames` controls the placing grids frames on non-water cell. The three numbers respectively represent "Some technos that can command departure have occupied this area", "This cell is actually beyond the scope, but there is still at least one cell inside the entire region" and "Here is no problem, everything is OK".
- `PlacementGrid.WaterFrames` controls the placing grids frames on water cell. Each item corresponds to the same as above.

In `ra2md.ini`:
```ini
[Phobos]
DrawAdjacentBoundary=false ; boolean
```

In `rulesmd.ini`:
```ini
[AudioVisual]
PlacementGrid.Expand=false ; boolean
PlacementGrid.LandFrames=1,0,0 ; integer, zero-based frame index - have technos, near boundary, is normal
PlacementGrid.WaterFrames=1,0,0 ; integer, zero-based frame index - have technos, near boundary, is normal
```

## Hotkey Commands

### `[ ]` Display Damage Numbers
Expand Down Expand Up @@ -367,6 +387,45 @@ In `rulesmd.ini`:
MissingCameo=XXICON.SHP ; filename - including the .shp/.pcx extension
```

### Show cameo when unbuildable

- A setting that allows you to preview information. This feature can be used as before, playing "new construction options" and clearing the specific production queue when prerequisites loss.
- `Cameo.AlwaysExist` controls whether you can see the cameo when the prerequisite have not satisfied (`TechnoLevel`, `Owner`, `RequiredHouses` and `ForbiddenHouses` should be satisfied). Defaults to `[AudioVisual]` -> `Cameo.AlwaysExist`.
- `ShowBuildingStatistics` controls whether the number of buildings of this type that you currently own needs to be displayed in the upper right corner of the building cameo (requires the cameo exist).
- `Cameo.OverlayShapes` controls the drawn image file.
- `Cameo.OverlayFrames` controls which frame in `Cameo.OverlayShapes` to draw in three different situations: currently owned this building type, grey cameo and have its prerequisite, grey cameo but have no prerequisite (The last situation requires `Cameo.AlwaysExist` to be true). When set to a negative number, it means that there is no need to draw under the corresponding conditions.
- `Cameo.OverlayPalette` the color palette used when drawing `Cameo.OverlayShapes`.
- If `Cameo.AuxTechnos` is not set, in addition to basic conditions, the grey cameo will only show when `AIBasePlanningSide` condition is satisfied. Otherwise, the grey cameo will only show when at least one of these types is owned by you or its `TechnoLevel`, `Owner`, `RequiredHouses`, `ForbiddenHouses`, `Cameo.AuxTechnos` (use `AIBasePlanningSide` if not set) and `Cameo.NegTechnos` (if set) conditions are satisfied.
- If `Cameo.NegTechnos` is set, the grey cameo will not show when you have a techno in one of these types.
- The `UIDescription.Unbuildable` is like `UIDescription`, but this only appearing when the techno is truly unbuildable.

In `ra2md.ini`:
```ini
[Phobos]
ShowBuildingStatistics=false ; boolean
```

In `rulesmd.ini`:
```ini
[AudioVisual]
Cameo.AlwaysExist=false ; boolean
Cameo.OverlayShapes=pips.shp ; filename - including the .shp extension
Cameo.OverlayFrames=-1,-1,-1 ; integer - owned this building, grey and have its prerequisite, grey but have no prerequisite
Cameo.OverlayPalette=palette.pal ; filename - including the .pal extension

[SOMETECHNO] ; TechnoType
Cameo.AlwaysExist= ; boolean
Cameo.AuxTechnos= ; List of TechnoTypes
Cameo.NegTechnos= ; List of TechnoTypes
UIDescription.Unbuildable= ; CSF entry key
```

In `artmd.ini`:
```ini
[SOMETECHNO] ; TechnoType
GreyCameoPCX= ; PCX filename - including the .pcx extension
```

### Harvester counter

![image](_static/images/harvestercounter-01.gif)
Expand Down
3 changes: 3 additions & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ New:
- Allow customizing extra tint intensity for Iron Curtain & Force Shield (by Starkku)
- Option to enable parsing 8-bit RGB values from `[ColorAdd]` instead of RGB565 (by Starkku)
- Customizing height at which subterranean units travel (by Starkku)
- Building placing and deploying logic enhancement (by CrimRecya)
- Unit base normal and new placing grids (by CrimRecya)
- Grey cameo preview and cameo overlays (by CrimRecya)
- Option for Warhead damage to penetrate Iron Curtain or Force Shield (by Starkku)
- Option for Warhead to remove all shield types at once (by Starkku)
- Allow customizing voxel light source position (by Kerbiter, Morton, based on knowledge of thomassnedon)
Expand Down
Loading
Loading