• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help request over uncompatible units

Status
Not open for further replies.
Level 2
Joined
Jan 7, 2021
Messages
5
Hello, people from Hive.
I am new at the site and made an account specifically for this question.

Results that I did tests in world editor to find a cool way to create randomly generated terrain, also playable.
But I have come upon neuron incinerating results.

I made a map which consisted in simply water, when you play it, the triggers make up the terrain by conecting and elevating spared points.
However the units remember the movement allowance from the world editor.
Explained more, the units that float, such as boats, go up and around hills as wanted, because they believe that still the entire map is water.
On a similar way, if I make a walking unit above a bunch of generated terrain, the unit looks stuck unable to walk the land that he resides over.
The clipping is no problem. The terrain shapes are recognized.

The visceversa happens when the start is all upland and the triggers sink bits.
The units that walk can cross the amazonas as jesus does and the floating units can only pretend to be dial posts.

A way to work around this was to concede a portion of my patience and make them all amphibians.
Make a system that detects every 0.26 seconds if a land unit is at water level or a floating unit on elevated land, send a message to the owner accusing him of unrealistic behavior and delete the unit, discount him gold, play a fun song and force his defeat with a message that expresses my anger very well.

I made other maps with changing 'possible ways layout', with fixed zones, and removing or adding bridges that connect them, for example.
But as the theme is natural and castigating, I want the organity of the first mentioned method.

If you would help me, thanks.
 
Level 2
Joined
Jan 7, 2021
Messages
5
I may post the maps tomorrow.

Do messages like this one come to your inbox, or should I answer to each response individually? How do you quote parts from other messages?
 
You should be able to place doodads to enable pathing.
The pathmap is generated by the editor marking it all as water, regardless of how it's modified by triggers later.
If you generate invunderable destructables where it should be walkable with an appropriate pathing-texture, it should be possible to solve your problem.
Trees usually have "unwalkable, unbuildable" pathing texture, but I see no technical reason why it should be impossible to do "walkable" (the "invisible platform" exists after all).

Custom Pathing Maps for basic pathmap texture info.
 
Level 2
Joined
Jan 7, 2021
Messages
5
Hello

This map clears up what i explained>
problemswith modified terrain.w3x

This map is an example of a terrain modification system>
way layout examples respaldo.w3x

Starting from a dot of ground, a bird looks for nearby free space around a circle. When the bird finds free space, the bird lifts ground in it, the circle moves there and the bird starts looking for nearby free space again. If there is no free space to lift around, the circle moves to a random piece of previously lifted ground.
The result will be a single island, therefore any part can be traveled from and to anywhere without extra transport elements.

ThompZon,
The link helped me, but i see that there are no /float yes but ground no/ path styles.
Exampling the previous map, if i changed the path of trees to a form of pure /ground yes/ path tiles, /ground/ units would be able to be on land, but /float/ units would be able to be on land too. If i changed the path to /ground yes fly no/, and made the boats /fly/ units, could work, but i would have to restrict myself to not have planes and birds.
A goal would be to have flying, floating and ground units cohabitating. To this goal, that units behave correctly according to their movement form.

By the way, is this the correct sub to post this question? Can you post questions on this sub?

Thanks for waiting.
 

Attachments

  • way layout examples respaldo.w3x
    36.7 KB · Views: 53
  • problemswith modified terrain.w3x
    18.9 KB · Views: 52
Level 18
Joined
Jan 1, 2018
Messages
728
Keep in mind that GetLocationZ can cause desync.

Anyways I made a solution for a similar problem earlier: Help me with algorithm for changing the tileset
You can change it a bit to work here as well:
  • Map Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Custom script: set udg_WorldRect = GetWorldBounds()
      • Custom script: set udg_TempPoint = Location(0,0)
  • Command Pathing
    • Events
      • Player - Player 1 (Red) types a chat message containing -pathing as An exact match
    • Conditions
      • PathingSet Equal to False
    • Actions
      • Custom script: local real maxx = GetRectMaxX(udg_WorldRect)
      • Custom script: set udg_ChangeTerrainX = GetRectMinX(udg_WorldRect) + 16
      • Custom script: set udg_ChangeTerrainY = GetRectMinY(udg_WorldRect) + 16
      • Custom script: loop
      • Trigger - Run Change Terrain Pathing <gen> (ignoring conditions)
      • Custom script: exitwhen udg_ChangeTerrainX > maxx
      • Custom script: endloop
      • Trigger - Turn off (This trigger)
  • Change Terrain Pathing
    • Events
    • Conditions
    • Actions
      • Custom script: local real minx = GetRectMinX(udg_WorldRect) + 16
      • Custom script: local real miny = GetRectMinY(udg_WorldRect) + 16
      • Custom script: local real maxx = GetRectMaxX(udg_WorldRect)
      • Custom script: local real maxy = GetRectMaxY(udg_WorldRect)
      • Custom script: loop
      • Custom script: loop
      • Custom script: call MoveLocation(udg_TempPoint, udg_ChangeTerrainX, udg_ChangeTerrainY)
      • Custom script: set udg_Z = GetLocationZ(udg_TempPoint)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Z Greater than or equal to -88.00
        • Then - Actions
          • Environment - Set terrain pathing at TempPoint of type TODO to On/Off
        • Else - Actions
          • Environment - Set terrain pathing at TempPoint of type TODO to On/Off
      • Custom script: set udg_ChangeTerrainY = udg_ChangeTerrainY + 32
      • Custom script: exitwhen udg_ChangeTerrainY > maxy
      • Custom script: endloop
      • Custom script: set udg_ChangeTerrainY = miny
      • Custom script: set udg_ChangeTerrainX = udg_ChangeTerrainX + 32
      • Custom script: exitwhen udg_ChangeTerrainX > maxx
      • Custom script: endloop
 
Level 2
Joined
Jan 7, 2021
Messages
5
Thompzon
I know now for the link, but the point of the problem is: what color do i paint a path to make it walkable by ground units, but not by floating (not flying) units?

Drake73
As I understand, this code checks if each tile on the map is above water level, and turns their terrain pathing off or on, correct?
However, how can I apply this so:
If the tile is above water level, it cannot be entered by a float unit
If the tile is at water level, it cannot be entered by a ground unit
More amplified, the goal is:
Ground units can move, but only on land
Boats can move, but only on water
Planes can move on the map as they please
Having known that the lands are generated, of course.

Thank you for your answers.
 
Level 6
Joined
Oct 29, 2007
Messages
34
Interresting aproach.

1. You try to do something the game engine was not designed for. When doing things on the edge of the possibilities of the game engine, keep an eye on the time/success probabilities of the things you want to achieve. For this very reason I ditched the use of water in my own map generator. However cool the idea of water might look, keep in mind it mightjust not be possible/ worth your time.

2. When posting something other people have to use/ review, please use “english” informative variable and unit names. G2 and G1 doesn’t tell me anything, it’s hard to read your code that way. Make use of comments. Clean coding is important.

3. Are you considering the generation time it takes? I try to stay under 15 seconds in my own generator, when using units this might become a problem. Have you considered vectors, radius and strength? You appear to use units instead of vectors. Try using vectors, it’s much quicker.

Can you tell me a bit more about your experience about random generation outside of warcraft 3? It might be useful if I want to point out specific resources to you.
 
what color do i paint a path to make it walkable by ground units, but not by floating (not flying) units?

Damn, I was sure it was a color in the pathmap, but apparently not... I have no idea how to solve that problem, even after a few minutes of googling, sorry.

There is a recent thread with comments related to, but not answering, your problem:
Pathing - Everything about it
 
Level 2
Joined
Jan 7, 2021
Messages
5
Interresting aproach.

1. You try to do something the game engine was not designed for. When doing things on the edge of the possibilities of the game engine, keep an eye on the time/success probabilities of the things you want to achieve. For this very reason I ditched the use of water in my own map generator. However cool the idea of water might look, keep in mind it mightjust not be possible/ worth your time.

2. When posting something other people have to use/ review, please use “english” informative variable and unit names. G2 and G1 doesn’t tell me anything, it’s hard to read your code that way. Make use of comments. Clean coding is important.

3. Are you considering the generation time it takes? I try to stay under 15 seconds in my own generator, when using units this might become a problem. Have you considered vectors, radius and strength? You appear to use units instead of vectors. Try using vectors, it’s much quicker.

Can you tell me a bit more about your experience about random generation outside of warcraft 3? It might be useful if I want to point out specific resources to you.
2. Noted it, I might add comments if I happen to renew the map.
3. I have no info on vectors and radiuses, but helps.

All the tries I remember doing regarding randomized land were done on Warcraft.

Thank you for your time and help, I intuite that you might have wanted to do collaborations, but I am not constant and enthusiasted; you can see with the date that I respond to these comments.
 
Status
Not open for further replies.
Top