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

#406 Post by Zizzo »

Thorondor wrote:Thanks again for undertaking this Herculean work! I like the new flavours that you've introduced.
New flavors? I'm pretty much working straight from the 2.3.9 release; I can't think offhand of anything significant I've added. Well, maybe the "live symbiotes" option…
Thorondor wrote:I've had a few LUA error reports; usually regarding actions taken regarding unidentified items: e.g. drop/wear an unidentified item, the aimless merchant picks up the club (1d4 good) etc.
Definitely submit those as you find them. There should be an error-reports/ directory somewhere near where the savefiles live, with files that have the text contents of the error dialogs, which would probably be easier than screen-shotting them.
Thorondor wrote:Screenshots attached for the above.
[sound F/X: source diving] You were wearing a shield but not a weapon, yes? That was the check for weapons like Katanas that can be wielded either one-handed or two-handed but take a damage penalty if wielded one-handed, and I had clearly forgotten to consider that case. :oops: Should be fixed in SVN. Also fixed in SVN is the problem you reported elsewhere, with ripple-effect skill boosts not being properly propagated from the level-up dialog to the character.
Thorondor wrote:I managed to completely crash a character whilst using a staff of identify (which seems to provide unlimited charges at the moment).
[sound F/X: testing] Now, this I can't reproduce; charges appear to be used up normally in my test. In your case, I think the error may have kicked it out before it got to the use-charges part of the code
Thorondor wrote:I wondered whether it would be possible to have certain shops always stocking certain items that are essential to every character (e.g. in Bree it should always be possible to purchase scroll of Identify, scroll of word of recall, oil flask, some form of digging implement etc); - I haven't yet found a scroll of ID in the characters I've done which makes things a bit trickier at the start.
Feasible, I think, though it might take a bit of work; T-Engine stores appear to be implemented on the assumption that they will only be restocked a handful of times. I'd want feedback on what items people think should be present, of course.
Thorondor wrote:I have to say I'm a big fan of knowing whether an item is {good / excellent} etc on pickup; - I personally find the trawl until items are identified is a bit of a drag;
That's standard T2 behavior as of 2.3.9. And yes, it is nice. :wink:
Thorondor wrote:I'd be interested in whether you (and the community) felt whether one of the fixed dungeon items that auto-ID's everything should be instead offered as a quest reward for one of the fixed quests. I know it's a tweak from the original game, but personally I think that'd be an improvement in game play and enjoyability.
Well, one of my Archers did take the Thunderlord Express down to the bottom of Illusory Castle and pick up the Helm of Knowledge for just that purpose. (Actually, I don't know of anything else that conveys auto-ID, except the completed Gothmog set; did you have something else in mind?)
Thorondor wrote:I usually played Fury as a variant as I preferred the innate magic system; - (seems a bit odd for an archwizard having to leaf through a spellbook mid-fight); - I recognise there's a balance issue with this but if it were possible that a player could 'buy' the ability to memorise spells then perhaps this would be a way of improving balance.
Sounds like an excellent idea for an addon. :wink:
Thorondor wrote:Would it also be possible for some of the humanoid characters to be non-hostile (I don't like every single humanoid I meet in the dungeon being out to get me, murdering hapless novice priests etc seems :twisted:
As currently implemented, anything that was flagged GOOD in T2 should be friendly or neutral to you, unless you follow Melkor.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: Porting ToME2 to the T4 engine

#407 Post by Thorondor »

Cheers Zizzo,
I'm used to 2.35 (for Theme and Fury), and haven't got a more recent version, hence I didn't know about 2.39 :mrgreen:
Thanks for signposting where the Lua errors are stored. :oops:

I've noticed a couple of little things; you might be aware of them already:
It's currently possible to find out where invisible creatures are (and their identity) via a mouse-over each of the square where the monster is.

Thaumaturgy - I've had one view spell so far; it didnt do any damage.
Thaumaturgy - will force spells knock enemies back at some point?

Should shops auto-ID sold items? (A puce potion remains unidentified once sold) (discussion rather than bug)
How do you use items such as map of bree?
Is item merging implemented yet? (e.g. find a flask of oil / pebble / spell book / potion)
Some items on description (e.g. dark red mushroom) give their ID away (it can be consumed to confuse yourself)

Some shops are very generous:
You have sold 22 rounded pebbles 1d2 (+4 +4) for 43900 gold(!)

I've had a few more Lua errors, - if it's helpful I'll continue to report them here. I hope I've managed to match the error action and lua errors below, If not I apologise for my incompetence (TM) ;-)

manathrusting a quest monster (final monster for the quest killed but the quest remains un-cleared)
error = "Lua Error: /engine/interface/GameTargeting.lua:121: /engine/interface/ActorTalents.lua:162: /mod/class/Object.lua:347: bad argument #1 to 'format' (number expected, got nil)\
stack traceback:\
\9[C]: in function 'format'\
\9/mod/class/Object.lua:347: in function 'getName'\
\9/engine/Object.lua:49: in function 'resolve'\
\9/mod/class/Object.lua:122: in function 'resolve'\
\9/engine/Zone.lua:676: in function 'finishEntity'\
\9/engine/Zone.lua:417: in function 'makeEntity'\
\9/data/quests/princess.lua:194: in function 'kill_quest_mon'\
\9/data/maps/quests/princess-5.lua:48: in function 'check'\
\9/engine/interface/ActorLife.lua:91: in function 'die'\
\9/mod/class/Actor.lua:837: in function 'die'\
\9/mod/class/Actor.lua:651: 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:1808: in function </mod/spell-util.lua:1795>\
\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/GameTargeting.lua:121 fct\
At /engine/interface/GameTargeting.lua:127 targetMode\
At /engine/interface/GameTargeting.lua:196 plain\
At /engine/KeyCommand.lua:84 "
seen = true
reported = false

being cursed by a cave orc (not a lot seemed to happen at the time)
error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /mod/spell-util.lua:1731: attempt to index local 'who' (a number value)\
stack traceback:\
\9/mod/spell-util.lua:1731: in function 'curse_equipment'\
\9/mod/spell-util.lua:2476: in function </mod/spell-util.lua:2463>\
\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: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:562 "
seen = true
reported = false

Gained thaumaturgy spells
error = "Lua Error: /mod/class/Player.lua:1804: attempt to index local 'o' (a number value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1804 recalcMana\
At /mod/class/Player.lua:2172 recalcEverything\
At /mod/dialogs/SkillDialog.lua:446 fct\
At /engine/ui/Dialog.lua:198 fct\
At /engine/ui/Button.lua:63 fct\
At /engine/Mouse.lua:58 receiveMouse\
At /engine/Mouse.lua:98 delegate\
At /engine/ui/Dialog.lua:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false


I had a sequence of errors around identifying things, and in the wilderness; I don't know if the repeated errors were just from a savefile that had become corrupted... I've retired the character now

error = "Lua Error: /mod/class/Player.lua:1804: attempt to index local 'o' (a number value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1804 recalcMana\
At /mod/class/Player.lua:2172 recalcEverything\
At /mod/spell-util.lua:877 action\
At /mod/dialogs/ShowEquipInvenFloor.lua:73 use\
At /engine/dialogs/ShowEquipInven.lua:49 fct\
At /engine/ui/ListColumns.lua:463 onUse\
At /engine/ui/ListColumns.lua:135 fct\
At /engine/Mouse.lua:58 receiveMouse\
At /engine/Mouse.lua:98 delegate\
At /engine/ui/Dialog.lua:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false


error = "Lua Error: /mod/class/Player.lua:1804: attempt to index local 'o' (a number value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1804 recalcMana\
At /mod/class/Player.lua:2172 recalcEverything\
At /mod/class/Game.lua:478 changeLevel\
At /mod/class/Game.lua:1046 CHANGE_LEVEL\
At /mod/class/Player.lua:240 callback\
At /mod/util.lua:762 check_threshold\
At /mod/class/Player.lua:219 incFood\
At /mod/class/Player.lua:200 regenFood\
At [string \"return function(self) self:regenMana() self.p...\"]:1 regenResources\
At /mod/class/Player.lua:1653 regenResources\
At /mod/class/Actor.lua:230 actBase\
At /engine/GameEnergyBased.lua:119 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:562 "
seen = true
reported = false


error = "Lua Error: /mod/class/Player.lua:1804: attempt to index local 'o' (a number value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1804 recalcMana\
At /mod/class/Player.lua:2172 recalcEverything\
At /mod/class/Game.lua:478 changeLevel\
At /mod/class/Game.lua:1046 \
At /engine/KeyBind.lua:242 "
seen = true
reported = false


error = "Lua Error: /mod/class/Player.lua:1804: attempt to index local 'o' (a number value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1804 recalcMana\
At /mod/class/Player.lua:2172 recalcEverything\
At /mod/class/Player.lua:1533 doTakeoff\
At /mod/class/Player.lua:1211 action\
At /engine/dialogs/ShowEquipment.lua:83 use\
At /engine/dialogs/ShowEquipment.lua:45 fct\
At /engine/ui/ListColumns.lua:463 onUse\
At /engine/ui/ListColumns.lua:135 fct\
At /engine/Mouse.lua:58 receiveMouse\
At /engine/Mouse.lua:98 delegate\
At /engine/ui/Dialog.lua:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false


error = "Lua Error: /mod/class/Player.lua:1804: attempt to index local 'o' (a number value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1804 recalcMana\
At /mod/class/Player.lua:2172 recalcEverything\
At /mod/class/Game.lua:478 changeLevel\
At /mod/class/Game.lua:1042 \
At /engine/KeyBind.lua:242 "
seen = true
reported = false

error = "Lua Error: /mod/class/Player.lua:1522: /mod/class/Player.lua:1804: attempt to index local 'o' (a number value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Player.lua:1522 doWear\
At /mod/class/Player.lua:1203 action\
At /mod/dialogs/ShowInvenFloor.lua:91 use\
At /mod/dialogs/ShowInvenFloor.lua:62 fct\
At /engine/ui/ListColumns.lua:463 onUse\
At /engine/ui/ListColumns.lua:135 fct\
At /engine/Mouse.lua:58 receiveMouse\
At /engine/Mouse.lua:98 delegate\
At /engine/ui/Dialog.lua:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false

It's awesome that you're continuing to work on this :D

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

#408 Post by Zizzo »

Thorondor wrote:It's currently possible to find out where invisible creatures are (and their identity) via a mouse-over each of the square where the monster is.
Hmm, I don't recall what T4 does in this case. That can probably be fixed; I'll just need to do some digging.
Thorondor wrote:Thaumaturgy - I've had one view spell so far; it didnt do any damage.
Odd. I'll investigate.
Thorondor wrote:Thaumaturgy - will force spells knock enemies back at some point?
They don't already? [sound F/X: source diving] They're supposed to. I'll investigate.
Thorondor wrote:Should shops auto-ID sold items? (A puce potion remains unidentified once sold) (discussion rather than bug)
[sound F/X: source diving] Yes, it should, and that is a bug. Give me a little time on that one.
Thorondor wrote:How do you use items such as map of bree?
Those aren't implemented yet. I'm punting that for now until I've finished up Alchemy for the next release.
Thorondor wrote:Is item merging implemented yet? (e.g. find a flask of oil / pebble / spell book / potion)
Oh, right, there were bugs related to stacking. I took a stab at fixing that on trunk; I'll go ahead and merge that back onto the release branch.
Thorondor wrote:Some items on description (e.g. dark red mushroom) give their ID away (it can be consumed to confuse yourself)
[sound F/X: source diving] Ah, yes, bit of misplaced code: the description of on-eat effects for food was supposed to happen inside an if-identified check. Should be fixed in SVN.
Thorondor wrote:Some shops are very generous:
You have sold 22 rounded pebbles 1d2 (+4 +4) for 43900 gold(!)
:shock: O-kaaay, I'll definitely look into that.
Thorondor wrote:I've had a few more Lua errors, - if it's helpful I'll continue to report them here.
Absolutely.
Thorondor wrote:manathrusting a quest monster (final monster for the quest killed but the quest remains un-cleared)
[sound F/X: source diving] Urk… it was trying to create the quest reward, and recording the object name; apparently it was something activateable, and it was missing some important bit of related information like the activation cost, which the object name code was expecting to be there. Unfortunately, there's no way to tell from the stack trace which object it was; I'll need to go digging for it.
Thorondor wrote:being cursed by a cave orc (not a lot seemed to happen at the time)
[sound F/X: source diving][sound F/X: forehead repeatly striking desk] That was just a stupid error in the curse-equipment code. Should be fixed in SVN.
Thorondor wrote:Gained thaumaturgy spells
[sound F/X: source diving] I can't believe I never tripped over that one. Typo in the mana-calculation code where it checks for gloves that reduce max mana. Should be fixed in SVN.
Thorondor wrote:I had a sequence of errors around identifying things, and in the wilderness; I don't know if the repeated errors were just from a savefile that had become corrupted... I've retired the character now
Yeah, that's just the same error cropping up in multiple contexts.
Thorondor wrote:It's awesome that you're continuing to work on this :D
*blush* [bows]
"Blessed are the yeeks, for they shall inherit Arda..."

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

#409 Post by Zizzo »

Thorondor wrote:Thaumaturgy - I've had one view spell so far; it didnt do any damage.
Okay, this turned out to be a stupid typo, which was preventing the spell damage type from getting through to the actual damage-dealing code. Fixed in SVN.
Thorondor wrote:Thaumaturgy - will force spells knock enemies back at some point?
Wasn't getting knock-back handling quite right in this case. Actor:knockback() needs the source location so that it knows which direction to knock the target "back" from; I was giving it the target location instead, which didn't help. :oops: This would also have messed up the Tidal Wave spell. Fixed in SVN.
Thorondor wrote:Should shops auto-ID sold items? (A puce potion remains unidentified once sold) (discussion rather than bug)
This is now implemented in SVN. And while I was in the neighborhood, I also arranged for stores (and homes and mathom-houses) to sort their stock in the same order as the player's inventory sort order. I shudder to imagine what order they were listing stuff in before… :oops:
Zizzo wrote:
Thorondor wrote:manathrusting a quest monster (final monster for the quest killed but the quest remains un-cleared)
[sound F/X: source diving] Urk… it was trying to create the quest reward, and recording the object name; apparently it was something activateable, and it was missing some important bit of related information like the activation cost, which the object name code was expecting to be there. Unfortunately, there's no way to tell from the stack trace which object it was; I'll need to go digging for it.
[sound F/X: source diving] Okay, I think I've tracked it down; it was probably either a Dragon horn or a weapon of the Thunderlords. Both should now be fixed in SVN.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: Porting ToME2 to the T4 engine

#410 Post by Thorondor »

Hi Zizzo,

Many thanks for looking into the previous bits n bobs. There's a couple more below :)

A hobbit rogue (Tulkas follower) rescued a princess and his measly reward was a sling (+0,+0). When I tried to wield it, an lua error arrived:

error = "Lua Error: /mod/class/Player.lua:1522: /mod/class/Player.lua:2041: attempt to index global 'p' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Player.lua:1522 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:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false


I then tried to wield a pick and got another error though I couldn't bring up that log to put in.
Venturing onto the next level I killed a white harpy and the following appeared.

error = "Lua Error: /mod/class/Player.lua:2041: attempt to index global 'p' (a nil value)\
At [C]:-1 __index\
At /mod/class/Player.lua:2041 applyFlags\
At /mod/class/Player.lua:2136 recalcEverything\
At /mod/class/Player.lua:1677 incPiety\
At /data/birth/gods.lua:261 cbs\
At /mod/class/interface/ActorCallbacks.lua:97 all_cbs\
At /mod/class/interface/ActorCallbacks.lua:151 fireCallbacks\
At /mod/class/Actor.lua:848 die\
At /mod/class/Actor.lua:651 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:947 attack\
At /mod/class/Actor.lua:520 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:827 move_or_scroll\
At /mod/class/Game.lua:842 \
At /engine/KeyBind.lua:230 "
seen = true
reported = false


Moving on a few squares another error arrived:
error = "Lua Error: /mod/class/Player.lua:2041: attempt to index global 'p' (a nil value)\
At [C]:-1 __index\
At /mod/class/Player.lua:2041 applyFlags\
At /mod/class/Player.lua:2136 recalcEverything\
At /mod/class/Player.lua:1677 incPiety\
At /mod/class/Player.lua:1665 regenResources\
At /mod/class/Actor.lua:230 actBase\
At /engine/GameEnergyBased.lua:119 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:562 "
seen = true
reported = false


I presumed it was basically a corrupted character file now so retired the hardworking hobbit to the land of second breakfasts

I started a woodelf archer - Manwe. - multiple Lua errors on startup so character abandoned.

error = "Lua Error: /mod/class/Player.lua:2038: attempt to index global 'p' (a nil value)\
At [C]:-1 __index\
At /mod/class/Player.lua:2038 applyFlags\
At /mod/class/Player.lua:2136 recalcEverything\
At /mod/class/Game.lua:190 at_end\
At /mod/dialogs/Birther.lua:380 callback\
At /mod/dialogs/Birther.lua:340 checkNew\
At /mod/dialogs/Birther.lua:382 atEnd\
At /mod/dialogs/Birther.lua:119 fct\
At /engine/ui/Button.lua:63 fct\
At /engine/Mouse.lua:58 receiveMouse\
At /engine/Mouse.lua:98 delegate\
At /engine/ui/Dialog.lua:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false


error = "Lua Error: /mod/class/Player.lua:199: attempt to perform arithmetic on field 'global_speed' (a nil value)\
At [C]:-1 __mul\
At /mod/class/Player.lua:199 regenFood\
At [string \"return function(self) self:regenMana() self.p...\"]:1 regenResources\
At /mod/class/Player.lua:1653 regenResources\
At /mod/class/Actor.lua:230 actBase\
At /engine/GameEnergyBased.lua:119 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:562 "
seen = true
reported = false

First movement of character - further lua error
error = "Lua Error: /mod/class/Player.lua:199: attempt to perform arithmetic on field 'global_speed' (a nil value)\
At [C]:-1 __mul\
At /mod/class/Player.lua:199 regenFood\
At [string \"return function(self) self:regenMana() self.p...\"]:1 regenResources\
At /mod/class/Player.lua:1653 regenResources\
At /mod/class/Actor.lua:230 actBase\
At /engine/GameEnergyBased.lua:119 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:562 "
seen = true
reported = false

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

#411 Post by Zizzo »

Zizzo wrote:
Thorondor wrote:It's currently possible to find out where invisible creatures are (and their identity) via a mouse-over each of the square where the monster is.
Hmm, I don't recall what T4 does in this case. That can probably be fixed; I'll just need to do some digging.
So, it turns out what T4 does in this case is not show a tooltip for an Actor that the player can't see. Which should have been obvious, I suppose. :oops: :wink: Fixed in SVN.
Thorondor wrote:A hobbit rogue (Tulkas follower) rescued a princess and his measly reward was a sling (+0,+0).
That's odd. I'll investigate.
Thorondor wrote:When I tried to wield it, an lua error arrived:

error = "Lua Error: /mod/class/Player.lua:1522: /mod/class/Player.lua:2041: attempt to index global 'p' (a nil value)\
[sound F/X: source diving] Ah, stupid copy/paste bug in applying the race-based extra-might flags. And Hobbits and Wood-Elves are exactly the two races that would have tripped over that; We Apologize for the Inconvenience.™ Fixed in SVN.

Thorondor wrote:I then tried to wield a pick and got another error though I couldn't bring up that log to put in.
At a guess, probably the same bug kicking in again; wielding something would probably have tickled that part of the code again. That probably explains the subsequent occurrences of the error too.
Thorondor wrote:I started a woodelf archer - Manwe. - multiple Lua errors on startup so character abandoned.

error = "Lua Error: /mod/class/Player.lua:2038: attempt to index global 'p' (a nil value)\
Yeah, same error again. :oops:
Thorondor wrote:error = "Lua Error: /mod/class/Player.lua:199: attempt to perform arithmetic on field 'global_speed' (a nil value)\
[sound F/X: source diving] Hmm… I think this bug is just a side effect of the previous bug; the player setup code crapped out when it tripped over trying to apply the extra-might flag and never got around to setting up global speed, which in turn tripped up downstream code that was expecting it to be set up. I think that will stop happening now that the previous bug is fixed, but if not, let me know.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: Porting ToME2 to the T4 engine

#412 Post by Thorondor »

Thanks :)

I tried starting a High-elf ranger:
error = "Lua Error: /mod/dialogs/Birther.lua:125: attempt to call method 'clearDescriptors' (a nil value)\
At [C]:-1 clearDescriptors\
At /mod/dialogs/Birther.lua:125 fct\
At /engine/ui/Button.lua:63 fct\
At /engine/Mouse.lua:58 receiveMouse\
At /engine/Mouse.lua:98 delegate\
At /engine/ui/Dialog.lua:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false

Dunedan ranger displayed as an "@"

Whilst trying to get some ill gotten gains by entering the black market...
error = "Lua Error: /data/general/objects/potions.lua:1745: attempt to index field 'name' (a nil value)\
At [C]:-1 __index\
At /data/general/objects/potions.lua:1745 getval\
At /data/general/objects/bases.lua:1102 getval\
At /mod/class/Object.lua:868 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:827 move_or_scroll\
At /mod/class/Game.lua:848 \
At /engine/KeyBind.lua:230 "
seen = true
reported = false

Another quest reward sling +0,+0

Ammo creation for shots didn't seem to work: It said "You create 29 expoding pebbles 1d2 (+5,+4), ??? no ammo created"

Forging arrows from junk worked - got some exploding arrows; when I fired at a hapless mushroom patch
error = "Lua Error: /engine/interface/GameTargeting.lua:121: /engine/interface/ActorTalents.lua:162: /mod/spell-util.lua:1854: attempt to call method 'project' (a nil value)\
stack traceback:\
\9/mod/spell-util.lua:1854: in function 'ball_spell'\
\9/mod/class/interface/Combat.lua:194: in function 'ammoExplode'\
\9/data/damage_types.lua:2271: in function 'side_effects_post'\
\9/data/damage_types.lua:218: in function 'projector'\
\9/engine/interface/ActorProject.lua:219: in function 'project'\
\9/data/talents/objects/archery.lua:92: in function </data/talents/objects/archery.lua:55>\
\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/GameTargeting.lua:121 fct\
At /engine/interface/GameTargeting.lua:127 targetMode\
At /engine/interface/GameTargeting.lua:196 plain\
At /engine/KeyCommand.lua:84 "
seen = true
reported = false

This error repeated each time the exploding arrows were used so presume it's a feature of the explosion

Some stores sell cursed items...

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

#413 Post by Zizzo »

Thorondor wrote:I tried starting a High-elf ranger:
error = "Lua Error: /mod/dialogs/Birther.lua:125: attempt to call method 'clearDescriptors' (a nil value)\
[sound F/X: source diving] …Huh. Apparently I never actually implemented the "Clear settings" button on the character creation dialog. That's covered now in SVN.
Thorondor wrote:Dunedan ranger displayed as an "@"
You mean with the "Use special ASCII symbols for player" option? Yeah, Dúnedain aren't one of the player races that have a special symbol with that option; I figured they're close enough to human that they can go with the default white '@'. [I could be convinced otherwise, though, if you had something particular in mind…?]
Thorondor wrote:Whilst trying to get some ill gotten gains by entering the black market...
error = "Lua Error: /data/general/objects/potions.lua:1745: attempt to index field 'name' (a nil value)\
[sound F/X: source diving] Ah, a Morphic Oil… oh, wait, the activation description is wrong; it's expecting the actual mimcry form data when what it's got is the form name by which it can look up the data. I got that right everywhere else; how did I screw it up there? :oops: Fixed in SVN.
Thorondor wrote:Another quest reward sling +0,+0
:? …Okay, that's starting to get weird. About what depth are you getting these?
Thorondor wrote:Ammo creation for shots didn't seem to work: It said "You create 29 expoding pebbles 1d2 (+5,+4), ??? no ammo created"
[sound F/X: testing][sound F/X: forehead repeatedly striking desk] Fixed in SVN. :oops: :oops:
Thorondor wrote:Forging arrows from junk worked - got some exploding arrows; when I fired at a hapless mushroom patch
error = "Lua Error: /engine/interface/GameTargeting.lua:121: /engine/interface/ActorTalents.lua:162: /mod/spell-util.lua:1854: attempt to call method 'project' (a nil value)\
[sound F/X: source diving] *blink* …oh, right, objects don't have a :project() method. :? I must have been passing in the ammo as the projection source in hopes of using its name in the log message. Well, since that obviously won't work, I've hacked together another way to pass the ammo's name through to the projector, so that should (knock on wood…) be fixed in SVN. [Hmm, now that I look at it, I bet I could reuse that hook to do things like "Player's Manathrust hits the Kobold for 10 mana damage." Interesting… :twisted: :mrgreen: ]
Thorondor wrote:Some stores sell cursed items...
[sound F/X: source diving] Ah, that's very old code, back from before I'd properly implemented object prices (T2 stores detect cursed or otherwise worthless objects internally by checking for zero or negative price). Should be fixed in SVN.
"Blessed are the yeeks, for they shall inherit Arda..."

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

#414 Post by Zizzo »

Zizzo wrote:
Thorondor wrote:Another quest reward sling +0,+0
:? …Okay, that's starting to get weird. About what depth are you getting these?
Never mind, found it. :oops: :oops: :oops: The definitions of slings, bows and crossbows were missing a crucial resolver that, among other things, applies egos. Fixed in SVN. We Apologize for the Inconvenience.™
"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

#415 Post by Steven Aus »

Is it still version 0.2.6? Also, you might want to post the SVN link you're working on at the moment in case anyone new comes along.

Also, I visited the shop represented by the '9' digit, and the game hung.

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

#416 Post by Zizzo »

Steven Aus wrote:Is it still version 0.2.6?
Yeah, We Apologize for the Delay.™ I think I'm mostly done with the next release (famous last words…), but I've hit a bit of a roadblock at the moment: the inventory juggling I need to do in the artifact creation dialog isn't really going to work the way I was planning to do it. I'll need to think about it a little harder.
Steven Aus wrote:Also, you might want to post the SVN link you're working on at the moment in case anyone new comes along.
Ah, good point. Currently, bugfixes are being committed into the 0.2.6 release branch; if you have Subversion, you can check out a copy of this branch under your game/modules/ directory and use it in place of the .team file, which will get you quicker access to bugfixes.
Steven Aus wrote:Also, I visited the shop represented by the '9' digit, and the game hung.
'9' is the Black Market… ah, crap, that means it could be almost any object that it's choking on. I don't suppose you got a stack trace?
"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

#417 Post by Steven Aus »

I think 7 is the black market. No, I mean the Book Store (and it hung again when I used it again in another game).

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

#418 Post by Zizzo »

Steven Aus wrote:I think 7 is the black market. No, I mean the Book Store (and it hung again when I used it again in another game).
Gah! You're right, of course. Far too late at night to be posting coherently… :oops: Well, that narrows it down to books, at least… [sound F/X: testing] ah, found it: small glitch in the new price calculation code that was causing spellbooks to have a perceived price of zero — which, as mentioned above, the store stocking code treats as a worthless item, so it was spinning in loops fruitlessly trying to find anything it could stock. Fixed in SVN; We Apologize for the Inconvenience.™
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: Porting ToME2 to the T4 engine

#419 Post by Thorondor »

Hi Zizzo,

Sorry i didn't reply RE a couple of your comments earlier; my brain is getting old and forgetful..
- RE an artifact that auto-identifies - yes helm of knowledge was the one I was thinking of. I just think that non-magic users have a harder time than mages in this respect and waiting to ID items is very tedious. I also didn't know Gothmog's set provided ID. :shock:

Shops:
As you mentioned T4 shops only change a few times in the game. As there are consumables (light source, food, potions, scrolls of *blah*) at some point I wondered whether each shop could change its stock at e.g. midnight or something like that, just to ensure that certain consumables get restocked, and if a shop (for whatever reason) that would usually stock scrolls of recall didn't have a paper delivery that day it wouldn't be a game damaging issue; likewise no available digging tool. This would also ensure that the shops don't become too cluttered with dungeon loot.
In one of the variants I've played there are shops that you can pay for a service (e.g. enchant weapon etc); I wondered if you could (at some point) introduce a shop that identifies (/ add a function to the town mayor)

No rush / mandate to do the above; I can't imaging how much time this project is taking; alas I can't offer to help due to complete ineptitude at programming :(

Dunedan represented as an @ - absolutely grand; I still dream in ASCII anyway ;)

Couple of LUA bits and bobs:

Tried using an unidentified wand:
error = "Lua Error: /mod/class/Player.lua:1326: /data/talents/spell/temporal.lua:69: attempt to call global 'get_level' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Player.lua:1326 action\
At /mod/dialogs/ShowEquipInvenFloor.lua:73 use\
At /engine/dialogs/ShowEquipInven.lua:49 fct\
At /engine/ui/ListColumns.lua:463 onUse\
At /engine/ui/ListColumns.lua:135 fct\
At /engine/Mouse.lua:58 receiveMouse\
At /engine/Mouse.lua:98 delegate\
At /engine/ui/Dialog.lua:765 mouseEvent\
At /engine/ui/Dialog.lua:485 fct\
At /engine/Mouse.lua:58 "
seen = true
reported = false


I got bitten by a leech
error = "Lua Error: /mod/class/Actor.lua:1301: bad argument #1 to 'format' (number expected, got nil)\
At [C]:-1 \
At [C]:-1 format\
At /mod/class/Actor.lua:1301 getTalentFullDescription\
At /data/hotkey-icons.lua:86 tooltipText\
At /mod/class/HotkeysIconsDisplay.lua:189 onMouse\
At /mod/class/Game.lua:1272 fct\
At /engine/Mouse.lua:78 "
seen = true
reported = false

Keep up the good work :D

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

#420 Post by Zizzo »

Thorondor wrote:- RE an artifact that auto-identifies - yes helm of knowledge was the one I was thinking of. I just think that non-magic users have a harder time than mages in this respect and waiting to ID items is very tedious. I also didn't know Gothmog's set provided ID. :shock:
Yeah, I think I've only had one character ever get the full Gothmog set, so I don't doubt it's not common knowledge. :wink: For other non-spellcasting characters, my usual strategy is to pick up the Stone of Lore in Orc Town in Moria, or sometimes a Rod of Perception if I can find a suitable rod tip and have decent Magic-Device skill.
Thorondor wrote:As you mentioned T4 shops only change a few times in the game. As there are consumables (light source, food, potions, scrolls of *blah*) at some point I wondered whether each shop could change its stock at e.g. midnight or something like that, just to ensure that certain consumables get restocked, and if a shop (for whatever reason) that would usually stock scrolls of recall didn't have a paper delivery that day it wouldn't be a game damaging issue; likewise no available digging tool. This would also ensure that the shops don't become too cluttered with dungeon loot.
IINM, in the base game stores are supposed to restock every 2000 normal-speed turns. And looking more closely at the store code, I'm no longer entirely certain that I've got that implemented properly… :? As I said earlier, I'm certainly open to having fixed items in certain stores (in fact, I think I've currently got a fixed Brass Lantern in the General Store); I'd just want player feedback about how many of what items in which stores.
Thorondor wrote:In one of the variants I've played there are shops that you can pay for a service (e.g. enchant weapon etc); I wondered if you could (at some point) introduce a shop that identifies (/ add a function to the town mayor)
Yeah, some of those are present in the base game; at least I know there are stores where you can get ammo enchanted or staffs recharged. And I'm fairly certain there's at least one store that will identify your pack for you; I'm trying to think it's the Wizards Spire in Lothlorien, where you can get the fireproofing quest (that service was on the 'i' key, and I kept tripping over it trying to check my inventory :? ). Unfortunately, none of those are implemented yet. :oops: The *ID* service at Galadriel's Mirror is implemented, though.
Thorondor wrote:Tried using an unidentified wand:
error = "Lua Error: /mod/class/Player.lua:1326: /data/talents/spell/temporal.lua:69: attempt to call global 'get_level' (a nil value)\
[sound F/X: source diving] Ah, a Wand of Magelock. Magelock is one of the last remaining unimplemented spells, and I think it would have stopped you if you'd tried to cast it from a spellbook, but apparently I forgot to add checks for that to wands and staffs. :oops: A quick search, though, indicates that it's the only unimplemented spell left that can appear on wands or staffs, and it looks like we have enough infrastructure in place now to at least mostly implement it (glyphs of warding don't actually do anything yet… :? ), so that's the easy fix. That's now in SVN.
Thorondor wrote:I got bitten by a leech
error = "Lua Error: /mod/class/Actor.lua:1301: bad argument #1 to 'format' (number expected, got nil)\
[sound F/X: source diving] Hmm, it looks like you moused over the icon for a spell and it choked while trying to build the tooltip because it was missing spell level information somehow. I don't suppose you remember which icon you moused over? In the meantime, I've checked in a couple tweaks to try to make that case recover more gracefully. If any of your spell tooltips ever say "??? Spell level info missing" in bright red, let me know. :wink:
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply