-
-
Notifications
You must be signed in to change notification settings - Fork 105
[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
base: develop
Are you sure you want to change the base?
[Highly Customized] Building placing and deploying logic enhancement #1479
Conversation
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
我觉得AutoBuilding可能需要一个ingame的快捷键来决定是否整体地开启它。 |
Hello, I've been following this PR for a long time which allows AI to use its available foundation area efficiently, I even pull the relevant branch as it is updated and test it after rebuilding. First of all, I would like to thank you for all your efforts. I have observed a small bug with the flow of the 'ExtendedBuildingPlacing' tag on the AI side for a long time. If the AI fails to clean the space of the LimboBuilding it is placed within the time specified in the 'pHouseExt->CurrentBuildingTimer.Start()' statement in the function and cannot replace the real building instead, the AI permanently bypasses that building and never builds it again. Any other functions seem to be working flawlessly. |
I checked the code, buildings with |
Considering that |
2128644
to
799ea22
Compare
Game removes deploying vehicles from map temporarily to check if there's enough space to deploy into a building when displaying allow/disallow deploy cursor. This can cause desyncs if there are certain types of units around the deploying unit because the OccupationFlags may be accidentally cleared, or the order of the objects linked list may be scrambled. About implementation: This is a hook separated from #1479 . This solution completely abandons the method of removing and then adding, and solves the problem by directly excluding specific units. Other related repairs: Fix unit's self-destruct when using trigger 107 to teleport the MCV. Fix reconnection error when moving MCV with Teleport locomotion.
Game removes deploying vehicles from map temporarily to check if there's enough space to deploy into a building when displaying allow/disallow deploy cursor. This can cause desyncs if there are certain types of units around the deploying unit because the OccupationFlags may be accidentally cleared, or the order of the objects linked list may be scrambled. About implementation: This is a hook separated from #1479 . This solution completely abandons the method of removing and then adding, and solves the problem by directly excluding specific units. Other related repairs: Fix unit's self-destruct when using trigger 107 to teleport the MCV. Fix reconnection error when moving MCV with Teleport locomotion.
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.AutoBuilding
controls whether building can be automatically placed.AutoBuilding.Gap
controls the gap of automatically placed buildings.LimboBuild
controls whether building can be automatically placed likeLimboDelivery
.LimboBuildID
defines the numeric ID of the building placed byLimboBuild
.PlaceBuilding.OnLand
controls building withNaval=yes
will become which building when placed on land.PlaceBuilding.OnWater
controls building withNaval=no
will become which building when placed on water.In
rulesmd.ini
:LaserFence
can be customized by settingLaserFencePost.Fence
onLaserFencePost=true
buildings.LaserFencePost.Fence
defines which kind of laser fence can connect this kind of laser fence post. If they have differentLaserFencePost.Fence
, they will not be connected.In
rulesmd.ini
:CanBeBuiltOn=true
can simply removed when building is placed on them.In
rulesmd.ini
:Splits from #1335 .