Open CrimRecya opened 3 months ago
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.
Building placing and deploying logic enhancement
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
.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.CanBeBuiltOn=true
can simply removed when building is placed on them.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.Cameo.AlwaysExist
is 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
.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.Cameo.NegTechnos
is set, the grey cameo will not show when you have a techno in one of these types.UIDescription.Unbuildable
is like UIDescription
, but this only appearing when the techno is truly unbuildable.In ra2md.ini
:
[Phobos]
DrawAdjacentBoundary=false ; boolean
ShowBuildingStatistics=false ; boolean
In rulesmd.ini
:
[General]
CheckUnitBaseNormal=false ; boolean
ExpandBuildingPlace=false ; boolean
[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
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
[SOMEBUILDING] ; BuildingType
AutoUpgrade=false ; boolean
LimboBuild=false ; boolean
LimboBuildID=-1 ; boolean
[SOMETECHNO] ; TechnoType
CanBeBuiltOn=false ; boolean
Cameo.AlwaysExist= ; boolean
Cameo.AuxTechnos= ; List of TechnoTypes
Cameo.NegTechnos= ; List of TechnoTypes
UIDescription.Unbuildable= ; CSF entry key
[SOMEUNIT] ; UnitType
UnitBaseNormal=false ; boolean
UnitBaseForAllyBuilding=false ; boolean
In artmd.ini
:
[SOMETECHNO] ; TechnoType
GreyCameoPCX= ; PCX filename - including the .pcx extension
this should be merged asap
If I may suggest some more appropriate English for these tags:
AlwaysExistTheCameo
► AlwaysShowCameo
or AlwaysShowInSidebar
PrerequisiteForCameo
► SidebarPrerequisite
or CameoPrerequisite
CheckExpandPlaceGrid
► UseNewGrid
And possibly remove Expand from ExpandLandGridFrames and ExpandWaterGridFrames
And cannot EligibleForAllyBuilding
be reused here instead of creating the new tag UnitBaseForAllyBuilding
?
If the features are not very intertwined and it's not hard to do a split would be preferable. I understand that we're over our review capacity at the moment though and because of that maybe it's not necessary at least yet.
Get the idea. The placing grids and units base normal are hard to split, but I think it can still be divided into three parts, although it will take me some time. So later I will make modifications to the review that was just submitted, then do a split when I have time.
Add new functions for cameos. And will split this pr in a few days.
I have been really busy lately, so I will wait until I have some free time to do the splitting. Even if it is split, I won't have the energy to make any modifications, so wait for now. Here may be no need for review at the moment, this can be focused on other good places. If you are interested in this, maybe you can give it a try, at least so far the feedback I've received says it's good.
I have been really busy lately, so I will wait until I have some free time to do the splitting. Even if it is split, I won't have the energy to make any modifications, so wait for now. Here may be no need for review at the moment, this can be focused on other good places. If you are interested in this, maybe you can give it a try, at least so far the feedback I've received says it's good.
Take your time! It's not a big priority to split the features at all, the pull request isn't as big. More of a "nice to have" than a requirement in this case.
I will update the docs soon and these GIFs will show you the main function.