View Full Version : T-Engine4 / ToME4 beta10 unleashed!

September 5, 2010, 16:10
As promised here comes T-Engine4 and ToME4 beta10 !
See http://tome.te4.org/ http://te4.org/ http://blog.te4.org/

Release highlights:

* Winnable game! The endgame fight is implemented with three possible outcomes.
* Smarter AI, most monsters can now pathfind using distance maps
* New class: Reavers
* Support for engine self update (disabled for now)
* Many speed improvments
* Finished alchemists spells
* Much balancing and fixes

Expanded changelist:

* ActorFOV can now compute distance maps if __do_distance_map=true is set for your actors; new AIs can use distance maps to do low-cost pathfinding (ai: simple_dmap, flee_dmap, dmap)
* Added achievements for most major plot events
* Added a –force32bits flags to premake to allow compilation using luajit on a 64bit linux
* Added an example_realtime module that is an exact copy of example module but in realtime (the gameplay sucks it’s not adapted)
* Added core.game.setRealtime(freq) function to set the engine into realtime mode, calling tick() at the given frequency
* Added jellies images
* Added lore items, as you explore the world you can discover texts, writings and other stories, they automatically add up in a lore book, accessible from the game menu
* Added Map:checkAllEntitiesNoStop() that will iterate over all entities no matter if a result is found
* Added minor and major demons, beware some are nasty
* Added new target types (for project): ballbolt, conebolt, ballbeam, conebeam
* Added one new world artifact
* Added potions of free action, they are not cheap but they are useful :)
* Added snakes tiles
* Added trails to some spells
* Allow talent category points to be used on known categories, increasing their mastery by 0.1
* Allow the Static generator defineTile() function to automatically define spots
* Changed engine version to 0.9.10 (from 1.0.0), your module will not display anymore in the list until you change your init.lua accordingly
* Changed lua table.sort() function to accept any index as a second parameter, if not a function it will assume the items to sort are tables and sort them by the given index
* Chat class constructor can be passed a table as a third parameter to provide data to the chat script
* Chat requests auto stop resting & running
* Chats & Stores can only be triggered by a player
* Chat texts revised by ushumgal
* Corrected some alchemist talent descriptions
* DebugConsole update
* Decaying wont destroy artifacts
* Dialogs now open with a fast “pop” animation (disable-able if needed by modules)
* Do not show the golem HP if the golem is dead
* Each achievement now have three versions, one for each difficulty level
* Effective talent level (computed using mastery value) will be displayed in talent description
* Factorized module instanciation/savefile loading into Module:instanciate()
* Fire Alchemy third talent is now “Fire Storm”, which finaly makes the tree complete
* Fix character sheet for controlled summmons
* Fix description of Stone Wall spell
* Fixed Bathe in Light
* Fixed Earth’s Eyes
* Fixed picking up all items with ‘*’
* Fixed some zones that were mistakenly non-persistant: Angolwen, Vor/Gorbat/Grushnak/Rak’Shor Prides
* Fixed typos
* Fix fire bolt for the Imp summon
* Fix (maybe ..) Quake talent
* Fix Nature’s Touch and Earth’s Eyes
* Fix online profile dialog size
* Fix profiles data “leaking” into globals (this fixed the Blood of Life)
* Fix saving while controlling a creature
* Fix tooltip on grids hit by the Darkness spell
* Game engines can also come in archived form in a .teae zip file
* Greatly improved performance when moving around the map. Map:checkAllEntities() is now much faster, FOV code is also faster
* Harno, the Herald of Minath Tirith will initiate a dialog if it is already speaking
* Improved character sheet (displays some more resistances and betetr char dump)
* Improved the integrated lua profiler (only works when luajit is disabled)
* Improve handling of activable items
* Improve savefile save performance
* Invulnerability prevents drowning
* It is possible to drop objets on the world map to destroy them
* Jewelers can now craft special rings on demand
* Main screen load savefile menu will correctly work for all modules with the keyboard
* Most ToME NPCs now use distance map to pursue the player
* New class: Reavers (Corrupter)
* New :cloneFull() method on all objects, this makes a perfect clone of the given object and any subjects recursively without creting duplicates of subobjects. This is nearly instantaneous and thus could be used to create time travel spells and other neat things.
* New engine.NameGenerator class
* New quest: Lost Knowledge
* New random quests: Escorts, you will find them randomly in some zones
* New random quest: sometimes you will meet a lost adventurer (of a random class), you can help him by escorting him to a portal, but beware he dies easily. He might reward you for you kindness.
* New zone: Ithilthum, Valley of the Moon
* New zone: the High Peak where the final end game battle will take place!
* New zone: the Slime Tunnels
* NPCs will “transfer” their targets to their friends in sight if they do not have a target themselves
* Password will not be displayed onscreen anymore
* Phase Door & Teleport are now correctly restricted to their own ranges
* Piercing arrow whot hit twice the same target
* Probability Travel does not work over no-teleport zones and in the wilderness
* Progressive teleporation resistance affects NPCs being teleported against their will
* Projectiles can now leave a trail of particles
* Resistances in ToME now go from -100 to 100 instead of 0 to 100
* Right click on a hotkey will delete it
* Summoned creatures give flying texts when doing damage
* Talents can be auto cast by melee weapon hit
* Talents can now require talents to not be known
* TE4 can now handle multiple versions of the same engine (or even different ones). Engines are located in game/engines and the default one in game/engines/default
* TE4 main menu will display a “news of the day”
* Teleport: Angolwen will take you back to the correct worldmap
* T-Engine can now auto-update itself (as long as it is not an update to the exe) (this is disabled for now, will be activated later)
* The game is now winnable with 3 possible endings
* The Shade of Angmar is immune to blindness
* Tridents & Whips now use the exotic weapons mastery talent, which is hidden by default, will require a quest to unlock
* Saves can now be made in the background while continuing to play the game. This obviously speeds ups considerably the gameplay since saves now “feel” instant.
* *WARNING* Module makers: I had to change how savefiles work, there is a few changes needed in your modules for it to work.
o * In Game.lua: change the Savefile code in saveGame() to be just a call to savefile_pipe:push(game.save_name, “game”, game)
o * In dialogs.Death too
o * Take a look at either the example module or ToME to see how it works exactly, it’s really easy to convert
o * the Game:tick() method must check for savefile_pipe.saving and return true if it’s true (otherwise the save will not continue in the background). Check the example module tick()
o * In your PlayerDisplay you can add a line like that:

if savefile_pipe.saving then h = h + self.font_h self.surface:drawColorStringBlended(self.font, “#YELLOW#Saving…”, 0, h, 255, 255, 255) h = h + self.font_h end

To make a graphical display of the background saving thread.
* Quitting while a save is going one will obviously still wait until it is finished

Have fun!

September 5, 2010, 16:41
Cool! :) I like the random quests, too :)

I have noticed that when playing with a maximized game window, after my character dies, the screen is offset maybe 50 pixels or so toward the bottom, and I have to restart the game or resize the window to fix it...

Also, it would be nice if statgain and skillgain were on the same screen, and could be switched between - since some skills require certain stats, it would be nice to see what skills you could level up by adding "just one more point" of some stat or other, instead of having to remember from your last levelup or dismiss the statgain screen and reinvoke it after you look at your skills!

September 5, 2010, 16:43
I'll check that thanks.

As for the double dialogs, yeah that's one my todo list :)

September 5, 2010, 17:39
Hmm, I decided to try my hand at module making, so I edited some files in a copy of the example module, and now monsters aren't appearing, and there are no errors in stdout.txt! Any quick ideas why this might happen?

September 5, 2010, 18:29
Without seeing your changes it's kinda hard :)

September 5, 2010, 18:49
Heh, right... I just thought you might have some common gotchas you'd run into before while developing the game! :)

Perhaps it's got something to do with the fact that I removed kobold.lua and replaced it with a new monster, but didn't edit any of the dungeon stuff to actually reference the new monster? :)

September 5, 2010, 18:55
Most probably yes ;)

September 6, 2010, 16:20
OK, I got that sorted out... now, dumb lua question! :P

combat = { dam= function() return self.stats.pow end },

This doesn't seem to work in a monster definition... well, it sort of does, but then I get errors elsewhere about various methods of self being missing, such as getTalentById!

Is self not really a keyword in lua - are you using it for the player, such that if I do what I've done here, I overwrite the entire player object or something? That's what seems to be going on here... if this is the case, how do I properly refer to a monster's stats in its combat data? I'd like to be able to define this once in a base monster definition and not have to redefine the formulas in every single monster, too! :)

September 6, 2010, 17:23
Well self is indeed nothing special.
When you define a function as:
function foo:bar() ... end

It will auto add a self parameter as the first param but that's (and that's all that is needed ;> )

What you want is:
combat = { dam= function(self) return self.stats.pow end },

But what will self be ? the actor using it or the obejct itself ?
that's your combat code that will handle this by passing the correct parameter to the function. Obviously this wont work in ToME4 default combat system but I guess you made your own ?

September 6, 2010, 17:28
Oh, hmm, so I need self to be a parameter to the function :)

But yeah, that might be a problem - I was hoping self would be the monster, but if it's just the combat object, or some arbitrary value passed in by whatever refers to dam... yeah, that won't work unless I modify the combat code!

Guess I'm more used to object-oriented programming, and not so much to functional! :)