Wow, if you call the run_step from the explore command, it doesn't even do regen or anything between steps. XD
Fiddling with pathfinding
Collapse
X
-
Phew, okay I think I have managed to get the basics down, pressing explore will now explore until visible monster or next to rubble/door. One thing definitely want to tweak, and that is if light radius is 1 it doesn't go into corners in the corridors so leaves unexplored spots all the time.
Then next stuff will be to go to items I think.Comment
-
Alrighty, I think this is a workable passable solution now. Pressing autoexplore will now:
- stop if monsters visible
- stop if next to a door/rubble
- move to closest visible item, stop on it if it is not autopicked up
- keep going, if no easy ones left go again next to a door/rubble if any left
Took some stuff away from the code that to me seemed to be just unnecessary (torch radius updates, erm, those are done between turns anyway). Bit of maybe unnecessary checking for monsters still there in the running code itself, since I just flat out disabled running if visible monsters at all.
Github messing my mind again, trying to set it up properly is beyond me lol. edit: well got git fixed to a bit more sensible looking commit ...
edit 2: somehow changing the "name" of the link in forum post didn't change the underlying link, weird. This is the updated easier to read changes:
Last edited by ewert; January 4, 2025, 10:48.Comment
-
Okeydokey, added meleeclosest command to target, advance to or hit closest monster.
For example, how I use these commands is:
keybound + on numpad to p (autoexplore)
keybound - on numpad to P (meleeclosest)
keybound / on numpad to 'o'pen door (auto-opens if only 1 door next to you so usually smooth)
keybound * to kill-ReturnReturn, if you are standing on something you don't want, this will automatically squelch (item only) first item on stack
Rubble still needs manual ctrl-movement clicking but I think that's okay. If it is passable rubble, you can also just move through it so that you are not next to it, and you can restart explore again (same works for doors if you don't want to open them right away, move away from them after their surroundings are explored).
Here is the changes again:
I think some streamlining in the processing speeds to the code could be done, but then again not 100% if the changes I am thinking actually would be streamlining anything. Like checking only for visible grid monsters, instead of checking if a monster is visible (would have to check around 400 grids, instead of checking however monsters exist in the dungeon which often will be less than 400, so ...)
Lemme know what you think if anyone checks these changes out.Comment
-
Okay found a problem with mimics. I think I will just change the run code to call walks instead of manually move the player, that can get rid of all sorts of checks in the code to make it simpler. And since there are a lot of things that's supposed to be done between rounds, I think condensing "movement that takes a turn" into one function makes sense as well.Comment
Comment