DRL > Discussion
More intro-level layouts needed!
Deathwind:
I've got an idea but it needs alot before it'll be playable, if anyone wants to try to make this work go ahead.
--- Code: ---..........##.................................##........
..........#####################################........
.....,,,,..#,,,,,,#,,,,,,,,,,,,,,,,,,........#.,,,,,,,.
.......,,,,#,,,,,,+,,,,,,,,,,,,,,,,,,........+,,,,,,,,,
........,,,#,,,,,,#,,,,,,,,,,,,,,,,,,........#,,,,,,,,,
......,,,,,#,,,,,,########################...#,,,,,,,,,
.....,,,,,,####+###,,,,,,,,,,,,,,,,,,....#####,,,,,,,,,
.....,,,,,,+*,,,,,+,,,,,,,,,,,,,,,,,,.H..+P>*#,,,,,,,,,
.......,,,,####+###,,,,,,,,,,,,,,,,,,....#####,,,,,,,..
.....,,,,,,#,,,,,,########################...#,,,,,,,,,
......,,,,,#,,,,,,#,,,,,,,,,,,,,,,,,,........#,,,,,,,,,
......,,,,,#,,,,,,+,,,,,,,,,,,,,,,,,,........+,,,,,,,,,
........,,,#,,,,,,#,,,,,,,,,,,,,,,,,,........#.........
..........#####################################........
..........##..,,,,,.....,,,,.................##........
--- End code ---
When was the last time a building like this only had one exit?
I was getting a bit tired of the stairs always being on the left so I put them on the right.
AStranger:
We don't have a circle, so here is a quick attempt at one.
--- Code: ---.....................,,,,#####,,,,.....................
...................,,,####,,,####,,,...................
.................,,,####,,,,,,,,###,,,.................
...............,,,###,3#,,,,,,,,,,###,,,...............
..............,,###,,,,#2,,,,,,,,,,,###,,..............
.............,,##,,,,,#####+####,,,,,,##,,.............
.............,##,,,,,,#1,,,,,,,#4,,,,,*##,.............
.............,#>PH,,,,+,,,,,,,1#,,,,,,,,+,.............
.............,##,,,,,,#1,,,,,,,#4,,,,,*##,.............
.............,,##,,,,,#####+####,,,,,,##,,.............
..............,,###,,,3#2,,,,,,,,,,,###,,..............
...............,,,###,,#,,,,,,,,,,###,,,...............
.................,,,####,,,,,,,,###,,,.................
...................,,,####,,,####,,,...................
.....................,,,,#####,,,,.....................
--- End code ---
UV Version:
Spoiler (click to show/hide)
--- Code: ---Levels("CUSTOM",{
name = "Phobos Test",
mortem = "",
mortem_desc = "in testing",
Create = function ()
Level.fill("wall")
local translation = {
['.'] = "rock",
[','] = "floor",
['#'] = "wall",
['+'] = "door",
['>'] = "stairs",
['*'] = "floor",
['P'] = "floor",
['H'] = "floor",
['1'] = "floor",
['2'] = "floor",
['3'] = "floor",
['4'] = "floor"
}
local center = [[
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
]]
local map = [[.....................,,,,#####,,,,.....................
...................,,,####,,,####,,,...................
.................,,,####,,,,,,,,###,,,.................
...............,,,###,3#,,,,,,,,,,###,,,...............
..............,,###,,,,#2,,,,,,,,,,,###,,..............
.............,,##,,,,,#####+####,,,,,,##,,.............
.............,##,,,,,,#1,,,,,,,#4,,,,,*##,.............
.............,#>PH,,,,+,,,,,,,1#,,,,,,,,+,.............
.............,##,,,,,,#1,,,,,,,#4,,,,,*##,.............
.............,,##,,,,,#####+####,,,,,,##,,.............
..............,,###,,,3#2,,,,,,,,,,,###,,..............
...............,,,###,,#,,,,,,,,,,###,,,...............
.................,,,####,,,,,,,,###,,,.................
...................,,,####,,,####,,,...................
.....................,,,,#####,,,,.....................]]
Level.place_tile(translation, center, 2, 2 )
Level.place_tile(translation, map, 9, 3 )
Level.player(2,2)
Level.drop_being("former", coord.new(31,6))
Level.drop_being("former", coord.new(33,7))
Level.drop_being("former", coord.new(32,9))
Level.drop_being("sergeant", coord.new(41,9))
Level.drop_item("smed", coord.new(47,9))
Level.drop_item("garmor", coord.new(25,10))
Level.drop_being("sergeant", coord.new(26,10))
Level.drop_being("former", coord.new(39,10))
Level.drop_being("former", coord.new(32,11))
Level.drop_being("sergeant", coord.new(41,11))
Level.drop_item("smed", coord.new(47,11))
Level.drop_being("former", coord.new(31,13))
Level.drop_being("former", coord.new(33,13))
end,
OnEnter = function ()
player.eq.weapon = item.new("pistol")
end,
OnKill = function ()
end,
OnKillAll = function ()
end,
OnExit = function ()
levels.CUSTOM.mortem = "fled alive the trials"
end,
})
--- End code ---
Edit: Swapped 2 and 3, so mobs clump less on lower difficulties.
General Patton:
Needs cover, you can't be expected to run straight up to them from such a distance. This would end an AoB very easily, depending on where the center is in relation to gift-dropping spots. Pistols probably wouldn't work well either. AoSg might have an advantage shooting down those halls without seeing the enemies. AoMC might have an easier time doing the same with the pistol, but the lack of cover is still going to shred you.
--- Code: ---.........4##.................................##........
..........#####################################........
.....,,,,..#1,,,,,#,,,,,,,,,,#,,,,,,,........#.,,,,,,,.
.......,,,,#,,,,,,+,,,,,,,,,,,,,,,,,,#.......+,,,,,,,,,
........,,,#,,,,,,#2,,,,,,,,,,,,#,,,,........#,,,,,,,,,
......,,,,,#,,,,,,########################..3#,,,,,,,,,
.....,,,,,,####+###,,,,,,,,,,,,#,,,,,....#####,,,,,,,,,
1....,,,,,,+*,,,,,+,,,,#,,,#,,,,,#,,,.H..+P>*#,,,,,,,,,
.......,,,,####+###,,,,,,,,,,,,#,,,,,....#####,,,,,,,..
.....,,,,,,#,,,,,,########################..3#,,,,,,,,,
......,,,,,#,,,,,,#2,,,,,,,,,,,,#,,,,........#,,,,,,,,,
......,,,,,#,,,,,,+,,,,,,,,,,,,,,,,,,#.......+,,,,,,,,,
........,,,#1,,,,,#,,,,,,,,,,#,,,,,,,........#.........
..........#####################################........
.........4##..,,,,,.....,,,,.................##........
--- End code ---
I wonder if I'll find it necessary to modify every suggestion here. God I hope not. I don't want to be that guy who thinks he can do better than everyone else.
Also...
--- Quote from: Deathwind on June 30, 2011, 00:37 ---I was getting a bit tired of the stairs always being on the left so I put them on the right.
--- End quote ---
Oh my God! The status quo has been disrupted! The end is nigh!
Edit: Oh good, I can't complain about the circular one. I'm officially not that guy.
tehtmi:
AStranger, your idea of providing a sandbox mod to test these levels out is excellent. As much as I love scheme racket, I think it will be easier for most people to directly use a sandbox mod, so I took the liberty of hacking one up. The source is here. If you don't know what to do with a sandbox mod, download the attached package instead. It's readme.txt provides instructions.
Spoiler (click to show/hide)
--- Code: ----- Intro Layout Tester
-- by tehtmi
-- Inspired by AStranger
-- Use this to choose a difficulty level.
-- 1 : I'm Too Young To Die
-- 2 : Hey, Not Too Rough
-- 3 : Hurt Me Plenty
-- 4 : Ultra-Violence
DIFFICULTY = 4
-- Use this to select a challenge mode.
-- 0 : Standard Game
-- 1 : Angel of Berserk
-- 2 : Angel of Marksmanship
-- 3 : Angel of Shotgunnery
local challenge = 0
-- Optionally, uncomment the following line to override the
-- FRONTAL option from config.lua
-- 0 : start in the upper-left corner
-- 1 : start on the right-hand side
-- FRONTAL = 1
-- You can set the following option to true to reveal the entire level.
-- This might be nice if you want to get a feel for how it looks in-game
-- or how the enemies act before the player reaches them.
local reveal = false
-- If this option is enabled, the program will try to find errors in the
-- layout including bad dimensions, stray characters, or an improper amount
-- or one thing or another. (Experimental)
local verify = false
-- Replace the layout here with the one you want to test.
local layout = [[
.......................................................
..............,,,,,,,,,,,,,............................
.....,,,,..,,,,,,,########,,,,,,,,,,,....,,,,,,,,,.....
.......,,,,,,,,,,,#,,,,,,#########,,,,,,,,,,,,,,,,,,,..
........,,,,,,,,,,#1,,,,,+,,,,,,,#3,,,,,,,,,,,,,,,,,,,.
......,,,,,,,,,####+###,,#2,,,,,,#######,,,,,,,,,,,,,..
.....,,,,,,,,,,#,,,,,,########,,,#,4,,*#,,,,,,,,,,,,...
.....,,,,,,,,,,#1,,,,,+,,,PH>#,,,+,,,,,+,,,,,,,,,,,....
.......,,,,,,,,#,,,,,,########,,,#,4,,*#,,,,,,,,,......
.....,,,,,,,,,,####+###,,#2,,,,,,#######,,,,,,,,,,,,...
......,,,,,,,,,,,,#1,,,,,+,,,,,,,#3,,,,,,,,,,,,,,,,....
......,,,,,,,,,,,,#,,,,,,#########,,....,,,,,,,,,,,....
........,,,,,,,,,,########,,,,,,,......................
..........,,,,,,,,,,,,,,,,,,,,,........................
..............,,,,,.....,,,,...........................
]]
-----------------------------------------------------
-- Below here is stuff you don't have to worry about.
-----------------------------------------------------
-- Custom challenge constants.
local challenge_standard = 0
local challenge_berserk = 1
local challenge_marksman = 2
local challenge_shotgun = 3
-- List of errors to diplay in OnEnter.
local errors = {}
-- Verification for layouts.
local function verify_layout()
local set = {}
local len = layout:len()
if len ~= 840 then
table.insert(errors, "Bad length!")
return false
end
-- String referencing isn't working for me for some reason... so
-- string.sub to the rescue.
for i = 1, 840 do
-- Skip line breaks.
if i % 56 ~= 0 then
local ch = layout:sub(i, i)
if set[ch] then
set[ch] = set[ch] + 1
else
set[ch] = 1
end
end
end
local proper = {
["."] = 0, -- meaning any number
[","] = 0,
["#"] = 0,
["+"] = 0,
[">"] = -1, -- meaning at least 1
["P"] = 1,
["1"] = 3,
["2"] = 2,
["3"] = 2,
["4"] = 2,
["H"] = 1,
["*"] = 2,
}
for ch, num in pairs(set) do
local proper_count = proper[ch]
if proper_count == nil then
table.insert(errors, "Unexpected character: " .. ch)
return false
end
end
for ch, num in pairs(proper) do
if num == -1 and not set[ch] then
table.insert(errors, "Expected at least one of: " .. ch)
elseif num > 0 and set[ch] ~= num then
table.insert(errors, "Expected exactly " .. num .. " of " .. ch)
end
end
return true
end
-- Define the Phobos Base Entry level.
Levels("CUSTOM", {
name = "Phobos Base Entry",
entry = "He started his journey on the surface of Phobos.",
Create = function()
-- Handle the layout stuff.
Level.fill("pwall")
Level.fill("rock", area.FULL_SHRINKED)
local translation = {
["."] = "rock",
[","] = "floor",
["#"] = "wall",
["+"] = "door",
[">"] = "stairs",
["P"] = {"floor"},
["1"] = {"floor", being = "former"},
["2"] = {"floor"},
["3"] = {"floor"},
["4"] = {"floor"},
["H"] = {"floor", being = "sergeant"},
["*"] = {"floor", item = "smed"},
}
if challenge == challenge_berserk then
translation["P"].item = "knife"
elseif DIFFICULTY >= 4 then
translation["P"].item = "garmor"
end
if DIFFICULTY >= 2 then
translation["2"].being = "former"
end
if DIFFICULTY >= 3 then
translation["4"].being = "former"
end
if DIFFICULTY >= 4 then
translation["3"].being = "former"
translation["4"].being = "sergeant"
end
if not verify or verify_layout() then
Level.place_tile(translation, layout, 9, 3)
end
-- Checks the FRONTAL parameter from config.lua
if FRONTAL == 1 then
Level.player(75, 10)
else
Level.player(2, 2)
end
end,
OnEnter = function()
-- Report errors
for _, err in ipairs(errors) do
ui.msg("@rError: " .. err)
end
-- Handle the reveal option
if reveal then
Level.light[LFEXPLORED] = true
Level.flags[LF_BEINGSVISIBLE] = true
Level.flags[LF_ITEMSVISIBLE] = true
end
-- Set-up difficulty modifiers to accuracy
local toHit_mod = math.min(DIFFICULTY - 1, 3)
beings.former.toHit = beings.former.toHit + toHit_mod
beings.sergeant.toHit = beings.sergeant.toHit + toHit_mod
-- Set-up difficulty modifier to powerups
if DIFFICULTY == 1 or DIFFICULTY == 5 then
DIFF_MOD = 2
else
DIFF_MOD = 1
end
-- Set-up challenge-specific conditions.
if challenge == challenge_berserk then
-- Set-up special equipment
player.inv:clear()
player.eq:clear()
player.eq.armor = item.new("barmor")
player.inv:add("lmed")
player.inv:add("lmed")
elseif challenge == challenge_marksman then
-- Add the special mod.
player.inv:add(table.random_pick({
"mod_agility",
"mod_bulk",
"mod_tech",
}))
elseif challenge == challenge_shotgun then
-- Set-up special equipment
player.inv:clear()
player.eq:clear()
player.eq.weapon = item.new("shotgun")
player.inv:add("shell")
player.inv[1].ammo = 50
player.inv:add("smed")
player.inv:add("smed")
end
end,
})
-- Lua hooks must be changed before the level is created.
if challenge == challenge_berserk then
-- Set-up fire restrictions for pistol and shotgun
local OnFire = function(item)
if item.itype == ITEMTYPE_MELEE then
return false
end
ui.msg("You pull the trigger, but nothing happens. You're a berserker, dumbass!")
return true
end
items.pistol.OnFire = OnFire
items.shotgun.OnFire = OnFire
elseif challenge == challenge_marksman then
-- Set-up fire restriction for shotgun
local OnFire = function(item)
if item.flags[IF_PISTOL] then
return false
end
ui.msg("This weapon isn't worthy of a marksman!")
return true
end
items.shotgun.OnFire = OnFire
elseif challenge == challenge_shotgun then
-- Set-up fire restriction for pistol
local OnFire = function(item)
if item.flags[IF_SHOTGUN] then
return false
end
ui.msg("This is a weapon for wimps, not a true man!")
return true
end
items.pistol.OnFire = OnFire
end
--- End code ---
I have made four layouts so far. Comments are welcome!
tehtmi 1
--- Code: ---................,,,,......,,,,,,,,,,,,,,,,,............
...............,,,,,,,,,,,,,,,,,,,,3,,,,,,,,,,,........
............,,,,##,,,,,,,,,,,,,,,,,,,,##,,,,,,,,.......
............,,,,####################+###,,,,,,,,.......
..............,,,#,,1,,,,,+,,,2,,#4,,,#,,,,,,..........
...........,,,,,,#,,,,#######,,,,#,,,*#,,,,,,,,,,......
............,,,,,#,,,,#,,,,,#,,,,#,,,,#,,,,,,,,,.......
.............,,,,#,,,,+1,H>P#,,,,+,,,,#,,,,,,,.........
...........,,,,,,#,,,,#,,,,,#,,,,#,,,,#,,,,,...........
.........,,,,,,,,#,,,,#######,,,,#,,,*#,,,.............
........,,,,,,,,,#,,1,,,,,+,,,2,,#4,,,#,,,,............
........,,,,,,,,####################+###,,,,,,.........
..........,,,,,,##,,,,,,,,,,,,,,,,,,,,##,,,,,,,........
............,,,,,,,,,,,,...,,,,..,3,,,,,,,,,...........
.............,,,,.,,,..............,,,,,...............
--- End code ---
This is intended to be fairly straight-forward. Having the doors on the sides helps make both of the first two rooms areas of engagement.
tehtmi 2
--- Code: ---.................,,,,,,,.......,,,,,,,,,,..............
.............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.............
...........,,,,#######,,,,,,,,,####+##,,,,,,...........
............,,,#P,,,,##,,,,,,,##,,*,,#,,,..,,..........
.............,,#,>,,,###########,,,,,+,,,,.............
............,,,#,,H,1#,,,,#,,,,#4,,,*#,,,,,,...........
.........,,,,,,#,,,,,+,,,,#,,,,+,,,,,#,,,.,............
..........,,.,,#,,1,,#,,,,#,,,,#,,4,,#,,,..............
.............,,####+###,,,#,,,###+####,,,,.............
..............,,,#,,,##,,,#,,,##,,,#,3,,,,,,...........
............,,,,,#,,,,,,,,1,,,,,,,,#,,,,,..............
.............,,,,#,,,,2,,,,,,,2,,,,#,3,,...............
................,###################,,,,,..............
...............,,,,,..,,,,,,,...,,,,,,.................
.....................,,,.,,............................
--- End code ---
Here, I was trying out a layout that wasn't vertically symmetric. The wall in the middle serves to break the combat into two major parts.
tehtmi 3
--- Code: ---.......................................................
..............,,,......................................
...........##,,##########################.,,##.........
...........#,,,#,,,,,,#...........,#,,,,#,,,3#.........
............,,,#,,1,,,+,2.,......,,+,4,,##,,...........
...........#####,,,,,,##..........##,,,,*#,,,..........
...........#,,,###+####.,,.,,,...,,##,,,,#,,...,,,...,,
...........#,>,P,,,,H#,,##,1##,,##,,#,,,,+,,,...,,,....
...........#,,,###+####,,,,..,..,,,##,,,,#,............
..........,#####,,,,,,##..........##,,,,*#.............
..........,,,,,#,,1,,,+,2.........,+,4,,##.............
.........,,#,,,#,,,,,,#,,..........#,,,,#..,3#.........
........,,,##,,##########################.,,##.........
.........,,,,,.,,......................................
.......................................................
--- End code ---
Here there is only one major battleground: the courtyard in the middle. The broken horizontal wall along the middle helps keep the enemies from engaging all at once.
tehtmi 4
--- Code: ---.............................,,..,,...,................
...................,.,.,,,,,,,,,,,,,,,,,,..............
................,,,,,,,################,,,,,,..........
.............,,,########2,,,,,,,,,,,,,#,,,.............
............,,,,#,,+,1,#,,,,,,,,,,,,,,#,,..............
...........,,,,,#,,##,,#,,,##,,#4,,,*##,,,.............
..............,,#,,,#,,##,,,#,,#######3,,,,,,..........
.............,,,#HP>#,,+,,1,#,,+,,,,,,,,,,,,,,,........
..............,,#,,,#,,##,,,#,,#######3,,,,,,,.........
...........,,,,,#,,##,,#,,,##,,#4,,,*##,,,,,...........
............,,,,#,,+,1,#,,,,,,,,,,,,,,#,,,.............
.........,,,,,,,########2,,,,,,,,,,,,,#,,,,............
........,,,..,,,,,,,,,,################,..,............
................,,,,...,,.,,,,,,,,,,,,,,...............
................................,,,,,..................
--- End code ---
This may look innocent, but it can be deadly if not approached carefully. There are few doors, and the sergeants are placed where they will cause a great deal of pain to an unsuspecting marine.
Deathwind: I like the way the layout can be approached from both sides. The long horizontal walls break up the level in an interesting way, but I agree with General Patton that such long hallways would be deadly to the player without any source of cover.
AStranger: The circle is simple, but it works. The middle room seems to do a good job of containing some of the enemies.
Shoop Da Woop: The gate is a cool idea. Also, the medpacks idea is interesting, but I'm not sure if any player would opt to pass them by.
AStranger:
--- Quote from: tehtmi on June 30, 2011, 04:57 ---...As much as I love scheme racket, I think it will be easier for most people to directly use a sandbox mod...
--- End quote ---
Actually I'm amazed someone else actually likes scheme (still not really comfortable calling it racket). I remember being a rare minority enjoying scheme when I took the class at WPI. It may have helped that I was perpetually drunk back then, but it was still a lot of fun.
Well done on the sandbox, I was unable to figure a few things out since the wiki is kinda sparse when it comes to documentation. After looking at yours I found out how to do what I couldn't yesterday:
Spoiler (click to show/hide)
--- Quote from: tehtmi on June 30, 2011, 04:57 ---
--- Code: --- local translation = {
...
["1"] = {"floor", being = "former"},
...
["H"] = {"floor", being = "sergeant"},
["*"] = {"floor", item = "smed"},...
--- End code ---
--- End quote ---
All I was able to figure out about Level.place_tile was that the first argument was a table and that strings were valid in the table. I couldn't find any examples that used more than strings, but I figured there was a way. I would have just looped over the map string, had I been able to figure out how to reference specific chars. That was the point were I just gave up and used racket. Alas my plan to create more scheme users has been foiled :).
For the maps, I've only played tehmi 4. I was a little worried about AoB and if shotgun quirks would be a problem, but play testing shows I have nothing to worry about. Last run a UV AoB finished with 4 medpacks and 80% health, so it looks good.
Navigation
[0] Message Index
[*] Previous page
Go to full version