[v1.0.4-1.0.5] Go to Landmark

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[v1.0.4-1.0.5] Go to Landmark

#1 Post by Zizzo »

So after one too many time tearing my hair out and scouring the entire map trying to remember where Ruined Dungeon or Elven Ruins was for this character, I finally sat down and bashed out a quick Go to Landmark addon. This addon adds a new option to the <Esc> menu, "Show known Landmarks", that pops up a list of landmarks you've seen on the current level and lets you go to them or view them on the map.

"Landmarks" for our purposes roughly corresponds to what auto-run considers interesting enough to stop for: up/down stairs, zone entrances on the world map, stores, and grids marked 'special' (notably unopened golden chests) or 'orb_portal' (portal to the East? I assume). On the world map, it also flags Agrimley as a landmark (if you've found him), and marks entrances of zones you haven't entered yet as "[never visited]", so the list can also serve as a useful reminder of where your character has been.

Now, this one is definitely going into ZOmnibus eventually (else none of my poor characters will be able to use it until they've died and been restarted); I'm putting it out now for testing and feedback.

[And I keep forgetting to add the Technical info that Darkgod asked for:]

Code: Select all

Hooks:
  Game:alterGameMenu [to add our 'Show known Landmarks' menu option]
Superload:
  mod.class.Player:
    autoExplore() [to continue to the last selected landmark]
Last edited by Zizzo on Wed Nov 13, 2013 5:31 am, edited 2 times in total.
"Blessed are the yeeks, for they shall inherit Arda..."

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#2 Post by Doctornull »

That's awesome. I'll try this with my next character.

Does it also flag stuff like Healing Pot... er, Font of Life?

Those can be important for Wild-Gift users who don't have an Equilibrium regen talent yet.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Go to Landmark

#3 Post by Zizzo »

Doctornull wrote:Does it also flag stuff like Healing Pot... er, Font of Life?

Those can be important for Wild-Gift users who don't have an Equilibrium regen talent yet.
No idea. [sound F/X: source diving] The corresponding terrain doesn't appear to be flagged 'special', so probably not. Does running stop there? I note that the terrain is flagged 'notice', which Player:runCheck() does appear to take into account. It would be a fairly easy change to add a 'notice' flag check, but it looks like that might drag in a lot of other terrain types that we wouldn't necessarily want to count as "landmarks". Let me do some testing on it.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Go to Landmark

#4 Post by Zizzo »

So I eventually just went with the expedient route of recognizing Fonts of Life by grid entity name, to avoid any potential conflicts. That's pushed out in v2, along with a tweak to the landmark list to show estimated distance to each landmark.

Any other landmarks anyone wants before this goes into ZOmnibus?
"Blessed are the yeeks, for they shall inherit Arda..."

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#5 Post by Doctornull »

Nice, thank you!

One annoying thing I noticed ... when my dude stops walking due to some silly triviality like "damaged by stepping on lava", or "ooo look it's blighted soil", he loses track of where he was headed, and I have to go back through the interface to re-select a landmark, often times twice (since he'll stop in front of a notable feature and then stop again on top of the feature).

Would it be possible to do something like...
- Landmark menu sets target tile in some persistent variable
- Hitting a key resumes auto-walk to target tile

Ideally, it would integrate with the default auto-explore / auto-exit finder, making the 'z' key work like...
- Have target tile? Try to go there!
- At target tile when 'z' hit? Check if zone is fully explored!
--- Not yet: Auto-explore!
--- Zone all explored: Auto-set target tile to nearest exit (excluding current tile) and try to go there!

That would preserve current behavior and cleanly integrate landmark targeting, allowing me to resume progress to target landmark even if interrupted (by a monster or other landmark or suffocation or whatever).
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Go to Landmark

#6 Post by Zizzo »

Doctornull wrote:One annoying thing I noticed ... when my dude stops walking due to some silly triviality like "damaged by stepping on lava", or "ooo look it's blighted soil", he loses track of where he was headed, and I have to go back through the interface to re-select a landmark, often times twice (since he'll stop in front of a notable feature and then stop again on top of the feature).
Yeah, I ran into that in testing. That is kind of annoying.
Doctornull wrote:Would it be possible to do something like...
- Landmark menu sets target tile in some persistent variable
- Hitting a key resumes auto-walk to target tile
Now, do you mean hitting any key, or hitting a particular key?
Doctornull wrote:Ideally, it would integrate with the default auto-explore / auto-exit finder, making the 'z' key work like...
- Have target tile? Try to go there!
- At target tile when 'z' hit? Check if zone is fully explored!
--- Not yet: Auto-explore!
--- Zone all explored: Auto-set target tile to nearest exit (excluding current tile) and try to go there!

That would preserve current behavior and cleanly integrate landmark targeting, allowing me to resume progress to target landmark even if interrupted (by a monster or other landmark or suffocation or whatever).
So, hitting the 'z' key, then. That would certainly be feasible in theory, though it would mean diving into the uncharted depths that is the auto-explore code... :?
"Blessed are the yeeks, for they shall inherit Arda..."

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#7 Post by Doctornull »

Zizzo wrote:Now, do you mean hitting any key, or hitting a particular key?
(...)
So, hitting the 'z' key, then. That would certainly be feasible in theory, though it would mean diving into the uncharted depths that is the auto-explore code... :?
I mentioned hitting 'z' because it's the current "go walk to place" key, and it seems to have some rudimentary target persistence, but which key does the landmark thing is not really important. The important thing is persistence of target so interruptions aren't annoying.

If you're at the current target, or there is no target, then the 'go to target' key can pop up the landmark list menu thing. :)
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Go to Landmark

#8 Post by Zizzo »

Well, auto-explore turned out to be a tangled mess that I didn't want to try to disentangle --- so I pretty much hijacked it instead. :wink: Now, I wanted to be careful not to leave auto-explore in an invisibly hijacked state, continuing to go back to the same landmark when the player no longer wants it to, so I'm using a slightly dodgy hack, inspired by the Antimagic Disruption effect you get if you wear arcane-disrupting equipment while being arcane. In this new version, when you use the go-to-landmark function you are given a new temporary status effect Going to Landmark, which persists until you arrive at the landmark, leave the level or cancel it manually; as long as you have this effect, the auto-explore key will try to go to your most recent landmark instead of doing its usual auto-exploring. That seemed like a reasonably clean way of keeping the player informed of what's happening.

Now, this is a pretty major change, so I'm going to put this out as v3 for some more testing and feedback before merging it into ZOmnibus.
"Blessed are the yeeks, for they shall inherit Arda..."

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#9 Post by Doctornull »

That's awesome. It's unobtrusively visible, and it sounds nicely integrated into the rest of the UI.

Downloading now.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#10 Post by Doctornull »

The new version has been working perfectly for me, even in combination with a bunch of other addons.

Chests in particular are great: only the unopened ones show up in the list :) (Could that behavior be extended to graves? Or at least show the opened / disturbed status?)
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Go to Landmark

#11 Post by Zizzo »

Doctornull wrote:Chests in particular are great: only the unopened ones show up in the list :) (Could that behavior be extended to graves? Or at least show the opened / disturbed status?)
[sound F/X: source diving] Hm. Graves don't clear their 'special' flag when opened, as chests do. Apparently the correct way to detect this is by checking the 'autoexplore_ignore' flag, which both chests and graves set when opened. And as long as I'm pushing out a new version, I might as well add a couple other tweaks I've been toying with:
  • I've added some colors to the landmark list, specifically the "(est.dist.)" and "[never visited]" parts; the text was a bit too hard to read without it.
  • The Going to Landmark effect is cleared when you step on the landmark; auto-explore, however, stops when you're next to a font of life, and obviously it's impossible to step onto a store. I've tweaked that to clear the effect if you're within one grid of the landmark, which should take care of both cases.
That's now out as v3a.
"Blessed are the yeeks, for they shall inherit Arda..."

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#12 Post by Doctornull »

It's interesting that go-to-landmark works even in areas where autoexplore does not (like the Sandworm lair). Using it there will probably get you killed, of course, but that's just the price of convenience. ;)

I haven't found a grave yet, I'll report back when I do.

Thanks!
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#13 Post by Doctornull »

BTW, graves seem to work great under 1.0.4

Should this addon work with 1.0.5?
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Go to Landmark

#14 Post by Zizzo »

Doctornull wrote:BTW, graves seem to work great under 1.0.4
*whew* :wink:
Doctornull wrote:Should this addon work with 1.0.5?
(shrug) No idea; I haven't looked at the code from any of the 1.0.5 beta releases yet to see what I'm going to need to change in my addons. This one in particular doesn't touch much, so my guess would be that it'll work.
"Blessed are the yeeks, for they shall inherit Arda..."

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.0.4] Go to Landmark

#15 Post by Doctornull »

Zizzo wrote:
Doctornull wrote:Should this addon work with 1.0.5?
(shrug) No idea; I haven't looked at the code from any of the 1.0.5 beta releases yet to see what I'm going to need to change in my addons. This one in particular doesn't touch much, so my guess would be that it'll work.
Seems to work fine on 1.0.5f so far. :)
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Post Reply