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)
1
17%
Hey, why haven't you implemented my favorite skill/talent/spell/ability yet? (specify below)
2
33%
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)
2
33%
Hey, that's a bug! Go fix that bug! (specify below)
1
17%
Hey, you didn't list what I want to see! (specify below)
0
No votes
 
Total votes: 6

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

Re: Porting ToME2 to the T4 engine

#571 Post by Thorondor »

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.

Zizzo
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

#572 Post by Zizzo »

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.
[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.
"Blessed are the yeeks, for they shall inherit Arda..."

GokuderaElPsyCongro
Yeek
Posts: 11
Joined: Sat Feb 12, 2022 7:15 am

Re: Porting ToME2 to the T4 engine

#573 Post by GokuderaElPsyCongro »

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

Zizzo
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

#574 Post by Zizzo »

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'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. :wink:
GokuderaElPsyCongro wrote: Sat Feb 12, 2022 1:42 pm I'm looking forward to play your seemingly amazing port Zizzo though :) But not sure if you have plans to port THeme too
I haven't played that particular mod myself, but from what I know of it, I imagine that would be quite the undertaking… :shock: That sort of thing would, if I've done this right, be implementable as a T2 module addon. Also bear in mind that I"m working from v2.3.9, and there may be some differences from 2.4.0; if you think they're improvements, let me know and I can try to port them.

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.™
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 tests aren't reproducing it.)
And a loosely related feature:
  • As you probably don't recall, :wink: 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… :twisted: )
I'm reasonably confident that my map.templites() won't leave stray temporarily-lit flags stuck on grids that are no longer in range of a temporary light source. Reasonably. :oops: :wink: Watch for that, and let me know if I missed something there. And of course, the usual array of as yet undetected bugs will no doubt continue to crop up; as always, here is a good place to report those.

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. :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.
With no other outstanding feature requests, I'm kind of idly fiddling with summoning at the moment. We'll see how big a project that turns into. :shock: :wink: If there's some other unimplemented feature you particularly miss, don't hesitate to ask for it.
"Blessed are the yeeks, for they shall inherit Arda..."

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#575 Post by Jaylow7 »

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

Zizzo
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

#576 Post by Zizzo »

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.
Awesome! The more playtesters, the better.
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).
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… :wink: )

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. :shock: Bard spells and instruments appear to be mostly implemented.
Jaylow7 wrote: Sat Mar 19, 2022 12:54 pm 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.
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.
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.
The main quest line should be fully implemented; I don't think it's been tested, though. :oops:
Jaylow7 wrote: Sat Mar 19, 2022 12:54 pm
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?)
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.
*whew* :wink: It'll be good to have a current T2 player who can attest to how the game actually behaves.
"Blessed are the yeeks, for they shall inherit Arda..."

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#577 Post by Jaylow7 »

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?

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#578 Post by Jaylow7 »

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.

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#579 Post by Jaylow7 »

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.

Zizzo
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

#580 Post by Zizzo »

Jaylow7 wrote: Mon Mar 21, 2022 10:13 pm Another thing: The character mentioned above DID actually have her first relic quest, but the temple didn't generate.
That sounds like a bug I just discovered recently, which (knock on wood…) should be fixed in the next release.
Jaylow7 wrote: Mon Mar 21, 2022 10:13 pm 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.
[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. :oops: :oops: )
  • 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. :oops:
  • 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. :roll: 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. :roll: 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.™ :oops:
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 tests aren't reproducing it.)
And a few features:
  • 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 :wink: ). 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.
I'm kind of worried about both of those new features; they're involved enough that I expect I've introduced some bugs in them. On top of the usual array of as yet undetected bugs, of course. :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.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. :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.
With no other outstanding feature requests, I'm kind of idly fiddling with summoning at the moment. We'll see how big a project that turns into. :shock: :wink: If there's some other unimplemented feature you particularly miss, don't hesitate to ask for it.
"Blessed are the yeeks, for they shall inherit Arda..."

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#581 Post by Jaylow7 »

So in the interest of testing the new stuff, I started up a LostSoul character, and ran into this error:

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 "
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:

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

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#582 Post by Jaylow7 »

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 

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#583 Post by Jaylow7 »

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.

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

Zizzo
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

#584 Post by Zizzo »

Urk… I really should have know better than to rush this out. We Apologize for the Errors.™ :oops:
Jaylow7 wrote: Wed Mar 23, 2022 6:40 am So in the interest of testing the new stuff, I started up a LostSoul character, and ran into this error:
[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.
Jaylow7 wrote: Wed Mar 23, 2022 6:40 am 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:
[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.
Jaylow7 wrote: Wed Mar 23, 2022 8:46 am 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
[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.
Jaylow7 wrote: Wed Mar 23, 2022 8:04 pm 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.
[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. :oops: 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:
  • 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..."

Jaylow7
Wayist
Posts: 16
Joined: Wed Aug 12, 2015 2:48 pm

Re: Porting ToME2 to the T4 engine

#585 Post by Jaylow7 »

Zizzo wrote: Thu Mar 24, 2022 12:07 am
Jaylow7 wrote: Wed Mar 23, 2022 8:04 pm 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.
[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. :oops: Should be fixed, but unfortunately, this probably means that your second relic quest never managed to successfully compute its world map location.
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.

Post Reply