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
50%
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)
1
25%
Hey, that's a bug! Go fix that bug! (specify below)
1
25%
Hey, you didn't list what I want to see! (specify below)
0
No votes
 
Total votes: 4

Message
Author
Thorondor
Halfling
Posts: 104
Joined: Wed Apr 15, 2015 11:59 am

Re: Porting ToME2 to the T4 engine

#676 Post by Thorondor »

Cheers for the latest release. :)
The wierd thing with the summoned elemental vs kobold i mentioned i think linked to the elemental trying to push past some creatures temporarily seems to occupy the same square as the monster.
that meant that it looked like the large kobold was killed but then reappeared.
The princess quest that was unconnected to the map via a path was the circular one with 5 monsters.

of interest one of the orc cave levels had 2 completely separate sections that without teleport wouldn't be possible to fully explore.

A crash on changing level to get to deathwatch; - tried a second time and same crash happened. Log below.

[LOG] Resting starts...
[LOG] Rested for 32 turns (stop reason: all resources and life at maximum).
[LOG] #YELLOW_GREEN#There is a down staircase here.#LAST#
table: 0x09145a60 normal
Using cached font /data/font/Salsa-Mono.ttf 14
[USE ITEM] name='K) Destroy' action=destroy talent=nil
[PLAYER] recalcEverything(0)
[PLAYER] recalcEverything: done
[LOG] You have no more Drum (+0).
[LOG] You destroy a Drum (+0).
[USE ITEM] name='K) Destroy' action=destroy talent=nil
[PLAYER] recalcEverything(0)
[PLAYER] recalcEverything: done
[LOG] You have no more Ring of Cold Resistance.
[LOG] You destroy a Ring of Cold Resistance.
Creating level orc-cave 12
[Zone:newLevel] orc-cave beginning level generation, count: 1
Static generator using file /data/maps/zones/deathwatch.lua
[STATIC MAP] size 127 52 rotate: default
Added unique mod.class.NPC/GRISHNAKH_THE_HILL_ORC :: 1
Added unique mod.class.Object/OF_MAEDHROS :: 1
Added unique mod.class.NPC/GOLFIMBUL_THE_HILL_ORC_CHIEF :: 1
Added unique mod.class.Object/CAMMITHRIM :: 1
Added unique mod.class.NPC/LAGDUF_THE_SNAGA :: 1
Added unique mod.class.Object/THALKETTOTH :: 1
[DEBUG] zones/deathwatch
Loading tile terrain/floor.png
Loading tile npc/half_orc.png
Loading tile npc/ogrillon.png
Loading tile npc/grishnakh_the_hill_orc.png
Loading tile object/main_gauche.png
Loading tile npc/golfimbul_the_hill_orc_chief.png
Loading tile object/set_of_leather_gloves.png
Loading tile npc/snaga.png
Loading tile npc/cave_orc.png
Loading tile npc/lagduf_the_snaga.png
Loading tile object/leather_scale_mail.png


ERROR:
Game version: tome2-0.8.3
Addons: gond_book-0.3.0, gervais_tiles-0.5.2, town_neutral-0.3.0

Lua Error: /mod/class/generator/actor/T2LevelFilteredActors.lua:378: attempt to perform arithmetic on local 'max' (a table value)
At [C]:-1 __mul
At /mod/class/generator/actor/T2LevelFilteredActors.lua:378 regenFrom
At /engine/generator/actor/Random.lua:49 generate
At /mod/class/generator/actor/T2LevelFilteredActors.lua:86 generate
At /engine/Zone.lua:1143 newLevel
At /engine/Zone.lua:999 getLevel
At /mod/class/Game.lua:564 changeLevel
At /mod/class/Game.lua:1273
At /engine/KeyBind.lua:243


Edit
went back to town and after recalling to L20 was able to enter Deathwatch, a couple of errors on casting thaumaturgy bolt spells or maybe on uruks firing arrows (I'm wearing a shield of reflection)

error = "Game version: tome2-0.8.3\
Addons: gond_book-0.3.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: /data/damage_types.lua:360: attempt to index local 'x' (a number value)\
stack traceback:\
\9/data/damage_types.lua:360: in function 'projector'\
\9/engine/interface/ActorProject.lua:259: in function 'project'\
\9/mod/class/interface/ActorProject.lua:38: in function 'project'\
\9/mod/project-util.lua:130: in function </mod/project-util.lua:114>\
\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/NPC.lua:614 useTalent\
At /engine/ai//talented.lua:68 runAI\
At /engine/ai//talented.lua:123 doAI\
At /mod/class/NPC.lua:104 act\
At /engine/GameEnergyBased.lua:129 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:746 "
seen = true
reported = false

further edit / error log - quest vs dark elven lord; - ? blindness spell triggering this

error = "Game version: tome2-0.8.3\
Addons: gond_book-0.3.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: /data/damage_types.lua:360: attempt to index local 'x' (a number value)\
stack traceback:\
\9/data/damage_types.lua:360: in function 'projector'\
\9/engine/interface/ActorProject.lua:259: in function 'project'\
\9/mod/class/interface/ActorProject.lua:38: in function 'project'\
\9/mod/project-util.lua:130: in function </mod/project-util.lua:114>\
\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/NPC.lua:614 useTalent\
At /engine/ai//talented.lua:68 runAI\
At /engine/ai//talented.lua:123 doAI\
At /mod/class/NPC.lua:104 act\
At /engine/GameEnergyBased.lua:129 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:746 "
seen = true
reported = false

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

Re: Porting ToME2 to the T4 engine

#677 Post by Zizzo »

Thorondor wrote: Sun Jan 28, 2024 8:01 pm The wierd thing with the summoned elemental vs kobold i mentioned i think linked to the elemental trying to push past some creatures temporarily seems to occupy the same square as the monster.
that meant that it looked like the large kobold was killed but then reappeared.
Hmm, maybe something wrong in the pushing-past code? [sound F/X: source diving] Ooh, Fire elementals have the KILL_BODY flag, so they're supposed to be able to crush weaker creatures; I bet that handling is buggy.
Thorondor wrote: Sun Jan 28, 2024 8:01 pm The princess quest that was unconnected to the map via a path was the circular one with 5 monsters.
[sound F/X: source diving] Alas, that doesn't help as much as I was hoping it would. Fortunately, all the debug logging for level generation is still turned on, but it would mean that when you see a level like this:
Thorondor wrote: Sun Jan 28, 2024 8:01 pm of interest one of the orc cave levels had 2 completely separate sections that without teleport wouldn't be possible to fully explore.
you'd need to zip up the entire log file and attach it to a comment for me to dig through.
Thorondor wrote: Sun Jan 28, 2024 8:01 pm A crash on changing level to get to deathwatch; - tried a second time and same crash happened. Log below.
[…]
Lua Error: /mod/class/generator/actor/T2LevelFilteredActors.lua:378: attempt to perform arithmetic on local 'max' (a table value)
[sound F/X: source diving] …wait, didn't we fix this before? [sound F/X: repo diving] Right, back in 0.7.4. What is it doing this time? I think I can at least patch over that for next release.
Thorondor wrote: Sun Jan 28, 2024 8:01 pm went back to town and after recalling to L20 was able to enter Deathwatch, a couple of errors on casting thaumaturgy bolt spells or maybe on uruks firing arrows (I'm wearing a shield of reflection)

[…]
Lua Error: /engine/interface/ActorTalents.lua:351: /engine/interface/ActorTalents.lua:324: /engine/interface/ActorTalents.lua:190: /data/damage_types.lua:360: attempt to index local 'x' (a number value)\
[sound F/X: source diving][sound F/X: forehead repeatedly striking desk] Fixed for next release. :oops:

And I think I'm going to go with an emergency bugfix release for these:

Release 0.8.4 "Found: One (1) Hobbit"

A few bugfixes for this release:
  • Yet Another Stupid Typo™ in the reflection code. [sound F/X: forehead repeatedly striking desk]
  • I swear, I don't know what Zone:getLevelData() is doing to muck up the level data merges for special levels like Deathwatch. I've added a few more checks in an attempt to catch whatever fever dream it's on this time. :roll:
  • Spectral NPCs are supposed to have fewer hit dice than their regular form, but Spectral Jackals aren't supposed to have 0d4 HP. :? We now constrain certain NPC ego modifications to a minimum of 1.
  • Small bug in generating the 'maze_vault' random vault type.
  • The Mindcraft power Psychic Drain uses the damage dealt to increase the caster's mana. Psi Drain Traps, which use the same damage type under the hood, don't have mana, so we probably shouldn't try to increase it. :oops:
  • Not really sure how to handle the level generation wierdness. I've put in a few more breadcrumbs in the log files to try to help track it down.
Known bugs that are still under investigation include:
  • Ring of Stupidity appearing in store stock.
  • Level generation weirdness.
  • Possible problems with NPC push-past/crush code.
And because that just wasn't enough, I whipped up a couple extra features: :wink:
  • Finally finished implementing the Lost Hobbit quest. We Apologize for the Delay.™ Note that as per the original T2 quest logic, Melinda Proudfoot won't appear in Bree until ten game days have passed.
  • In a tangentially related feature, the T2 port of my Go to Landmark addon gets an upgrade to 1.0.2, as noted below. I couldn't figure for the life of me why the landmark dialog wasn't working — until I realized that I hadn't ported over the keybinding that I added to the main addon. :oops: :wink: Both addons share the same keybinding, so if you've changed it in T4, that change should automatically get picked up in the T2 module.
As I expected, I'm probably going to be spending the next few patch releases fixing all the bugs I inevitably introduced with v0.8's bigger changes. :oops: 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.8.4 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 (new release 1.0.2): 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 or the <Alt-Shift-> keybinding (or whatever you change it to, of course).
  • 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.1): Repurposes David Gervais' TomeTik tiles (reused here pursuant to the Creative Commons CC-BY-3.0 license) for use with our T2 module.
In the meantime, testing and debugging of dungeon towns has been going about as well as you'd expect. :roll: Still taking requests, of course.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply