ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sun Apr 05, 2020 4:41 pm

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Aug 20, 2012 4:13 am 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
Hellfire
Click for latest version.

"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."

Hellfire: Get Outta Hell is an action point turn based tactical combat roguelike.

Screenshots:

Image
Click for bigger!

To install:

http://chezzo.com/Hellfire/Hellfire04.zip

Unzip above and play.

Or, if you have a copy of T-Engine 1.0.0:

http://chezzo.com/Hellfire/hellfiremod05.zip

Unzip in the /game/mods directory of te4. Click "New Game" and select Hellfire from the list. You may need to first select, "Show incompatible" depending on your installation.

To do:

Add party members.
Add party control.
Add a next party member button.
Add an end turn button.
Add animations (couldn't get animated gifs or pngs to work).
When one party member is out of action points, switch to the next.
Add a splash screen with the above flavor text, as the description for the mod flashes by too fast.
Add an undo button.
Have monsters wait their turn to fight.
Add more levels, maps, monsters, items, and story.
Add enemies leaving still beating hearts that you can eat and gain their powers, both for a limited time and permanently.
Pants!

If anyone has any ideas on how to accomplish those goals, I would welcome your input.

(Thanks so so much to edge2054 for letting me put this on his code.)


Last edited by chezzo on Sat Feb 09, 2013 2:22 am, edited 8 times in total.

Top
 Profile  
 
PostPosted: Mon Aug 20, 2012 12:04 pm 
Offline
Loremaster

Joined: Thu Sep 23, 2010 10:18 pm
Posts: 3516
Location: London, England
Wow! This has some nice polish to it. I'm impressed! Will play it properly when I get out of work...

Some of your "to dos" are fairly trivial. For the starting text I suggest checking out Broken Bottle and how it does its intro text (see the startingroom's zone.lua).

Getting monsters to wait their turn is just a matter of implementing an over-riding turn counter in Actor.lua - make them use energy when their turn-counter isn't up. Just make sure to exclude resource regen and timed effects as well.

For item-dropping again see Broken Bottle - junkies in it drop stims for instance, and you can see from the objects file how consumables work. For inventory in general (if you want inventories) I'd recommend checking out Run from the Shadow, as the info in the wiki for implementing this is out of date I think. Of course you can do the power-up drops without items at all - make it change the terrain instead, with the terrain itself activating when you step on it.

An undo button sounds immensely tricky. I'd go so far as to recommend giving up on that feature. The effort required would not be worth the gameplay gain.

No idea about animations - perhaps DarkGod can answer that one.

_________________
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes


Top
 Profile  
 
PostPosted: Mon Aug 20, 2012 6:42 pm 
Offline
Retired Ninja

Joined: Fri May 28, 2010 4:38 pm
Posts: 3756
No problem Chezzo :) I'm glad the module is coming together :)

_________________
Jack's Cheese and Bread Snack


Top
 Profile  
 
PostPosted: Mon Aug 20, 2012 7:01 pm 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
Oh wow, thanks so much! I'll go check all of that stuff out.

Neat! Broken Bottle has a stand alone version. I had no idea you could do that, but it makes it feel like its own game instead of a mod. I am going to have to figure that out.

I think someone in IRC said maybe I could use Chronomancy for the undo button.

I uploaded a new version, now with objects! I got the still beating hearts in, but when I go to change the type from body armour, they're gone. Where do I have to define types of objects? I also haven't been able to figure out how to have them get slowly eaten. I'm not sure the monsters are dropping items either. Do you know where that is in Broken Bottle?

http://chezzo.com/Hellfire/Hellfire02.rar


Top
 Profile  
 
PostPosted: Mon Aug 20, 2012 7:07 pm 
Offline
Retired Ninja

Joined: Fri May 28, 2010 4:38 pm
Posts: 3756
Yeah, to undo just clone the game at the start of each turn.

Some of this you may not need but here's how ToME does it.

Code:
--- Clones the game world for chronomancy spells
function _M:chronoClone(name)
   local d = Dialog:simpleWaiter("Chronomancy", "Folding the space time structure...")

   local to_reload = {}
   for uid, e in pairs(self.level.entities) do
      if type(e.project) == "table" and e.project.def and e.project.def.typ and e.project.def.typ.line_function then
         e.project.def.typ.line_function.line = { game.level.map.w, game.level.map.h, e.project.def.typ.line_function:export() }
         to_reload[#to_reload + 1] = e
      end
   end

   local ret = self:cloneFull()

   for uid, e in pairs(to_reload) do e:loaded() end

   if name then
      self._chronoworlds = self._chronoworlds or {}
      self._chronoworlds[name] = ret
      ret = nil
   end
   d:done()
   return ret
end

--- Restores a chronomancy clone
function _M:chronoRestore(name, remove)
   local ngame
   if type(name) == "string" then
      ngame = self._chronoworlds[name]
      if remove then self._chronoworlds[name] = nil end
   else ngame = name end
   if not ngame then return false end

   local d = Dialog:simpleWaiter("Chronomancy", "Unfolding the space time structure...")

   ngame:cloneReloaded()
   _G.game = ngame

   game.inited = nil
   game:run()
   game.key:setCurrent()
   game.mouse:setCurrent()
   profile.chat:setupOnGame()

   core.wait.disable() -- "game" changed, we cant just unload the dialog, it doesnt exist anymore
   return true
end


*edit* This is in game.lua. So all those selfs refer to the game.

_________________
Jack's Cheese and Bread Snack


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 4:11 pm 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
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.rar

I was able to clean up the objects being displayed!


Top
 Profile  
 
PostPosted: Wed Nov 21, 2012 1:02 am 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
Hellfire 0.2 the first animated mod for the T-Engine!

Image
Click for bigger!

To install:

Unzip this file in the modules directory of the t-engine. There are reports that you need to rebind < or use the hotbar.

Since my last release, I've included:

Animations! I can do about three or four of these a day, but they are totally worth it. I'm pretty proud of this one.

Image

A new UI! With a next player, an end turn, inventory, use stairs, kick, and shooting buttons. Also one that is the talent to make the new party member, mostly because I can't figure out how to get rid of the button.

A rocket launcher! Shoot your friends and enemies.

Speaking of enemies, I've done gobs more!

Things that are broken:

I'm still having problems with moving and action points.

I go back and forth doing it the way it needs to be done, and being a bad coder and filling the actions by the uid.

Actor.lua

Code:
-- We use action points instead of energy to simulate multiple actions per turn
-- When action points hit 0 we end our turn
function _M:useActionPoints(value)
   local value = value or 20
   --BAD CODING Goes and gets the uid of the party and refills the action points. Need to change every time a new entity is added, because the uid changes.
   local a = __uids[112]
   local b = __uids[12]
   --game.level.map:moveViewSurround(self.x, self.y, 8, 8)
   self:incActions(-value)
   if game.party.m_list[1].actions <= 0 and game.party.m_list[2].actions <= 0 then
      game.log("Out of action points")
      self:useEnergy()
      game.party:nextPlayer()
      --a.actions = 100
      --b.actions = 100
      self.changed = true
      return end
   -- Action points should never go below zero, but just in case
   if self:getActions() <= 0 then
      if self.actor == game.party.m_list[1] and game.party.m_list[2].actions <= 0 or self.actor == game.party.m_list[2] and game.party.m_list[1].actions <= 0 then
      game.party:nextPlayer()
      self.changed = true
      else
      self:useEnergy()
      end
   end
   self.changed = true
end


I had targeting working for all movement before, but I lost some data when a computer crashed. Basically, if you moused over a square it would show the route, and a red or blue square depending if you could go there. I remember what I did, but not where I put it, so I haven't been able to get it to work again.

Also, I'm having real trouble with the enemies turn. It seems they sometimes don't get a turn, and sometimes they get to take a bunch of turns.

The still beating hearts of your enemies that you eat and gain their powers don't work. I couldn't figure out how to temporarily increase and decrease attributes. Would it be a timed action?

If you wait too long, a portal opens up and something comes out of the other side and attacks you. However, if you do anything but shoot back, you get an error.

Coming up:

Next up, we've got a pirate world, heaven, and other different levels. Lots more items, and monsters. I've got some of the code in there, but when you die, you will go to the hell that is being built behind you. Also, some new enemy AI. Skeletons and witches stand and shoot at you, pumpkin heads walk to you and explode, and lots more.

Questions:

What else do I need to make this feel more tactical? Even though I don't really need it, would an "Demonic Activity" while the bad guys are going, be good? Also, having the camera follow, and having the enemies really moving on their turns?


Last edited by chezzo on Wed Nov 21, 2012 2:33 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Nov 21, 2012 5:32 am 
Offline
Archmage

Joined: Fri Feb 18, 2011 6:15 am
Posts: 300
Haven't tried this yet, but it looks amazing. Great work Chezzo :)


Top
 Profile  
 
PostPosted: Thu Nov 22, 2012 11:52 am 
Offline
Halfling

Joined: Sun Mar 04, 2012 2:04 am
Posts: 112
It crashes in b43.
Code:
Lua Error: /engine/Module.lua:403: attempt to concatenate local 'backname' (a nil value)
   At [C]:-1 __concat
   At /engine/Module.lua:403
   At [C]:-1 enable
   At /engine/Module.lua:397 loadScreen
   At /engine/Module.lua:557 instanciate
   At /engine/utils.lua:1871 showMainMenu
   At /engine/init.lua:124
   At [C]:-1 dofile
   At /loader/init.lua:183


Top
 Profile  
 
PostPosted: Thu Nov 22, 2012 12:05 pm 
Offline
Loremaster

Joined: Thu Sep 23, 2010 10:18 pm
Posts: 3516
Location: London, England
B43 needs an extra line in the init.lua file to tell it what background image to use.

_________________
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes


Top
 Profile  
 
PostPosted: Sat Nov 24, 2012 7:55 pm 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
Thanks, Grey. I put that in there. Oh yeah, this is for b43 because it uses animation. If you're not running b43, you could download Grey's F*ck This Jam and install it in the modules section.


Top
 Profile  
 
PostPosted: Tue Nov 27, 2012 7:30 pm 
Offline
Perspiring Physicist

Joined: Tue Jul 13, 2010 2:53 pm
Posts: 1332
Hey-a chezzo, it is looking like a great start. I am coming out of my coding hiatus and if you need any help just let me know. You should be able to catch me on IRC. Good luck!

_________________
Quote:
<DarkGod> lets say it's intended


Top
 Profile  
 
PostPosted: Wed Jan 30, 2013 1:32 pm 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
Here's the next version of Hellfire!

http://chezzo.com/Hellfire/Hellfire03.zip

That's the standalone copy, branded with Hellfire logos and such. Here's the mod to put in your mod folder.

http://chezzo.com/Hellfire/hellfiremod03.zip

Now you can eat the hearts, I fixed some game breaking bugs, and took out one player character for my own sanity.

Next up, more items, monsters, shops a little different than you know them, and AI.


Top
 Profile  
 
PostPosted: Wed Jan 30, 2013 2:16 pm 
Offline
Wyrmic

Joined: Thu Mar 10, 2011 9:10 pm
Posts: 227
This looks quite nice. Unfortunately whenever I try to use the stairs in the first room the screen (excluding HUD) goes black. When I quit out I get this Lua error:

Image

I should probably mention that I'm running it as a mod and I'm playing on a mac.


Top
 Profile  
 
PostPosted: Wed Jan 30, 2013 2:36 pm 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
Maan, fixed a game breaking bug to make an even bigger game breaking bug. I changed out the .zip, should work for ya now.

http://chezzo.com/Hellfire/hellfiremod03.zip

Thanks so much for the quick reporting!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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