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

[Highly Customized] Unit base normal and new placing grids #1478

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

CrimRecya
Copy link
Contributor

@CrimRecya CrimRecya commented Dec 28, 2024

  • You can now set CheckUnitBaseNormal to true to use units (without jumpjets) 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:

[General]
CheckUnitBaseNormal=false      ; boolean

[SOMEUNIT]                     ; UnitType
UnitBaseNormal=false           ; boolean
UnitBaseForAllyBuilding=false  ; boolean
  • If CheckUnitBaseNormal is set to true , Adjacent.AllowedUnit and Adjacent.DisallowedUnit will work for units as what Adjacent.Allowed and Adjacent.Disallowed do.

In rulesmd.ini:

[SOMEBUILDING]              ; BuildingType
Adjacent.AllowedUnit=       ; list of UnitTypes
Adjacent.DisallowedUnit=    ; list of UnitTypes
  • 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:

[Phobos]
DrawAdjacentBoundary=false       ; boolean

In rulesmd.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

Splits from #1335 .

Copy link

github-actions bot commented Dec 28, 2024

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.

@mevitar
Copy link

mevitar commented Feb 8, 2025

This ignores Adjacent.Allowed= , which means buildings that are restricted to be built only next to specific buildings will be buildable near a unit with UnitbaseNormal=yes.
Adjacent.Allowed= should either be expanded to allow VehicleTypes, or (i think better option) a similar tag should be added for buildings to check for specific VehicleTypes (like: Adjacent.AllowedUnits= ?)

Also, i see that only ground VehicleTypes appear to work. I can understand if it's not meant for InfantryTypes and AircraftTypes, as supporting them might be too problematic, but there still should be a note that only grounded VehicleTypes will work.

@CrimRecya
Copy link
Contributor Author

CrimRecya commented Feb 8, 2025

This ignores Adjacent.Allowed= , which means buildings that are restricted to be built only next to specific buildings will be buildable near a unit with UnitbaseNormal=yes. Adjacent.Allowed= should either be expanded to allow VehicleTypes, or (i think better option) a similar tag should be added for buildings to check for specific VehicleTypes (like: Adjacent.AllowedUnits= ?)

Get it. I will add it later.

Also, i see that only ground VehicleTypes appear to work. I can understand if it's not meant for InfantryTypes and AircraftTypes, as supporting them might be too problematic, but there still should be a note that only grounded VehicleTypes will work.

Okay, but I would like to know if you think infantry/air force (jumpjet, aircraft) need this feature?
If it's not necessary, it's very simple. I'll add an explanation later;
If necessary, the logic of that part needs to be redone (it won't be very complicated, but it will take time. In fact, infantry is also easy, but the air force cannot handle it like the original version).

@mevitar
Copy link

mevitar commented Feb 8, 2025

Okay, but I would like to know if you think infantry/air force (jumpjet, aircraft) need this feature? If it's not necessary, it's very simple. I'll add an explanation later; If necessary, the logic of that part needs to be redone (it won't be very complicated, but it will take time. In fact, infantry is also easy, but the air force cannot handle it like the original version).

Necessary or not is an incorrect question, because if it's there, then people will find a use for it. :P
(for example, an engineering helicopter that allows placing base defenses nearby, or a hero infantry that allows the same)
And I myself wanted to add it to an infantry, but i'll manage without it if i have to.

Still, i think adding it to air units might still be too much work for too little gain. Just a note that airborne objects are not supported should suffice.

@Metadorius
Copy link
Member

If it's not too complex, jumpjet vehicles could be cool too. For example, there was an old game called Urban Assault, I once wanted to replicate it in C&C. There a floating host station could build stuff around itself.

AircraftTypes I don't see much point in adding.

Also seeing that there's an UI improvement - it could be cool to show it in docs as an image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants