Porting ToME2 to the T4 engine

If you have a module that you'd like comments on or would like to know how to create your very own module, post here

Moderator: Moderator

What do you want to see in the next release?

Hey, why haven't you implemented my favorite race/subrace/class yet? (specify below)
0
No votes
Hey, why haven't you implemented my favorite skill/talent/spell/ability yet? (specify below)
2
67%
Hey, why haven't you implemented my favorite scroll/potion/wand/staff/rod/other object yet? (specify below)
0
No votes
Hey, why haven't you implemented my favorite store/quest/event yet? (specify below)
0
No votes
Hey, that's not what that dungeon's supposed to look like! (specify below)
0
No votes
Hey, why haven't you implemented my favorite game mechanic/UI feature yet? (specify below)
0
No votes
Hey, that's a bug! Go fix that bug! (specify below)
1
33%
Hey, you didn't list what I want to see! (specify below)
0
No votes
 
Total votes: 3

Message
Author
Thorondor
Higher
Posts: 61
Joined: Wed Apr 15, 2015 11:59 am

Re: Porting ToME2 to the T4 engine

#556 Post by Thorondor »

Hi Zizzo
Thanks for the latest update; I had collected a few things on 0.51 which are listed below; recognise these might have been fixed already.
Looking forward to having a bash at the updated module. RE next thing to develop; - to be honest the thing I'd love to see is some animation with arrows, bolt spells and breaths - though this might not be easy to do. It'd be nice to see where stuff is coming from when you get blasted.
Thanks for the good work
Stay safe

Game functionality things:

If you go over your 100% burden limit, then you'll slow down (appropriately :) ) but if you drop something you don't necessarily return to the previous rate of movement....
If you consume or sell something to get you below that limit, you will remain at the penalised rate until you drop an additional item onto the floor - it's not updating the speed penalty check as far as I can see...

A voidgate destination was the princess - is this allowed?

Are empty bottles fillable?

Child spirits are friendly, but unless you can see them you can't move past them

If you recharge a staff, it seems at least on first go, to completely unidentify it (e.g. an identify staff (0 charges) becomes a cedar staff

In vaults aquatic creatures generated on land


Error reports

Fails to load when attempting to enter the heart of the world

on level change - I presume a fate would have triggered here...

error = "Game version: tome2-0.5.0\
Addons: gond_book-0.3.0, landmark-0.2.0, town_neutral-0.3.0\
\
Lua Error: /mod/class/interface/PlayerFates.lua:83: attempt to index global 'Map' (a nil value)\
At [C]:-1 __index\
At /mod/class/interface/PlayerFates.lua:83 ok_cb\
At /mod/spell-util.lua:1058 \
At [C]:-1 calc_circle\
At /mod/spell-util.lua:1066 grids_near\
At /mod/class/interface/PlayerFates.lua:89 apply\
At /mod/class/interface/PlayerFates.lua:224 checkFates\
At /mod/class/Game.lua:600 changeLevel\
At /mod/class/Game.lua:1162 \
At /engine/KeyBind.lua:243 "
seen = true
reported = false

Attempted to copy a spell to a stack of amulets of spell
error = "Game version: tome2-0.5.1\
Addons: gond_book-0.3.0, landmark-0.2.0, town_neutral-0.3.0\
\
Lua Error: /mod/class/Actor.lua:1779: /engine/interface/ActorTalents.lua:190: /data/talents/skill/magic.lua:61: attempt to call method 'addOrDrop' (a nil value)\
stack traceback:\
\9/data/talents/skill/magic.lua:61: in function </data/talents/skill/magic.lua:44>\
\9[C]: in function 'xpcall'\
\9/engine/interface/ActorTalents.lua:186: in function </engine/interface/ActorTalents.lua:173>\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Actor.lua:1779 unload\
At /engine/Game.lua:467 unregisterDialog\
At /mod/dialogs/UseTalents.lua:195 use\
At /mod/dialogs/UseTalents.lua:120 fct\
At /engine/ui/TreeList.lua:310 onUse\
At /engine/ui/TreeList.lua:209 fct\
At /engine/Mouse.lua:71 receiveMouse\
At /engine/Mouse.lua:111 delegate\
At /engine/ui/Dialog.lua:798 mouseEvent\
At /engine/ui/Dialog.lua:508 fct\
At /engine/Mouse.lua:71 "
seen = true
reported = false

Got a really good character to level 29:
Had a couple of issues where the character accidentally targetted itself with bolt spells and expired; - I did retrieve the characters as seemed a shame to lose the progress. It seems to happen perhaps because the user interface can't keep up with key-presses and then it accidentally targets the player; which will often be fatal. Not sure what you think about effectively all spell casters having immunity to their own spells? shame to die with a typo.
Anyway, the following error messages started coming up.

error = "Game version: tome2-0.5.1\
Addons: gond_book-0.3.0, landmark-0.2.0, town_neutral-0.3.0\
\
Lua Error: /engine/interface/ActorTalents.lua:351: /engine/interface/ActorTalents.lua:324: /engine/interface/ActorTalents.lua:190: /engine/interface/ActorTalents.lua:158: attempt to index upvalue 'force_target' (a nil value)\
stack traceback:\
\9/engine/interface/ActorTalents.lua:158: in function 'getTarget'\
\9/mod/spell-util.lua:2117: in function 'bolt_spell'\
\9/data/talents/spell/mana.lua:69: in function </data/talents/spell/mana.lua:68>\
\9[C]: in function 'xpcall'\
\9/engine/interface/ActorTalents.lua:186: in function </engine/interface/ActorTalents.lua:173>\
At [C]:-1 \
At [C]:-1 error\
At /engine/interface/ActorTalents.lua:351 useTalent\
At /mod/class/Player.lua:701 useTalent\
At /engine/interface/PlayerHotkeys.lua:179 \
At /engine/interface/PlayerHotkeys.lua:162 activateHotkey\
At /mod/class/Game.lua:1341 fct\
At /engine/interface/PlayerHotkeys.lua:326 \
At /engine/KeyBind.lua:231 "
seen = true
reported = false

error = "Game version: tome2-0.5.1\
Addons: gond_book-0.3.0, landmark-0.2.0, town_neutral-0.3.0\
\
Lua Error: /mod/spell-util.lua:2835: /engine/interface/ActorTalents.lua:158: attempt to index upvalue 'force_target' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/spell-util.lua:2835 cast\
At /mod/dialogs/UseThaumaturgy.lua:183 use\
At /mod/dialogs/UseThaumaturgy.lua:97 fct\
At /engine/ui/TreeList.lua:310 onUse\
At /mod/dialogs/ui/TweakedTreeList.lua:177 fct\
At /engine/Mouse.lua:71 receiveMouse\
At /engine/Mouse.lua:111 delegate\
At /engine/ui/Dialog.lua:798 mouseEvent\
At /engine/ui/Dialog.lua:508 fct\
At /engine/Mouse.lua:71 "
seen = true
reported = false

Zizzo
Sher'Tul Godslayer
Posts: 2045
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: Porting ToME2 to the T4 engine

#557 Post by Zizzo »

Couple quick notes before I go source diving for all those bugs:
Thorondor wrote: Fri Jul 16, 2021 11:32 am RE next thing to develop; - to be honest the thing I'd love to see is some animation with arrows, bolt spells and breaths - though this might not be easy to do. It'd be nice to see where stuff is coming from when you get blasted.
I could investigate that, certainly. I think we're okay license-wise to crib particle definitions from the T4 module.
Thorondor wrote: Fri Jul 16, 2021 11:32 am Are empty bottles fillable?
They're supposed to be fillable from fountains, but that's probably not implemented yet. The initial sticking bit there would be what sort of UI we want to have for filling bottles from fountains. I could imagine, for instance, handling it like T4's golden chests: when the player steps on a fountain, they would get a dialog to the effect of "Fill bottles from fountain?". [sound F/X: source diving] It looks like fountain's aren't supposed to appear in corridors, so it probably wouldn't interrupt regular travel too much.
Thorondor wrote: Fri Jul 16, 2021 11:32 am Had a couple of issues where the character accidentally targetted itself with bolt spells and expired;
Hmm, for that we could just have an "Are you sure you want to target yourself?" dialog, like the T4 module does.
"Blessed are the yeeks, for they shall inherit Arda..."

Thorondor
Higher
Posts: 61
Joined: Wed Apr 15, 2015 11:59 am

Re: Porting ToME2 to the T4 engine

#558 Post by Thorondor »

Just wondering if the particle effects could be imported, would your module be able to import the full te4 tileset? It'd look amazing 😁

Zizzo
Sher'Tul Godslayer
Posts: 2045
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: Porting ToME2 to the T4 engine

#559 Post by Zizzo »

Thorondor wrote: Fri Jul 16, 2021 11:32 am A voidgate destination was the princess - is this allowed?
Do you mean directly under the princess? That should have been caught by the 'naked_bold' filter. Void gates going into the princess quest room in general are fine; I've seen them in original T2.
Thorondor wrote: Fri Jul 16, 2021 11:32 am Child spirits are friendly, but unless you can see them you can't move past them
[sound F/X: source diving] That's original T2 behavior AFAICT. I did go back and add the corresponding "Something is in your way" message for clarity.
Thorondor wrote: Fri Jul 16, 2021 11:32 am Fails to load when attempting to enter the heart of the world
[sound F/X: source diving] Yeah, that's not implemented yet. I can put that next on my to-do list, but I have a feeling it's gonna be ugly… :?
Thorondor wrote: Tue Aug 03, 2021 5:26 pm Just wondering if the particle effects could be imported, would your module be able to import the full te4 tileset? It'd look amazing 😁
Hmm, I'm actually not sure. It doesn't say anywhere in the code that I can find whether the Shockbolt tiles are distributed under their own license.

In the meantime, We Apologize for the Delay™; some of the stuff I wanted to put in this release took a bit longer than I expected. So, without further ado:

Release 0.5.3 "Fountain of Smart"

Several bugfixes in this release:
  • Just to be sure, we now recompute the speed changed for your carried weight (and everything else) every time anything is put into or taken out of the player's inventory or equipment. We're triggering this at a low enough level that it should catch everything (famous last words…) :oops:
  • Stupid typo in applying certain fates.
  • Another stupid typo in the Copy Spell talent, of the sort that I routinely bemoan that Lua can't somehow catch at compile time. :oops:
  • Turns out that the game's "show the real names of flavored objects that are flavor-known but not identified" logic wasn't handled where I thought it was (notably, in the stuff I'd already implemented), but in some special-case handling in object_desc(). This applies, for instance, to a Staff of Identify after it's recharged; it's unidentified because you don't know how many charges it now has, but its flavor is still known, so it should still be listed as a Staff of Identify.
  • Buried deep in T2's projection code, I discovered the comment "Never affect projector." Which is indeed reflected in the project_m() code, which returns with no effect if the affected actor is the same as the caster. Which basically means that all spells and damaging talents in T2 have always had built-in self-fire protection. :shock: :oops: I've patched up all the places I can find to reflect this change; let me know if I've missed any.
  • So the Static map generator, which among other things is used to build vaults, invokes Zone:makeEntity() directly to create its actors, instead of going through our special actor generator that does things like make sure we don't place an aquatic creature on dry land. :oops: We now borrow the filter from the latter to use in the former.
  • Small off-by-1 error in parsing some static level maps with void jumpgates; the T2 map definition specifies the gate's destination in 1-based coordinates, but our maps use 0-based coordinates. :oops: This affects the Bree wights quest, the Galleon level in Helcaraxe, and the Machine level in Illusory Castle.
I've probably missed some reported bugs in the above; We Apologize for the Inconvenience.™ :oops: (Don't hesitate to report them again. :wink: ) Known bugs that are still under investigation include:
  • Travak appearing multiple times (and apparently other artifacts…).
  • Randarts reporting *ID*'d info when just ID'd? Maybe some sloppiness in Object:getDesc().
  • Maze edge walls not visible. (Actually, is this still a problem? My recent tests aren't reproducing it.)
And a few requested features:
  • Preliminary implementation of drinking or filling empty bottles from fountains. I went with the golden-chest-style interface that I discussed previously; it's smart enough to know whether you have any bottles to fill and thus whether to ask drink/fill/ignore or just drink/ignore.
  • Particles! We borrow the T4 module's 'generic_ball', 'generic_blast' and 'hit_warning' particles, adapt its 'mana_beam' into a generic beam, and Frankenstein up our own generic bolt particle. (I'd show an example here, but I have no idea how to do that fancy animated screen-grab stuff that DarkGod does in his announcements. :oops: ) For now we're using these basic particles for all spells and effects (unless I've missed any), including thaumaturgy spells; in theory we could poach some more of the fancy fire/lightning from the T4 module in the future.
  • And migrate to the 1.7.4 engine.
Now, the particles work touched a fair bit of code, so I wouldn't be surprised if I introduced some bugs in the process (on top of the ever-present bugs that were already there…). :oops: :wink: As always, here is a good place to report said bugs.

And as always, the .team file for the release is available from my site, along with the Subversion repo and SVN::Web front-end thereto. And for those of you following along on SVN, the 0.5.3 release branch will get bug fixes for all the aforementioned inevitable bugs.

And since having them scattered throughout the thread is sort of useless, here's a reference list of all the T2 addons I've released:
  • Alchemic Arcanorum (current release 1.0.0): Starts Alchemist characters with an Alchemic Arcanorum object from my old ToME:Arcanorum T2 module, which can be used to store and extract essences.
  • Gender Parity (current release 1.0.1): Modifies assorted NPCs that don't particularly have to be male or female so that they can be either randomly.
  • Go to Landmark (current release 1.0.1): A quickie port of my T4 addon of the same name; allows you to auto-travel to various landmarks like stores or up/down stairs via the "Show known landmarks" action on the <Esc> menu.
  • Neutral Townsfolk (current release 1.0.0): As requested by Thorondor. :wink: Modifies a few of the more harmless town denizens into the "Neutral" faction so they don't pester you.
  • ZAngband Monsters (current release 1.0.1): Adds ZAngband monsters (hence the name). Untested.
  • Gondolin Book Store (current release 1.0.0): Also as requested by Thorondor. :wink: Adds a book store to Gondolin (hence the name…).
  • Gervais Tiles for ToME Classic (current release 1.0.0): Repurposes David Gervais' TomeTik tiles (reused here pursuant to the Creative Commons CC-BY-3.0 license) for use with our T2 module.
Next up, I'll probably take a stab at getting Heart of the Earth working, by request; if there's any other unimplemented feature you particularly miss, don't hesitate to ask for it.
"Blessed are the yeeks, for they shall inherit Arda..."

Thorondor
Higher
Posts: 61
Joined: Wed Apr 15, 2015 11:59 am

Re: Porting ToME2 to the T4 engine

#560 Post by Thorondor »

Thanks - excited to try this out 😊
I'd leave heart of the world to be honest, I'd just put a jokey notice saying the heart of the world is closed for maintenance, we apologise for the inconvenience :D I accidentally went on the hotw stairs and it crashed so thought it should be highlighted

Summoning or incorporating the enhanced graphics or shock bolt tiles would get my vote as next preference. Can u imagine razorback with te4 animation 😁😁😁😁😁😁

Thorondor
Higher
Posts: 61
Joined: Wed Apr 15, 2015 11:59 am

Re: Porting ToME2 to the T4 engine

#561 Post by Thorondor »

Hi
A bit of playtesting from the latest module:

blindness from bloodshot eyes - 6 damage / turn for 60 turns... - virtually instant death for a low level character; - not sure that there was ongoing damage in original T2...

Managed to forge 30 Travak pebbles from rubble using forge ammo (seems to do every time forge shots done actually)

Globe of light has lost it's strong light component at relevant levels, - used to be able to use it as a decent kill crebain skill but the 'strong light' has gone and it doesn't have a graphic, and also has an error report - see below... btw is it possible to incorporate the graphic for this skill from T4? - would be cool!

Saw a pike in a fountain (a bit unusual but guess fountains are water after all)

Error reports

Consumed fine wine:
error = "Game version: tome2-0.5.3\
Addons: gond_book-0.3.0, landmark-0.2.0, gervais_tiles-0.5.2, town_neutral-0.3.0\
\
Lua Error: /engine/Object.lua:147: attempt to get length of field 'stacked' (a nil value)\
At [C]:-1 __len\
At /engine/Object.lua:147 stack\
At /mod/class/Object.lua:1275 stack\
At /mod/obj-util.lua:529 sort_inven\
At /mod/class/Actor.lua:1694 sortInven\
At /mod/class/Player.lua:1580 playerEat\
At /mod/dialogs/UseItemDialog.lua:73 use\
At /mod/dialogs/UseItemDialog.lua:46 fct\
At /engine/ui/List.lua:155 onUse\
At /engine/ui/List.lua:81 fct\
At /engine/Mouse.lua:71 receiveMouse\
At /engine/Mouse.lua:111 delegate\
At /engine/ui/Dialog.lua:817 mouseEvent\
At /engine/ui/Dialog.lua:510 fct\
At /engine/Mouse.lua:71 "
seen = true
reported = false

cast globe of light

error = "Game version: tome2-0.5.3\
Addons: gond_book-0.3.0, landmark-0.2.0, gervais_tiles-0.5.2, town_neutral-0.3.0\
\
Lua Error: /engine/interface/ActorTalents.lua:351: /engine/interface/ActorTalents.lua:324: /engine/interface/ActorTalents.lua:190: /mod/spell-util.lua:2688: attempt to perform arithmetic on local 'dst_y' (a nil value)\
stack traceback:\
\9/mod/spell-util.lua:2688: in function 'particle'\
\9/mod/spell-util.lua:2186: in function 'ball_spell'\
\9/data/talents/spell/fire.lua:76: in function </data/talents/spell/fire.lua:69>\
\9[C]: in function 'xpcall'\
\9/engine/interface/ActorTalents.lua:186: in function </engine/interface/ActorTalents.lua:173>\
At [C]:-1 \
At [C]:-1 error\
At /engine/interface/ActorTalents.lua:351 useTalent\
At /mod/class/Player.lua:725 useTalent\
At /engine/interface/PlayerHotkeys.lua:179 \
At /engine/interface/PlayerHotkeys.lua:162 activateHotkey\
At /mod/class/Game.lua:1350 fct\
At /engine/interface/PlayerHotkeys.lua:326 \
At /engine/KeyBind.lua:231 "
seen = true
reported = false

This occurred on character creation (there was a previous character of the same name)
error = "Game version: tome2-0.5.3\
Addons: gond_book-0.3.0, landmark-0.2.0, gervais_tiles-0.5.2, town_neutral-0.3.0\
\
Lua Error: /mod/class/Automatizer.lua:225: automatizer rule collision on name \"Auto type 'armor' + bad\"\
At [C]:-1 \
At [C]:-1 assert\
At /mod/class/Automatizer.lua:225 validateAutomatizerRule\
At /mod/class/Automatizer.lua:236 newAutomatizerRule\
At /mod/class/Automatizer.lua:184 newAutomatizerRule\
At /save/timothy/automatizer-auto.lua:152 f\
At /mod/class/Automatizer.lua:187 loadDefinition\
At /mod/class/Automatizer.lua:200 loadForPlayer\
At /mod/class/Game.lua:207 at_end\
At /mod/dialogs/Birther.lua:399 callback\
At /mod/dialogs/Birther.lua:355 fct\
At /engine/ui/Dialog.lua:154 fct\
At /engine/ui/Button.lua:63 fct\
At /engine/Mouse.lua:71 receiveMouse\
At /engine/Mouse.lua:111 delegate\
At /engine/ui/Dialog.lua:817 mouseEvent\
At /engine/ui/Dialog.lua:510 fct\
At /engine/Mouse.lua:71 "
seen = true
reported = true

Thorondor
Higher
Posts: 61
Joined: Wed Apr 15, 2015 11:59 am

Re: Porting ToME2 to the T4 engine

#562 Post by Thorondor »

Just tried to load a saved file; - game aborted and wouldn't load.
Forgot to say in the previous post; particle effects looking good :)

error = "Game version: tome2-0.5.3\
Addons: gond_book-0.3.0, landmark-0.2.0, gervais_tiles-0.5.2, town_neutral-0.3.0\
\
Lua Error: /mod/class/Automatizer.lua:225: automatizer rule collision on name \"Auto type 'armor' + bad\"\
At [C]:-1 \
At [C]:-1 assert\
At /mod/class/Automatizer.lua:225 validateAutomatizerRule\
At /mod/class/Automatizer.lua:236 newAutomatizerRule\
At /mod/class/Automatizer.lua:184 newAutomatizerRule\
At /save/timothy/automatizer-auto.lua:152 f\
At /mod/class/Automatizer.lua:187 loadDefinition\
At /mod/class/Automatizer.lua:200 loadForPlayer\
At /mod/class/Game.lua:155 run\
At /engine/Module.lua:1122 instanciate\
At /engine/utils.lua:2999 showMainMenu\
At /engine/init.lua:207 \
At [C]:-1 dofile\
At /loader/init.lua:217 "
seen = true
reported = false

Post Reply