Author Topic: Units: Building/Custom Fields (For walking on walls, bridges, etc)  (Read 988 times)

ChupaReaper

  • Guest
Since we don't have height detected in the pathfinder, we can't have units climb buildings, but there could be another way.
Building Fields would work like surface, water and air, only with building versions (building-surface, building-air, etc), units in these fields would only be able to move around 'in' buildings with the 'climbable' flag on the matching field 9so units can't move from a a building in the surface field to one in the air field.

When in a building field, the unit is treated as if it's in a normal field (so attacks that target units in the surface field can also target surface-building units, but the range between the attacking unit and the target unit is increased by the height of the building cell the target unit is standing 'in').

Also the visual height of the unit in a building field is increased by the height of the building cell, so essential we can have a unit stand 'in' a wall unit but look like its standing on top of it and its range from enemy units is also increased so melee units can't get to it and ranged units have a slight disadvantage (projectiles firing at this unit would have to adapt also). Ranged units (attack-range 2+) standing in a building cell could not be affected by the range adjustment so they get a range advantage when in a tall building.

Finally, how do units get into a building field? Using a 'stairs' command or something could allow a unit a to move to a building and climb into it (or essentially walk up some stairs), it would maybe work in a slightly similar way to the load and unload skills but instead of loading the unit it puts the unit into the building field and increases its visual height and range to it's unit height.

Binary maps on buildings would have to be considered also, either a flag to tell units whether they can only walk on 1s when in the building field of the binary map building, or whether they can also walk over 0s (bridges could be formed). Or a second binary map for units climbing the building could be defined, or both features?

Also building-amphibious for buildings that both support water and surface units (bridges across water can essentially be built here).

I hope this all makes sense, instead of adding height to the pathfinder, we can simply add building surfaces? And units would be able to move from a building with the height of 2 to a building with a height of 10, it would look odd but it is a restriction without working on the pathfinder.

Multi-field buildings and units would be nice also (so really tall buildings that air units can fly through are placed on the surface but block air field units).
And yet another but final request here, units that can climb up buildings without using stairs (for stealthy things that would scale walls).
« Last Edit: 7 February 2011, 13:33:34 by ChupaReaper »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Units: Building Fields (For walking on walls, bridges, etc)
« Reply #1 on: 6 February 2011, 00:14:15 »
I think this is essentially the same as (or at least, akin to) the 'surface prop' zone, proposed long ago yet sadly never implemented (at least yet).

There are some details in the old water thread ("ahoy there!") and more were on the old bugzilla tracker, which was sadly lost...  I'll open a ticket on Trac, when I can be bothered re-elucidating  ;)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ChupaReaper

  • Guest
Re: Units: Building/Custom Fields (For walking on walls, bridges, etc)
« Reply #2 on: 7 February 2011, 13:38:17 »
Perhaps custom fields could be defined in a tech tree? Each custom field could define what other fields it can link to (units in customefield1 can walk from that onto customfield2)? Could essential make a wall field and a tower field and have wall stairs that can only be built in the wall field that can link to the tower field. Wall stairs could have the custom field 'wallstairs' and the 'wall' field and 'tower' fields can link to the 'wallstairs' field Basically there's a lot you can do with custom fields. Fields could also affect unit movement, define whether the height of the unit they're standing on affects their range and their en enemies range.

 

anything