Author Topic: Getting over low fences  (Read 4519 times)

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Getting over low fences
« on: August 01, 2019, 05:13:11 pm »
Is there a mod out there (I haven't found one) that would allow soldiers (and probably some aliens?) to get over low fences and hedges? If not, is it hard to implement myself?

I have always been bugged by the fact that a soldier can drop from several floors' edge without consequences, but they can't get over a waist-high or chest-high barrier that anyone half-decently trained should get no trouble surmounting in a moment, i.e. wasting not much more TUs than walking. Instead you have to make them go around or shoot the barrier, which also wastes a lot of time (besides they can miss it and hit the ground).

I'm not interested in animation of it, it would be just as fine if it was standard walking animation, I'm only interested in the result, i.e. getting the soldiers over low (waist-high or chest-high) fences with only spending about 8-10 TUs.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Getting over low fences
« Reply #1 on: August 01, 2019, 05:34:28 pm »
Yes, I tried it and it worked, but the unit simply phased through the fence without shifting upwards.
I think the only thing to be done is changing the movement costs from 255 to something appropriate, for example 6.

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Getting over low fences
« Reply #2 on: August 01, 2019, 08:15:43 pm »
Yes, I tried it and it worked, but the unit simply phased through the fence without shifting upwards.
I think the only thing to be done is changing the movement costs from 255 to something appropriate, for example 6.

That's great! But what should I edit for it? Is it done via rulesets or some other files? For now I only know how to edit rul files, and do not know which parameters to change for movement cost.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Getting over low fences
« Reply #3 on: August 01, 2019, 08:47:59 pm »
That's great! But what should I edit for it? Is it done via rulesets or some other files? For now I only know how to edit rul files, and do not know which parameters to change for movement cost.

You can try using MCDpatches (which is a ruleset), but it's way simpler to get MCDEdit, a dedicated program for editing MCDs, by Volutar - it's the best editor ever.

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Getting over low fences
« Reply #4 on: August 01, 2019, 09:44:43 pm »
I am on Linux, so I can't use MCDEdit (only with Wine, but I doubt I can make it work). So, maybe you could show me the ropes concerning the MCDpatches? As far as I understand I need to create a rul file with:

MCDPatches:
  - type: URBAN (BARN, or something else)
    data:
      - MCDIndex: X
        TUWalk: 8
        TUFly: 8
        TUSlide: 8

But how can I find out which files contain the needed elements (low barriers) and these elements' MCDIndexes?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Getting over low fences
« Reply #5 on: August 01, 2019, 11:53:28 pm »
I use MCDEdit on Linux (Ubuntu), it should just work with Wine, no real configuration needed.

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Getting over low fences
« Reply #6 on: August 02, 2019, 04:51:27 am »
Mcdview works on linux i believe, its part of mapview2

Offline Kzer-Za

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: Getting over low fences
« Reply #7 on: August 02, 2019, 09:58:53 am »
Okay, I will try launching it, thanks for the advice.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Getting over low fences
« Reply #8 on: August 23, 2019, 11:43:09 pm »
To make them go up, you must change the height of the tile. Check stairs for examples. There is a maximum height difference that any unit can scale--meaning your soldiers and the aliens can equally walk over the fence. Only way to change this is to differentiate between time unit costs of walking versus sliding over it. If you set the height of the fence to the maximum value they can walk over, then they will animate walking over it much like it was a small mound. You can also make the fence too high to scale, and put objects (such as hay bales) adjacent to the fence to allow a unit to scale the fence in certain locations--but the aliens should have no difficulty pathing over the fence using these tiles.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Getting over low fences
« Reply #9 on: August 24, 2019, 10:37:21 am »
To make them go up, you must change the height of the tile. Check stairs for examples. There is a maximum height difference that any unit can scale--meaning your soldiers and the aliens can equally walk over the fence. Only way to change this is to differentiate between time unit costs of walking versus sliding over it. If you set the height of the fence to the maximum value they can walk over, then they will animate walking over it much like it was a small mound. You can also make the fence too high to scale, and put objects (such as hay bales) adjacent to the fence to allow a unit to scale the fence in certain locations--but the aliens should have no difficulty pathing over the fence using these tiles.

Right, but it only applies to objects - not walls.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Getting over low fences
« Reply #10 on: August 25, 2019, 06:17:34 am »
Right, but it only applies to objects - not walls.
Right. So the fences and such in question must be converted into objects for this to work. That will require not just changing their tile type to object, but I believe also reworking the map to place them in the object slot of their tile. This means in some cases where there is an existing object already there, it must be moved or removed.