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
Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#376 Post by Steven Aus »

Using TEngine 1.4.9:

This is the error message:

Code: Select all

error = "Lua Error: /hooks/persistentdungeons/load.lua:29: attempt to index field 'tome2' (a nil value)\
  At [C]:-1 __index\
  At /hooks/persistentdungeons/load.lua:29 f\
  At /engine/Module.lua:676 loadAddons\
  At /engine/Module.lua:989 instanciate\
  At /engine/utils.lua:2221 showMainMenu\
  At /engine/init.lua:171 \
  At [C]:-1 dofile\
  At /loader/init.lua:217 "
Without my mod (same TEngine version) - running into the book shop, two distinct errors (note: walking into the entrance of the store gave an error too, but that wasn't unique):

Code: Select all

error = "Lua Error: /data/talents/spell/manwe.lua:205: attempt to index field 'mimicry_form' (a nil value)\
  At [C]:-1 __index\
  At /data/talents/spell/manwe.lua:205 info\
  At /engine/interface/ActorTalents.lua:82 getval\
  At /mod/class/Actor.lua:1372 getTalentFullDescription\
  At /mod/class/Object.lua:845 getDesc\
  At /engine/dialogs/ShowStore.lua:129 generateList\
  At /engine/dialogs/ShowStore.lua:59 init\
  At /mod/dialogs/ShowStore.lua:45 init\
  At /engine/class.lua:147 new\
  At /mod/class/Store.lua:428 interact\
  At /mod/resolvers.lua:45 check\
  At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
  At /engine/Actor.lua:209 move\
  At /mod/class/Actor.lua:450 move\
  At /mod/class/Player.lua:286 move\
  At /engine/interface/PlayerRun.lua:136 runStep\
  At /mod/class/Player.lua:501 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:553 "

Code: Select all

error = "Lua Error: /data/talents/spell/manwe.lua:205: attempt to index field 'mimicry_form' (a nil value)\
  At [C]:-1 __index\
  At /data/talents/spell/manwe.lua:205 info\
  At /engine/interface/ActorTalents.lua:82 getval\
  At /mod/class/Actor.lua:1372 getTalentFullDescription\
  At /mod/class/Object.lua:845 getDesc\
  At /engine/dialogs/ShowStore.lua:129 generateList\
  At /engine/dialogs/ShowStore.lua:59 init\
  At /mod/dialogs/ShowStore.lua:45 init\
  At /engine/class.lua:147 new\
  At /mod/class/Store.lua:428 interact\
  At /mod/resolvers.lua:45 check\
  At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
  At /engine/Actor.lua:209 move\
  At /mod/class/Actor.lua:450 move\
  At /mod/class/Player.lua:286 move\
  At /engine/interface/PlayerMouse.lua:63 mouseMove\
  At /engine/interface/PlayerMouse.lua:141 mouseHandleDefault\
  At /mod/class/Game.lua:1252 fct\
  At /engine/Mouse.lua:58 "
Save, because it eventually resolved, though without opening the book store (maybe because I tried to end the program from the taskbar):
https://www.dropbox.com/s/c9j897v31m786 ... 1.zip?dl=0

Was able to go into other shops fine, but I just tested and it is an error specific to the Book store.

Different Character, Thunderlord worshipping Manwe, died in Thieves' Lair after killing most of the enemies. Error on killing the ones I did kill. Also error on killing Agent of the Black Market (not sure if there were any other Bree enemies that gave an error, most of them didn't).

They are pretty similar:

Code: Select all

error = "Lua Error: /engine/interface/ActorResource.lua:75: attempt to perform arithmetic on local 'v' (a string value)\
  At [C]:-1 __add\
  At /engine/interface/ActorResource.lua:75 incPiety\
  At /mod/class/Player.lua:1675 incPiety\
  At /data/birth/gods.lua:199 cbs\
  At /mod/class/interface/ActorCallbacks.lua:97 all_cbs\
  At /mod/class/interface/ActorCallbacks.lua:151 fireCallbacks\
  At /mod/class/Actor.lua:847 die\
  At /mod/class/Actor.lua:650 takeHit\
  At /data/damage_types.lua:202 projector\
  At /mod/class/interface/PlayerCombat.lua:306 one_blow\
  At /mod/class/interface/PlayerCombat.lua:723 bumpInto\
  At /mod/class/Actor.lua:946 attack\
  At /mod/class/Actor.lua:519 check\
  At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
  At /engine/Actor.lua:209 move\
  At /mod/class/Actor.lua:450 move\
  At /mod/class/Player.lua:286 moveDir\
  At /mod/class/Player.lua:279 moveDir\
  At /mod/class/Game.lua:818 move_or_scroll\
  At /mod/class/Game.lua:840 \
  At /engine/KeyBind.lua:230 "
Seems like the defeating enemies error is specific to a god, maybe Manwe, because it doesn't show when I have no god. Also, I am able to visit the book store with (at least) a no-god Thunderlord Sorcerer. Not sure if the god has something to do with the Book store error (and I also got it sometimes with the Black Market).

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

#377 Post by Zizzo »

Steven Aus wrote:Using TEngine 1.4.9:

This is the error message:

Code: Select all

error = "Lua Error: /hooks/persistentdungeons/load.lua:29: attempt to index field 'tome2' (a nil value)\
[sound F/X: source diving] Ah. Now that you mention it, I'm not actually entirely sure when the config.settings.tome2{} table is set up relative to when hook files are processed. It should be set up properly by the time the T2:load hook is called though, so I think you can make that work by moving those lines inside your T2:load callback.
Steven Aus wrote:Without my mod (same TEngine version) - running into the book shop, two distinct errors (note: walking into the entrance of the store gave an error too, but that wasn't unique):

Code: Select all

error = "Lua Error: /data/talents/spell/manwe.lua:205: attempt to index field 'mimicry_form' (a nil value)\
[sound F/X: source diving] Now, that was just a stupid typo. Looks like you were trying to pull up a tooltip for an Avatar spellbook, which was botched; a Flame of Udun spellbook would have gotten a similar error. Checked a preliminary fix into SVN, and as soon as I figure out how to tell my create-item debug dialog to create a spellbook with a specific spell in it, I'll actually be able to test it. :oops:
Steven Aus wrote:Seems like the defeating enemies error is specific to a god, maybe Manwe, because it doesn't show when I have no god.
[sound F/X: source diving] Yep, that was a typo in the handling of gaining Manwe piety for killing evil monsters while praying. Looks like I got it right for everything else. Fixed in SVN.

And speaking of "fixed in SVN", would it be worth it for me to branch off a side release to fix these bugs for the 1.4.x engine, and/or to bump up to the 1.5.x engine, while I'm working on alchemy for the next release?
"Blessed are the yeeks, for they shall inherit Arda..."

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#378 Post by Steven Aus »

Would it be a big job to update for the 1.5 series? And is there an advantage for moving to 1.5.x? It's up to you. Personally I don't mind using 1.4.9, but if you're interested in updating the code for 1.5.x, then you can go for it. But probably would be good if you keep up the 1.4.9 version so we can still play while you're updating for 1.5.x.

There's still a piety error with Manwe (is this because I wasn't praying?):

Code: Select all

error = "Lua Error: /engine/interface/GameTargeting.lua:119: /engine/interface/ActorTalents.lua:150: /engine/interface/ActorResource.lua:75: attempt to perform arithmetic on local 'v' (a string value)\
stack traceback:\
\9/engine/interface/ActorResource.lua:75: in function 'incPiety'\
\9/mod/class/Player.lua:1675: in function 'incPiety'\
\9/data/birth/gods.lua:199: in function 'cbs'\
\9/mod/class/interface/ActorCallbacks.lua:97: in function 'all_cbs'\
\9/mod/class/interface/ActorCallbacks.lua:151: in function 'fireCallbacks'\
\9/mod/class/Actor.lua:847: in function 'die'\
\9/mod/class/Actor.lua:650: in function 'takeHit'\
\9/data/damage_types.lua:202: in function 'projector'\
\9/engine/interface/ActorProject.lua:219: in function 'project'\
\9/mod/spell-util.lua:1888: in function 'beam_spell'\
\9/data/talents/player/race-class.lua:347: in function </data/talents/player/race-class.lua:345>\
\9[C]: in function 'xpcall'\
\9/engine/interface/ActorTalents.lua:147: in function </engine/interface/ActorTalents.lua:140>\
  At [C]:-1 \
  At [C]:-1 error\
  At /engine/interface/GameTargeting.lua:119 fct\
  At /engine/interface/GameTargeting.lua:125 targetMode\
  At /engine/interface/GameTargeting.lua:254 targetMouse\
  At /mod/class/Game.lua:1244 fct\
  At /engine/Mouse.lua:58 "
Also, my new persistentdungeons code seems to be working, but I think it's giving a non-critical error every time I return to an area I've visited before. Also the quest is regiven each time I enter, and makes the quest again, so you can get the rewards again. How do I change the code so that it doesn't make a new quest every time I enter a valid level that I've already entered?

This time I checked to see if the zone was already made persistent. I'll check to see if that works. No it doesn't, I must have the syntax wrong.

Heres the load.lua file in hooks, how do I correct the syntax?

Code: Select all

local Zone = require "engine.Zone"
local GameOptions = require "mod.dialogs.GameOptions"

class:bindHook("T2:load", function(self, data)
	if  type(config.settings.tome2.persistentdungeonlevels) == 'nil' then
    config.settings.tome2.persistentdungeonlevels = false
	end
	GameOptions:loadDefinition('/data-persistentdungeons/option.lua')
	end)
	

	
class:bindHook("Zone:create", function(self, data)
	if config.settings.tome2.persistentdungeonlevels
	then if self.persistent ~= "zone"
	     then self.persistent = "zone"
	     end
	     end
	end)

Code: Select all

error = "Lua Error: /mod/spell-util.lua:109: attempt to index field 'level' (a nil value)\
  At [C]:-1 __index\
  At /mod/spell-util.lua:109 level_ok_teleport\
  At /data/talents/player/race-class.lua:376 on_pre_use\
  At /mod/class/Actor.lua:1077 preUseTalent\
  At /data/hotkey-icons.lua:69 display\
  At /mod/class/HotkeysIconsDisplay.lua:73 display\
  At /engine/HotkeysIconsDisplay.lua:285 toScreen\
  At /mod/class/Game.lua:622 \
  At [C]:-1 forceRedraw\
  At /engine/ui/Waiter.lua:72 getWaitDisplay\
  At /engine/ui/Dialog.lua:54 simpleWaiterTip\
  At /engine/Zone.lua:866 getLevel\
  At /mod/class/Game.lua:406 changeLevel\
  At /mod/class/Game.lua:1028 \
  At /engine/KeyBind.lua:242 "
Also, torches MIGHT still provide light after they run out (0 turns left). I'm not sure though.

Also, Globe of Light doesn't work in Thieves' Lair (but torches do for some reason).

Also, what does the "version" mean here? I thought it was version of the module that it applies to, because "addon_version" is there too.

Code: Select all

long_name = "ToME2 Persistent Dungeons Addon"
short_name = "persistentdungeons" -- Determines the name of your addon's file.
for_module = "tome2"
version = {0,2,5}
addon_version = {1,0,0}

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

#379 Post by Zizzo »

Steven Aus wrote:Would it be a big job to update for the 1.5 series?
Don't think so. I've only found a few incompatibilities so far, and anything else I need to fix on that front would be something I'd run into in trunk testing anyway.
Steven Aus wrote:And is there an advantage for moving to 1.5.x?
Well, it would allow people to use the module without having to have an older engine version lying around. :wink:
Steven Aus wrote:It's up to you. Personally I don't mind using 1.4.9, but if you're interested in updating the code for 1.5.x, then you can go for it. But probably would be good if you keep up the 1.4.9 version so we can still play while you're updating for 1.5.x.
Actually, I'm starting to think that's something I should do proactively in the future, when 1.6.0 eventually drops (and for further minor point releases): since that's when I'm already updating T4 addons for the new engine, I should also take the most recent T2 module release and make a new interim release from it, with just the necessary changes for the new game engine, so that people can still play it while I'm working on the next feature release.
Steven Aus wrote:There's still a piety error with Manwe (is this because I wasn't praying?):
Ah, right, `s been too long, I forgot I need to merge those fixes back into the 0.2.5 release branch. Those should be there now. We Apologize for the Inconvenience.™ :oops: Or do I need to upload a new .team with these fixes too?
Steven Aus wrote:Also, my new persistentdungeons code seems to be working, but I think it's giving a non-critical error every time I return to an area I've visited before.
[sound F/X: source diving] Ah, that was spell.level_ok_teleport() not being bulletproof against the case that game.zone and/or game.level aren't present. Which might seem unnecessary, but it's used in the pre-use check for some Thunderlord talents, which gets used in the hotkey icons display, so it really does need to be that bulletproof. That should be fixed in SVN.
Steven Aus wrote:Also the quest is regiven each time I enter, and makes the quest again, so you can get the rewards again. How do I change the code so that it doesn't make a new quest every time I enter a valid level that I've already entered?
Now, that could get tricky; I'll have to refresh my memory on how those quests work and how they interact with level generation. Let me investigate a bit.
Steven Aus wrote:Also, torches MIGHT still provide light after they run out (0 turns left). I'm not sure though.
[sound F/X: source diving] Ah, right. I suppose it's easy to get the 'fuel_lite' and 'lite_fuel' object flags mixed up… :oops: Should be fixed in SVN.
Steven Aus wrote:Also, Globe of Light doesn't work in Thieves' Lair (but torches do for some reason).
[sound F/X: testing] …What. Oh, wait, I see what's happening here: at that low level, Globe of Light only lights areas that are flagged by the level generator as a "room", and nothing in the Thieves quest is so flagged.
Steven Aus wrote:Also, what does the "version" mean here? I thought it was version of the module that it applies to, because "addon_version" is there too.

Code: Select all

long_name = "ToME2 Persistent Dungeons Addon"
short_name = "persistentdungeons" -- Determines the name of your addon's file.
for_module = "tome2"
version = {0,2,5}
addon_version = {1,0,0}
Yep, that's what it is. Was there confusion about that?
"Blessed are the yeeks, for they shall inherit Arda..."

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#380 Post by Steven Aus »

It seems that you updated the trunk for 1.5.3 (as it shows as a native 1.5.3 version). There is an error when you try to open a door that is locked (preventing it happening at all) - not sure if there are other errors. This doesn't happen with the release-0.2.5 branch.

Code: Select all

error = "Lua Error: /mod/class/Player.lua:1631: attempt to call a table value\
  At [C]:-1 (for generator)\
  At /mod/class/Player.lua:1631 gainExp\
  At /data/general/grids/all.lua:484 try_open_door\
  At /mod/class/Player.lua:972 restCheck\
  At /engine/interface/PlayerRest.lua:75 restStep\
  At /mod/class/Player.lua:504 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:561 "
Also, it says "unknown certificate owner" when downloading the svn.

The princess quest doesn't appear to multiply (at least the quest dialog does not come up again, so maybe there's already some code for preventing repeats) when re-entering the same level, but the lost sword quest does.

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

#381 Post by Zizzo »

Steven Aus wrote:It seems that you updated the trunk for 1.5.3 (as it shows as a native 1.5.3 version).
Well, yeah, trunk is generally going to track the latest engine version, since I'm eventually going have to make the module work for the latest version when I release it and it's easier to do it as we go along. Following trunk is hazardous, of course, as you demonstrate below: :wink:
Steven Aus wrote:There is an error when you try to open a door that is locked (preventing it happening at all) - not sure if there are other errors. This doesn't happen with the release-0.2.5 branch.
[sound F/X: source diving] I'm surprised you hadn't already tripped over that one killing monsters. That was a typo in the new code for allowing Alchemy-built artifacts in progress to gain experience points to be used to add features to them. Should be fixed now in SVN.
Steven Aus wrote:Also, it says "unknown certificate owner" when downloading the svn.
(shrug) I'm almost certainly using a self-signed certificate on the web server. Should be harmless.
Steven Aus wrote:The princess quest doesn't appear to multiply (at least the quest dialog does not come up again, so maybe there's already some code for preventing repeats) when re-entering the same level, but the lost sword quest does.
Hmm, to clarify, are you talking about lost sword quests that you've completed and gotten the skill reward for, or lost sword quests that you've partially completed by killing some of the quest monsters and leaving the level and returning? Part of the setup of the princess quest is done in level generation, and it looks like the sanity-checking code that prevents the princess quest from being given if the princess room wasn't generated accidentally protects you in the persistent-levels case. The lost sword quest setup, on the other hand, is done entirely as you enter the level, and if you have persistent levels, I can see that it might keep generating more and more quest monsters as you leave and return to the level.
"Blessed are the yeeks, for they shall inherit Arda..."

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#382 Post by Steven Aus »

Yes, I mean it regives the lost sword quest if you haven't finished it, and you can keep killing one more creature to get the next reward. Can you change this? Otherwise I'm afraid my persistentdungeons addon is not balanced and functional.

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

#383 Post by Zizzo »

Steven Aus wrote:Yes, I mean it regives the lost sword quest if you haven't finished it, and you can keep killing one more creature to get the next reward. Can you change this? Otherwise I'm afraid my persistentdungeons addon is not balanced and functional.
Yeah, the Game:enterLevel hook was really the wrong place to be creating and placing the quest monsters anyway. I've checked in a modification of the lost sword quest that looks like it fixes the problem; let me know how it works.
"Blessed are the yeeks, for they shall inherit Arda..."

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#384 Post by Steven Aus »

I haven't been able to get the lost sword quest yet (five princess quests on the first four levels of the downs). Does the game randomize the two quests properly? So far, if I get one of the quests on the first level, I keep getting the same quest on multiple levels (quests: 98(max)). I'm not sure if it happens all the time, but I do feel it happens a lot. There might be a randomization bug - it's worth checking at least. 5 in a row seems like it's not properly randomizing between the two quests.

Also, when I took the princess quest stars down, and then came back up, I got placed at an exit that went up. Didn't you fix a bug like this a while ago?

I got hit by a giant white louse, then a giant white mouse, and got an error each time. Luckily they didn't do anything insidious, but I was lucky that they tripped up - there must be an error in the code. :) ;) Here is the error message and log:

https://www.dropbox.com/s/y4dd5wgf2jbu1 ... g.zip?dl=0

More OnHit bugs when special monster abilities are trying to fire. I have been extremely lucky by this time. Can you have a check and see if there is something wrong with special ability monster code? There has been a lot of errors on OnHit triggers by this time. This set was by Mirkwood spiders.

https://www.dropbox.com/s/x71fn0gz4pwyt ... n.zip?dl=0

Also, in one of the princess quests, there were mushroom patches. Are immobile creatures meant to spawn for princess quests? And do they spawn for lost sword quests?

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

#385 Post by Zizzo »

Steven Aus wrote:I haven't been able to get the lost sword quest yet (five princess quests on the first four levels of the downs).
Neat trick. :wink:
Steven Aus wrote:Does the game randomize the two quests properly? So far, if I get one of the quests on the first level, I keep getting the same quest on multiple levels (quests: 98(max)). I'm not sure if it happens all the time, but I do feel it happens a lot. There might be a randomization bug - it's worth checking at least. 5 in a row seems like it's not properly randomizing between the two quests.
Well, a random quest only has a 1 in 4 chance of being a lost sword quest, so five princess quests in a row can happen with probability… [sound F/X: calculator] a bit less than 25%, so still within the realm of plausibility. My testing does appear to indicate that quests are being randomly generated as expected. If you want, I can add some debug messages to the log file listing which quests are generated for which levels (this all gets precomputed at character creation), so you can compare them against what you're seeing in game.
Steven Aus wrote:Also, when I took the princess quest stars down, and then came back up, I got placed at an exit that went up. Didn't you fix a bug like this a while ago?
That does sound familiar… [sound F/X: source diving] yes, back in v0.2.2. And apparently I had underestimated how tenacious the level generator was in setting up a default_down{} location if there isn't a down stairs to put it on. :oops: That should be fixed in SVN.
Steven Aus wrote:I got hit by a giant white louse, then a giant white mouse, and got an error each time. Luckily they didn't do anything insidious, but I was lucky that they tripped up - there must be an error in the code.
Steven Aus wrote:More OnHit bugs when special monster abilities are trying to fire.
[sound F/X: source diving] Yes, these are the same error — one of those things I really wish Lua had some sort of compile-time checking to catch. :oops: If you haven't been getting this before, though… hmm, have you picked up some equipment that confers melee retaliation? Should be fixed in SVN.
Steven Aus wrote:Also, in one of the princess quests, there were mushroom patches. Are immobile creatures meant to spawn for princess quests? And do they spawn for lost sword quests?
(shrug) I've run into molds and mushrooms as both princess guards and lost sword quest monsters in the original T2.
"Blessed are the yeeks, for they shall inherit Arda..."

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#386 Post by Steven Aus »

I tried to use a Scroll of Recharging on a Staff of Identify, twice, and it did nothing (but it did use up the 2 scrolls). I'm thinking that maybe I don't have enough skill yet to use it properly. Can you check?

https://www.dropbox.com/s/lft6bx7zjr69a ... og.7z?dl=0

I got properly paralyzed and killed by a spider, but there was another repeated error:

Code: Select all

error = "Lua Error: /mod/class/Actor.lua:1387: attempt to perform arithmetic on a string value\
  At [C]:-1 __add\
  At /mod/class/Actor.lua:1387 onHitInMelee\
  At /mod/class/AttackType.lua:73 monAttackTarget\
  At /mod/class/NPC.lua:496 bumpInto\
  At /mod/class/Actor.lua:947 attack\
  At /mod/class/Actor.lua:520 check\
  At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
  At /engine/interface/ActorAI.lua:64 aiCanPass\
  At /engine/interface/ActorAI.lua:86 runAI\
  At /engine/ai//talented.lua:67 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:553 "
Also Paralyze lasts for a long time! I guess it's intended, but most people will be killed by the time it wears off (which is probably intended too :) ). Anyway, here's the log up to the time I got killed.

https://www.dropbox.com/s/2q3xmr7f9j6ac ... r.zip?dl=0

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

#387 Post by Zizzo »

Steven Aus wrote:I tried to use a Scroll of Recharging on a Staff of Identify, twice, and it did nothing (but it did use up the 2 scrolls). I'm thinking that maybe I don't have enough skill yet to use it properly.
[sound F/X: source diving] No, I botched the recharge method; it was passing parameters through from the item selection dialog in the wrong order, and thereby inadvertently trying to recharge the player. :shock: :oops: Should be fixed in SVN.
Steven Aus wrote:I got properly paralyzed and killed by a spider, but there was another repeated error:
[sound F/X: source diving] Ah, right, it's Java that concatenates strings using the '+' operator; Lua uses '..'. :oops: Fixed in SVN.
Steven Aus wrote:Also Paralyze lasts for a long time! I guess it's intended, but most people will be killed by the time it wears off (which is probably intended too :) ).
Yeah, free action is absolutely vital beyond the early game, for exactly that reason. In fact, at one point either T2 or Angband added (and I hope I've successfully reproduced) the side effect that applying the Paralyzed effect to someone that's already paralyzed does 1hp damage, specifically as a "mercy kill" for Floating eyes that otherwise kept re-paralyzing the player while they starved to death over thousands of turns. :shock: The source I usually go for is a couple guaranteed artifacts near the bottom of Orc Cave, if you know where to look for them (and assuming I've implemented that properly… :? ).
"Blessed are the yeeks, for they shall inherit Arda..."

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#388 Post by Steven Aus »

1. If you have princess quests/lost sword quests every level, you can easily get spiders and Mirkwood spiders in the first few levels of Barrowdowns, and AFAIK, they can both paralyze. So I decided to turn the quests off (0) this playthrough.

2. Still got killed by a cave spider. Well, I had run out of light, so that's something to avoid for next time.

3. New game: just realized that you can cast Conjure Lightning when you don't have enough mana. If you do have enough mana, it is used, but if you don't you can still use it for no cost.

4. Has piety and strength (carrying capacity) functionality been added? I noticed with Manwe the last time he was my character's god, that the character wouldn't lose any piety if he didn't pray, and then once he prayed (even if he stopped praying) the character kept getting more and more negative piety because he couldn't kill evil creatures quickly enough. Not sure if there is a penalty for carrying too much if you have lots of heavy items.

5. Feel free to find your own way, these are only my suggestions. I must say that there is already a lot of functionality already, and Sorcerers are especially playable. :) The game is quite fun already with what has been coded/converted from T2.

Depending on what you are doing in the mod at the moment, I would say my suggestions on what to do next would be, in order:

Bugs that are found that need to be fixed (obviously only when I or someone else finds them)
Carrying limit, or penalty for going over the limit, based on strength (if it isn't already there)
Functionality for Piety, Gods and Praying/Stopping Praying (if it isn't already there)
Alchemist functionality
Any other magic users not implemented
DeathMold functionality
LostSoul functionality

Of course, there is no time limit, but I just wanted to let you know what I would like. If you are still working on the map generation code, or other crucial code that multiple races/classes depend on, of course that takes precedence.

6. Btw: can you send me the original T2 code that you are converting to TEngine4 so it's backed up in a few places? I'm not sure if the place you got it from is still active.

7. a) Bonus question: Would it be possible to make a bag object that could hold multiple items? It may have not been in T2 originally, so it might make a good addon. Of course, carrying capacity from Strength stat would need to be implemented so this isn't overpowered (especially since items that are the same can already be stacked in the same slot).

7. b) There could still be bags of holding that would reduce weight for items inside them, but since there doesn't seem to be the same interaction between items in inventory as in Nethack, maybe bags, and bags of holding would be specifically excluded from being put in bags and bags of holding. Items in bags would still need to be pulled out of them for use, but multiple separate bags could still be an option.

8. Bonus question 2: Is there meant to be any effect of projectiles (or certain melee attacks) on items carried by a character? I don't mind either way, but it would certainly make the game harder. Maybe this could be an option?

9. I just tried two High Elf Archers, and when I went into the Thieves' Lair, and tried to equip the quiver from the ground before and after the bow, this error occurred and the quiver disappeared:

Code: Select all

error = "Lua Error: /mod/class/Player.lua:1521: /engine/interface/ActorInventory.lua:479: attempt to index local 'o' (a boolean value)\
  At [C]:-1 \
  At [C]:-1 error\
  At /mod/class/Player.lua:1521 doWear\
  At /mod/dialogs/UseItemDialog.lua:113 use\
  At /mod/dialogs/UseItemDialog.lua:45 fct\
  At /engine/ui/List.lua:155 onUse\
  At /engine/ui/List.lua:81 fct\
  At /engine/Mouse.lua:58 receiveMouse\
  At /engine/Mouse.lua:98 delegate\
  At /engine/ui/Dialog.lua:657 mouseEvent\
  At /engine/ui/Dialog.lua:399 fct\
  At /engine/Mouse.lua:58 "
10. Word of Recall only sends you to the first level of the last dungeon you visited (rather than the last level), at least when you use Return to Town (Thunderlord talent for recalling to town).

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

#389 Post by Zizzo »

Steven Aus wrote:1. If you have princess quests/lost sword quests every level, you can easily get spiders and Mirkwood spiders in the first few levels of Barrowdowns, and AFAIK, they can both paralyze. So I decided to turn the quests off (0) this playthrough.
98 quests will bite you in the proverbial in the late game, with quests on every level of Angband. The default is 20; I usually do 49 as a happy medium.
Steven Aus wrote:2. Still got killed by a cave spider. Well, I had run
out of light, so that's something to avoid for next time.
[sound F/X: source diving] Ooh, yeah, those are +100% normal speed; they're no fun in the early game.
Steven Aus wrote:3. New game: just realized that you can cast Conjure Lightning when you don't have enough mana. If you do have enough mana, it is used, but if you don't you can still use it for no cost.
[sound F/X: source diving] You mean Thunder Strike? As a racial talent, that can be cast from hit points if you don't have enough mana; are you losing HP in that case? I suppose I might need to mention that more prominently…
Steven Aus wrote:4. Has piety and strength (carrying capacity) functionality been added? I noticed with Manwe the last time he was my character's god, that the character wouldn't lose any piety if he didn't pray, and then once he prayed (even if he stopped praying) the character kept getting more and more negative piety because he couldn't kill evil creatures quickly enough.
Piety should be implemented. How long did you wait for your Manwe piety to drop? That should happen even when you aren't praying (though slightly more so if you are), and for Manwe it should happen every 30 turns at normal speed. And yeah, my experience with Manwe followers is that your piety will suffer for much of the early game; usually plowing through Orc Cave will get it back above sea level for me (don't forget that you only gain piety for killing evil monsters if you're praying while you do it).
Steven Aus wrote:Not sure if there is a penalty for carrying too much if you have lots of heavy items.
No, carrying capacity isn't implemented yet.
Steven Aus wrote:Depending on what you are doing in the mod at the moment, I would say my suggestions on what to do next would be, in order:

Bugs that are found that need to be fixed (obviously only when I or someone else finds them)
Well, that goes without saying. :wink:
Steven Aus wrote:Carrying limit, or penalty for going over the limit, based on strength (if it isn't already there)
Functionality for Piety, Gods and Praying/Stopping Praying (if it isn't already there)
Alchemist functionality
Well, currently I'm working on Alchemy for the next main release; I can probably wedge carrying capacity in there too. Piety and praying should all be covered, I think.
Steven Aus wrote:Any other magic users not implemented
Hmm, most school spells are implemented, including (most of) Geomancy, so that should cover most classes under the Mage class group; Thaumaturgy was also covered a while back. Mainly that leaves Necromancy and Runecraft untouched.
Steven Aus wrote:DeathMold functionality
[sound F/X: source diving] All the DeathMold race talents are implemented; their semi-random teleporting in lieu of ordinary movement is the tricky bit, especially on the world map.
Steven Aus wrote:LostSoul functionality
Yoiks. I haven't even looked into that one.
Steven Aus wrote:Of course, there is no time limit, but I just wanted to let you know what I would like. If you are still working on the map generation code, or other crucial code that multiple races/classes depend on, of course that takes precedence.
Map generation is mostly done; there are some features like tree/water/lava streamers and some special zones like Erebor and Maze and Heart of the Earth that I ought to get back to eventually.
Steven Aus wrote:6. Btw: can you send me the original T2 code that you are converting to TEngine4 so it's backed up in a few places? I'm not sure if the place you got it from is still active.
Well, most Linux distributions should have some version of the source code; the one I use has 2.3.5 and 2.3.11, which aren't the exact version I'm working from, but should be close enough.

Steven Aus wrote:7. a) Bonus question: Would it be possible to make a bag object that could hold multiple items? It may have not been in T2 originally, so it might make a good addon. Of course, carrying capacity from Strength stat would need to be implemented so this isn't overpowered (especially since items that are the same can already be stacked in the same slot).

7. b) There could still be bags of holding that would reduce weight for items inside them, but since there doesn't seem to be the same interaction between items in inventory as in Nethack, maybe bags, and bags of holding would be specifically excluded from being put in bags and bags of holding. Items in bags would still need to be pulled out of them for use, but multiple separate bags could still be an option.
Bags would certainly be possible in theory. It would definitely need to be an addon, as I imagine I'd get serious objections to adding it to the main game. :wink:
Steven Aus wrote:8. Bonus question 2: Is there meant to be any effect of projectiles (or certain melee attacks) on items carried by a character? I don't mind either way, but it would certainly make the game harder. Maybe this could be an option?
…? I'm not sure what you mean here. Certain damage types can destroy items in the player's inventory; fire can burn scrolls and spellbooks, for instance, and cold can shatter potions. That should be implemented.
Steven Aus wrote:9. I just tried two High Elf Archers, and when I went into the Thieves' Lair, and tried to equip the quiver from the ground before and after the bow, this error occurred and the quiver disappeared:
[sound F/X: source diving] …what. Map:removeObject() doesn't return the object removed from the floor as ActorInventory:removeObject() does. :x Should be fixed in SVN.
Steven Aus wrote:10. Word of Recall only sends you to the first level of the last dungeon you visited (rather than the last level), at least when you use Return to Town (Thunderlord talent for recalling to town).
…? I'll investigate. What does the "Show Recall Targets" option from the game menu report?
"Blessed are the yeeks, for they shall inherit Arda..."

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: Porting ToME2 to the T4 engine

#390 Post by Steven Aus »

When you find a second copy of a book such as "Guide to Adventuring in Middle Earth", if you pick it up when you already have it in your inventory, the second copy disappears.

Log from latest playthrough: https://www.dropbox.com/s/y56z5hp8nv7wa ... 3.zip?dl=0
Save from latest playthrough: https://www.dropbox.com/s/3eys316ptgqp9 ... d.zip?dl=0

When you try to go to the Book store:

Code: Select all

error = "Lua Error: /data/talents/spell/melkor.lua:145: attempt to call global 'get_spell_level' (a nil value)\
  At [C]:-1 get_spell_level\
  At /data/talents/spell/melkor.lua:145 info\
  At /engine/interface/ActorTalents.lua:82 getval\
  At /mod/class/Actor.lua:1373 getTalentFullDescription\
  At /mod/class/Object.lua:845 getDesc\
  At /engine/dialogs/ShowStore.lua:129 generateList\
  At /engine/dialogs/ShowStore.lua:59 init\
  At /mod/dialogs/ShowStore.lua:45 init\
  At /engine/class.lua:147 new\
  At /mod/class/Store.lua:428 interact\
  At /mod/resolvers.lua:45 check\
  At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
  At /engine/Actor.lua:209 move\
  At /mod/class/Actor.lua:451 move\
  At /mod/class/Player.lua:286 moveDir\
  At /mod/class/Player.lua:279 moveDir\
  At /mod/class/Game.lua:818 move_or_scroll\
  At /mod/class/Game.lua:835 \
  At /engine/KeyBind.lua:230 "
ActorTalents in the middle of nowhere (looks like there is a double slash):

Code: Select all

error = "Lua Error: /engine/interface/ActorTalents.lua:279: /engine/interface/ActorTalents.lua:256: /engine/interface/ActorTalents.lua:150: /data/talents/npc/spells.lua:863: attempt to index global 'actor' (a nil value)\
stack traceback:\
\9/data/talents/npc/spells.lua:863: in function </data/talents/npc/spells.lua:860>\
\9[C]: in function 'xpcall'\
\9/engine/interface/ActorTalents.lua:147: in function </engine/interface/ActorTalents.lua:140>\
  At [C]:-1 \
  At [C]:-1 error\
  At /engine/interface/ActorTalents.lua:279 useTalent\
  At /mod/class/NPC.lua:509 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:553 "
Zizzo wrote:
Steven Aus wrote:1. If you have princess quests/lost sword quests every level, you can easily get spiders and Mirkwood spiders in the first few levels of Barrowdowns, and AFAIK, they can both paralyze. So I decided to turn the quests off (0) this playthrough.
98 quests will bite you in the proverbial in the late game, with quests on every level of Angband. The default is 20; I usually do 49 as a happy medium.
Okay, thanks.
Zizzo wrote:
Steven Aus wrote:3. New game: just realized that you can cast Conjure Lightning when you don't have enough mana. If you do have enough mana, it is used, but if you don't you can still use it for no cost.
[sound F/X: source diving] You mean Thunder Strike? As a racial talent, that can be cast from hit points if you don't have enough mana; are you losing HP in that case? I suppose I might need to mention that more prominently…
I lost the mana amount in HP when I used it without enough mana. But yes, it would be good if you update the description.
Zizzo wrote:
Steven Aus wrote:4. Has piety and strength (carrying capacity) functionality been added? I noticed with Manwe the last time he was my character's god, that the character wouldn't lose any piety if he didn't pray, and then once he prayed (even if he stopped praying) the character kept getting more and more negative piety because he couldn't kill evil creatures quickly enough.
Piety should be implemented. How long did you wait for your Manwe piety to drop? That should happen even when you aren't praying (though slightly more so if you are), and for Manwe it should happen every 30 turns at normal speed. And yeah, my experience with Manwe followers is that your piety will suffer for much of the early game; usually plowing through Orc Cave will get it back above sea level for me (don't forget that you only gain piety for killing evil monsters if you're praying while you do it).
Yes, Manwe piety falls properly with or without praying (of course quicker when praying if you aren't killing evil creatures).
Zizzo wrote:
Steven Aus wrote:7. a) Bonus question: Would it be possible to make a bag object that could hold multiple items? It may have not been in T2 originally, so it might make a good addon. Of course, carrying capacity from Strength stat would need to be implemented so this isn't overpowered (especially since items that are the same can already be stacked in the same slot).

7. b) There could still be bags of holding that would reduce weight for items inside them, but since there doesn't seem to be the same interaction between items in inventory as in Nethack, maybe bags, and bags of holding would be specifically excluded from being put in bags and bags of holding. Items in bags would still need to be pulled out of them for use, but multiple separate bags could still be an option.
Bags would certainly be possible in theory. It would definitely need to be an addon, as I imagine I'd get serious objections to adding it to the main game. :wink:
Yes, of course I was intending it as an addon.
Zizzo wrote:
Steven Aus wrote:10. Word of Recall only sends you to the first level of the last dungeon you visited (rather than the last level), at least when you use Return to Town (Thunderlord talent for recalling to town).
…? I'll investigate. What does the "Show Recall Targets" option from the game menu report?
When I first cast Return to Town, it returned me to the outside of the Barrow-downs dungeon. When I returned to the dungeon, I returned to level 1. When I went to Level 2 and checked recall targets, it still said Barrow-downs level 1. When I ported back to town, this time I got taken to the actual town, and it still said Barrow-downs level 1 for dungeon recall target. So I guess the game is not updating the dungeon recall target when reaching a deeper level. Not sure why when I ported from Level 4 I got taken to the entrance of the Barrow-downs rather than the town (maybe because it was the first time). Here's the log.

https://www.dropbox.com/s/fr36qmhid41mu ... g.zip?dl=0

Post Reply