Vault Contest v2

All new ideas for the upcoming releases of ToME 4.x.x should be discussed here

Moderator: Moderator

Message
Author
FuzzyCuddlyBunny
Wayist
Posts: 20
Joined: Sat Feb 25, 2017 4:05 am

Vault Contest v2

#1 Post by FuzzyCuddlyBunny »

Hello my fellow players, I have come here today to propose a vaults contest!

Everybody loves a good, deadly vault and they are really easy to create! The vaults we already have ingame seem to frequently show up, so some increased variety would be welcome!
I will post a guide on how to make vaults and then you are very welcome to go wild.

Cathbald, Orange, and myself will add to the game any vaults we deem fun (and that DarkGod is willing to accept :wink:).

For each vault also post which zones it would logically be possible to spawn in.

And get wild, you can do normal vaults but don't hesitate to suggest special scripted events/mechanisms inside the vault too; one of us may or may not be able/want to do it, but then, it just might happen :D

So be creative, have fun!

FuzzyCuddlyBunny
Wayist
Posts: 20
Joined: Sat Feb 25, 2017 4:05 am

Re: Vault Contest v2

#2 Post by FuzzyCuddlyBunny »

Creating a vault for ToME is easy. Basic steps:

1) Draw a picture of your vault using your favorite text editor, representing walls and loot and monsters and whatever else using letters and symbols. It helps with readability to pick appropriate letters and symbols; consider using ^ to represent traps, for example, or D to represent a big dragon.

2) Make a 'key' to your map of the vault, telling the game what you meant by all the symbols you used. ToME can't just read a D and know that you mean a big dragon. You have to tell it explicitly.

You don't need any special software. Use a monospaced font so your vault map looks nice and rectangular. When you post your vault code in this thread, put the text inside code tags, like this:

Code: Select all

 blah blah blah 
This will force the forum to display the text in a monospaced font.

Below is a sample vault into which I try to put all the features commonly seen in current vaults. It looks long and complicated, but that's only because I'm trying to make a comprehensive example. Use it as a reference later, and remember that most vaults are much simpler than this. A detailed explanation of each line follows the vault code.

Code: Select all

--sample vault

startx = 3
starty = 7 
 
setStatusAll{no_teleport=true}
rotates = {"default", "90", "180", "270", "flipx", "flipy"}

defineTile('%', "WALL")
defineTile('.', "FLOOR")
defineTile('#', "HARDWALL")
defineTile('+', "DOOR")
defineTile('X', "DOOR_VAULT")
defineTile('&', "LAVA_FLOOR")
defineTile('~', "DEEP_WATER")

defineTile('$', "FLOOR", {random_filter={add_levels=20, type="money"}})
defineTile('\', "FLOOR", {random_filter={add_levels=5, tome_mod="vault"}})
defineTile('|', "FLOOR", {random_filter={add_levels=5, tome_mod="gvault"}})
defineTile('/', "FLOOR", {random_filter={add_levels=5, tome_mod="uvault"}})

defineTile('D', "FLOOR", nil, {random_filter={add_levels=5, name = "fire drake"}})
defineTile('U', "FLOOR", nil, {random_filter={add_levels=10, type = "demon", subtype = "major"}})
defineTile('a', "FLOOR", nil, {random_filter={add_levels=1, type = "animal"}})
defineTile('x', "FLOOR", nil, {random_filter={add_levels=15}})
 
defineTile('^', "FLOOR", nil, nil, {random_filter={add_levels=20}})

defineTile('a', "FLOOR", {random_filter={add_levels=10, tome_mod="vault"}}, {random_filter={add_levels=15, type = "insect", subtype = "ant"}})
defineTile('b', "FLOOR", {random_filter={add_levels=15, tome_mod="gvault"}}, nil, {random_filter={add_levels=20}})
defineTile('c', "FLOOR", nil, {random_filter={add_levels=10, type = "animal", subtype = "canine"}}, {random_filter={add_levels=5}})
defineTile('d', "FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=10, name = "storm wyrm"}}, {random_filter={add_levels=5}})

 return {
 [[########]],
 [[#^.abcd#]],
 [[#D..Uax#]],
 [[#+%%%%+#]],
 [[#~~~&&&#]],
 [[#~~~&&&#]],
 [[#$..\|/#]],
 [[###X####]],
 }
 
The first line is a commented out (begins with --) name for the vault, so we know what to call the file when the vault eventually gets included in ToME.

Then we have this:

Code: Select all

startx = 3
starty = 7 
This is only really necessary for vaults whose center is sealed off behind walls, making pathing impossible. That's not the case with my sample vault, but including it doesn't hurt. The coordinates 3, 7 give the location of the vault door (X).

These lines...

Code: Select all

setStatusAll{no_teleport=true}
rotates = {"default", "90", "180", "270", "flipx", "flipy"}
... tell the game that teleporting isn't allowed in this vault, and that the game can feel free to generate the vault rotated or flipped for the sake of variety.

All of the lines that follow define a symbol used on the map at the end, telling the game what exactly to put on that tile in the vault when it's generated. Tiles include, at the least, terrain features. In addition, they can have loot, monsters, and traps. Each 'defineTile()' statement is a comma-separated list. The first item in the list is the symbol used on your map that you're defining. The second is the terrain type to use, followed by loot, monster, and trap. So the the format goes like this:
defineTile(symbol used, terrain, loot, monster, trap)

The first seven such lines in my sample vault all have only two entries in their lists: the symbol used and the terrain type. If you don't put anything after those, the game assumes you don't want anything else. So these seven lines produce tiles in the game of a certain terrain type with no loot, monsters, or traps.

The next four lines include a third item in their lists that specifies loot to generate. The line...

Code: Select all

defineTile('$', "FLOOR", {random_filter={add_levels=20, type="money"}}) 
...says to put a normal floor tile down where you put the $ symbol, and to include a pile of gold on that tile generated at twenty levels above the current zone's level. Vaults typically generate loot, monsters, and traps at well above the level on which the vault appears.
The line...

Code: Select all

defineTile('|', "FLOOR", {random_filter={add_levels=5, tome_mod="gvault"}})
...says to generate an item on a normal floor tile where you put the | symbol in your map. The item will be generated five levels above the current zone level, and the part that says tome_mod="gvault" tells the game to give that item a better chance of being high quality. The three levels of quality-weighting available are "vault" (above average), "gvault" (way above average), and "uvault" (amazing). Use "uvault" very sparingly, since it very frequently generates artifacts.

The next four lines all have a fourth entry in the list. This tells the game what type of monster to generate. Notice that the third entry in each of these is 'nil', which says to generate no loot. It's certainly possible to generate both loot and monsters (and traps) on a single tile, but I start with one at a time. Monsters can be specified in several ways. In my four lines, I go in decreasing order of specificity; the first line says to make a very particular monster: a fire drake. The second says to make a major demon, but doesn't specify which one. The third line says to make an animal; it could be anything from a cobra to a polar bear. The fourth line says to just generate any old monster (and to add 15 to its level).

This line...

Code: Select all

defineTile('^', "FLOOR", nil, nil, {random_filter={add_levels=20}})
...produces a normal floor tile with no loot, no monsters, and a +20 level trap.

The four final defineTile() lines all generate a floor tile with more than one interesting feature.

Code: Select all

defineTile('a', "FLOOR", {random_filter={add_levels=10, tome_mod="vault"}}, {random_filter={add_levels=15, type = "insect", subtype = "ant"}})
The above line makes a tile with vault-quality item, an ant, and no trap.

Code: Select all

defineTile('b', "FLOOR", {random_filter={add_levels=15, tome_mod="gvault"}}, nil, {random_filter={add_levels=20}})
The above line makes a tile with a greater-vault-quality item, no monster, and a trap.

Code: Select all

defineTile('c', "FLOOR", nil, {random_filter={add_levels=10, type = "animal", subtype = "canine"}}, {random_filter={add_levels=5}})
The above line makes a tile with no item, a canine monster, and a trap.

Code: Select all

defineTile('d', "FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=10, name = "storm wyrm"}}, {random_filter={add_levels=5}})
The above line makes a tile with an uber item, a storm wyrm, and a trap.

The last part is your ascii drawing of the vault, returned as a comma-separated list of rows but organized in a nice, stacked-up format so they read like what the vault will look like in-game.

For more examples of vaults, look through the ones already in-game. They can be viewed here: https://git.net-core.org/tome/t-engine4 ... aps/vaults

Recaiden
Thalore
Posts: 179
Joined: Mon Jul 30, 2018 8:41 pm

Re: Vault Contest v2

#3 Post by Recaiden »

This is a basic little vault full of WORMS, inspired by dying to Worms that Walk in Kor'Pul Circle Vaults.
I think it should appear in Halfling Ruins and Dreadfell. And in Kor'Pul if the player is Recaiden

Code: Select all

startx = 4
starty = 7

specialList("actor", {
	"/data/general/npcs/horror.lua",
	"/data/general/npcs/vermin.lua",
})

setStatusAll{no_teleport=true}
rotates = {"default", "90", "180", "270", "flipx", "flipy"}

defineTile('o', "WALL")
defineTile('.', "FLOOR")
defineTile('#', "HARDWALL")
defineTile('X', "DOOR_VAULT")

defineTile('$', "FLOOR", {random_filter={add_levels=20, type="money"}})
defineTile('*', "FLOOR", {random_filter={add_levels=5, tome_mod="gvault"}})

defineTile('w', "FLOOR", nil, {random_filter={add_levels=5, name = "carrion worm mass"}} )
defineTile('W', "FLOOR", nil, {random_filter={add_levels=10, name = "worm that walks"}} )

return {
 [[#########]],
 [[#..w*w..#]],
 [[#..www..#]],
 [[#..ooo..#]],
 [[#.......#]],
 [[#.Wo.oW.#]],
 [[#$$o.o$$#]],
 [[####X####]],
}
Image
Last edited by Recaiden on Thu Nov 07, 2019 2:29 am, edited 1 time in total.

Recaiden
Thalore
Posts: 179
Joined: Mon Jul 30, 2018 8:41 pm

Re: Vault Contest v2

#4 Post by Recaiden »

This is an open-air 'vault' for Daikara and Tempest Peak, featuring a trio of giants atop a small hill, reachable by switchbacks.
The interior mountains are 'cliffs' which can be seen and shot over, but not walked on. Possibly they should look a little different from basic mountains.

Code: Select all

-- Daikara, Tempest Peak

specialList("actor", {
	"/data/general/npcs/snow-giant.lua",
})

specialList("terrain", {
        "/data/general/grids/mountain.lua",
        "/data/general/grids/king_of_the_hill_terrain.lua",
})

rotates = {"default", "90", "180", "270", "flipx", "flipy"}

defineTile('#', "HARDMOUNTAIN_WALL")
defineTile('.', "ROCKY_GROUND")
defineTile('v', "CLIFFSIDE")

defineTile('$', "ROCKY_GROUND", {random_filter={add_levels=20, type="money"}})

defineTile('T', "ROCKY_GROUND", {random_filter={add_levels=5, tome_mod="gvault"}}, {random_filter={add_levels=8, name = "snow giant thunderer"}} )
defineTile('G', "ROCKY_GROUND", nil, {random_filter={add_levels=5, name = "snow giant boulder thrower"}} )

return {
 [[##########]],
 [[.........#]],
 [[.vvvvvvv.#]],
 [[.v.....v.#]],
 [[.v.vGT.v.#]],
 [[.v.v$G.v.#]],
 [[.v.vvvvv.#]],
 [[.v.......#]],
 [[.#########]],
}
An alternate, less spirally layout:

Code: Select all

return {
 [[##########]],
 [[.........#]],
 [[.vvvvvvv.#]],
 [[.v.......#]],
 [[.v.vvvvvv#]],
 [[.v.v.....#]],
 [[.v.v.v.TG#]],
 [[.v...v.G$#]],
 [[.#########]],
}

helminthauge
Wyrmic
Posts: 212
Joined: Sat Sep 29, 2018 3:43 am

Re: Vault Contest v2

#5 Post by helminthauge »

Can be placed in any place where a greater vault can spawn, because of the size and rather high-level enemy types (wyrms!).

Code: Select all

startx = 6
starty = 0

setStatusAll{no_teleport=true}
rotates = {"default", "90", "180", "270"} -- no need to flipx or flipy

specialList("actor", {
   "/data/general/npcs/cold-drake.lua",
   "/data/general/npcs/fire-drake.lua",
   "/data/general/npcs/storm-drake.lua",
   "/data/general/npcs/venom-drake.lua",
   "/data/general/npcs/multihued-drake.lua",
})

local hues_drake = {"fire", "cold", "storm", "venom", "multi-hued"}
local hues_wyrm = {"fire", "ice", "storm", "venom", "fire", "ice", "storm", "venom", "greater multi-hued"}
local function spawnD()
   local wyrm = rng.percent(2.5 * math.max(0, game.player.level - 15)) -- 0% chance to spawn a wyrm until level 15 (included), +2.5% per level higher, to 87.5% at level 50
   local name = wyrm and (rng.table(hues_wyrm).." wyrm") or (rng.table(hues_drake).." drake")
   return name
end

defineTile('#', "HARDWALL")
defineTile(' ', "FLOOR")
defineTile('X', "DOOR_VAULT")
defineTile('%', "WALL")

defineTile('a', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('b', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('c', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('d', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('e', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('f', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('g', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('h', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('i', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('j', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('k', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('l', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={add_levels=10, name = spawnD()}})
defineTile('A', "FLOOR", {random_filter={add_levels=10, tome_mod="uvault"}}, {random_filter={add_levels=15, name = spawnD()}})
defineTile('B', "FLOOR", {random_filter={add_levels=10, tome_mod="uvault"}}, {random_filter={add_levels=15, name = spawnD()}})
defineTile('C', "FLOOR", {random_filter={add_levels=10, tome_mod="uvault"}}, {random_filter={add_levels=15, name = spawnD()}})
defineTile('D', "FLOOR", {random_filter={add_levels=10, tome_mod="uvault"}}, {random_filter={add_levels=15, name = spawnD()}})

--tile ^ is a trap, triggering on vault open, which mimics a spinning trap, but has following featers:
----spinning 2 beams at the same time, to opposite directions
----range 4 --just enough to hit the furthest #
----randomly dealing fire/cold/acid/lightning damage and can harm those dragons
----player with a 12-turn digger should be able to dig a wall withou touching the beam, and the beam damage should be something worth dodging in a fight.
defineTile('*', mod.class.Grid.new{
   define_as = "DOOR_OPENING_FLOOR",
   type = "floor", subtype = "trapped_floor",
   name = "floor", image = "terrain/marble_floor.png",
   display = '.', color_r=255, color_g=255, color_b=255, back_color=colors.DARK_GREY,
   grow = "WALL",
   on_move = function(self, x, y, actor, forced)
      if not actor.player then return end
      if forced then return end
      game.logPlayer(actor, "Something in the floor clicks ominously.")
      local g = game.zone:makeEntityByName(game.level, "terrain", "FLOOR")
      local grids = {}
      for xx = x - 5, x + 5 do for yy = y - 5, y + 5 do
         local grid = game.level.map.map[yy * game.level.map.h + xx][1]
         if grid.type == "wall" and grid.subtype == "floor" and grid.dig == "FLOOR" or grid.type == "floor" and grid.subtype == "trapped_floor" then
            game.zone:addEntity(game.level, g, "terrain", xx, yy)
            grids[#grids + 1] = {x = xx, y = yy}
         end
      end end
      for _, xy in pairs(grids) do game.nicer_tiles:updateAround(game.level, xy.x, xy.y) end
      g = nil
      grids = nil
   end})

return {
   [[######X######]],
   [[####a#b#c####]],
   [[##A#%#%#%#B##]],
   [[###%     %###]],
   [[#l%       %d#]],
   [[###  ***  ###]],
   [[#k%  *^*  %e#]],
   [[###  ***  ###]],
   [[#j%       %f#]],
   [[###%     %###]],
   [[##D#%#%#%#C##]],
   [[####i#h#g####]],
   [[#############]],
}
half-finished, because of my lack of programming skills (or can I blame that dg didn't add an onopen interface to vaults?)
Maybe some nice guy can help me finish it :D

plus I really want to use Chinese characters to draw maps, because they're more square, and each of them actually means something (who would know whether that "T" is treant or troll or thief or trap or throne or treasure or whatever), and have shear numbers (maybe there're some guys wanting to use more than 100 symbols lol)
example: (a similar map as above)
[[壁壁壁壁壁壁壁門壁壁壁壁壁壁壁]],
[[壁壁壁龙壁龙壁龍壁龙壁龙壁壁壁]],
[[壁壁壁墙壁墙壁墙壁墙壁墙壁壁壁]],
[[壁龙墙         墙龙壁]],
[[壁壁壁         壁壁壁]],
[[壁龙墙         墙龙壁]],
[[壁壁壁   开开开   壁壁壁]],
[[壁龍墙   开罠开   墙龍壁]],
[[壁壁壁   开开开   壁壁壁]],
[[壁龙墙         墙龙壁]],
[[壁壁壁         壁壁壁]],
[[壁龙墙         墙龙壁]],
[[壁壁壁墙壁墙壁墙壁墙壁墙壁壁壁]],
[[壁壁壁龙壁龙壁龍壁龙壁龙壁壁壁]],
[[壁壁壁壁壁壁壁壁壁壁壁壁壁壁壁]],
Last edited by helminthauge on Sat Nov 09, 2019 2:19 am, edited 3 times in total.

helminthauge
Wyrmic
Posts: 212
Joined: Sat Sep 29, 2018 3:43 am

Re: Vault Contest v2

#6 Post by helminthauge »

plus, any easy way to test a self-written vault in the game?

helminthauge
Wyrmic
Posts: 212
Joined: Sat Sep 29, 2018 3:43 am

Re: Vault Contest v2

#7 Post by helminthauge »

Water prison, mimicing greater-checkerboard, but much smaller, and force player to dig in water (and fight aquatic monsters), and offer player a chance to drown tanky enemies they can't kill otherwise. Can be placed in any non-flooded area.

Code: Select all

startx = 1
starty = 2

setStatusAll{no_teleport=true, vault_only_door_open=true}
rotates = {"default", "90", "180", "270", "flipx", "flipy"}

specialList("actor", {
	"/data/general/npcs/aquatic_critter.lua",
	"/data/general/npcs/aquatic_demon.lua",
	"/data/general/npcs/horror_aquatic.lua",
	"/data/general/npcs/naga.lua",
})

defineTile('#', "HARDWALL")
defineTile('~', "DEEP_WATER")
defineTile('X', "DOOR_VAULT")
defineTile('%', "WALL")
defineTile('8', "DEEP_WATER", {random_filter={add_levels=15, tome_mod="gvault"}}, {random_filter={add_levels=50}})

return {
	[[~~~~~~~~~~~]],
	[[~#########~]],
	[[~X8%8%8%8#~]],
	[[~#######%#~]],
	[[~#8%8%8%8#~]],
	[[~#%#######~]],
	[[~#8%8%8%8X~]],
	[[~#########~]],
	[[~~~~~~~~~~~]],
}

starsapphire
Thalore
Posts: 132
Joined: Sat Sep 27, 2014 11:33 am
Location: Irkkk

Re: Vault Contest v2

#8 Post by starsapphire »

This is a vault design demonstrating a powerful sleeping wyrm's nest, based on some pleasant personal experience in Daikara.
This powerful wyrm has accumulated some personal treasures in its nest, just like various vaults across the world. However, as it is sleeping and inactive, you can try to steal the treasure, without the need to fight any enemy. But beware: Nobody knows when it will wake up.
This is a simple prototype design and it haven't been debugged or polished, and I am not sure if it will be suitable for the theme of this contest.
The powerful level of the enemy, the reward… there are so many things to tweak. I will be very happy to get feedback from you.

Code: Select all

startx = 4
starty = 7

setStatusAll{no_teleport=true}
rotates = {"default", "90", "180", "270", "flipx", "flipy"}

defineTile('o', "WALL")
defineTile('.', "FLOOR")
defineTile('#', "HARDWALL")
defineTile('X', "DOOR_VAULT")
unique = "sleeping_dragon_vault"
local Talents = require("engine.interface.ActorTalents")
specialList("actor", {
   "/data/general/npcs/cold-drake.lua",
   "/data/general/npcs/fire-drake.lua",
   "/data/general/npcs/storm-drake.lua",
   "/data/general/npcs/venom-drake.lua"
}, true)
local wyrm_types = {
   cold={"cold drake", "ice wyrm"},
   fire={"fire drake", "fire wyrm"},
   storm={"storm drake", "storm wyrm"},
   venom={"venom drake", "venom wyrm"}
}
local wyrm_types_names = {"cold", "fire", "storm", "venom"}
roomCheck(function(room, zone, level, map)
   if level._wyrm_awoken then
      return false
   end
   local wyrm_types_name = rng.table(wyrm_types_names)
   local wyrm_type = wyrm_types[wyrm_types_name]
   local drake_name, wyrm_name = wyrm_type[1], wyrm_type[2]
   for i, e in ipairs(room.npc_list) do -- set up special wyrm rarity
      if not e.wyrm_rarity and e.name == wyrm_name then
         e.wyrm_rarity = e.rarity; e.rarity = nil
      elseif not e.drake_rarity and e.name == drake_name then
         e.drake_rarity = e.rarity; e.rarity = nil
      end
   end
   return true
end)
onplace = function(room, zone, level, map, data)
   map._wyrm_awoken = level.level
end
onGenerated(function(zone, level, map) -- update the zone after the vault is placed (in case the level was regenerated)
	if map._wyrm_awoken == level.level then
		level._wyrm_awoken = level.level
	end
end
)
local check_sleep = function(self)
   if game.level.wyrm_awoken == true then
      return true
   end
   if not game.level.seen_wyrm_awoken then
      game.level.seen_wyrm_awoken = true
      game.log("The dragons here are asleep. You may try to steal their treasure... at your own risk.")
   end
   if not self:hasEffect(self.EFF_SLEEP) then
      self:setEffect(self.EFF_SLEEP, 999, {src=self, power=1, waking=0, insomnia=0, contagious=0})
   end
   return true
end
local aggro_wyrm = function()
   if game.level.wyrm_awoken == true then
      return false
   end
   game.level.wyrm_awoken = true
   for uid, e in pairs(game.level.entities) do
      if e.sleeping_wyrm == true then
         e:removeEffect(e.EFF_SLEEP)
         e:setTarget(game.player)
      end
   end
   game.log("#CRIMSON#Those dragons are suddenly awoken when you are stealing their treasure!")
   return true
end
local aggro_wyrm_takehit = function(self, value, src)
   aggro_wyrm()
   return value
end
local aggro_wyrm_grid = function(chance)
   local g = game.zone.grid_list.FLOOR:clone()
   g.on_move = function(self, x, y, actor, forced)
      if not actor.player then return end
      if forced then return end
      if game.level.wyrm_awoken then return end
      if not rng.percent(chance) then return end
      aggro_wyrm()
   end
   return g
end
defineTile('1', aggro_wyrm_grid(2), {random_filter={add_levels=25, type="money"}})
defineTile('2', aggro_wyrm_grid(5), {random_filter={add_levels=10, tome_mod="uvault"}})
defineTile('3', aggro_wyrm_grid(25), {random_filter={add_levels=15, tome_mod="gvault"}})
defineTile('W', "FLOOR", nil,
   {entity_mod=function(e) 
      e.make_escort = nil
      e.on_seen = check_sleep
      e.on_act = check_sleep
      e.on_takehit = aggro_wyrm_takehit
      e.sleeping_wyrm = true
      return e
   end,
   random_filter={special_rarity="wyrm_rarity",
      add_levels=35,
      random_boss={name_scheme="Sleeping #rng#", force_classes={Wyrmic=true}, nb_classes=0, loot_quality="store", loot_quantity=1, rank=3.5}
      }
   }
)
defineTile('D', "FLOOR", nil,
   {entity_mod=function(e) 
      e.make_escort = nil
      e.on_seen = check_sleep
      e.on_act = check_sleep
      e.on_takehit = aggro_wyrm_takehit
      e.sleeping_wyrm = true
      return e
   end,
   random_filter={special_rarity="drake_rarity",
      add_levels=15,
      random_boss={name_scheme="Dozing #rng#", force_classes={Wyrmic=true}, nb_classes=0, loot_quality="store", loot_quantity=1, rank=3.5}
      }
   }
)
return {
 [[#########]],
 [[#...W...#]],
 [[#..131..#]],
 [[#..232..#]],
 [[#D.121.D#]],
 [[#..111..#]],
 [[#..o.o..#]],
 [[####X####]],
}
QQ_img20191108165514.jpg
QQ_img20191108165514.jpg (90.99 KiB) Viewed 11307 times
Last edited by starsapphire on Sun Dec 29, 2019 3:03 pm, edited 1 time in total.

starsapphire
Thalore
Posts: 132
Joined: Sat Sep 27, 2014 11:33 am
Location: Irkkk

Re: Vault Contest v2

#9 Post by starsapphire »

I have made a simple Addon to help me debuging my vault.
This addon is very simple and unpolished, just hope it will be helpful for some people:
tome-vault_test.zip
(7.29 KiB) Downloaded 345 times
This Addon adds a new zone: Vault Test Zone, stored in (data/zones/vault-test).
This zone can only be accessed with Developer Mode on and use Change Zone command. I strongly recommand to enable Developer Mode when you are designing your vault.
It is a daikara-like zone, cleared with enemies and items. Your vault will appear here.
Your vault would be stored in overload/data/maps/vaults/*, there is already a test_vault.lua here, featuring my wyrm vault, you can replace it with your own vault or other vaults in this post.
After that, you can modify data/zones/vault-test/zone.lua, and add your vault name to lesser_vaults_list and greater_vaults_list.
Lesser vaults will appear in the floor, and greater vaults will be placed in hidden vault out of the floor, like those in High Peak. If you store you vault in test_vault.lua, you won't need to change this file.

This is just a simple temporary widget, hope people with more addon designing experience will design better vault debuging tools.

helminthauge
Wyrmic
Posts: 212
Joined: Sat Sep 29, 2018 3:43 am

Re: Vault Contest v2

#10 Post by helminthauge »

another wild idea, which I don't bother trying programming myself because the core part is just beyond my programming ability.

It's just a small-size square vault, with nothing but a single npc in. That npc is a random humanoid of some hyperboss level (maybe with 5 classes) but starting with half hp, and about one-third talents on half CD. If it's killed it will drop a lot of stuff (because it just cleared this vault and looted it), and if it kills player it will offer an option that if player is willing to give it a lot of money (maybe like 8k) it won't deal the killing blow and let player go (remember also remove all debuffs on player from it). It should be hostile to all creatures other than its summons, but if it kills other mobs, their drops won't appear on map but are moved to its inventory.

nsrr
Sher'Tul
Posts: 1126
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: Vault Contest v2

#11 Post by nsrr »

Starting to get the hang of this. I'm mostly interested in revamping some of the early vaults and adding more variety to them. With that in mind, this is my first submission, a reworking of the honey glade vault.

This cuts off the trail that leads up to the glade and removes the traps as well as trimming the surrounding thicket a bit, considerably reducing the area this takes up within a level. You'll notice at the end that we don't just return one set ascii map, we choose randomly from four. Defining the tiles and such is the hard part, making ascii maps is easy, so I'd really like to see something like this implemented for more vaults.

Code: Select all

--name: honey_glade_small
setStatusAll{no_teleport=true}
roomCheck(function(room, zone, level, map)
	return resolvers.current_level <= 25 and zone.npc_list.__loaded_files["/data/general/npcs/swarm.lua"] -- make sure the honey tree can summon
end)
specialList("actor", {
	"/data/general/npcs/bear.lua",
	"/data/general/npcs/plant.lua",
	"/data/general/npcs/swarm.lua",
})
specialList("terrain", {
	"/data/general/grids/forest.lua",
}, true)
local Floor = data.floor or "GRASS"
defineTile('X', "ROCK_VAULT", nil, nil, nil, {room_map={special=false, room=true, can_open=true}})
defineTile(' ', Floor)
defineTile('#', "HARDTREE")
defineTile('*', Floor, {random_filter={add_levels=10, tome_mod="vault"}})
defineTile('T', Floor, nil, {random_filter={name="honey tree", add_levels=15}})
defineTile('t', Floor, nil, {random_filter={name="honey tree"}})
defineTile('B', Floor, nil, {random_filter={name="bee swarm", add_levels=10}})
defineTile('b', Floor, nil, {random_filter={name="bee swarm", add_levels=5}})
defineTile('G', Floor, {random_filter={add_levels=20, tome_mod="vault"}}, {random_filter={name="grizzly bear", add_levels=20}})
defineTile('g', Floor, nil, {random_filter={name="brown bear", add_levels=10}})

startx = 2
starty = 10

rotates = {"default", "90", "180", "270", "flipx", "flipy"}
--Introducing: Our Patented Alt-Vault System(R)
local version = rng.range(1,4)
if version == 4 then 
	return { -- more or less the original, 4 weak trees, 4 brown bears, 1 grizzly
	[[#######]],
	[[##*g*##]],
	[[#tgGgt#]],
	[[#t g t#]],
	[[##   ##]],
	[[### ###]],
	[[###X###]],
	}
elseif version == 3 then 
	return { -- grizzly bear and a bunch of weak swarms
	[[#######]],
	[[##   ##]],
	[[#bb bb#]],
	[[#*bTb*#]],
	[[## G ##]],
	[[### ###]],
	[[###X###]],
	}
elseif version == 2 then
	return { -- 2 brown bears, 3 strong swarms, no narrow spot
	[[#######]],
	[[## t ##]],
	[[# * * #]],
	[[# gTg #]],
	[[# B*B #]],
	[[## B ##]],
	[[###X###]],
	}
else -- always return something
	return { -- 2 grizzly bears, one strong swarm
	[[#######]],
	[[## * ##]],
	[[# GTG #]],
	[[#  B  #]],
	[[##   ##]],
	[[### ###]],
	[[###X###]],
	}
end

starsapphire
Thalore
Posts: 132
Joined: Sat Sep 27, 2014 11:33 am
Location: Irkkk

Re: Vault Contest v2

#12 Post by starsapphire »

Image
The living are not the only terrible things on eyal, even items may express their warth. Those weapons have accumulate enough hate after years of staying in the vault and being transmoged into metal. Beware.
A sample design of Animated weapon vault, based on Mango Kangaroo's idea on Discord. (Thank you very much for your greatest idea!)
My art talent is terrible, so the vault design is very underpolished and ugly. o_o It's just an technical preview for vault coding.
Hope someone will make a better design and add more atmosphere into it.

These code is somewhat a bit dumb, I will be very happy to change the code if there is a better workaround.

Code: Select all

setStatusAll{no_teleport=true}
rotates = {"default", "90", "180", "270", "flipx", "flipy"}

local Talents = require("engine.interface.ActorTalents")
--make other requirement equipment from Cursed Sentry
local make_req = function(el, o, subtype, slot)
    local o2 = nil
    if o.subtype == subtype then
        o2 = o:clone()
        o2.no_drop = true
    else
        local level = o.material_level or 1
        -- Code from cursed aura
        local egos = o.egos_number or (o.ego_list and #o.ego_list) or (o.egoed and 1) or 0
        local greater = o.greater_ego or 0
        local double_greater = (o.unique and egos == 0) or greater > 1  -- artifact or purple
        local greater_normal = (o.unique and egos > 2) or greater == 1 and egos > 1 -- randart or blue
        local greater = (o.unique and egos > 0) or greater == 1 and egos == 1  -- rare or blue
        local double_ego = not o.unique and greater == 0 and egos > 1
        local ego = not o.unique and greater == 0 and egos == 1
        local filter = {subtype=subtype, ignore_material_restriction=true, tome={double_greater=double_greater and 1, greater_normal=greater_normal and 1,
        greater = greater and 1, double_ego = double_ego and 1, ego = ego and 1}, special = function(e) return not e.unique and e.material_level == level end}
        o2 = game.zone:makeEntity(game.level, "object", filter, nil, true)
        o2.no_drop = true
        if slot == "QUIVER" then o2.infinite = true end
    end
    el[#el+1] = {o2, slot or "OFFHAND"}
end
local make_poltergeist = function(type)
    local o = nil
    local filter = nil
    local x_level = nil
    if type == "greater" then
        filter = {id=true, type="weapon", add_levels=10, --force_tome_drops=true, --tome_drops="boss", tome_mod="uvault",
        --subtype = "whip",
        unique=true,
        special=function(o) return true end}
        x_level = math.max(15, resolvers.current_level + 10)
    elseif type == "normal" then
        filter = {id=true, type="weapon", add_levels=5, force_tome_drops=true, tome_drops="store", tome_mod="gvault", special=function(o) return true end}
        x_level = math.max(10, resolvers.current_level + 5)
    elseif type == "smaller" then
        filter = {id=true, type="weapon", add_levels=0, force_tome_drops=true, tome_drops="store", tome_mod="vault", special=function(o) return true end}
        x_level = math.max(5, resolvers.current_level)
    end
    o = game.zone:makeEntity(game.level, "object", filter, nil, true)
    o.no_drop = false
    local e = mod.class.NPC.new{
        type = "construct", subtype = "weapon",
        display = o.display, color=o.color, image = o.image, blood_color = colors.GREY,
        faction = "enemies",
        body = { INVEN = 10, MAINHAND=1, OFFHAND=1, QUIVER=1,PSIONIC_FOCUS=1},
        level_range = {x_level, nil},
        ai = "tactical", ai_state = { talent_in=2, ai_move="move_astar", },
        ai_tactic = resolvers.tactic"melee",
        stats = {wil= 20, cun = 20, mag = 20, con = 20},
        resolvers.sustains_at_birth(),
        resolvers.talents{
            [Talents.T_WEAPON_COMBAT]={base=1, every=10, max=5},
        },
        combat_armor = 10, combat_defense = 10,
        cut_immune = 1,
        blind_immune = 1,
        fear_immune = 1,
        poison_immune = 1,
        disease_immune = 1,
        stone_immune = 1,
        see_invisible = 30,
        infravision = 10,
        no_breath = 1,
        disarm_immune = 1,
        size_category = 2,
        -- Not sure whether give them that ability, giving they have no hands.
        -- open_door = true, 
    }
    local class = nil
    local req = nil
    local el = {}
    if o.subtype == "staff" then
        class = "Archmage"
        e.autolevel = "caster"
        e[#e+1] = resolvers.talents{
            [Talents.T_STAFF_MASTERY]={base=1, every=10, max=5},
            [Talents.T_CHANNEL_STAFF]={base=1, every=10, max=5},
        }
    elseif o.subtype == "longbow" then
        class = "Archer"
        e.autolevel = "archer"
        e.ai_tactic = resolvers.tactic"ranged"
        e[#e+1] = resolvers.talents{
            [Talents.T_MASTER_MARKSMAN] = {base=1, every=10, max=5},
            [Talents.T_STEADY_SHOT] = {base=1, every=10, max=5},
            [Talents.T_SHOOT] = 1
        }
        make_req(el, o, "arrow", "QUIVER")
    elseif o.subtype == "sling" then
        class = "Archer"
        e.autolevel = "slinger"
        e.ai_tactic = resolvers.tactic"ranged"
        e[#e+1] = resolvers.talents{
            [Talents.T_MASTER_MARKSMAN] = {base=1, every=10, max=5},
            [Talents.T_STEADY_SHOT] = {base=1, every=10, max=5},
            [Talents.T_AGILE_DEFENSE] = 1,
            [Talents.T_SHOOT] = 1
        }
        make_req(el, o, "shield")
        make_req(el, o, "shot", "QUIVER")
    elseif o.subtype == "mindstar" then
        class = "Mindslayer"
        e.autolevel = "wildcaster"
        e[#e+1] = resolvers.talents{
            [Talents.T_PSIBLADES] = {base=1, every=10, max=5},
            [Talents.T_TELEKINETIC_SMASH] = {base=1, every=10, max=5},
        }
        e[#e+1] = resolvers.equip{
            {type="weapon", subtype="greatsword", autoreq=true, force_inven = "PSIONIC_FOCUS", no_drops=true},
        }
        make_req(el, o, "mindstar")
    elseif o.subtype == "steamgun" then --For Orcs DLC!
        class = "Gunslinger"
        e.autolevel = "slinger"
        e.ai_tactic = resolvers.tactic"ranged"
        e[#e+1] = resolvers.talents{
            [Talents.T_STEAMGUN_MASTERY] = {base=1, every=10, max=5},
            [Talents.T_STRAFE] = {base=1, every=10, max=5},
            [Talents.T_SHOOT] = 1
        }
        e[#e+1] = resolvers.inscription("IMPLANT:_STEAM_GENERATOR", {cooldown=32, power=10}),
        make_req(el, o, "steamgun")
        make_req(el, o, "shot", "QUIVER")
    elseif o.subtype == "steamsaw" then 
        class = "Sawbutcher"
        e.autolevel = "warrior"
        e[#e+1] = resolvers.talents{
            [Talents.T_STEAMSAW_MASTERY]={base=1, every=10, max=5},
            [Talents.T_TO_THE_ARMS] = {base=1, every=10, max=5},
        }
        e[#e+1] = resolvers.inscription("IMPLANT:_STEAM_GENERATOR", {cooldown=32, power=10}),
        make_req(el, o, "steamsaw")
    elseif o.type == "weapon" and o.offslot == "OFFHAND" then
        class = "Rogue"
        e.autolevel = "rogue"
        e[#e+1] = resolvers.talents{
            [Talents.T_KNIFE_MASTERY]={base=1, every=10, max=5},
            [Talents.T_EXOTIC_WEAPONS_MASTERY]={base=1, every=10, max=5},
            [Talents.T_DUAL_WEAPON_MASTERY]={base=1, every=10, max=5},
            [Talents.T_LETHALITY]=1,
            [Talents.T_DUAL_STRIKE]={base=1, every=10, max=5},
        }
        make_req(el, o, "dagger")
    elseif o.type == "weapon" and o.slot_forbid == "OFFHAND" then --Non mindstar dual weapon
        class = "Berserker"
        e.autolevel = "warrior"
        e[#e+1] = resolvers.talents{
            [Talents.T_WEAPONS_MASTERY]={base=1, every=10, max=5},
            [Talents.T_EXOTIC_WEAPONS_MASTERY]={base=1, every=10, max=5},
            [Talents.T_STUNNING_BLOW_ASSAULT]={base=1, every=10, max=5},
        }
    elseif o.type == "weapon" and o.offslot == nil then
        class = "Bulwark"
        e.autolevel = "warrior"
        e[#e+1] = resolvers.talents{
            [Talents.T_WEAPONS_MASTERY]={base=1, every=10, max=5},
            [Talents.T_EXOTIC_WEAPONS_MASTERY]={base=1, every=10, max=5},
            [Talents.T_SHIELD_PUMMEL]={base=1, every=10, max=5},
            [Talents.T_ARMOUR_TRAINING]=2
        }
        make_req(el, o, "shield")
    else
        class = "Doomed"
        e.autolevel = "wildcaster"
        e[#e+1] = resolvers.talents{
            [Talents.T_CALL_SHADOWS]={base=1, every=8, max=6},
            [Talents.T_SHADOW_WARRIORS]={base=1, every=8, max=6},
            [Talents.T_REPROACH]={base=5, every=10, max=5},
        }
    end
    e[#e+1] = resolvers.auto_equip_filters(class)

    if type == "greater" then
        e.name = "Poltergeist " .. o.name
        e.rank = 3.5
        e.max_life = resolvers.rngavg(100,120)
        e.life_rating = 20
        e.resist = {all=20}
        e.auto_classes={
            {class=class, start_level=10, level_rate=80},
            {class="Cursed", start_level=20, level_rate=40}
        }
    elseif type == "normal" then
        e.name = "Animated " .. o.name
        e.rank = 3
        e.max_life = resolvers.rngavg(80,100)
        e.life_rating = 15
        e.auto_classes={
            {class=class, start_level=10, level_rate=50}
        }
    elseif type == "smaller" then
        e.name = "Moving " .. o.name
        e.rank = 2
        e.max_life = resolvers.rngavg(60,80)
        e.life_rating = 15
        e.auto_classes={
            {class=class, start_level=10, level_rate=30}
        }
    end
    e:resolve()
    e:resolve(nil, true)
    e:wearObject(o, true, false, "MAINHAND")
    for _, v in ipairs(el) do
        e:wearObject(v[1], true, false, v[2])
    end
    return e
end
specialList("actor", {
    "/data/general/npcs/wight.lua",
    "/data/general/npcs/skeleton.lua",
    "/data/general/npcs/horror.lua",
})


local p_char = '0'
local used_char = {}
local function check_def(def)
    for x = 1, #(def[1]) do
        for y = 1, #def do
            used_char[used_char[y]:sub(x,x)] = true
        end
    end
end
local function get_next(p_char)
    while used_char[p_char] == true do
        p_char = string.char(string.byte(p_char) + 1)
    end
    used_char[p_char] = true
    return p_char
end
function make_poltergeist_room(def)
    for x = 1, #(def[1]) do
        for y = 1, #def do
            if def[y]:sub(x, x) == "a" then
                p_char = get_next(p_char)
                defineTile(p_char, "FLOOR", nil, make_poltergeist("smaller"))
                def[y] = def[y]:sub(1, x-1)..p_char..def[y]:sub(x+1, #def[y])
            elseif def[y]:sub(x, x) == "p" then
                p_char = get_next(p_char)
                defineTile(p_char, "FLOOR", nil, make_poltergeist("normal"))
                def[y] = def[y]:sub(1, x-1)..p_char..def[y]:sub(x+1, #def[y])
            elseif def[y]:sub(x, x) == "P" then
                p_char = get_next(p_char)
                defineTile(p_char, "FLOOR", nil, make_poltergeist("greater"))
                def[y] = def[y]:sub(1, x-1)..p_char..def[y]:sub(x+1, #def[y])
            end
        end
    end
    return def
end

-- It had been updated to detect unused characters on alphabet to be replaced with moving weapons.
-- Just use make_poltergeist_room(def)
defineTile('#', "WALL")
defineTile('+', "DOOR")
defineTile('.', "FLOOR")
defineTile('X', "HARDWALL")
defineTile('!', "DOOR_VAULT")
defineTile('A', "FLOOR", {random_filter={type="armor", add_levels=5, tome_mod="gvault"}}, nil)
defineTile('W', "FLOOR", {random_filter={type="weapon", add_levels=5, tome_mod="gvault"}}, {random_filter={subtype='wight', add_levels=5}})
defineTile('Z', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, nil)
defineTile('b', "FLOOR", nil, {random_filter={name='blade horror', add_levels=10}})
defineTile('h', "FLOOR", {random_filter={add_levels=10, tome_mod="gvault"}}, {random_filter={subtype='eldritch', add_levels=10}})
defineTile('s', "FLOOR", nil, {random_filter={subtype='skeleton', add_levels=5}})

startx = 12
starty = 10
local def = {
    [[XXXXXXXXXXXXXXX]],
    [[XA#.A.a#...ZZZX]],
    [[Xp+....+......X]],
    [[XW#.W.a##..shsX]],
    [[X##+######>...X]],
    [[Xp..#..P.##a..X]],
    [[X...#p...p##+#X]],
    [[XA.p#.....#sasX]],
    [[X...###+###...X]],
    [[XW.A+..b###...X]],
    [[XXXXXXXXXXXX!XX]],
}

return make_poltergeist_room(def)
Last edited by starsapphire on Sun Dec 29, 2019 3:09 pm, edited 2 times in total.

nsrr
Sher'Tul
Posts: 1126
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: Vault Contest v2

#13 Post by nsrr »

'Mold Path' revamp. Makes the whole vault a bit smaller, removes the random diggable trees, slightly reduces the number of enemies but makes them a bit stronger, adds one more pile of slightly better loot. There is always a clear path to the loot that does not require traversing the poison water. Contains a reworking of the original switchback path, plus 3 new alternate versions.

Code: Select all

--mold path revamp
--path is too long, whole vault is too big
--poison water fine for flavor, but it should not interupt the path
--a bit more loot, a few less enemies, slightly stronger

setStatusAll{no_teleport=true}
roomCheck(function(room, zone, level, map)
	return resolvers.current_level <= 25
end)
rotates = {"default", "90", "180", "270", "flipx", "flipy"}
specialList("terrain", {
	"/data/general/grids/water.lua",
	"/data/general/grids/forest.lua",
})
specialList("actor", {
	"/data/general/npcs/ooze.lua",
	"/data/general/npcs/molds.lua",
})
defineTile('.', "GRASS_SHORT")
defineTile('#', "TREE")
defineTile('X', "HARDTREE")
defineTile('~', "POISON_DEEP_WATER")
defineTile('!', "ROCK_VAULT", nil, nil, nil, {room_map={special=false, room=false, can_open=true}})

defineTile('m', "GRASS_SHORT", nil, {random_filter={subtype="molds", add_levels=5}})
defineTile('j', "GRASS_SHORT", nil, {random_filter={subtype="oozes", add_levels=5}})

defineTile('$', "GRASS_SHORT", {random_filter={add_levels=5, tome_mod="vault"}})
defineTile('*', "GRASS_SHORT", {random_filter={add_levels=10, tome_mod="vault"}})

startx = 3
starty = 7
local version = rng.range(1,4)
if version == 1 then
return { -- switchback, similar to original
[[XXXXXXXXXXXXXXXX]],
[[XXm~~.m....X$*$X]],
[[X~..j..jXX.mmmmX]],
[[X~..mXXXXXXXXXXX]],
[[Xm.jm......jm..X]],
[[XXXXXXXXXXXX~~.X]],
[[X~~...mm....mm.X]],
[[XXX!XXXXXXXXXXXX]],
}
elseif version == 2 then
return { -- big pond, you can go through the poison to the loot, the better loot is in sight of the mob pile though
[[XXXXXXXXXXXXXXXX]],
[[XX...XjmmmmX..*X]],
[[X..XmmjjmmmmmX$X]],
[[X..XXXXXmjmmjX$X]],
[[X..~~~~XXXXXXX~X]],
[[XX.~~~~~~~~~~~~X]],
[[XX...~~~~~~~~~XX]],
[[XXX!XXXXXXXXXXXX]],
}
elseif version == 3 then
return { -- small pond, lots of jellies
[[XXXXXXXXXXXXXXXX]],
[[XXmjmXXj..jXX$XX]],
[[Xj..j..jX..mjjmX]],
[[Xj.~mXXXXXX.jj$X]],
[[Xm.~~~~~~~XjX..X]],
[[XX.mXX~~~~XjXj*X]],
[[Xm..XXX~~~XX~~~X]],
[[XXX!XXXXXXXXXXXX]],
}
else
return { -- small pond, nearly all mold, token jelly
[[XXXXXXXXXXXXXXXX]],
[[XX...mmm..m.X$XX]],
[[Xmm...~~XXXmXmjX]],
[[X....m~~mmXX...X]],
[[X....~~~~~mXmmmX]],
[[XX....m~~~~XX$mX]],
[[XX......m~~X*mmX]],
[[XXX!XXXXXXXXXXXX]],
}
end

orange<
Higher
Posts: 64
Joined: Sat Mar 23, 2013 11:54 am
Contact:

Re: Vault Contest v2

#14 Post by orange< »

forest-ruined-building2, variations upon a tree.
Added a vault item and mobs to the empty rooms.
May also spawn with a gloomy or flooded theme, providing gvault item instead and giving the mobs a thematic name and talent

Code: Select all

startx = 9
starty = 1

setStatusAll{no_teleport=true, room_map = {can_open=true}}

roomCheck(function(room, zone, level, map)
	return zone.npc_list.__loaded_files["/data/general/npcs/bear.lua"] and zone.npc_list.__loaded_files["/data/general/npcs/plant.lua"] and zone.npc_list.__loaded_files["/data/general/npcs/swarm.lua"] --make sure the honey tree can summon
end)

specialList("actor", {"/data/general/npcs/aquatic_demon.lua"}, true)

specialList("terrain", {
	"/data/general/grids/underground_gloomy.lua",
	"/data/general/grids/water.lua",
	"/data/general/grids/forest.lua",
}, true)

border = 0
rotates = {"default", "90", "180", "270", "flipx", "flipy"}

local vaultvariations = rng.range(1,3)

defineTile('.', "FLOOR")
defineTile(',', "GRASS")
defineTile('#', "WALL")
defineTile('X', "TREE")
defineTile('+', "DOOR", nil, nil, nil, {room_map = {can_open=true}})

if vaultvariations == 1 then -- Gloomy theme
	defineTile('i', "FLOOR", {random_filter={add_levels=4, tome_mod="gvault"}})
	local Talents = require("engine.interface.ActorTalents")
	defineTile('T', "FLOOR", nil,
		{entity_mod=function(e) 
			e.make_escort = nil
			e.name = rng.table{"gloomy ", "deformed ", "sick "}..e.name
			e[#e+1] = resolvers.talents{ [Talents.T_GLOOM]=1, [Talents.T_HATEFUL_WHISPER]=1 }
			e:resolve()
			return e
		end,
		random_filter={name="honey tree", add_levels=4}}
	)
	defineTile('P', "FLOOR", nil,
		{entity_mod=function(e) 
			e.make_escort = nil
			e.name = rng.table{"gloomy ", "deformed ", "sick "}..e.name
			e[#e+1] = resolvers.talents{ [Talents.T_AGONY]=1, [Talents.T_GLOOM]=1 }
			e:resolve()
			return e
		end,
		random_filter={name="giant venus flytrap", add_levels=4}}
	)
	defineTile('B', "FLOOR", nil,
		{entity_mod=function(e) 
			e.make_escort = nil
			e.name = rng.table{"gloomy ", "deformed ", "sick "}..e.name
			e[#e+1] = resolvers.talents{ [Talents.T_REPROACH]=1, [Talents.T_GLOOM]=1 }
			e:resolve()
			return e
		end,
		random_filter={name="brown bear", add_levels=4}}
	)
	return {
	[[,,,,,,,,,,,,,,,,,,,,,]],
	[[,#################X,,]],
	[[,#....#.....,,#,X,,X,]],
	[[,#P...+......,+,...#,]],
	[[,######...T...######,]],
	[[,#.,,,,.......+..i.#,]],
	[[,#..,,#,,.....#B...#,]],
	[[,########+#+########,]],
	[[,,,,,,,,,,,,,,,,,,,,,]],
	}

elseif vaultvariations == 2 then -- FLooded theme
	local Talents = require("engine.interface.ActorTalents")
	defineTile('~', "DEEP_WATER")
	defineTile('i', "GRASS", {random_filter={add_levels=4, tome_mod="gvault"}})
	defineTile('T', "DEEP_WATER", nil,
		{entity_mod=function(e) 
			e.make_escort = nil
			e.can_breath={water=1}
			e.name = rng.table{"wet ", "soaked ", "drenched "}..e.name
			e[#e+1] = resolvers.talents{ [Talents.T_TIDAL_WAVE]=2 }
			e:resolve()
			return e
		end,
		random_filter={name="honey tree", add_levels=4}}
	)
	defineTile('B', "DEEP_WATER", nil,
		{entity_mod=function(e) 
			e.make_escort = nil
			e.can_breath={water=1}
			e.name = rng.table{"wet ", "soaked ", "drenched "}..e.name
			e[#e+1] = resolvers.talents{ [Talents.T_WATER_BOLT]=1 }
			e:resolve()
			return e
		end,
		random_filter={name="giant venus flytrap", add_levels=4}}
	)
	defineTile('P', "DEEP_WATER", nil, {random_filter={name="water imp", add_levels=4}})
	return {
	[[,,,,,,,,,,,,,,,,,,~~~]],
	[[,#################X~~]],
	[[,#~P~~#~~~~~~~#~~~~X~]],
	[[,#~~~,+,~~~~~~X~~~~#,]],
	[[,######,~~T~~~######,]],
	[[,#~~i,+,~~~~~,+,~~~#,]],
	[[,#~~~,#,,,,,,,#~~~B#,]],
	[[,########+#+########,]],
	[[,,,,,,,,,,,,,,,,,,,,,]],
	}

else -- Normal theme
	defineTile('T', "GRASS", nil, {random_filter={name="honey tree", add_levels=4}})
	defineTile('P', "FLORR", nil, {random_filter={name="giant venus flytrap", add_levels=4}})
	defineTile('B', "FLOOR", nil, {random_filter={name="brown bear", add_levels=4}})
	defineTile('i', "FLOOR", {random_filter={add_levels=4, tome_mod="vault"}})
	return {
	[[,,,,,,,,,,,,,,,,,,,,,]],
	[[,#################X,,]],
	[[,#....#.,..,..#.X.,X,]],
	[[,#.i..+..,,,..+..,.#,]],
	[[,######..,T,,.######,]],
	[[,#....+.,,,,..+....#,]],
	[[,#P...#....,,.#B...#,]],
	[[,########+#+########,]],
	[[,,,,,,,,,,,,,,,,,,,,,]],
	}
end

nsrr
Sher'Tul
Posts: 1126
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: Vault Contest v2

#15 Post by nsrr »

Snake Pit revamp. This removes the grass and trees so the vault can appear in dungeon themes as well (kor'pul, rhaloren camp, etc), and adds several new mob types that may spawn in place of snakes. We also remove the door and add a very obvious diggable wall, with a (crappy) pickaxe conveniently located next to it. I just feel that this increases the feeling of busting into some long-abandoned structure that's become infested with snakes (or rats or spiders or sandworms or ritches or worms or cats or mold or ants).

Edit: added a border around the outside which matches either grass or dungeon tiles; swapped out the carpenter ant for the slightly tankier brown ant.

Code: Select all

--snake pit revamp
--snake pit is fine, but variations with other mobs would be cool
--keep this one real simple and use the same layout everytime, just rng the mob
--remove the door and make it a wall you have to dig into. extra wall layer with a notch to make the digwall super obvious.
--digging in makes it feel more like you are busting into some long abondoned place that is now infested, imo
--also gives you a free (crappy) digger so no one can complain that you can't always do the vault right away.
--remove the grass and trees around the vault, allow it to appear in dungeon themes as well

--name="infested_pit"
startx = 3
starty = 5

setStatusAll{no_teleport=true, room_map = {can_open=false}}
specialList("actor", {
	"/data/general/npcs/snake.lua",
	"/data/general/npcs/molds.lua",
	"/data/general/npcs/feline.lua",
	"/data/general/npcs/ant.lua",
	"/data/zones/ritch-tunnels/npcs.lua",
	"/data/general/npcs/sandworm.lua",
	"/data/general/npcs/spider.lua",
	"/data/general/npcs/vermin.lua",
	"/data/general/npcs/rodent.lua",
})
rotates = {"default", "90", "180", "270", "flipx", "flipy"}

defineTile(',', data.floor or data['.'] or "FLOOR")
defineTile('#', "HARDWALL")
defineTile('w', "WALL")
defineTile('d', "FLOOR", {random_filter={type="tool", subtype="digger", name="iron pickaxe", ego_chance=-1000, ego_chance=-1000}})

local mobs = {
	"rattlesnake",
	"green worm mass", 
	"giant brown ant",
	"snow cat",
	"green mold",
	"giant grey rat",
	"giant spider",
	"ritch flamespitter",
	"sandworm"
}
local mob = rng.tableRemove(mobs)

defineTile('s', "FLOOR", {random_filter={type="scroll", ego_chance=25}}, {random_filter={name=mob}})

return {
[[,,,,,,,,]],
[[,######,]],
[[,#sss##,]],
[[,#ssswd,]],
[[,#sss##,]],
[[,######,]],
[[,,,,,,,,]],
}
Last edited by nsrr on Fri Nov 15, 2019 3:53 am, edited 1 time in total.

Post Reply