Porting ToME2 to the T4 engine
Moderator: Moderator
Re: Porting ToME2 to the T4 engine
Thanks; - think there's a bug in the blind check for casting spells. On thieves quest wielding a torch in a non-magically lit area (such as corridors) is deemed as being blind for the purposes of casting spells. going back to a pre-lit, or globe of light-lit area means you can cast spells.
-
- Sher'Tul Godslayer
- Posts: 2512
- Joined: Thu Jan 23, 2003 8:13 pm
- Location: A shallow water area south of Bree
- Contact:
Re: Porting ToME2 to the T4 engine
[sound F/X: source diving] Hmm, temporary lighting like torches apparently isn't applied to the map's lites() grid, as I thought it was. I'll have to do a bit of digging and see how that's handled.Thorondor wrote: ↑Sat Jan 15, 2022 11:25 pm Thanks; - think there's a bug in the blind check for casting spells. On thieves quest wielding a torch in a non-magically lit area (such as corridors) is deemed as being blind for the purposes of casting spells. going back to a pre-lit, or globe of light-lit area means you can cast spells.
"Blessed are the yeeks, for they shall inherit Arda..."
-
- Yeek
- Posts: 11
- Joined: Sat Feb 12, 2022 7:15 am
Re: Porting ToME2 to the T4 engine
Does anyone know how I could compile latest Tome 2.4.0 so that I could finally discover this seemingly legendary roguelike?
(https://github.com/tome2/tome2)
After spending three hours trying to install Boost, cmake, visual studio, to only be slapped with missing gtk2, X11 and ncurses dependencies, I feel really tired...
If anyone could upload its compiled latest (from March 2021), that'll be even better! Still don't know why for the love of god, they don't provide the compiled binary in releases...
I'm looking forward to play your seemingly amazing port Zizzo though
But not sure if you have plans to port THeme too
Edit: managed to build it in a Ubuntu VM, I'm finally good!!!
(https://github.com/tome2/tome2)
After spending three hours trying to install Boost, cmake, visual studio, to only be slapped with missing gtk2, X11 and ncurses dependencies, I feel really tired...

If anyone could upload its compiled latest (from March 2021), that'll be even better! Still don't know why for the love of god, they don't provide the compiled binary in releases...
I'm looking forward to play your seemingly amazing port Zizzo though

Edit: managed to build it in a Ubuntu VM, I'm finally good!!!
-
- Sher'Tul Godslayer
- Posts: 2512
- Joined: Thu Jan 23, 2003 8:13 pm
- Location: A shallow water area south of Bree
- Contact:
Re: Porting ToME2 to the T4 engine
I'd direct you to our ToME 2.x.x forums, where you'd likely get more useful information, but I see you already found it.GokuderaElPsyCongro wrote: ↑Sat Feb 12, 2022 1:42 pm Does anyone know how I could compile latest Tome 2.4.0 so that I could finally discover this seemingly legendary roguelike?
(https://github.com/tome2/tome2)

I haven't played that particular mod myself, but from what I know of it, I imagine that would be quite the undertaking…GokuderaElPsyCongro wrote: ↑Sat Feb 12, 2022 1:42 pm I'm looking forward to play your seemingly amazing port Zizzo thoughBut not sure if you have plans to port THeme too

In the meantime; We Apologize for the Delay;™ one thing led to another, as it often does:
Release 0.5.6 "I Saw the Light and the Light Won"
A handful of bugfixes in this release:
- So AFAICT the engine uses the map's seens() array to track grids illuminated by temporary light like torches or lanterns. Unfortunately, that doesn't help us, because the map handling always sets the player's grid as seen if the player is not blind, and also sets grids with things like detected traps and ESP-sensed monsters as seen. For our purposes, then, we add a new templites() array to track temporarily lit areas. As a first pass, we compute this in Player:playerFOV(), which means the temp-lite grid flags will be cleared while the player is blinded; I think we can get away with that for now, since we only care about the flag when the player can see.
- Tangentially related: while investigating the above, I noticed I was handling the NPC Aggravate Monsters talent slightly wrong; it was supposed to affect all NPCs in line of sight of the caster, but it was actually only affecting NPCs on grids the player could see. We Apologize for the Error.™


- 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 tests aren't reproducing it.)
- As you probably don't recall,
Vampire players in T2 have an innate radius-1 "dark light", since their innate vulnerability to light prevents them from using the more powerful light sources. Since that tangentially touches on our temporary-light handling above, we add support for it, which in turn spurred me to implement most (maybe all?) of the Vampire subrace's other resists and stat modifiers that we weren't picking up before because they were implemented as corruptions internally. We even implement the Vampirism subrace power (which we rename to Vampiric Feeding to avoid confusion with the Necromancy power of the same name), which Vampires can use to feed. We don't yet support damage to the player from walking around in daylight, because we don't yet implement the day/night cycle, but we do support damage per turn from wielding an artifact light source (except for the Phial of Undeath, although you probably shouldn't be wielding that anyway…
)


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


"Blessed are the yeeks, for they shall inherit Arda..."
Re: Porting ToME2 to the T4 engine
My there's been a lot of progress made on this since I was last here. Was pulled away due to a serious car accident in early 2017 and shortly thereafter the death of my one computer that was new enough to run te4. Looking forward to playing around with everything that's been added over the past 5 years.
My major suggestions for things to be working on currently (in no particular order):
1) Any classes that aren't currently implemented. You mention in the release notes that you're poking at getting summoning working. I'd also personally like to see the loremaster subclasses, particularly possessor and monk (not sure if you've implemented bare-handed fighting yet since normally that skill is only available to the loremaster classes outside of FF quests and I haven't seen it pop up in the list of FF skill choices yet).
2) I recognize that it's going to be a major undertaking, but there's probably many of us that would like the LostSoul stuff to get added.
3) Putting this here since I can't tell by going over release notes if it's actually implemented yet: The actual Mount Doom dungeon/level and associated quest to find and destroy the Ring, and by extension ability to actually find/fight Morgoth and attain Winner status.
My major suggestions for things to be working on currently (in no particular order):
1) Any classes that aren't currently implemented. You mention in the release notes that you're poking at getting summoning working. I'd also personally like to see the loremaster subclasses, particularly possessor and monk (not sure if you've implemented bare-handed fighting yet since normally that skill is only available to the loremaster classes outside of FF quests and I haven't seen it pop up in the list of FF skill choices yet).
2) I recognize that it's going to be a major undertaking, but there's probably many of us that would like the LostSoul stuff to get added.
3) Putting this here since I can't tell by going over release notes if it's actually implemented yet: The actual Mount Doom dungeon/level and associated quest to find and destroy the Ring, and by extension ability to actually find/fight Morgoth and attain Winner status.
That is indeed vanilla ToME 2 behavior, just yesterday I had multiple instances where my Noxious Cloud spells were affecting enemies on the other side of otherwise impassable walls in a Melkor temple. Also had them affect the hapless Princess way too many times through her glass wall prison.Some source diving reveals that ball spells in T2 only affect grids in line of sight of the center, and thus should be blocked by, for instance, small trees. As a first pass, we'll attempt to imitate that by keying off the 'block_sight' grid flag; if this results in any odd behavior, let me know and I'll try something more elaborate. (Ironically, this suggests that ball spells should work through glass walls and other things that block movement but not sight. That actually sounds vaguely familiar, from my experience in Melkor relic quests; does anyone else recall T2 working that way?)
-
- Sher'Tul Godslayer
- Posts: 2512
- Joined: Thu Jan 23, 2003 8:13 pm
- Location: A shallow water area south of Bree
- Contact:
Re: Porting ToME2 to the T4 engine
Awesome! The more playtesters, the better.Jaylow7 wrote: ↑Sat Mar 19, 2022 12:54 pm My there's been a lot of progress made on this since I was last here. Was pulled away due to a serious car accident in early 2017 and shortly thereafter the death of my one computer that was new enough to run te4. Looking forward to playing around with everything that's been added over the past 5 years.
Yes, Barehanded combat is implemented. It uses the same internal infrastructure as Bearform combat, so that came along basically for free when I implemented the Beorning stuff. (Just don't forget to switch your melee style…Jaylow7 wrote: ↑Sat Mar 19, 2022 12:54 pm My major suggestions for things to be working on currently (in no particular order):
1) Any classes that aren't currently implemented. You mention in the release notes that you're poking at getting summoning working. I'd also personally like to see the loremaster subclasses, particularly possessor and monk (not sure if you've implemented bare-handed fighting yet since normally that skill is only available to the loremaster classes outside of FF quests and I haven't seen it pop up in the list of FF skill choices yet).

As for other Loremaster subclasses… [sound F/X: source diving] Symbiosis is working, I think, and Mimicry cloaks are implemented, but not the other Mimicry powers; some of those would involve fiddling the player's inventory slots on the fly, after all, and I don't know yet how doable that will be. Possessors will have that problem too, especially considering the inevitable two-hander/shield juggling with a six-armed body.

Hmm, I don't think that would be too hard, actually. The zone data for Mandos is already generated; the trickiest part, I think, would be figuring out how to make the player start there. Give me a little time on that.
The main quest line should be fully implemented; I don't think it's been tested, though.Jaylow7 wrote: ↑Sat Mar 19, 2022 12:54 pm 3) Putting this here since I can't tell by going over release notes if it's actually implemented yet: The actual Mount Doom dungeon/level and associated quest to find and destroy the Ring, and by extension ability to actually find/fight Morgoth and attain Winner status.

*whew*Jaylow7 wrote: ↑Sat Mar 19, 2022 12:54 pmThat is indeed vanilla ToME 2 behavior, just yesterday I had multiple instances where my Noxious Cloud spells were affecting enemies on the other side of otherwise impassable walls in a Melkor temple. Also had them affect the hapless Princess way too many times through her glass wall prison.Some source diving reveals that ball spells in T2 only affect grids in line of sight of the center, and thus should be blocked by, for instance, small trees. As a first pass, we'll attempt to imitate that by keying off the 'block_sight' grid flag; if this results in any odd behavior, let me know and I'll try something more elaborate. (Ironically, this suggests that ball spells should work through glass walls and other things that block movement but not sight. That actually sounds vaguely familiar, from my experience in Melkor relic quests; does anyone else recall T2 working that way?)

"Blessed are the yeeks, for they shall inherit Arda..."
Re: Porting ToME2 to the T4 engine
So a few things from a new game I started up:
1) I remember there being discussion about making some items guaranteed to show up in the stores. Was this ever implemented? If it is, I submit that Scrolls of Identify should be on that list.
This idea came up because in my current game there are 0 scrolls of ID available in the Alchemy shops in both Bree and Gondolin, I can't ID my dagger from the thieves quest and thus have no money to buy essentials before starting to dive the Barrow-Downs. Staffs of ID are available but outside my price range.
This character is a Mage class but the skill plan is to get Divination through Prayer skill (Eru), which I currently have only level 2 in so I can't cast ID yet. And the money situation means I couldn't afford a spellbook of ID atm anyway
2) The magic shop in Bree is stocking Potions of Charisma, which should not happen. In normal T2 only the black market is supposed to be able to have stat potions in surface towns. And on the subject of towns.. are dungeon towns implemented yet?
1) I remember there being discussion about making some items guaranteed to show up in the stores. Was this ever implemented? If it is, I submit that Scrolls of Identify should be on that list.
This idea came up because in my current game there are 0 scrolls of ID available in the Alchemy shops in both Bree and Gondolin, I can't ID my dagger from the thieves quest and thus have no money to buy essentials before starting to dive the Barrow-Downs. Staffs of ID are available but outside my price range.
This character is a Mage class but the skill plan is to get Divination through Prayer skill (Eru), which I currently have only level 2 in so I can't cast ID yet. And the money situation means I couldn't afford a spellbook of ID atm anyway
2) The magic shop in Bree is stocking Potions of Charisma, which should not happen. In normal T2 only the black market is supposed to be able to have stat potions in surface towns. And on the subject of towns.. are dungeon towns implemented yet?
Re: Porting ToME2 to the T4 engine
Another thing: The character mentioned above DID actually have her first relic quest, but the temple didn't generate.
The directions say: "quite some way to the South of Bree and a long way to the northwest of Minas Anor" which in t2 describes a small 4 square wide patch of land west of Moria stretching from just south of the Maze to the Paths of the Dead entrance. I have explored the entire western section of the map (all I safely can anyway, not stepping on deep water squares at character level 9..), there is no temple entrance anywhere in this section of the map.
Also to touch on something I discussed in the previous post: This character STILL has not found a shop selling ID scrolls, despite having visited all 4 towns multiple times while trying to track down the temple.
The directions say: "quite some way to the South of Bree and a long way to the northwest of Minas Anor" which in t2 describes a small 4 square wide patch of land west of Moria stretching from just south of the Maze to the Paths of the Dead entrance. I have explored the entire western section of the map (all I safely can anyway, not stepping on deep water squares at character level 9..), there is no temple entrance anywhere in this section of the map.
Also to touch on something I discussed in the previous post: This character STILL has not found a shop selling ID scrolls, despite having visited all 4 towns multiple times while trying to track down the temple.
Re: Porting ToME2 to the T4 engine
So yeah.. I'm beginning to wonder if something is broken with lost temple quests.
Started a new character after the one mentioned above met an untimely end to an ambush on a shallow water tile.
This one got his first relic quest during the Thieves quest, upon hitting level 2. When I went looking for it there was no temple entrance anywhere on the world map, despite again checking everywhere it was safe to do so (avoiding stepping on deep water tiles and did not touch the ice area north of angband). He is sadly also now deceased. And had the same issue of never finding scrolls of ID for sale despite visiting all 4 towns multiple times while exploring.
I am of course assuming that they work like in T2, where the quest temple is entered via a new entrance placed on the overworld map.
Started a new character after the one mentioned above met an untimely end to an ambush on a shallow water tile.
This one got his first relic quest during the Thieves quest, upon hitting level 2. When I went looking for it there was no temple entrance anywhere on the world map, despite again checking everywhere it was safe to do so (avoiding stepping on deep water tiles and did not touch the ice area north of angband). He is sadly also now deceased. And had the same issue of never finding scrolls of ID for sale despite visiting all 4 towns multiple times while exploring.
I am of course assuming that they work like in T2, where the quest temple is entered via a new entrance placed on the overworld map.
-
- Sher'Tul Godslayer
- Posts: 2512
- Joined: Thu Jan 23, 2003 8:13 pm
- Location: A shallow water area south of Bree
- Contact:
Re: Porting ToME2 to the T4 engine
That sounds like a bug I just discovered recently, which (knock on wood…) should be fixed in the next release.
[sound F/X: source diving] … *blink* … [sound F/X: forehad repeatedly striking desk] Store bug. Fixed in next release.
And those bugs are probably enough of a show-stopper to justify going ahead and pushing out an emergency bugfix release:
Release 0.5.7 "Found: One (1) Soul"
Assorted bugfixes in this release:
- Yet Another Stupid Typo™ that was preventing wilderness quests from placing their zone entrances on the world map. (In fact, now that I examine it more closely, this is probably the source of the god quest bug Thorondor reported a while back, and I fixed it wrong.
)
- The Spread Blows ability wasn't being applied, as I was managing to screw up detecting that the player is using weapon combat melee style.
- Using the Change Melee Style talent takes a turn, but switching melee styles from the <ESC> menu doesn't. That seems inconsistent, so I made them both instant. Also improved the talent description slightly.
- So, y'know how you can learn that a creature can, for instance, pick up objects if it picks something up off the floor while the player can see it? Well, it turns out that can be triggered in the middle of generating a level. Before the player is even on the map.
So we catch that corner case now.
- A couple artifacts that were supposed to confer wraith form and allow passing through walls weren't.
- Nasty bug involving stores. See, the T2 store definitions file includes lines like "I;100:Identify" specifying what objects should be stocked in the stores. That "Identify" bit is intended to refer to the first thing in the object definitions list matching that name, namely Scrolls of Identify. Unfortunately, my Perl parsing script was matching it with the last matching thing in the list, namely Staffs of Identify.
That was messing up some crucial stock in some stores, notably Scrolls/Staffs of Identify and Amulets/Potions of Charisma. We Apologize for the Inconvenience.™


- 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 tests aren't reproducing it.)
- LostSouls! Now, it's been a while since I played a LostSoul character, but I think I've covered the relevant bits: the player starts on level 98 of Mandos with a lot of Identify and Satisfy Hunger scrolls, can pass through (non-permanent) walls, and can't use recall magic. We even include a quest and an achievement for getting out of Mandos alive (pun intended
). Let me know if I've missed anything.
- Floor inscriptions! On a lark, I checked the T2 code and found that it isn't a free-form ability to write stuff on the floor, just to place particular inscriptions; so I went ahead and had the corresponding language parchments confer talents for their inscription. Note that we don't yet implement the "dunna hrassa" chasm inscription, and the "pedo mellon a mino" 'protection' inscription doesn't appear to do anything anyway, so we omit it. And floor mana is about as difficult to determine as it is in T2. And remember, floor inscriptions take several turns to engrave, and can't be interrupted once you start.

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


"Blessed are the yeeks, for they shall inherit Arda..."
Re: Porting ToME2 to the T4 engine
So in the interest of testing the new stuff, I started up a LostSoul character, and ran into this error:
Continuing on (I was heading back to the stairs after grabbing an item out of a nearby room, and should note I continued to get spammed with repeated instances of the above lua error at every step) I also got this error:
I was inside the corridor wall while these happened, and no monsters were in line of sight. The character worships Eru, so good-aligned monsters are friendly, it looks like a Cherub picked a fight with some hostile monsters, including the horned reaper that caused the second error.
The full error logs if you want them can be found at this dropbox link
Code: Select all
[dumb_talented AI] chooses for 17427 Cherub T_NPC_S_MONSTERS
Loading tile npc/werewolf.png
Loading tile npc/novice_paladin_grp.png
Loading tile npc/paladin.png
##Use Talent Lua Error## T_NPC_S_MONSTERS Actor: 17427 Cherub
error = "Game version: tome2-0.5.7\
Addons: \
\
Lua Error: /engine/interface/ActorTalents.lua:351: /engine/interface/ActorTalents.lua:324: /engine/interface/ActorTalents.lua:190: /mod/util.lua:339: attempt to index a nil value\
stack traceback:\
\9/mod/util.lua:339: in function 'find_free_grid'\
\9/mod/spell-util.lua:805: in function 'summon'\
\9/mod/spell-util.lua:3040: in function </mod/spell-util.lua:3034>\
\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:534 useTalent\
At /engine/ai//talented.lua:68 runAI\
At /engine/ai//talented.lua:123 doAI\
At /mod/class/NPC.lua:89 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:700 "
Code: Select all
[dumb_talented AI] chooses for 18512 Horned Reaper T_NPC_S_HI_DEMON
##Use Talent Lua Error## T_NPC_S_HI_DEMON Actor: 18512 Horned Reaper
error = "Game version: tome2-0.5.7\
Addons: \
\
Lua Error: /engine/interface/ActorTalents.lua:351: /engine/interface/ActorTalents.lua:324: /engine/interface/ActorTalents.lua:190: /data/talents/npc/summons.lua:137: attempt to perform arithmetic on field 'level' (a table value)\
stack traceback:\
\9/data/talents/npc/summons.lua:137: in function 'getval'\
\9/mod/spell-util.lua:787: in function 'summon'\
\9/mod/spell-util.lua:3040: in function </mod/spell-util.lua:3034>\
\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:534 useTalent\
At /engine/ai//talented.lua:68 runAI\
At /engine/ai//talented.lua:123 doAI\
At /mod/class/NPC.lua:89 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:700 "
The full error logs if you want them can be found at this dropbox link
Re: Porting ToME2 to the T4 engine
Another error, this one when a baby gold dragon (princess quest monster on barrow-downs 2) breathed sound at me, shattering one of my potions of CCW
Code: Select all
[LOG] One of your Potions of Cure Critical Wounds wasdestroyed!
##Use Talent Lua Error## T_NPC_BR_SOUN Actor: 15279 Baby gold dragon
fail energy
fail energy
fail energy
fail energy
fail energy
fail energy
fail energy
ERROR:
Game version: tome2-0.5.7
Addons:
Lua Error: /engine/interface/ActorTalents.lua:351: /engine/interface/ActorTalents.lua:324: /engine/interface/ActorTalents.lua:190: /data/general/objects/bases.lua:1251: attempt to index global 'se' (a nil value)
stack traceback:
/data/general/objects/bases.lua:1251: in function 'on_destroy'
/data/damage_types.lua:505: in function 'try_damage_player_inven'
/data/damage_types.lua:1348: in function 'side_effects_pre'
/data/damage_types.lua:364: in function 'projector'
/engine/interface/ActorProject.lua:259: in function 'project'
/mod/class/interface/ActorProject.lua:34: in function 'project'
/mod/spell-util.lua:2212: in function </mod/spell-util.lua:2182>
[C]: in function 'xpcall'
/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:534 useTalent
At /engine/ai//talented.lua:68 runAI
At /engine/ai//talented.lua:123 doAI
At /mod/class/NPC.lua:89 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:700
Re: Porting ToME2 to the T4 engine
Another error while trying to switch to the worldmap to go find the temple for my 2nd relic quest. This one caused the game to hang on "Generating Level" and I was forced to kill the game via task manager, losing about an hour of progress.
And a related error I found in my logs folder that happened when it generated that quest, and might be the root cause of the above error:
Code: Select all
ERROR:
Game version: tome2-0.5.7
Addons:
Lua Error: /mod/class/GameState.lua:256: bad argument #1 to 'pairs' (table expected, got number)
At [C]:-1
At [C]:-1 pairs
At /mod/class/GameState.lua:256 getWildernessQuests
At /data/zones/worldmap/zone.lua:83 post_process_map
At /engine/Zone.lua:1103 newLevel
At /engine/Zone.lua:991 getLevel
At /mod/class/Game.lua:535 changeLevel
At /mod/class/Game.lua:1192
At /engine/KeyBind.lua:243
Code: Select all
ERROR:
Game version: tome2-0.5.7
Addons:
Lua Error: /mod/class/GameState.lua:275: bad argument #1 to 'next' (table expected, got number)
At [C]:-1
At [C]:-1 next
At /mod/class/GameState.lua:275 setWildernessQuest
At /data/quests/relic.lua:134 place_zone
At /data/quests/relic.lua:184 check
At /engine/Quest.lua:106 setStatus
At /engine/interface/ActorQuest.lua:73 setQuestStatus
At /data/chats/quest-relic.lua:67 action
At /engine/dialogs/Chat.lua:104 use
At /engine/dialogs/Chat.lua:49 on_input
At /engine/KeyCommand.lua:72 receiveKey
At /engine/ui/Dialog.lua:826 keyEvent
At /engine/ui/Dialog.lua:512
-
- Sher'Tul Godslayer
- Posts: 2512
- Joined: Thu Jan 23, 2003 8:13 pm
- Location: A shallow water area south of Bree
- Contact:
Re: Porting ToME2 to the T4 engine
Urk… I really should have know better than to rush this out. We Apologize for the Errors.™ 
Should be fixed, but unfortunately, this probably means that your second relic quest never managed to successfully compute its world map location.
Okay, since it's been less that 24 hours, I'm going to go ahead and replace the existing .team file without bumping the version number. And I shudder to imagine what other bugs I've almost certainly missed…
Here are quick release notes for the patch:

[sound F/X: source diving] Summoning NPC couldn't find anywhere to summon whatever it was summoning, and my code didn't handle it well. Should be fixed.
[sound F/X: source diving] Ouch, yes, the NPC talent code is really old, written back before I really understood how zones and level depths actually worked. Should be fixed.
[sound F/X: source diving] *sigh* Have I mentioned recently how much I wish Lua had a syntax checker to catch misspelled variable names like this? Fixed for new potions, but since the relevant method lives on the object itself, any of your existing potions could still trigger the bug.
[sound F/X: source diving] … *blink* … [sound F/X: forehead repeatedly striking desk] Pro tip for module/addon developers: table.set(your_table, x, y, nil) does not do what it looks like it ought to do.

Okay, since it's been less that 24 hours, I'm going to go ahead and replace the existing .team file without bumping the version number. And I shudder to imagine what other bugs I've almost certainly missed…

- Sloppy handling in my find-free-grids utility method that didn't respond well to not finding any suitable grids.
- Fix some ancient NPC summoning code to properly compute the current dungeon level.
- Yet Another Stupid Typo™ in the potion shatter code.
- Spectacularly stupid error in clearing the previous relic quest from the map before placing a new one.
"Blessed are the yeeks, for they shall inherit Arda..."
Re: Porting ToME2 to the T4 engine
Can confirm this is now working as intended - I loaded that character back up since the save was from before I'd gotten the quest, and on the first levelup it gave me the second relic quest without any errors. The world map entrance exists, and I am currently exploring the first level.Zizzo wrote: ↑Thu Mar 24, 2022 12:07 am[sound F/X: source diving] … *blink* … [sound F/X: forehead repeatedly striking desk] Pro tip for module/addon developers: table.set(your_table, x, y, nil) does not do what it looks like it ought to do.Should be fixed, but unfortunately, this probably means that your second relic quest never managed to successfully compute its world map location.