Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

[Highly Customized] Base normal for all techno and new placing grids

Open CrimRecya opened this issue 11 months ago • 5 comments

  • You can now set CheckExtraBaseNormal to true to use every technos to expand the construction scope of the base.
    • ExtraBaseNormal controls whether our own buildings can be place around it like vanilla BaseNormal do.
    • ExtraBaseForAllyBuilding controls whether ally buildings can be place around it like vanilla EligibileForAllyBuilding do.

In rulesmd.ini:

[General]
CheckExtraBaseNormal=false      ; boolean

[SOMETECHNO]                    ; TechnoType
ExtraBaseNormal=false           ; boolean
ExtraBaseForAllyBuilding=false  ; boolean
- Do not assign this to too many technos.
  • If CheckExtraBaseNormal is set to true , Adjacent.AllowedExtra and Adjacent.DisallowedExtra will work for technos as what Adjacent.Allowed and Adjacent.Disallowed do.

In rulesmd.ini:

[SOMEBUILDING]              ; BuildingType
Adjacent.AllowedExtra=      ; list of TechnoTypes
Adjacent.DisallowedExtra=   ; list of TechnoTypes
  • 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 .

CrimRecya avatar Dec 28 '24 09:12 CrimRecya

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.

github-actions[bot] avatar Dec 28 '24 09:12 github-actions[bot]

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.

mevitar avatar Feb 08 '25 00:02 mevitar

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).

CrimRecya avatar Feb 08 '25 05:02 CrimRecya

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.

mevitar avatar Feb 08 '25 17:02 mevitar

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.

Metadorius avatar Feb 08 '25 18:02 Metadorius