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

#481 Post by Zizzo »

Thorondor wrote:Hi Zizzo
Thanks for the new patch. It's awesome you continue to work on it.
[bows]
Thorondor wrote:One little thing I noticed: selling stacks of items might be confusing the shopkeepers:
Sell 1 arrow of slay undead for 247 gold
sell 2 arrows of slay undead for 247 gold
etc etc
sell 24 arrows of slay undead for 253 gold
Doesn't warrant an emergency bug patch though, as it's not a game breaking bug
Dangit, I was sure I had it right this time… I'll investigate.
Thorondor wrote:When you are doing the automizer, are you thinking about including a 'don't destroy' command (e.g. spellbooks getting !d!v!k)
Hmm… on re-reading, there seem to be multiple things you might be talking about here. If you mean the ability to add an ask-before-dropping/destroying/etc. annotation to an object, then yes, that is in my future plans, although instead of embedding it in the object inscription, I plan to make it configurable via the use-item dialog. The notify-on-recharge functionality for rods et al. (corresponding to T2's "!!" inscription annotation) should already be implented, as an example of what I'm going for.

Ooh, now that you mention it, though, since the inscriptions you mention are frequently added by the automatizer, I'll need to make these new configuration settings settable via automatizer rule. [takes notes…]
Thorondor wrote:Three other questions... I have a character with Legendary (7) disarming who regularly takes 100-200 turns to open a locked door. Is this working normally?
No idea; I'll investigate.
Thorondor wrote:Have you activated 'destruction' in Thaumaturgy?
[sound F/X: source diving] Not yet. Doing that looks like it will require some deep wizardry in the projection code, so that may take a while.
Thorondor wrote:Is there a spellbook shop in Gondolin?
[sound F/X: source diving] No, neither in the original T2 Gondolin map or this module. Should be easy enough to add one with an addon, though. :wink:
Thorondor wrote:On a different note, when you do something that gives heroism modifier, it adds time to the heroism counter. The current character I have will be a hero for 500 turns. Am not complaining though...
[sound F/X: source diving] Not everywhere, it looks like; Manwe's Call, at least, overwrites the current duration with its new duration. I guess you were casting Ent's Potion repeatedly, or quaffing lots of Potions of Heroism? I've tried to track how the T2 code computes duration changes in these cases, so this shouldn't be anything that wasn't possible in T2.
Thorondor wrote:Also, it's still occasionally possible to know what type of invisible creature you've hit e.g. Aragorn hits the clear centipede, something hits aragorn
Ah, must have missed some spots. I'll go hunting for them…
Thorondor wrote:Sell an arrow (exploding) 1d4 1d4 (+1,+6) for 1962 gold pieces :D
When trying to sell a stack of these, the maximum value offered is (for this shop) 20k gold pieces. I think in original 2.35 it wouldn't "cap" the price
Hmm, now that you mention it, that does sound familiar. I'll investigate.
Thorondor wrote:No idea what this error means. Was in Orc Cave, autoexploring and saw some rotting corpses.

error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /mod/util.lua:298: attempt to call field 'findFreeGrids' (a nil value)\
[sound F/X: source diving] It means that some NPC tried to summon something, and it tripped over a stupid typo in the code from v0.3.4 that prevents summons from landing on a glyph of warding. Fixed in SVN.

And I think this warrants an emergency bug fix:

Release 0.3.6 "Future Proof"

This release picks up a few bugfixes from trunk:
  • Stupid typo that would have broken effects that prevent you from dying.
  • Small fix to the map generator used for towns, giving it access to the various features I had to add to the engine's Static map generator to properly generate assorted T2 fixed-map levels. This also makes possible a new addon, Gondolin Book Store, as requested by Thorondor above. :mrgreen:
  • Stupid typo that I think would have applied terrain-changing effects like destroying walls/doors twice.
  • Stupid typo (noticing a pattern here? :oops: ) in the implementation of glyphs of warding.
And some random unrelated features from trunk:
  • Sort of a documentation bug: in the previous version's release notes, I claimed that drowning in deep water would kick in at half your maximum unencumbered weight. Turns out I was wrong; it kicks in at your unencumbered max. [The T2 code is a bit confusing in this; it seems to compute double unencumbered max weight everywhere and then divide in half…] The code was doing the right thing all along, at least. We Apologize for the Confusion.™ :oops:
  • T2 players of Spectre characters will know that Spectres' pass-wall power is not without cost: up to 11hp damage per turn (depending on your level) while in a wall or similar solid terrain (unless you have some other ability to enter it, like tree walking). We weren't doing that before, but we are now. :twisted:
  • Also not implemented before: some temporary effects, like Poison or Cut (or the aforementioned In Wall effect :wink: ), will prevent normal life regeneration.
  • Not so much a feature as forward compatibility: a small change to mod.class.Player to accommodate upcoming changes to actor energy usage in the 1.6 engine.
I have a sinking suspicion that I introduced some bugs in that Spectre code, frankly… :oops: As always, here is a good place to report bugs.

And as always, the .team file for the release is available from my site, along with the Subversion repo and WebSVN front-end thereto. And for those of you following along on SVN, the 0.3.6 release branch will get bug fixes for all the aforementioned inevitable bugs.

And since having them scattered throughout the thread is sort of useless, here's a reference list of all the T2 addons I've released:
  • Alchemic Arcanorum (current release 1.0.0): Starts Alchemist characters with an Alchemic Arcanorum object from my old ToME:Arcanorum T2 module, which can be used to store and extract essences.
  • Gender Parity (current release 1.0.1): Modifies assorted NPCs that don't particularly have to be male or female so that they can be either randomly.
  • Go to Landmark (current release 1.0.0): 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.
  • (new!) Gondolin Book Store (current release 1.0.0): Also as requested by Thorondor. :wink: Adds a book store to Gondolin (hence the name…).
In the meantime, the automatizer dialog is drifting into some really complicated UI hackery. :shock: Although I'm probably more proud of my new radio buttons than I ought to be: :wink:
quick-rule.png
quick-rule.png (62.49 KiB) Viewed 28703 times
Last edited by Zizzo on Fri Dec 21, 2018 12:18 am, edited 1 time in total.
"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

#482 Post by Thorondor »

Thanks Zizzo
I upgraded to the new patch, and character health regeneration seems to have stopped...
Also, an area thamaturgy spell (which all seem to have quite high fail rates relative to what I remember 18/50 Int) doesn't use any mana :)

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

#483 Post by Zizzo »

Thorondor wrote:Thanks Zizzo
I upgraded to the new patch, and character health regeneration seems to have stopped...
[sound F/X: source diving] …right, zero and nil are not the same thing in Lua. [sound F/X: forehead repeatedly striking desk] I've uploaded a replacement .team to fix the problem; for an existing character, putting on or taking off some equipment should be enough to clean up the internals appropriately. We Apologize for the Error.™ :oops:
Thorondor wrote:Also, an area thamaturgy spell (which all seem to have quite high fail rates relative to what I remember 18/50 Int) doesn't use any mana :)
Is this new? I'll investigate.
"Blessed are the yeeks, for they shall inherit Arda..."

BugReporter
Higher
Posts: 62
Joined: Wed Jun 06, 2018 10:53 am

Re: Porting ToME2 to the T4 engine

#484 Post by BugReporter »

It looks like Gondolin Book Store is unavailable. Both links (one in release notes, another one in addons list) lead to 404 Not Found. I think there is a typo

Code: Select all

http://www.killerbunnies.org/angband/tome2-gond-book.teaa
instead of

Code: Select all

http://www.killerbunnies.org/angband/tome2-gond_book.teaa

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

#485 Post by Zizzo »

BugReporter wrote:It looks like Gondolin Book Store is unavailable. Both links (one in release notes, another one in addons list) lead to 404 Not Found. I think there is a typo

Code: Select all

http://www.killerbunnies.org/angband/tome2-gond-book.teaa
instead of

Code: Select all

http://www.killerbunnies.org/angband/tome2-gond_book.teaa
[sound F/X: forehead repeatedly striking desk] Fixed both links. 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

#486 Post by Thorondor »

Hi Zizzo
Thanks for the latest update
Enjoying the playtesting (when time allows...)

Previously I mentioned about inscribing objects; - meant both for the benefit of the automiser + also to stop me leaving my stack of healing / teleport / recall scrolls etc. Might not be easy to implement so no worries; I just need to be careful!

A few observations:

One merchant kindly offered 390gp for an unID'd (average) ring armour, then put it on sale for 366.

Selling one of a stack of unID'd ammo doesn't ID the stack

It's also possible to offer to sell 0 of a stack and be paid for it!

Achievement of gold hoarder and exterminator granted every time character is loaded

Selling a stack of wooden torches, 2 gp each. Sell a stack of 6 wooden torches, 10gp. Seems likely that there's a rounding issue in the sales

As a long-term thing, is it likely to be possible to put a link from a thaumaturgy spell to a hot-key? (or is it already implemented and I just need to know how?)

Selling an un-ID'd mushroom of hallucination to general store will result in item being available for sale for 1gp

Bashing doors doesn't work

error = "Lua Error: /mod/class/Game.lua:927: /engine/interface/ActorTemporaryEffects.lua:109: attempt to compare table with number\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Game.lua:927 do_in_coroutine\
At /mod/class/Game.lua:1034 \
At /engine/KeyBind.lua:230 "
seen = true
reported = false


No idea what this error was... - apologies!
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:59 \
At [C]:-1 calc_circle\
At /engine/interface/ActorFOV.lua:58 computeFOV\
At /mod/class/Player.lua:599 playerFOV\
At /mod/class/Game.lua:676 "
seen = true
reported = false

Is phase door >30 level always meant to leave a void jumpgate? - doesn't seem to do that always at the moment.

If a void jumpgate is adjacent to the only open space by a locked door it becomes impossible to open the door as far as I know, as attempting to open the door (or search for a door if you think there's on there) counts as a 'rest' turn.

Thanks again :)

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

Re: Porting ToME2 to the T4 engine

#487 Post by Thorondor »

Have just been confused whilst wearing hat of Thengel (which grants confusion resist). Was blind at the time...
The rng is still trying to come to terms with me having boots of speed and a shield of reflection :lol:

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

#488 Post by Zizzo »

Thorondor wrote:Hi Zizzo
Thanks for the latest update
Enjoying the playtesting (when time allows...)
`S cool. Speaking of time allowing, I may not be able to cover all your questions tonight; We Apologize for the Inconvenience™:
Thorondor wrote:Previously I mentioned about inscribing objects; - meant both for the benefit of the automiser + also to stop me leaving my stack of healing / teleport / recall scrolls etc. Might not be easy to implement so no worries; I just need to be careful!
That is planned eventually. I've got it stubbed out in trunk but not implemented.
Thorondor wrote:Selling one of a stack of unID'd ammo doesn't ID the stack
What? I remember fixing that… [sound F/X: source diving][sound F/X: forehead repeatedly striking desk] In retrospect, it may have been a mistake to define Object:identify() to take a parameter; I keep accidentally calling obj:identify() [which effectively un-ID's the object] when I mean obj:identify(true). Fixed in SVN.
Thorondor wrote:It's also possible to offer to sell 0 of a stack and be paid for it!
[sound F/X: source diving] Hmm, should probably enforce a minimum quantity of 1 on that dialog. Fixed in SVN.
Thorondor wrote:Achievement of gold hoarder and exterminator granted every time character is loaded
? The engine's achievement code is supposed to check if a character has already gained an achievement. I'll investigate.
Thorondor wrote:Selling a stack of wooden torches, 2 gp each. Sell a stack of 6 wooden torches, 10gp. Seems likely that there's a rounding issue in the sales
[sound F/X: testing] Yeah, there are some invisible price modifiers being applied there: modifications from Charisma, the store owner's internal "inflation" parameter, and a racial adjustment based on the store owner's race vs. the players. So for instance, my human test character with a 9 Charisma (+14% adjustment) is selling to Bilbo the Friendly in the general store (+8% inflation adjustment, +0% racial adjustment for hobbit vs. human), for a total adjustment of 22%, applied negatively for selling, so my stack of 5 torches at 2gp apiece sells for a total of 7.8gp, rounded to nearest integer as 8gp. The current code applies this adjustment to the final price; I'll have to check whether the T2 code applies it per unit.
Thorondor wrote:As a long-term thing, is it likely to be possible to put a link from a thaumaturgy spell to a hot-key? (or is it already implemented and I just need to know how?)
That can be done from the Use Thaumaturgy dialog, the same way as for talents from the Use Talents dialog. I probably decided against automatically assigning hotkeys on the grounds that (a) you eventually get a lot more thaumaturgy spells than you have available hotkeys, and (b) most of them are pretty useless anyway.
Thorondor wrote:Selling an un-ID'd mushroom of hallucination to general store will result in item being available for sale for 1gp
I think that's original T2 behavior (can any veterans confirm or refute?). Presumably it's being sold as "recreational"? :wink:
Thorondor wrote:Bashing doors doesn't work

error = "Lua Error: /mod/class/Game.lua:927: /engine/interface/ActorTemporaryEffects.lua:109: attempt to compare table with number\
[sound F/X: source diving] Ah, stupid typo applying the paralysis effect when "You are off-balance." Fixed in SVN.

Thorondor wrote:No idea what this error was... - apologies!
error = "Lua Error: [string \"return function(self, x, y, what, ...) local ...\"]:1: attempt to call method 'check' (a nil value)\
[sound F/X: source diving] …okay, that's weird. That's in the code that does the light effect around monster with the HAS_LITE flag, and AFAICT it's tripping over something on the map that isn't an Entity with a :check() method. I have no idea how something of that nature could get there, and I'm not even sure how to check for it…

Thorondor wrote:Is phase door >30 level always meant to leave a void jumpgate? - doesn't seem to do that always at the moment.
[sound F/X: source diving] Well, if either the starting or ending point is marked as "permanent" terrain (for our purposes, mostly stairs or existing jumpgates), Phase Door won't create new jumpgates. I vaguely recall T2 would create an unusable unpaired single jumpgate in that case, which struck me as inelegant.
Thorondor wrote:If a void jumpgate is adjacent to the only open space by a locked door it becomes impossible to open the door as far as I know, as attempting to open the door (or search for a door if you think there's on there) counts as a 'rest' turn.
Hmm, good point. That's a downside to hijacking the rest infrastructure for repeated commands. I'll have to think about how to work around that.
"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

#489 Post by Zizzo »

Thorondor wrote:Have just been confused whilst wearing hat of Thengel (which grants confusion resist). Was blind at the time...
The rng is still trying to come to terms with me having boots of speed and a shield of reflection :lol:
[sound F/X: source diving] An NPC casting Confuse on you? Wow, that's really old code. I was checking for resistance to the non-existent DamageType.CONFUSE instead of DamageType.CONFUSION; I guess that's what I thought I was going to call it? Fixed in SVN. (And for future reference, there are a few confusion effects that I think are meant to bypass resistances — the Stone of Lore's backfire effect, for instance, or the TY curse.)
Thorondor wrote:One merchant kindly offered 390gp for an unID'd (average) ring armour, then put it on sale for 366.
Hmm, now that I think of it, that sounds like something that came up in T2 at some point. The trick, as I recall, was that the price computation code was factoring the standard accuracy penalty for heavy armor into the price when the armor was ID'd but not when it is was unID'd. I don't remember whether that was ever fixed in T2; if it was, I suppose I should reproduce it…

Give me a little more time for an emergency bugfix release; I'm working on something special for you. :mrgreen:
"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

#490 Post by Zizzo »

Thorondor wrote:Achievement of gold hoarder and exterminator granted every time character is loaded
[sound F/X: source diving] …interesting. It turns out that persistent achievement information is stored in the player profile, and the T2 module doesn't define a profile. The relevant field in init.lua is profile_defs{}, for which I can't immediately find any documentation. T4's profile_defs{} table describes itself as "Define the fields that are sync'ed online, and how they are sync'ed", and we obviously can't sync anything online, so I'm hesitant to poke around in that area too recklessly.

Oh, and as a more general heads-up, it turns out that the WebSVN project is no longer updating, so I'm retiring the WebSVN front-end for my Subversion repository and replacing it with an SVN::Web front-end. We Apologize for the Convenience.™ :wink:
"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

#491 Post by Zizzo »

Okay, I think I've got everything ready to go (famous last words):

Release 0.3.7 "Casual Destruction"

I had a surprisingly large number of bugfixes piled up in trunk:
  • If you fail to bash a door, you can be knocked "off-balance", paralyzing you for 2+1d2 turns. I neglected to specify the "2+1d2 turns" part when implementing bashing doors. :oops:
  • Identify a stack of items when you sell one of them. ["Again?" "This time for sure!" :oops: ]
  • Enforce a minimum quantity of 1 when specifying how many of a stack of items to buy/sell. While I was in the neighborhood, also added a title and prompt to the dialog in question.
  • Was accidentally checking for resistance to the wrong damage type in the NPC Confuse spell. :oops:
  • The calculation of Bad/Fair/Good/etc. labeling of properties in the Miscellaneous Abilities section of the character sheet was doing scaling wrong, making it way too free in handing out "Legendary" descriptions for values that might only rate "Fair" or "Good". We Apologize for the Confusion.™ :oops:
  • Several more places where we needed to check whether the player could actually see an NPC before reporting its name.
  • Small typo that would have screwed up the message you should get when you take off an artifact that breaks a completed artifact set.
  • Small bug that I think might have caused objects destroyed out of wielded equipment not to clean up behind themselves.
  • As Thorondor reminded us above, T2 stores' price caps are applied per-unit rather than per-sale, so that selling, for instance, a large stack of ego ammo could exceed the store's cap in total. That should be implemented now.
  • More fixes to object names. Arrows (1d4) of Flame (1d4), for instance, is just not on. :oops:
  • Why did no one tell me that thaumaturgy spell hotkey icons were broken? :oops:
  • Fixed meteor-shower/"area" thaumaturgy spells so that the engine knows they succeeded and thus knows to spend mana and use a turn.
  • Small typo that I think would have broken Scrolls of *Destruction*.
  • Small typo in Razorback's activation code.
  • Spells like Dig or any of the usual wall creation/destruction spells kind of need to be followed up by recomputing what the player and nearby NPCs have line of sight to. That took a little poking around, but it's done now.
But I also had time for a few unrelated features:
  • By request, :mrgreen: we now implement the thuamaturgy "destruction" damage type. This includes some deep wizardry in the projection code, so that, for instance, the 'wall destruction' damage should now also have full effect rather than just peeling off one layer of walls, and the Dig spell should be able to go through multiple wall grids in a single shot as it does in T2.
  • In original T2, by default any grid that blocked movement also blocked projectiles and spell effects. This counterintuitively includes dark pits, though, which has tripped up my Geomancers once or twice. While working on the aforementioned deep projection wizardry, however, I discovered that the T-Engine also supports the suggestively named terrain flag 'pass_projectile', which looks like it might fix that wrinkle. I've added that flag to dark pits for now; if there are any other terrain types that need similar handling, we may be able to come up with something more general.
Since this is an emergency bugfix release, any bugs you may find were almost certainly already there and simply hadn't been found yet. :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.7 release branch will get bug fixes for all the aforementioned inevitable bugs.

And since having them scattered throughout the thread is sort of useless, here's a reference list of all the T2 addons I've released:
  • Alchemic Arcanorum (current release 1.0.0): Starts Alchemist characters with an Alchemic Arcanorum object from my old ToME:Arcanorum T2 module, which can be used to store and extract essences.
  • Gender Parity (current release 1.0.1): Modifies assorted NPCs that don't particularly have to be male or female so that they can be either randomly.
  • Go to Landmark (current release 1.0.0): 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…).
"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

#492 Post by Thorondor »

Cheers Zizzo
Been trapped in the Misty Mountains for an age...
Not got far yet; a couple of small error messages came up.
One was entering Thieves den, the other was attempting to wear equipment.

error = "Lua Error: /mod/class/Player.lua:1543: attempt to index field 'set_info' (a nil value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1543 artifactSetChanged\
At /mod/class/Player.lua:1676 onTakeoff\
At /engine/interface/ActorInventory.lua:293 removeObject\
At /data/zones/quest-bree-thieves/zone.lua:51 on_enter\
At /mod/class/Game.lua:517 changeLevel\
At /mod/class/Game.lua:1119 \
At /engine/KeyBind.lua:242 "
seen = true

error = "Lua Error: /mod/class/Player.lua:1649: /mod/class/Player.lua:1543: attempt to index field 'set_info' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Player.lua:1649 doWear\
At /mod/class/Player.lua:1314 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

reported = false

Interestingly my armour was removed (and deleted!) when entering the thieves quest :cry: :mrgreen:


edit: can't remove an non-cursed lantern
error = "Lua Error: /mod/class/Player.lua:1543: attempt to index field 'set_info' (a nil value)\
At [C]:-1 __index\
At /mod/class/Player.lua:1543 artifactSetChanged\
At /mod/class/Player.lua:1676 onTakeoff\
At /engine/interface/ActorInventory.lua:293 removeObject\
At /engine/interface/ActorInventory.lua:553 takeoffObject\
At /mod/class/Player.lua:1655 doTakeoff\
At /mod/class/Player.lua:1322 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

edit: lantern seems to have been deleted when I changed level.

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

#493 Post by Zizzo »

Thorondor wrote: error = "Lua Error: /mod/class/Player.lua:1543: attempt to index field 'set_info' (a nil value)\
[sound F/X: source diving] …That's odd; that part of the code shouldn't even come into play if the 'set_info' field isn't present. I'll investigate. I don't suppose you were wearing any artifacts at the time?
Thorondor wrote:Interestingly my armour was removed (and deleted!) when entering the thieves quest :cry: :mrgreen:
Well, "removed" is supposed to happen in the thieves quest; "deleted" was probably because the error interrupted stuff after the armor was removed and before it was put on the floor in the quest level.
"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

#494 Post by Zizzo »

Zizzo wrote: [sound F/X: source diving] …That's odd; that part of the code shouldn't even come into play if the 'set_info' field isn't present. I'll investigate. I don't suppose you were wearing any artifacts at the time?
Never mind, found it. :oops: :oops: :oops: And that's definitely going to be a showstopper, so it's time for an emergency bugfix release:

Release 0.3.8 "Set Theory"

Only a few bugfixes this time:
  • Catch some places where we should have been reporting the "original" source of damage from the Poisoned or Bleeding effect; e.g. "Poison from Poison Arrow Trap hits player for 1 poison damage" instead of "Player hits player for 1 poison damage".
  • So, yeah, it looks like my code for checking artifact sets and their completion and breakage as you wear and take off stuff was rather b0rken, and was just being papered over by a bug that I fixed in the previous release. This apparently broke almost every instance of taking off (and possibly also putting on) equipment. We Apologize for the Inconvenience.™ :oops:
  • While testing the preceding, I noticed that the engine's low-level inventory handling logs "Player wears" messages when you put something on, but doesn't log any "Player takes off" message when you take something off. That was easy enough to add. (I'd rather the log message read "Player wields" for weapons, of course, but that would require much deeper modification.)
And on a tangentially related note:
  • Pushing out v1.0.1 of the T2 module port of the Go to Landmark addon, which inherits the bugfix from the original addon that improves travel to impassable landmarks like stores.
Any other bugs in the code were probably being masked by that massive showstopper we fixed this time… :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.8 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 writing a tree editor GUI for automatizer rules is as annoyingly difficult as always, but I can show off a bit of deep wizardry in my dialog layout code:
dialog-modes.jpg
dialog-modes.jpg (197.52 KiB) Viewed 27878 times
Trust me, that's more difficult than it looks. :wink:
"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

#495 Post by Thorondor »

Zizzo wrote: so it's time for an emergency bugfix release:
Thanks very much :)
Zizzo wrote:Trust me, that's more difficult than it looks.
Looks very cool! Sorry the suggestion has likely cost you a lot of time but if it comes off it'd be an amazing improvement when deeper in the various dungeons. If I had the skills to do anything remotely like this, I'd make a patch so that any character called "Zizzo" would get a longsword 4d5{special} to start with, to commemorate your efforts :) :D

Post Reply