Page 1 of 1
12b - Sandworm Stairs - issue and workaround
Posted: Thu Oct 14, 2010 9:40 pm
by overtrix
On Level 2 the stairs from Level 1 were generated without any surrounding free squares - i.e. alone in the sea of sand.
Coming back up, the sandworm burrowers were never burrowing to those stairs. As a workaround, rather than leave Julie the Noldor Archer to sit there until world's end, I played with the sandworm burrower AI to make them target the stairs using the hotspot of a neighbouring 'room' (by adding offsets, the -2 and +4 below) ...
Code: Select all
newAI("sandworm_tunneler", function(self)
-- Get a spot
if not self.ai_state.spot_x then
local s = rng.table(game.level.spots)
self.ai_state.spot_x = s.x - 2
self.ai_state.spot_y = s.y + 4
end
... need to be a bit careful, and change it back once up the stairs. I'm sure there's a more elegant way of getting out of it, but this worked - just had to be careful to figure out where to be first, for hitching a lift.
Re: 12b - Sandworm Stairs - issue and workaround
Posted: Thu Oct 14, 2010 9:46 pm
by Shoob
the better way to do it, is to adjust a sandworms path to include either the up.x and up.y or the down.x and the down.y every so often (every 300 turns?) that way they can be gotten off course and then readjust back onto the stairs (this shift should affect all sandworm burrowers, with "even" ones going to one and the "odds" going to the other.
this would make some... interesting... paths, but that doesnt matter i dont think
Re: 12b - Sandworm Stairs - issue and workaround
Posted: Fri Oct 15, 2010 6:09 am
by yufra
I have seen isolated stairs in the SWL, but a quick look through the engine.generator.map.Roomer code I am at a loss as to how it happens. Theoretically the spots table (used by the tunneler AI) has an entry for every room (lines 295-297). The stair generation (makeStairsInside) should pick a non-blocking (so not sand) tile, and add the stairs there, so if all non-sand tiles are part of rooms and all rooms are represented in spots... confusion.
overtrix, do you by chance still have that character? If you do can you post the desc.lua, game.teag and zone-sandworm-lair.teaz files? They will probably be too large to post on the forum, so you can email them to me (I will PM you my email).
EDIT: Except I cannot PM you.

Re: 12b - Sandworm Stairs - issue and workaround
Posted: Fri Oct 22, 2010 1:54 pm
by darkgod
I added stairs to the tunnelers pathing.
Fixed!
Re: 12b - Sandworm Stairs - issue and workaround
Posted: Fri Oct 22, 2010 10:25 pm
by overtrix
Hi yufra - in an attempt to do something other than explore this fascinating new version of ToME the annals of early Ladies of Lorien were sent following them to Mandos. Of course that resolve didn't last long.
The isolated-stairs thing only happened once anyway, and DG says it won't happen again. Overall I found this version of the Sandworm Lair dispiriting with early characters - they would work their way up, gathering their personal features, then head south to be buried under sand and die in two game turns, sooner or later. It took 4-5 tries to work out how to make it a matter of being careful and properly equipped - which was just about tolerable for me but someone newer to roguelikes might spend weeks feeling their way around the other dungeons rather than hours, then a tunnel collapses and one movement keypress will be fatal, it doesn't even qualify as YASD.
The concept and mechanics are so cool, can understand that it's hard to change - but maybe the damage per game turn from collapsing sand would be worth reducing, say to 100 HP or so per turn, give folk a chance to realize that forcing their way out is unlikely to work, then "oh wait, I wonder if this Phase Door scroll will save the day ?" and they're hooked

Re: 12b - Sandworm Stairs - issue and workaround
Posted: Fri Oct 22, 2010 10:34 pm
by darkgod
I have reduced the damage
Re: 12b - Sandworm Stairs - issue and workaround
Posted: Sat Oct 23, 2010 12:52 am
by Grey
Changing the whole "wall-bumping uses a turn" thing would also be nice for the sandy place. It's easy to lose a lot of HP from a single wrong keypress.