Skip to content
Snippets Groups Projects
Commit 8d605525 authored by dg's avatar dg
Browse files

campaigns

git-svn-id: http://svn.net-core.org/repos/t-engine4@1338 51575b47-30f0-44d4-a5cc-537603b46e54
parent 58615691
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ module(..., package.seeall, class.inherit(engine.Dialog)) ...@@ -24,6 +24,7 @@ module(..., package.seeall, class.inherit(engine.Dialog))
_M.birth_descriptor_def = {} _M.birth_descriptor_def = {}
_M.birth_auto = {} _M.birth_auto = {}
_M.step_names = {}
--- Defines birth descriptors --- Defines birth descriptors
-- Static! -- Static!
...@@ -34,6 +35,7 @@ function _M:loadDefinition(file) ...@@ -34,6 +35,7 @@ function _M:loadDefinition(file)
ActorTalents = require("engine.interface.ActorTalents"), ActorTalents = require("engine.interface.ActorTalents"),
newBirthDescriptor = function(t) self:newBirthDescriptor(t) end, newBirthDescriptor = function(t) self:newBirthDescriptor(t) end,
setAuto = function(type, v) self.birth_auto[type] = v end, setAuto = function(type, v) self.birth_auto[type] = v end,
setStepNames = function(names) self.step_names = names end,
load = function(f) self:loadDefinition(f) end load = function(f) self:loadDefinition(f) end
}, {__index=_G})) }, {__index=_G}))
f() f()
...@@ -46,6 +48,7 @@ function _M:newBirthDescriptor(t) ...@@ -46,6 +48,7 @@ function _M:newBirthDescriptor(t)
assert(t.type, "no birth type") assert(t.type, "no birth type")
t.short_name = t.short_name or t.name t.short_name = t.short_name or t.name
t.short_name = t.short_name:upper():gsub("[ ]", "_") t.short_name = t.short_name:upper():gsub("[ ]", "_")
t.display_name = t.display_name or t.name
assert(t.desc, "no birth description") assert(t.desc, "no birth description")
if type(t.desc) == "table" then t.desc = table.concat(t.desc, "\n") end if type(t.desc) == "table" then t.desc = table.concat(t.desc, "\n") end
t.desc = t.desc:gsub("\n\t+", "\n") t.desc = t.desc:gsub("\n\t+", "\n")
...@@ -264,9 +267,9 @@ Mouse: #00FF00#Left click#FFFFFF# to accept; #00FF00#right click#FFFFFF# to go b ...@@ -264,9 +267,9 @@ Mouse: #00FF00#Left click#FFFFFF# to accept; #00FF00#right click#FFFFFF# to go b
end end
-- Stats -- Stats
s:drawColorStringBlended(self.font, "Selecting: "..self.current_type:capitalize(), 2, 2) s:drawColorStringBlended(self.font, "Selecting: "..(self.step_names[self.current_type] or self.current_type:capitalize()), 2, 2)
self:drawWBorder(s, 2, 20, 200) self:drawWBorder(s, 2, 20, 200)
self:drawSelectionList(s, 2, 25, self.font_h, self.list, self.sel, "name") self:drawSelectionList(s, 2, 25, self.font_h, self.list, self.sel, "display_name")
self.changed = false self.changed = false
end end
...@@ -20,6 +20,14 @@ ...@@ -20,6 +20,14 @@
setAuto("subclass", false) setAuto("subclass", false)
setAuto("subrace", false) setAuto("subrace", false)
setStepNames{
world = "Campaign",
race = "Race Category",
subrace = "Race",
class = "Class Category",
subclass = "Class",
}
newBirthDescriptor{ newBirthDescriptor{
type = "base", type = "base",
name = "base", name = "base",
...@@ -31,7 +39,13 @@ newBirthDescriptor{ ...@@ -31,7 +39,13 @@ newBirthDescriptor{
{ {
Tutorial = "disallow", Tutorial = "disallow",
Arda = "allow", Arda = "allow",
["Spydrë"] = function() return profile.mod.allow_build.world_spydre and "allow" or "disallow" end, Ents = "disallow",
Spydre = "disallow",
Orcs = "disallow",
Trolls = "disallow",
Nagas = "disallow",
Undeads = "disallow",
Faeros = "disallow",
}, },
subclass = subclass =
{ {
......
...@@ -17,17 +17,61 @@ ...@@ -17,17 +17,61 @@
-- Nicolas Casalini "DarkGod" -- Nicolas Casalini "DarkGod"
-- darkgod@te4.org -- darkgod@te4.org
-- Player worlds newBirthDescriptor{
type = "world",
name = "Tutorial",
desc =
{
"The tutorial will explain the basics of the game to get you started.",
},
-- on_select = function(what)
-- setAuto("subclass", false)
-- setAuto("subrace", false)
-- end,
descriptor_choices =
{
race =
{
__ALL__ = "forbid",
["Tutorial Human"] = "allow",
},
subrace =
{
__ALL__ = "forbid",
["Tutorial Human"] = "allow",
},
class =
{
__ALL__ = "forbid",
["Tutorial Adventurer"] = "allow",
},
subclass =
{
__ALL__ = "forbid",
["Tutorial Adventurer"] = "allow",
},
},
}
-- Player worlds/campaigns
newBirthDescriptor{ newBirthDescriptor{
type = "world", type = "world",
name = "Arda", name = "Arda",
display_name = "Free People: The Fourth Age",
desc = desc =
{ {
--[[
"Arda, the World.", "Arda, the World.",
"It was shaped into being ages ago by the Music of the Ainur.", "It was shaped into being ages ago by the Music of the Ainur.",
"It is home of elves, men, dwarves and hobbits, but also evil orcs, trolls and dragons.", "It is home of elves, men, dwarves and hobbits, but also evil orcs, trolls and dragons.",
"Since the downfall of Sauron, the lands have known relative peace.", "Since the downfall of Sauron, the lands have known relative peace.",
"Until recently it was the only world known to exist.", "Until recently it was the only world known to exist.",
]]
"The Free People of Middle-earth: Humans, Hobbits, Elves and Dwarves.",
"The West has been at relative peace for over one hundred year and people are prospering again.",
"You are an adventurer, setting out to find lost treasure and glory.",
"But what lurks in the shadow of the world?",
}, },
descriptor_choices = descriptor_choices =
{ {
...@@ -61,48 +105,127 @@ newBirthDescriptor{ ...@@ -61,48 +105,127 @@ newBirthDescriptor{
newBirthDescriptor{ newBirthDescriptor{
type = "world", type = "world",
name = "Tutorial", name = "Orcs",
display_name = "Orcs: The Rise to Power",
desc = desc =
{ {
"The tutorial will explain the basics of the game to get you started.", "Baston!",
}, },
-- on_select = function(what)
-- setAuto("subclass", false)
-- setAuto("subrace", false)
-- end,
descriptor_choices = descriptor_choices =
{ {
race = race =
{ {
__ALL__ = "forbid", __ALL__ = "disallow",
["Tutorial Human"] = "allow", Orc = "allow",
-- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end,
}, },
subrace = },
}
newBirthDescriptor{
type = "world",
name = "Spydre",
display_name = "Spydrë: Legacy of Ungoliant",
desc =
{
"Spydrë is home to the essence of spiders. The mighty Ungoliant of Arda actually originating from this world.",
"It is home to uncounted numbers of spider races, all fighting for supremacy of all the lands.",
"Some humanoids also live there, but they are usually the prey, not the hunter.",
},
descriptor_choices =
{
race =
{ {
__ALL__ = "forbid", __ALL__ = "disallow",
["Tutorial Human"] = "allow", Human = "allow",
-- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end,
}, },
class = },
}
newBirthDescriptor{
type = "world",
name = "Ents",
display_name = "Ents: The March of the Entwifes",
desc =
{
"",
},
descriptor_choices =
{
race =
{ {
__ALL__ = "forbid", __ALL__ = "disallow",
["Tutorial Adventurer"] = "allow", Human = "allow",
-- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end,
}, },
subclass = },
}
newBirthDescriptor{
type = "world",
name = "Trolls",
display_name = "Trolls: Terror of the Woods",
desc =
{
"",
},
descriptor_choices =
{
race =
{ {
__ALL__ = "forbid", __ALL__ = "disallow",
["Tutorial Adventurer"] = "allow", Human = "allow",
-- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end,
}, },
}, },
} }
newBirthDescriptor{ newBirthDescriptor{
type = "world", type = "world",
name = "Spydrë", name = "Nagas",
display_name = "Nagas: Guardians of the Tide",
desc = desc =
{ {
"Spydrë is home to the essence of spiders. The mighty Ungoliant of Arda actually originating from this world.", "",
"It is home to uncounted numbers of spider races, all fighting for supremacy of all the lands.", },
"Some humanoids also live there, but they are usually the prey, not the hunter.", descriptor_choices =
{
race =
{
__ALL__ = "disallow",
Human = "allow",
-- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end,
},
},
}
newBirthDescriptor{
type = "world",
name = "Faeros",
display_name = "Urthalath: Treason or the High Guards",
desc =
{
"",
},
descriptor_choices =
{
race =
{
__ALL__ = "disallow",
Human = "allow",
-- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end,
},
},
}
newBirthDescriptor{
type = "world",
name = "Undeads",
display_name = "Broken Oath: The Curse of Undeath",
desc =
{
"",
}, },
descriptor_choices = descriptor_choices =
{ {
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment