Page 8 of 46
Re: Porting ToME2 to the T4 engine
Posted: Wed May 07, 2014 6:54 pm
by darkgod
Oh this has much advanced since last time
A few things:
- Upload releases to te4.org !
- Autoexplore, pleasssssseee !

- Validating the levelup dialog is really not intuitive for those that do not read

a "Ok" / "Cancel" button pair would be neat

- Make ASCII not transparent, at least as an option
- Enable ingame chat, it's most easy:
Code: Select all
Index: init.lua
===================================================================
--- init.lua (revision 805)
+++ init.lua (working copy)
@@ -29,6 +29,7 @@
The original Tales of Middle Earth v2.3.9 (or a reasonable approximation thereof) ported to the TE4 engine.
]]
starter = "mod.load"
+allow_userchat = true -- We can talk to the online community
no_get_name = true -- Handle name juggling ourself.
Index: class/Game.lua
===================================================================
--- class/Game.lua (revision 805)
+++ class/Game.lua (working copy)
@@ -103,6 +103,9 @@
self.log(style, ...)
end
end
+ self.logChat = function(msg, ...)
+ self.log(msg, ...)
+ end
self.log(self.flash.GOOD, "Welcome to #00FF00#Tales of Middle-Earth#LAST#!")
Some bugs:
- Pray to Tulkas skill gives a lua error for tooltip:
Code: Select all
Lua Error: /data/talents/player/pray.lua:131: attempt to index global 'src' (a nil value)
At [C]:-1 __index
At /data/talents/player/pray.lua:131 describe
At /data/talents/player/pray.lua:112 info
At /engine/interface/ActorTalents.lua:78 info
At /mod/class/Actor.lua:410 getTalentFullDescription
At /engine/HotkeysDisplay.lua:198 onMouse
At /mod/class/Game.lua:664 fct
At /engine/Mouse.lua:76
- Tried to make a high elf sorceror and got:
Code: Select all
Lua Error: /mod/class/Player.lua:848: attempt to perform arithmetic on field 'luck' (a table value)
At [C]:-1 __add
At /mod/class/Player.lua:848 getLuck
At /mod/class/Player.lua:852 getLuckScale
At /mod/class/Object.lua:105 resolve
At /engine/Zone.lua:455 finishEntity
At /engine/Zone.lua:426 makeEntityByName
At /mod/class/NPC.lua:167 populateInitialInventory
At /mod/resolvers.lua:212
At /engine/Entity.lua:571 resolve
At /engine/Zone.lua:455 finishEntity
At /engine/Zone.lua:396 makeEntity
At /engine/generator/actor/Random.lua:101 generateOne
At /engine/generator/actor/Random.lua:118 regenFrom
At /engine/generator/actor/Random.lua:47 generate
At /engine/Zone.lua:909 newLevel
At /engine/Zone.lua:804 getLevel
At /mod/class/Game.lua:271 changeLevel
At /mod/class/Game.lua:146 at_end
At /mod/dialogs/Birther.lua:322 callback
At /mod/dialogs/Birther.lua:293 checkNew
At /mod/dialogs/Birther.lua:324 atEnd
At /mod/dialogs/Birther.lua:114 fct
At /engine/ui/Button.lua:64 fct
At /engine/Mouse.lua:56 receiveMouse
At /engine/Mouse.lua:94 delegate
At /engine/ui/Dialog.lua:547 mouseEvent
At /engine/ui/Dialog.lua:326 fct
At /engine/Mouse.lua:56
Re: Porting ToME2 to the T4 engine
Posted: Thu May 08, 2014 2:01 am
by Zizzo
darkgod wrote:- Upload releases to te4.org !
I can do that? I assumed I'd have to wait until I was much further along before I could do that.
[...] Okay, I've uploaded
a stab at it. Where do I get the module MD5 from, though? The log file reports a nil MD5 for the module, and a quick source dive through engine.Module:instanciate() suggests that it's printing the wrong thing anyway.
darkgod wrote:- Autoexplore, pleasssssseee !

Okay, okay...

Does the example module implement auto-explore, or am I going to have to decipher what the T4 module is doing?
darkgod wrote:- Validating the levelup dialog is really not intuitive for those that do not read

a "Ok" / "Cancel" button pair would be neat

Done in SVN.
darkgod wrote:- Make ASCII not transparent, at least as an option
How do I do that? That's actually been bugging me for a while.
darkgod wrote:- Enable ingame chat, it's most easy:
Done in SVN.
darkgod wrote:Some bugs:
- Pray to Tulkas skill gives a lua error for tooltip:
[sound F/X: forehead repeatedly striking desk] Fixed in SVN.
darkgod wrote:- Tried to make a high elf sorceror and got:
[sound F/X: source diving] Hmm. Player luck hasn't been resolve()'d yet at that point. I hadn't tripped over that before, because all my test characters used races or classes with luck modifiers, which concealed the problem. Papered over for now in SVN. For reference, is there a particular reason that Game:newGame() needs to call Game:changeLevel() before resolve()'ing the player? That's copied from the example module, and appears to be the way the T4 module does it, but it would work better for my case to do it the other way around.
Oh, and fair warning: spells aren't implemented yet, so your Sorceror wasn't going to get far anyway. I can work on that for the next release, unless anyone wants me to give higher priority to something else.
Re: Porting ToME2 to the T4 engine
Posted: Thu May 08, 2014 1:03 pm
by darkgod
MD5 should compute right in 1.2.0, just grab the latest test version.
For non-transparent ASCII, just add:
Code: Select all
Map.tiles.force_back_color = {r=0, g=0, b=0, a=255}
T4's autoexplore does many things, I suggest you instead look at engine.interface.PlayerExplore
No reason for resolving after, except that in T4 some resolvers need a level; if yours dont then no problem.
Spells would be neat, but you seem to be doing fine on your own deciding what to do so it's just a suggestion

I have no idea how much is done vs. not done so ..

Re: Porting ToME2 to the T4 engine
Posted: Fri May 16, 2014 1:31 am
by Crim, The Red Thunder
Just dropping words of encouragement, and watching this for the day I can joyously experience a modern ToME2. (Or Classic Tome, or whatever variation one wants to call it.)
I won't even complain about wanting to have my beloved thaumaturges back yet. No really, I won't complain at all. Lovely Lovely meteor strikes.
Can't wait for this to become the next big thing!
Also, will it be possible to import the T2 graphic tileset, and upscale the tiles if necessary, or are they protected source material or something?
Re: Porting ToME2 to the T4 engine
Posted: Fri May 16, 2014 1:39 am
by jenx
pleeeeeaaaaasssssseeeeee do this!
Re: Porting ToME2 to the T4 engine
Posted: Fri May 16, 2014 12:58 pm
by darkgod
Most certainly possible possible to use the tiles yes; let's trike a deal here zizzo, I allow you to use tome2 tiles in your tome2 rewrite provided that you whip yoruself and make the said tome2 rewrite working :>
Re: Porting ToME2 to the T4 engine
Posted: Mon May 19, 2014 3:40 am
by Zizzo
Crim, The Red Thunder wrote:I won't even complain about wanting to have my beloved thaumaturges back yet. No really, I won't complain at all. Lovely Lovely meteor strikes.
Ooh, thaumaturgists will be tricky; I'd either have to create random Thaumaturgy spell talents
ex nihilo and somehow get them to persist in the savefile, or have a two-stage system with a single Cast Thaumaturgy Spell talent that goes to another dialog that lets you select a spell. That will happen much later, I think.
Crim, The Red Thunder wrote:Also, will it be possible to import the T2 graphic tileset, and upscale the tiles if necessary, or are they protected source material or something?
jenx wrote:pleeeeeaaaaasssssseeeeee do this!
darkgod wrote:Most certainly possible possible to use the tiles yes; let's trike a deal here zizzo, I allow you to use tome2 tiles in your tome2 rewrite provided that you whip yoruself and make the said tome2 rewrite working :>
Well, I can hardly turn down a request like that.

I've cobbled together an implementation that seems to work, and checked it into SVN. As a teaser, here's a quick test of a Half-Ogre Barbarian Swordmaster about to clobber a hapless Pitiful-looking beggar:

This is at 32x32 tile size; 48x48 and 64x64 should also be possible, but I haven't tested those yet.
Re: Porting ToME2 to the T4 engine
Posted: Mon May 19, 2014 7:53 am
by Crim, The Red Thunder
Well, a TRULY clunky way to do it, failing anything else, would be to create every possible spell, at every possible level, hardcoded, and then pull randomly from them. There's almost certainly a better one though.
Graphics will make it quite nice, even if they look all low-res. Retro <3! Definitely a good touch!
Re: Porting ToME2 to the T4 engine
Posted: Mon May 19, 2014 11:01 am
by Zireael
Will be checking the new release out. Those tiles look spiffy!
... and I really have to learn how to improve level generation based on Angband/ToME2 code...
Re: Porting ToME2 to the T4 engine
Posted: Mon May 19, 2014 2:11 pm
by darkgod
A better way of doing it would be to make your own system; it's not really a talent it's a randomspell
As for the bluriness of the gfx, it's because by default textures in TE4 are scaled with interpolation; I'll add a way to disable that..... DONE !
Add that to your Game:setupDisplayMode and use latest git engine

Re: Porting ToME2 to the T4 engine
Posted: Tue May 20, 2014 4:03 am
by Zizzo
darkgod wrote:A better way of doing it would be to make your own system; it's not really a talent it's a randomspell

*sigh* I've already got spells and tiles in the air, and now you're tempting me with thaumaturgy ideas... You realize you're just pushing the next release date that much further back, yes?
darkgod wrote:
Add that to your Game:setupDisplayMode and use latest git engine

Done and done. Hmm, on the subject of tiles, do we want faction markers like T4 has? Obviously much less elaborate. of course, but I could probably make something simple to distinguish friend from foe from unique from player. The Angband tile set also includes overlay tiles for displaying player health as a bar, which I might be able to wedge into place here; would we also want that for monster, the way T4 does?
Re: Porting ToME2 to the T4 engine
Posted: Tue May 20, 2014 4:50 am
by Crim, The Red Thunder
With an option to turn it off, certainly apply healthbars.
There's also the 'highlight the player option', A similar function could no doubt be used to overlay tactical borders for friends/enemies/uniques/etc. Again, with an option to turn off.
Not sure how well graphics will take to this, especially in some of the clutter you could get in classic tome (summon swarms, among others) compared to the rather elegant and lesser groups in T4. I think it'd be manageable, but I'll hold my breath just in case.
I'm willing to delay my enjoyment of the True Art for a while, if it gets basic spells and gameplay running. Functional and playable beats feature-laden and unfinished, anyday.
Re: Porting ToME2 to the T4 engine
Posted: Tue May 20, 2014 11:13 pm
by rexorcorum
Zizzo, you can play around with my latest tactical border displays, named "flagposts" - they're in the latest git (accessible through Game Options - UI). I think they are minimalist enough to work also here. Nudge me if you need them also in lower res (currently they're 64x64) or if they'll need even more "stripping".
Last, but not least - with the classic tileset, I guess I'll have to revisit my icons ideas (which reminds me that I haven't finished them in the first place

).
All in all, great work so far and more greatness is looming on the future horizons.
Re: Porting ToME2 to the T4 engine
Posted: Fri May 23, 2014 4:17 am
by Zizzo
Crim, The Red Thunder wrote:With an option to turn it off, certainly apply healthbars.
There's also the 'highlight the player option', A similar function could no doubt be used to overlay tactical borders for friends/enemies/uniques/etc. Again, with an option to turn off.
Not sure how well graphics will take to this, especially in some of the clutter you could get in classic tome (summon swarms, among others) compared to the rather elegant and lesser groups in T4. I think it'd be manageable, but I'll hold my breath just in case.
You have a point that faction markers and/or health bars on everything could be too "busy". The "highlight the player" option would almost certainly be implemented with a faction marker (which probably won't work in ASCII mode, now that I think of it...); I could also see (optional) faction markers on friendly mobs, and particularly health bars on pets and companions.
rexorcorum wrote:Zizzo, you can play around with my latest tactical border displays, named "flagposts" - they're in the latest git (accessible through Game Options - UI). I think they are minimalist enough to work also here. Nudge me if you need them also in lower res (currently they're 64x64) or if they'll need even more "stripping".
Hmm, that would probably depend on whether we can use different faction markers at different tile sizes. Bear in mind, the original Adam Bolt tiles are 16x16, and I'm making that size available as an option for players with small screens; your markers would get pretty squished at that size.
Re: Porting ToME2 to the T4 engine
Posted: Thu Jun 05, 2014 2:02 am
by Zizzo
Thinking about faction markers has got me thinking about factions:
- Presumably we'll need one for pets and companions.
- One thing that's always bugged me in T2 is that my Eru and Manwe characters always have to pack some sort of charm spell to deal with good monsters that are trying to kill me, but that will dock my piety if I kill them. What do we think about putting good monsers in a faction that would be allied or neutral to Eru and Manwe followers? Note that that would probably lead to them attacking other monsters, as good-flagged unique monsters already do in T2.
- Some of the minor townsfolk could plausibly be in a neutral faction, for that matter. AFAIK that would still leave them open to "mugging" if the player particularly needed more starting gold.
The heavy hitters like Mean-looking mercenaries and Battle-scarred veterans would still be hostile, of course. 
Any or all of this may or may not be implemented by the next release, of course...
