Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Pathing/Avoid orders  (Read 524 times)

OneRaven

  • Bay Watcher
    • View Profile
Pathing/Avoid orders
« on: August 11, 2009, 03:32:07 pm »

I don't know of many things that can be damaged by dwarves or destroyed walking over them, but two important ones that can be are spider webs and saplings. A simple solution is some options on the orders screen: Dwarves avoid/ignore webs/saplings. If one of these options is set to avoid, the pathing system treats tiles with a web/sapling as restricted traffic tiles. If you don't mind your dwaves taking a zigzag path through the forest, you'll have better regrowth of trees, and the same for caves and webs.
Logged
Messing with hardcoded stuff is playing with fire. And we all know how dwarves react to fire.

Derakon

  • Bay Watcher
    • View Profile
Re: Pathing/Avoid orders
« Reply #1 on: August 11, 2009, 03:46:15 pm »

I certainly like this better than manually setting the pathing weights for each sapling you notice that you want to keep. However, I think "restricted" is a bit excessive here; just set them to "light" traffic and that should be entirely adequate.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

OneRaven

  • Bay Watcher
    • View Profile
Re: Pathing/Avoid orders
« Reply #2 on: August 11, 2009, 04:14:54 pm »

Low traffic would be fine as well. ;) Restricting individual saplings sucks, though.

e: Shrubs are also killed by traffic. While not as useful to the average fortress as saplings->trees, "Avoid Shrubs" should probably be an option too.
« Last Edit: August 11, 2009, 04:35:24 pm by OneRaven »
Logged
Messing with hardcoded stuff is playing with fire. And we all know how dwarves react to fire.

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: Pathing/Avoid orders
« Reply #3 on: August 11, 2009, 04:47:27 pm »

What also be neat, is if you can set pathing based dorf activity, and make it so that one square is for one direction.

Like making a one way street, or making a three wide hallway, where the middle square is for dorf hauling stuff.
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

OneRaven

  • Bay Watcher
    • View Profile
Re: Pathing/Avoid orders
« Reply #4 on: August 11, 2009, 04:57:52 pm »

What also be neat, is if you can set pathing based dorf activity, and make it so that one square is for one direction.

Like making a one way street, or making a three wide hallway, where the middle square is for dorf hauling stuff.

The one-way-tile is an interesting idea, but how would you deal with dwarves attempting to path perpendicular/diagonally to the path?
Logged
Messing with hardcoded stuff is playing with fire. And we all know how dwarves react to fire.

Sizik

  • Bay Watcher
    • View Profile
Re: Pathing/Avoid orders
« Reply #5 on: August 11, 2009, 05:10:34 pm »

The one-way-tile is an interesting idea, but how would you deal with dwarves attempting to path perpendicular/diagonally to the path?

I was thinking they could work like this:
Code: [Select]
hhh
n^n
lll

So for a tile oriented up, moving upwards in any way acts as if they're high-traffic, sideways is normal, and backwards is low.
« Last Edit: August 11, 2009, 05:31:23 pm by Sizik »
Logged
Skyscrapes, the Tower-Fortress, finally complete!
Skyscrapes 2, repelling the zombie horde!

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Pathing/Avoid orders
« Reply #6 on: August 11, 2009, 05:24:12 pm »

A setting for traffic-marking shrubs, saplings and webs (each) would be very nice.

That said, expect lots of grass-trampling for the sake of FPS.
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

lucusLoC

  • Bay Watcher
    • View Profile
Re: Pathing/Avoid orders
« Reply #7 on: August 11, 2009, 06:17:47 pm »

The problem with the one way tile is it throws out the concept of the connectivity map, since the pathing algorthm would now have to be aware of a direction, and not just a connection. Right now path restrictions just adds a precieved lenght to any path that has that tile, so any path that has a restricted tile simply adds 100 (or whatever) to any path that has that tile. Dorfs go around that tile because they want to use the shortest path. Since A* uses a simple fill to calculate best path you would need the pathing algorythm to hold data not just for individual tiles (what we have now) but also for adjacent tiles. This is also the problem multi-tile cretures have, since they also need to calculate adjacent tile data.
Logged
Quantum dumps are proof of "memory" being a perfectly normal dimension in DF. ~Gazz

Pilsu

  • Bay Watcher
    • View Profile
Re: Pathing/Avoid orders
« Reply #8 on: August 12, 2009, 02:17:10 am »

Grass trampling is a complete mess right now. If anything, it should be disabled entirely until it's reworked
Logged

MMad

  • Bay Watcher
    • View Profile
Re: Pathing/Avoid orders
« Reply #9 on: August 12, 2009, 11:11:48 am »

Nice little suggestion. :)
Logged
"Ask not what your fortress can do for you - ask what you can do for your fortress."
Unapologetic ASCII abolitionist.