Skip to content

[Highly Customized] Building placing and deploying logic enhancement #1479

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

Open
wants to merge 68 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
13c9ba6
Core
CrimRecya Dec 26, 2024
9a5efd8
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Dec 29, 2024
e541fa1
Fix merge
CrimRecya Dec 29, 2024
8890757
Simplify
CrimRecya Jan 3, 2025
d735f45
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 3, 2025
76c066a
Fix that chronominer will not leave the placing area
CrimRecya Jan 9, 2025
f46b303
No need to cover the mission of vehicle units
CrimRecya Jan 9, 2025
df92a14
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 9, 2025
f84af42
Fix a typo
CrimRecya Jan 18, 2025
5c5fb53
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 18, 2025
aebc930
Small optimize
CrimRecya Jan 18, 2025
c05a549
A missing function
CrimRecya Jan 20, 2025
edb06f8
New 4 functions
CrimRecya Jan 20, 2025
ba994cf
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 20, 2025
4f7c444
Fix a typo
CrimRecya Jan 23, 2025
09f3116
Fix naval typo and fit with wall for `AutoBuilding`
CrimRecya Jan 23, 2025
284ebaf
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 23, 2025
3da4751
Fix confusion
CrimRecya Jan 24, 2025
2a78d8e
Rename key and add global setting
CrimRecya Jan 24, 2025
00a2021
New shortcut key
CrimRecya Jan 24, 2025
8afe883
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 24, 2025
c5bbec2
No need to skip set shortcut key
CrimRecya Jan 24, 2025
191cf39
Use correct key to check
CrimRecya Jan 25, 2025
a130a32
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 25, 2025
4d1d2bb
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Jan 27, 2025
8b1aec5
Fix mouse restore, fix contribution doc, do scatter allies and revert…
CrimRecya Jan 27, 2025
613c379
Add a sanity check
CrimRecya Feb 2, 2025
cfa92c8
Exchange check sequence
CrimRecya Feb 2, 2025
32c59fe
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Feb 2, 2025
32c90bd
")"
DeathFishAtEase Feb 2, 2025
88a6c20
Change displaying prompt and fit with #1477
CrimRecya Feb 5, 2025
ef13cdf
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Feb 5, 2025
904588d
Small change
CrimRecya Feb 5, 2025
7daf664
Merge branch 'develop' of https://github.com/Phobos-developers/Phobos…
CrimRecya Feb 5, 2025
14dd3aa
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Feb 5, 2025
ca926ea
Not remove buildings on the mouse in all cases
CrimRecya Feb 5, 2025
8589aa3
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Feb 8, 2025
ca1c913
Fix the stuck issue
CrimRecya Feb 13, 2025
277f93b
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Feb 13, 2025
5adfd88
Fix typo
CrimRecya Feb 13, 2025
3a87629
Fix moving issue
CrimRecya Feb 13, 2025
bb133bf
Optimize and separate tech and defense
CrimRecya Feb 14, 2025
babf6d7
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Feb 14, 2025
1def8f7
Check grey cameo
CrimRecya Feb 14, 2025
b47832a
Update doc
CrimRecya Feb 14, 2025
db4049f
CannotDeployHere
CrimRecya Feb 14, 2025
fed2a8f
Fix RE
CrimRecya Feb 14, 2025
c86ce53
Optimize
CrimRecya Feb 14, 2025
bfc628c
Fix draw
CrimRecya Feb 16, 2025
4550c88
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Feb 16, 2025
2d5e835
Fix typo
CrimRecya Feb 16, 2025
5a5e6b2
Remove `AutoBuilding`
CrimRecya Feb 22, 2025
ddde505
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Feb 22, 2025
08b5272
Fix doc
CrimRecya Feb 22, 2025
97581cc
Fix deployed unit
CrimRecya Feb 26, 2025
e3c25e4
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Feb 26, 2025
7d36f80
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Mar 25, 2025
9dcc5ef
Fix merge
CrimRecya Mar 25, 2025
dab30cc
Optimize
CrimRecya Mar 25, 2025
c3510cb
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Apr 12, 2025
bd7be2f
Fix merge
CrimRecya Apr 12, 2025
10862a6
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Apr 20, 2025
9d81e45
Update
CrimRecya Apr 20, 2025
861de71
Fix incorrect check
CrimRecya Apr 21, 2025
b91bde0
Merge remote-tracking branch 'upstream/develop' into develop-Building…
CrimRecya Apr 21, 2025
a2388f7
Update YRpp
CrimRecya Apr 21, 2025
4e9364c
Simplify
CrimRecya Apr 24, 2025
5ceb71f
Merge branch 'develop' into develop-BuildingPlacing
CrimRecya Apr 24, 2025
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
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ This page lists all the individual contributions to the project by their author.
- Fix an issue that game crashes when spawnee has been removed and is not real dead
- Aggressive attack move mission
- Amphibious access vehicle
- Building placing and deploying logic enhancement
- **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 @@ -176,6 +176,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
21 changes: 21 additions & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,27 @@ HeightShadowScaling.MinScale=0.0 ; floating point value
ShadowSizeCharacteristicHeight= ; integer, height in leptons
```

### Custom laser fence

- Now `LaserFence` can be customized by setting `LaserFencePost.Fence` on `LaserFencePost=true` buildings.
- `LaserFencePost.Fence` defines which kind of laser fence can connect this kind of laser fence post. If they have different `LaserFencePost.Fence`, they will not be connected.

In `rulesmd.ini`:
```ini
[SOMEBUILDING] ; BuildingType, `LaserFencePost=yes`
LaserFencePost.Fence= ; BuildingType
```

### 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
24 changes: 24 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,30 @@ 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 `ExtendedBuildingPlacing` 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 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.
- `LimboBuild` controls whether building can be automatically placed like `LimboDelivery`.
- `LimboBuildID` defines the numeric ID of the building placed by `LimboBuild`.
- `PlaceBuilding.OnLand` controls building with `WaterBound=yes` will become which building when placed on land.
- `PlaceBuilding.OnWater` controls building with `WaterBound=no` will become which building when placed on water.

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

[SOMEBUILDING] ; BuildingType
LimboBuild=false ; boolean
LimboBuildID=-1 ; integer
PlaceBuilding.OnLand= ; BuildingType
PlaceBuilding.OnWater= ; BuildingType
```

```{note}
- `PlaceBuilding.OnLand` and `PlaceBuilding.OnWater` are only work for players.
```

## Infantry

### Customizable FLH When Infantry Is Prone Or Deployed
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ New:
- Customize airstrike targets (by NetsuNegi)
- Aggressive attack move mission (by CrimRecya)
- Amphibious access vehicle (by CrimRecya)
- Building placing and deploying logic enhancement (by CrimRecya)

Vanilla fixes:
- Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya)
Expand Down
Loading