ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Nov 24, 2017 2:09 am

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page Previous  1, 2

Should Norseband retain an astral dungeon?
Yes 60%  60%  [ 3 ]
No 0%  0%  [ 0 ]
I'm not sure 40%  40%  [ 2 ]
Total votes : 5
Author Message
 Post subject:
PostPosted: Thu Feb 23, 2006 6:11 pm 
Hmm... So you couldn't just create a new kind of vault consisting of nothing but a square with "deep hole" tiles, and make sure that it's created on every level? The exact position isn't so important, who says Chaos has to be symmetrical, after all :)

I didn't quite think of COMPLETELY damaging walls, more like in the Melkor temples - normal walls with randomly placed chains of nether and/or elemental tiles, making long-range travel more difficult and painful but still letting you hide in walls. When you stair-scum (and in the astral that's the sensible thing to do) you don't stay long enough on Lvl 1 anyway to HAVE to hide in walls. But the idea with shifting wall types and tiles is pretty neat as well, the way you describe it. Heh... Guess it now comes to bite me that I never went to the Heart, I just hate Mirkwood too much to even try.

With 99 Levels and uber-monsters, don't you think the Maze-like perpetual darkness is a bit over the top, though? It's hard enough to get to the next stairs as it is, even when you know where they are. Stumbling through the darkness with no inkling to where the next Greater Undead monster pit might be sounds pretty harsh.


Top
  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 6:21 pm 
Offline
Uruivellas

Joined: Tue Dec 09, 2003 12:53 am
Posts: 634
Location: Madison, Wisconsin, USA
You've got a point about the perpetual darkness handicapping players who begin in an über-challenging dungeon already; I'll scrap that feature. A "hole vault" sounds like a cool way to put a dark, unusable shaft on every floor. Still, I can see one big coding problem: how do you restrict a specific vault type to one dungeon only? (I'm assuming that the current T-Engine allows such a rule in the first place...)

_________________
Ingeborg S. Nordén
(isnorden@gmail.com)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 6:35 pm 
Actually, I think you could maybe realize the "dark" feeling by simply using a level-wide lowpowered Vision spell coupled with Reveal Ways, just like in the Halls except without the general lighting up. That way you could see the rough outline of the dungeon, but not the exact tiles or even items. In a very spacious and rugged dungeon (and thus with many tiles remaining unseen) it would still feel moody without being overtly unfair.

Hmm... Sadly, I have no idea how to restrict vaults to certain dungeons. I don't think you can per se, but maybe you could make it extremely high (or low) level, like 9999 or something? That way it wouldn't crop up with any regularity in normal dungeons, but you could still insert it manually. This is just theory, though, but from looking at the v_info i'd guess vaults are indeed sorted by depth.


Top
  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 10:29 pm 
Offline
Uruivellas

Joined: Tue Jan 27, 2004 3:10 pm
Posts: 743
Location: UK
You can't do that with vaults, unfortunately, and I don't think you can tell the game to load a specific vault from f_info.txt.

However, what you can do instead is create it as a normal lua type map and tell the game to load it and where to place it on each level.

[EDIT:] Something like this should do:

Code:
function big_hole()
   if current_dungeon_idx == 19 then
      local ysize, xsize = get_map_size(hole)
      local tries = 0
      --msg_print(format("ysize= %s, xsize= %s", ysize, xsize))
      while TRUE do
         if ysize < cur_hgt and xsize < cur_wid then
            load_map(hole, cur_hgt/2 - ysize/2, cur_wid/2 - xsize/2)
            break
         else
            player.leaving = TRUE
            tries = tries+1
            if tries >= 200 then
               msg_print(TERM_VIOLET,"Warning: could not place hole")
               break
            end
         end
      end
   end
end
add_hook_script(HOOK_LEVEL_END_GEN, "big_hole", "hig_hole")

hole =
[[#!map
F:#:87:0

D:  ##  # # # # 
D:   ### ## ####
D: ## ######## ##
D:  ############
D: ############ 
D: ## ### ### ###
D:#   #   #   ##
]]


It loads the "hole" map in the middle of a level. It's set up for the orc caves atm (dungeon idx 19), and places the #'s as "dark pit" feature(no.87). You can of course change it to anything else, and change the hole to look as you need.

This will create the same size / shape hole in the middle of every level. If you want a variable size, random hole on each level, then I expect I could find some means of doing that as well. This would probably be the ideal solution, since it would eliminate size problems.

I wasn't sure whether it would do this exactly as I wanted, since I was afraid that it would replace the entire rectangle (spaces included), or that it was possible to find the x and y size, but it all seems to work fine.

[EDITn+1: changed the script above to mean that it'll effectively regenerate the level if the first one is too small for the map, up to the tries limit, at which point it'll give the error.]


(For history's sake: here is the get around script that I foolishly wrote first to get around the non-existant problems...)
Code:
function big_hole()
   if current_dungeon_idx == 19 then
      local i,j
      local lenm = strlen(hole[1])
      --msg_print(format("wid = %s, hgt = %s", cur_wid, cur_hgt))
      for j = 1, getn(hole) do
         for i = 1, strlen(hole[j]) do
            if strlen(hole[j]) > lenm then
               --msg_print("Increasing lenm")
               lenm = strlen(hole[j])
            end
         end
      end
      if cur_wid >= lenm and cur_hgt >= getn(hole) then
         --msg_print("Hole placement started...")
         local starty = cur_hgt/2 - getn(hole)/2
         local startx = cur_wid/2 - strlen(hole[1])/2
         --msg_print(format("starty = %s, startx = %s", starty, startx))
         for j = 1, getn(hole) do
            for i = 1, strlen(hole[j]) do
               if strbyte(hole[j], i) == strbyte('#') then
                  cave(starty + j, startx + i).feat = 87
               end
            end
         end
      elseif cur_wid < strlen(hole[1]) then
         msg_print("Warning: width too small to place 'hole'")
      else
         msg_print("Warning: height too small to place 'hole'")
      end
   end
end
add_hook_script(HOOK_LEVEL_END_GEN, "big_hole", "hig_hole")

hole =
{
[[  ##  # # # #  ]],
[[   ### ## #### ]],
[[ ## ######## ##]],
[[  ############ ]],
[[ ############  ]],
[[ ## ### ### ###]],
[[#   #   #   ## ]],
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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