Page 34 of 46

Re: Porting ToME2 to the T4 engine

Posted: Tue Aug 20, 2019 9:31 pm
by Thorondor
Hi Zizzo
After a very long break (apologies) -have resumed some degree of testing, all going fine until Boldor which resulted in a string of errors that crashed the game.

error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /mod/class/Map.lua:387: attempt to call method 'getMapObjects' (a nil value)\
stack traceback:\
\9/mod/class/Map.lua:387: in function 'updateMap'\
\9/engine/Map.lua:566: in function 'map'\
\9/mod/spell-util.lua:743: in function 'f'\
\9/mod/util.lua:67: in function 'greplist'\
\9/mod/util.lua:300: in function 'find_free_grid'\
\9/mod/spell-util.lua:747: in function 'summon'\
\9/mod/spell-util.lua:2806: in function </mod/spell-util.lua:2800>\
\9[C]: in function 'xpcall'\
\9/engine/interface/ActorTalents.lua:160: in function </engine/interface/ActorTalents.lua:149>\
At [C]:-1 \
At [C]:-1 error\
At /engine/interface/ActorTalents.lua:322 useTalent\
At /mod/class/NPC.lua:527 useTalent\
At /engine/ai//talented.lua:53 runAI\
At /engine/ai//talented.lua:63 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:616 "
seen = true
reported = false


error = "Lua Error: [string \"return function(self, x, y, what, ...) local ...\"]:1: attempt to call method 'check' (a nil value)\
At [C]:-1 check\
At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
At /engine/interface/ActorFOV.lua:102 \
At [C]:-1 calc_circle\
At /engine/interface/ActorFOV.lua:101 computeFOV\
At /mod/class/NPC.lua:84 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:616 "
seen = true
reported = false

error = "Lua Error: /engine/Map.lua:636: attempt to call method 'check' (a nil value)\
At [C]:-1 check\
At /engine/Map.lua:636 \
At [C]:-1 calc_circle\
At /mod/class/Game.lua:899 tweakVisuals\
At /mod/class/Player.lua:505 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:616 "
seen = true
reported = false

Re: Porting ToME2 to the T4 engine

Posted: Sat Sep 14, 2019 8:48 pm
by Thorondor
Couple of other things:

Have noticed that the Maze dungeon won't load

Are child spirits active yet - you can't move into their space until see invisible is activated.

Total crash when in the Orc Caves; - saw some Crypt creeps - I presume it was a spell or something but the game hung. Unfortunately no error message generated.

Re: Porting ToME2 to the T4 engine

Posted: Sat Sep 14, 2019 11:25 pm
by Zizzo
Thorondor wrote:Couple of other things:

Have noticed that the Maze dungeon won't load
Yeah, the Maze uses a special map generator that I haven't implemented yet. On a related note, I don't recommend visiting Heart of the Earth any time soon… :oops: :wink:
Thorondor wrote:Are child spirits active yet - you can't move into their space until see invisible is activated.
Hmm, maybe an issue with deciding when the player can push past friendlies? I'll investigate.
Thorondor wrote:Total crash when in the Orc Caves; - saw some Crypt creeps - I presume it was a spell or something but the game hung. Unfortunately no error message generated.
Urk, could be anything, then… I'll poke around and see if I see anything obvious.

Re: Porting ToME2 to the T4 engine

Posted: Tue Sep 17, 2019 9:28 pm
by Thorondor
This might have been an off-screen master yeek - a fairly significant cycle of errors but the game didn't completely hang.

error = "Lua Error: /engine/Map.lua:801: attempt to call method 'check' (a nil value)\
At [C]:-1 check\
At /engine/Map.lua:801 checkEntity\
At /engine/utils.lua:2247 findFreeGrid\
At /engine/interface/ActorAI.lua:194 aiSeeTargetPos\
At /engine/ai//talented.lua:27 runAI\
At /engine/ai//talented.lua:63 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:616 "
seen = true
reported = false

EDIT - am sure this is the master yeek. Game-ending crash when the yeek was in sight.

Re: Porting ToME2 to the T4 engine

Posted: Tue Sep 17, 2019 11:13 pm
by Zizzo
Thorondor wrote:[…] all going fine until Boldor which resulted in a string of errors that crashed the game.

error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /mod/class/Map.lua:387: attempt to call method 'getMapObjects' (a nil value)\
[sound F/X: source diving]*blink* …okay, that was just amazingly dumb, even for me. :oops: :oops: :oops:
Thorondor wrote:This might have been an off-screen master yeek - a fairly significant cycle of errors but the game didn't completely hang.

error = "Lua Error: /engine/Map.lua:801: attempt to call method 'check' (a nil value)\
[sound F/X: source diving] Yep, master yeeks have a summon spell, so that's probably the same bug. I think it's time for an emergency bugfix release:

Release 0.3.9 "Neutral Territory"

A smattering of bugfixes this time:
  • Small bug in the Lothlorien Poisoned Water quest: the quest definition is supposed to prevent you from dropping the Potions of Water Curing if you're not in the quest zone, but thanks to a smal typo, it wasn't.
  • A few cosmetic bugs with player sex:
    • The corresponding flags weren't getting to where the message-logging system looks for them, so game messages would describe the player as "it" instead of "he" or "she".
    • My descriptor-generating Perl script accidentally dropped the height/weight mean/variance numbers for neuter characters on top of the ones for male characters. :oops: Which just means male characters were being created a bit shorter and lighter than intended.
  • Ents are supposed to get a bonus to AC that increases with level. Was in a kind of obscure part of the code, and I overlooked it.
  • Small bug in the forget-map effect; forgot that I needed to tell traps specifically who was forgetting about them…
  • Part of the handling code in summoning spells is to check the candidate target location for the "no_summon" flag. It takes a particularly spectacular type of stupid to instead literally replace the map grid at the candidate location with the string "no_summon". [sound F/X: forehead repeatedly striking desk] :oops: :oops: :oops: In fact, this was probably the indirect cause of some other mysterious map-related bugs I could never track down.
  • Small bug when dropping objects. I think it would only have kicked in if you were dropping artifacts while buried in a wall or floating over a deep pit or the like, and the game had to teleport the artifact somewhere else on the map. Still, though, principle of the matter. :wink:
And a few small features:
  • "Wait, back up, what do you mean 'neuter characters'?" That's an option T2 provides, alongside Female and Male. Presumably it's intended for DeathMold characters, but it's available to all character races, and the character creation dialog now makes it available as an option.
  • The T2 module now defines a module profile. In theory, this should allow us to retain persistent achievement information between characters and across a save/load; in practice, all I can confirm so far is that it doesn't produce any
    errors… :? :wink:
Since this is an emergency bugfix release, any bugs you may find were almost certainly already there and simply hadn't been found yet. Unless I added them inadvertently while fixing the previous bugs. :wink: :oops: As always, here is a good place to report them.

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.3.9 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.
  • (updated) 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…).
And not to jinx it, but I think I might be reasonably close to a release on the automatizer stuff. Still composing the te4.org blog post I'm going to need to explain to everyone how to use this thing… :oops: :wink:

Re: Porting ToME2 to the T4 engine

Posted: Wed Nov 13, 2019 10:33 pm
by Zaive
Trying this out in 1.6... because why not. I haven't played much of Tome2 so what could possibly go wrong? Some stuff:

Getting repeat messages will often just put (x2), (x3) and so on at the top of the game screen, without the message that's being repeated.

Is there any way to repeatedly attempt to unlock doors?

Auto-explore won't move to doors or stairs after it's done... since it's probably more a good way of getting yourself killed than anything else later on it's probably not too important.

Re: Porting ToME2 to the T4 engine

Posted: Wed Nov 20, 2019 2:40 am
by Zizzo
Zaive wrote:Trying this out in 1.6... because why not. I haven't played much of Tome2 so what could possibly go wrong?
Shhh, you'll jinx it… :? :wink: I haven't done an exhaustive review of the engine-level changes between 1.5.x and 1.6.x, but I haven't found any obvious show-stoppers so far.
Zaive wrote:Getting repeat messages will often just put (x2), (x3) and so on at the top of the game screen, without the message that's being repeated.
That's supposed to mimic T2 behavior. Do you mean that the repeated message itself is getting lost in the LogFlasher at the top, and you're just seeing the (x2)? I'll investigate.
Zaive wrote:Is there any way to repeatedly attempt to unlock doors?
[sound F/X: source diving] That should happen automatically, just like for digging. If it isn't, let me know and I'll look into it.
Zaive wrote:Auto-explore won't move to doors or stairs after it's done... since it's probably more a good way of getting yourself killed than anything else later on it's probably not too important.
Now, there I'm out of my depth. Currently I'm just putting a thin wrapper around the engine's auto-explore handling, and I make no guarantees about its behavior (mainly because I have no idea how to change it… :oops: )

Re: Porting ToME2 to the T4 engine

Posted: Fri Dec 27, 2019 7:11 am
by Steven Aus
How hard would it be to re-institute the special map generation code for Maze and Heart of the Earth and any other area that uses special generation code? And what percentage of the port do you feel you've done already?

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 03, 2020 12:55 am
by Zizzo
Steven Aus wrote:How hard would it be to re-institute the special map generation code for Maze and Heart of the Earth and any other area that uses special generation code?
Well, since you ask… :mrgreen:
Release 0.4.0 "Reduce, Reuse, Recycle"

The main new feature in this release, as advertised, is the automatizer. For those not familiar with T2's automatizer infrastructure, it basically allows you to set up rules for automatically destroying, picking up or adding inscriptions to objects based on the object's properties and/or properties of you the player. For instance, you could have rules like "destroy all cursed armor", or "destroy all {average} weapons if I'm level 10 or higher", or "pick up any ammo on the floor that has an inscription containing '=g'". Rules can be as simple or as complex as you want, depending on how you define them, and will be automatically applied to objects in your inventory and on the floor at your feet whenever you use an item or a talent (including casting a spell), pick up an object (inventory stuff only), or enter a map grid (floor stuff only).

There are three ways of creating automatizer rules:
  • For T2 veterans who prefer the simpler "destroy stuff like this" interface, that's still available, sort of; it's just implemented in terms of the automatizer now. :twisted: The new "Create destroy/pick-up rule" action on the use-item dialog will take you to the Quick Automatizer Rule dialog:
    img0001.jpg
    img0001.jpg (26.93 KiB) Viewed 48273 times
    via which you can create a simple automatizer rule to destroy or pick up objects like the selected one. This should cover all the options T2 provided, but I never really used that interface in T2, so let me know if something's missing.
  • More generally, the "Automatizer Rules" action on the main <Esc> menu will take you to the Automatizer Rules dialog (hence the name):
    img0002.jpg
    img0002.jpg (91.13 KiB) Viewed 48273 times
    Here you can turn the automatizer on or off, review and edit your automatizer rules (except as noted below), and create new rules. This is intended to be similar to the interactive automatizer interface in T2.
  • If you really want to get your hands dirty, you can write your automatizer rules by hand. [C'mon, you knew I was going to have something like this… :mrgreen: ] By the time I post this or shortly thereafter, I should have a blog entry describing the simple automatizer rule language I've concocted for you to write your rules in. Note that, for now at least, hand-written automatizer rules can't be modified from the Automatizer Rules dialog.
Now, several of the things you can now do via the automatizer are things you might also want to do manually, and since they're now implemented, we add some commands to the use-item dialog for them:
  • "Destroy" (do we need a keybinding for this?)
  • "Add inscription", "Edit inscription" and "Remove inscription"
  • The previous "Enable/disable notify on recharge" command is subsumed
    into the new "Configure…" command, which brings up a configure dialog for
    the object:
    configure.jpg
    configure.jpg (34.6 KiB) Viewed 48273 times
Notes about stuff related to the automatizer:
  • If your automatizer rules aren't applying to something you think they should, selecting the "Test automatizer rule" action for the object in question will let you choose the rule you think should apply, and then will take you to the Automatizer Rules Dialog with your rule selected, with the parts of the rule that match your object highlighted in green and the parts that don't highlighted in red.
  • The things that we're configuring via the Configure dialog were handled in T2 via special annotations in an objects's inscription, like '!d' for "Ask before drop" or '!!' for "Notify on recharge". We don't support configuring stuff that way (which is why we needed a "Configure" command in the automatizer), but for descriptive purposes, we include the old-style annations as pseudo-inscriptions on an object, alongside e.g. pseudo-ID pseudo-inscriptions like '{cursed}'.
Also some unrelated bugfixes that hadn't been merged onto the release branch:
  • Small typo that I think would have broken Scrolls of *Destruction* and Skullcleaver's activation.
  • T2 tries to save memory and screen real estate by consolidating repeated log messages with a repeat count, like "You are hungry. <5x>". We try to reproduce that with our custom LogFlasher, but it turns out the actual repeated message was sometimes getting lost and not displayed. That should be fixed.
And some unrelated features that I just felt like adding:
  • Inspired by the Orc Prides' zone-wide effects, the T2 module now supports zone effects. Mostly this allows us to finally implement "ambient" damage for various zones, like cold damage in Helcaraxë or fire damage in Mount Doom, :twisted: but it also handles suffocating in underwater or airless zones like Submerged Ruins or the Void and forgetting the map in zones like the Maze.
  • And speaking of the Maze, its special map generator is now implemented, and its forget-map zone effect is fully functional. Haven't implemented the Merton quest yet; We Apologize for the Inconvenience.™
  • Parchments! Well, mostly; so far I've implemented the "Map of <town>" parchments, which reveal the town's location on the world map, and all the usual lore parchments (along with a "Show Lore" dialog to review them), but I still haven't figured out how floor inscriptions need to work.
Now, this is of course a fairly significant change to the code, so in addition to the bugs that presumably were already present and just hadn't been tripped over yet, :? I've probably just added a swath of new ones. :oops: :wink: As always, here is a good place to report them.

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.4.0 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 above. :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…).
And with that off the table, I have no idea what to work on for the next feature release. :oops: We've got one vote above for more map generators; any other requests?

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 03, 2020 12:58 am
by Zizzo
And since there's no way AFAICT that I can upload images onto a TE4.org blog entry, I'm going to cheat slightly by attaching them here and linking to them from the blog. We Apologize for the Inconvenience.™

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 03, 2020 1:00 am
by Zizzo
This will be slightly annoying with only three attachments allowed per post…

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 03, 2020 1:02 am
by Zizzo
…well, that didn't work; "Sorry, the board attachment quota has been reached." Maybe it will let me attach more later?

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 03, 2020 6:37 am
by Steven Aus
What would you say is the % completeness of the port so far?

Re: Porting ToME2 to the T4 engine

Posted: Tue Jan 07, 2020 4:46 am
by Zizzo
Steven Aus wrote:What would you say is the % completeness of the port so far?
I… have no idea, and I'm not even sure how I'd put a number to it.

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 10, 2020 6:45 pm
by Sissa Dreki
When attempting to use Copy Spell, I ran into a lua error. Here is the error log. Attached is the entire log file.

Code: Select all


Lua Error: /engine/interface/ActorTalents.lua:329: /engine/interface/ActorTalents.lua:302: /mod/class/LogFlasher.lua:56: attempt to concatenate local 'base' (a nil value)
  At [C]:-1 
  At [C]:-1 error
  At /engine/interface/ActorTalents.lua:329 useTalent
  At /mod/class/Player.lua:695 useTalent
  At /engine/interface/PlayerHotkeys.lua:170 
  At /engine/interface/PlayerHotkeys.lua:162 activateHotkey
  At /mod/class/HotkeysIconsDisplay.lua:178 onMouse
  At /mod/class/Game.lua:1411 fct
  At /engine/Mouse.lua:71