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
Zizzo
Sher'Tul Godslayer
Posts: 2193
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: Porting ToME2 to the T4 engine

#601 Post by Zizzo »

Thorondor wrote: Thu Jun 16, 2022 9:28 pm ok...had a further look.
New character.
successfully completes the thieves quest and goes up the ladder.
The village doesn't appear, and when I try to cast a spell I get told I cannot see. all that is there is black background but the player stats / experience remain visible.
There's no log file generated at all as not an error.
[sound F/X: testing] …gah! The wilderness zone fiddling I added in 0.6.0 is breaking zone changes in town. Crap crap crap… okay, give me a little time on this.
Thorondor wrote: Thu Jun 16, 2022 9:28 pm Tried something different: didn't do the thieves quest, but instead went to the barrow downs; - went down to level 1, completed princess quest, and recalled successfully. the game was able to save, and then reload from the menu.
Huh. I would have expected that to break too, given the nature of the error. Definitely something I'll need to test before the next release.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: Porting ToME2 to the T4 engine

#602 Post by Zizzo »

And I think I've got that sorted out, so it's time to set a new record for fewest commits between releases: :oops:

Release 0.6.1 "Reality Trouble"

This is an emergency bugfix release, fixing one major show-stopper bug:
  • So, remember that clever hack from the 0.6.0 release that I was so proud of, that would prevent onsters from being populated in a town/wilderness zone too close to where the player enters? Well, it turns out it wasn't as clever as I thought… :oops: See, when you return to a town from a town quest subzone (like, say, the house quest… :oops: ), your entry point into the town is supposed to be the quest entrance you're returning from, and we were computing that on the assumption that the level had already been built — and the whole point of this exercise is that we're doing this before the level is built. :oops: I think I've managed to work around the problem.
  • Dunno if this counts as a bug, but it annoyed me: in T4, the inventory dialog is not closed when you put on or take off equipment. We, for no reason I can recall, were closing said dialog in those cases, and I was used to the T4 behavior enough that it annoyed me, so now it doesn't. We Apologize for the Convenience.™ :wink:
And that massive @#$%-up was of course obscuring all the other bugs I no doubt introduced in the 0.6.0 release, so they'll probably crop up next. :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.6.1 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…).
Did I say I'd be fixing massive bugs for a while? :oops: :wink: Still taking feature requests, though.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: Porting ToME2 to the T4 engine

#603 Post by Thorondor »

Hi
Have been quite busy so sorry for the late update.

That wierd bug where the targetting focuses on a particular square, whilst trying to manathrust a quest target came up again. For the rest of that session the manathrust tried to hit a particular grid reference, no matter how far away I was. Exited to menu, and the following error came up again.

error = "Game version: tome2-0.6.1\
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: /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/project-util.lua:114: in function 'bolt_spell'\
\9/data/talents/spell/mana.lua:70: in function </data/talents/spell/mana.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:753 useTalent\
At /engine/interface/PlayerHotkeys.lua:179 \
At /engine/interface/PlayerHotkeys.lua:162 activateHotkey\
At /mod/class/Game.lua:1474 fct\
At /engine/interface/PlayerHotkeys.lua:326 \
At /engine/KeyBind.lua:231 "
seen = true
reported = false

Other things:
eels etc still in the fountains (though not a bit deal to me

also there's wierdness when moving in wilderness mode back to town screen; - you seem to end up in the centre of the map when coming out of wilderness mode, even if you didn't start there.

Otherwise, it's looking good :)

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

Re: Porting ToME2 to the T4 engine

#604 Post by Zizzo »

We Apologize for the Delay;™ somehow managed to completely miss this comment… :oops:
Thorondor wrote: Sun Sep 18, 2022 8:48 pm That wierd bug where the targetting focuses on a particular square, whilst trying to manathrust a quest target came up again. For the rest of that session the manathrust tried to hit a particular grid reference, no matter how far away I was. Exited to menu, and the following error came up again.

error = "Game version: tome2-0.6.1\
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: /engine/interface/ActorTalents.lua:158: attempt to index upvalue 'force_target' (a nil value)\
Dammit. I think I'm going to have to do some serious meatball surgery to track that one down. Give me a little time on that.
Thorondor wrote: Sun Sep 18, 2022 8:48 pm Other things:
eels etc still in the fountains (though not a bit deal to me
[sound F/X: source diving] Oh. Got sloppy in handling drinking/filling potions from fountains. I'll have that fixed for the next release.
Thorondor wrote: Sun Sep 18, 2022 8:48 pm also there's wierdness when moving in wilderness mode back to town screen; - you seem to end up in the centre of the map when coming out of wilderness mode, even if you didn't start there.
[sound F/X: testing] Gah! I keep tripping over that wilderness-buffer-zone thing. That'll be fixed for next release.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: Porting ToME2 to the T4 engine

#605 Post by Zizzo »

While I'm still trying to figure out that weird :getTarget() leakage, I can at least push out the bugfixes I've got so far. My Christmas present to the forum: 🎅 :wink:

Release 0.6.2 "You Shall Not Pass"

This is mostly a bugfix release:
  • Fun fact: Fountains define a special block_move() method that handles the drink/fill-bottles dialog prompt. For everyone but the player, this method returned false, so any creature could enter the grid, and thus the level generator was allowed to spawn any type of NPC on the grid — including creatures with the AQUATIC flag like eels, which shouldn't be spawned there. :oops: Now we fall through to the regular block_move() method for grids, which should fix the problem.
  • That wilderness buffer zone hack from 0.6.0 just keeps coming back to bite me in the proverbial… :oops: See, when you move around in the worldmap, the game computes where your re-entry location should be when you drop back down to town/wilderness level based on how you've moved — or if you haven't moved, it remembers your town/wilderness location from just before you shifted up to the worldmap and returns you there. Once you've dropped out of the worldmap, of course, we don't need that information before, so we discard it — except our buffer-zone hackery led to us discarding that information prematurely. :oops: Should be fixed.
Some bugs, of course, we're still investigating:
  • Mysterious leakage in the Actor:getTarget() method, screwing up targeting.
  • 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 that still happening? My tests aren't reproducing it.)
And, of course, all the bugs that haven't been found yet… :oops: Here, as always, is a good place to report them.

Also a small sort-of feature, while I'm here:
  • So I finally got a bug up my proverbial to convert my infamously over-engineered T2 automatizer rules file to the new regime (I kept thinking, "why isn't the automatizer kicking in? Oh, right, I don't have any rules."). Clearly no one but me is using my custom automatizer rules language, because the parser was kind of broken… :oops: Anyway, I bashed that into shape and added a couple new features to simplify the conversion; here's the result, for everyone's edification. Never did get around to posting that automatizer documentation I promised (te4.org's blog setup kept choking on it as spam); I'll try to have something written up by the time I post this.
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.6.2 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…).
Did I say I'd be fixing massive bugs for a while? :oops: :wink: Still taking feature requests, though.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply