ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed Dec 13, 2017 5:16 am

All times are UTC




Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Wed Aug 07, 2013 1:47 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1413
Location: A shallow water area south of Bree
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:
Hooks:
  Game:alterGameMenu [to add our 'Show known Landmarks' menu option]
Superload:
  mod.class.Player:
    autoExplore() [to continue to the last selected landmark]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Last edited by Zizzo on Wed Nov 13, 2013 5:31 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed Aug 07, 2013 10:16 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
PostPosted: Thu Aug 08, 2013 3:08 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1413
Location: A shallow water area south of Bree
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..."


Top
 Profile  
 
PostPosted: Sat Aug 10, 2013 12:06 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1413
Location: A shallow water area south of Bree
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..."


Top
 Profile  
 
PostPosted: Sun Aug 11, 2013 5:48 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
PostPosted: Thu Aug 15, 2013 12:12 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1413
Location: A shallow water area south of Bree
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..."


Top
 Profile  
 
PostPosted: Thu Aug 15, 2013 12:38 am 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
PostPosted: Tue Sep 03, 2013 2:18 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1413
Location: A shallow water area south of Bree
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..."


Top
 Profile  
 
PostPosted: Tue Sep 03, 2013 3:00 am 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
PostPosted: Thu Sep 05, 2013 8:45 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
PostPosted: Sun Sep 08, 2013 3:29 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1413
Location: A shallow water area south of Bree
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..."


Top
 Profile  
 
PostPosted: Mon Sep 09, 2013 2:50 pm 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
PostPosted: Fri Nov 01, 2013 4:14 am 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
PostPosted: Fri Nov 01, 2013 4:27 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1413
Location: A shallow water area south of Bree
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..."


Top
 Profile  
 
PostPosted: Fri Nov 01, 2013 7:10 am 
Offline
Sher'Tul Godslayer

Joined: Tue Jun 18, 2013 10:46 pm
Posts: 2275
Location: Ambush!
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group