I'm having a real hard time with the next step.
First, I tried to add the beginning dialogue.
I added the following to data/zones/dungeon/zone.lua:
Code:
on_enter = function(lev, old_lev, newzone)
if lev == 1 and not game.player.intro then
local Dialog = require("engine.ui.Dialog")
game.player.into=true
Dialog:simpleLongPopup("Welcome to Hell", [[Hell. It's not so bad once you get used to it. You fell right back into your old routine, working construction in Gehennom and beating your co-workers at poker.
Until one day, you were digging out a basement for one of Ba'al's apartment complexes and you came across a door. A trapdoor, buried in the dirt, sealed with arcane runes, you KNEW you shouldn't have opened it.
But you did.
I mean, you know evil but this was somethin' different. Somethin' darker.
And old. Real old.
Now, EVERYBODY is pissed, and you gotta fight your way out of Hell before it burns to the ground.]],400)
end
end,
}
And nothing ever showed up. Do I need to do a starting room?
Then I tried to add another party member. I looked at Bone Builder and the alchemist in ToME for this.
I added the following to data/birth/descriptors.lua:
Code:
talents = {
[ActorTalents.T_CLEAVE] = 1,
[ActorTalents.T_MAKE_MAC] = 1,
},
local t = self:getTalentFromId(self.T_MAKE_MAC)
t.action(self, t)
}
And the following to data/talents.lua:
Code:
newTalent{
name = "Make Mac",
type = {"role/combat", 1},
points = 1,
cooldown = 6,
reason = 2,
range = 1,
action = function(self, t)
local undead= require("mod.class.NPC").new{
type = "humanoid",
display = '', color=colors.RED, image = "mushroom/pcs/mac.png",
desc = [[Your best friend Mac.]],
faction = self.faction,
ai = "dumb_talented_simple", ai_state = { talent_in=2 },
name = "mac", exp_worth = 0,
lite = 3,
life = 20,
max_life = 20,
offense = 4,
defense = 4,
damage = 10,
armor = 4,
}
local x, y = util.findFreeGrid(self.x, self.y, 5, true, {[Map.ACTOR]=true})
if not x then
game.logPlayer(self, "Not enough space to refit!")
return
end
game.zone:addEntity(game.level, undead, "actor", x, y)
return
end
info = function(self, t)
return "Hey Mac!"
end,
}
Any thoughts on how I'd get these to work?
Here are the files, you'd just have to remove the comments.
http://chezzo.com/Hellfire/HellfireGetO ... lBroke.rarI was able to clean up the objects being displayed!