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

#466 Post by Zizzo »

Thorondor wrote:I was thinking about the 'wishlist' for next version; -
I wondered what you thought about bringing something like the bulwark into T2? Warriors can be a bit dull, and it'd be nice to have some combat skills. (something between a bulwark and a paladin character from Diablo). It's not a priority but wondered what you thought...
Depends what you have in mind. What would a Bulwark look like in T2? Something like that would probably be done in an addon, of course.
Thorondor wrote:I guess for me, things to think about for the next version would include automizer,
You don't think small, do you? :wink: What kind of interface would you want — something like the "rule builder" UI in T2, or editing an external file? (Bear in mind, I'm sorely tempted to make the automatizer file full-blown Lua code, for extreme flexibility.)
Thorondor wrote:strength being relevant to carrying capacity,
An, right, I do need to get around to implementing that.
Thorondor wrote:and ??potential for importing some T4 engine tiles / graphics though this is less important than getting the actual game to work as you intend.
(shrug) I assume adding a new tileset to T2 would be comparable to adding a new tileset to T4, and there are already a number of addons that do the latter. I'll grab one of them and investigate.
Thorondor wrote:I've found a couple of "features"...
icky green potion represented by a ! rather than a potion symbol
[sound F/X: source diving] Oops, forgot to add image info to the "fixed" object flavors when I added them to all the random flavors. Fixed in SVN.
Thorondor wrote:rock moles can walk through walls but not bore through them; - I think this is better than the original - seems daft that a small mole can destroy a large block of wall; though I suspect Balrogs (as / if / when this character gets to them should be able to destroy walls) please consider keeping it like this, - it's an improvement on the original.
[sound F/X: source diving] Ah, yes, the KILL_WALL actor flag isn't fully implemented yet, so it effectively behaves like PASS_WALL. Another thing I need to get around to implementing. I should investigate what T4 does with its tunneling NPCs…
Thorondor wrote:Magic shop in Lothlorien will buy cursed ring
Well, that's not good. Do you remember what kind of ring it was, and whether it was identified or pseudo-ID's as {cursed}?
Thorondor wrote:I went to sell 23 bolts (1d5)(1d5) (+2,+1) 15939 gold :)
:shock: :shock: :shock: 15939gp each? That's got to be a bug. [sound F/X: calculating] Oh, wait, 15939 is 23×693, and 693gp apiece is at least somewhat more reasonable for arrows like that (though still seems a little high…), so something is clearly double-counting. I'll investigate.
"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

#467 Post by Thorondor »

Hmmm I guess "The automizer" is a rather big topic :shock: , - the only thing i'd actually use it for is to destroy cursed stuff. Rather than doing a big thing on it (which is for convenience rather than actual gameplay) maybe implementing a 'destroy' object command to start would be more than sufficient.

Was there ever a quest at the end of barrow downs level 10? In Fury there was a wight tomb and in Theme there was a frightened hobbit quest, from which Thorin's key was obtained. If there wasn't one, would there have been a set of stairs from which you escape from the barrow downs? I can't really remember...

Is it possible to remove the requirement to de-equip a lantern before going to world map?

Mangy lepers / blubbering idiots / pitiful looking beggars / drunks : could these be made neutral (please - I don't like innocent townsfolk immolating themselves on my super firey cloak) Mercenaries / black market agents are fair game.

Would it be possible to stop auto-explore running into deep lava...?

The cursed ring was fully ID'd pre-sale.
It's possible to sell a wand of haste monster for 1gp

Ammo: I think it's the exploding flag that bumped the price up so much and ended up giving me a 1.7million payday....

I read a scroll of phase door whilst it was still on the ground, interestingly it cast the spell but didn't destroy the scroll. Now where's that scroll of *Acquirement*...
error = "Lua Error: /mod/class/Player.lua:1423: /mod/class/Player.lua:1258: attempt to index local 'oo' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Player.lua:1423 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


Tried recharging a staff of identify in Lothlorien:
error = "Lua Error: /mod/class/Actor.lua:1744: bad argument #1 to 'resume' (coroutine expected)\
At [C]:-1 \
At [C]:-1 resume\
At /mod/class/Actor.lua:1744 unload\
At /engine/Game.lua:430 unregisterDialog\
At /mod/dialogs/ShowEquipInvenFloor.lua:74 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/Actor.lua:1752: attempt to yield across C-call boundary\
At [C]:-1 \
At [C]:-1 yield\
At /mod/class/Actor.lua:1752 talentDialog\
At /mod/obj-util.lua:586 recharge\
At /mod/store-util.lua:223 action\
At /engine/dialogs/Chat.lua:97 use\
At /engine/dialogs/Chat.lua:50 fct\
At /engine/ui/VariableList.lua:124 onUse\
At /engine/ui/VariableList.lua:99 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 copied a spell to a staff. Once I'd done this, the following error appeared when trying to enter the magic store. I was able to enter the store when I dropped the staff.
error = "Lua Error: /mod/class/Object.lua:1100: module 'engine.ActorTalents' not found:\
\9no field package.preload['engine.ActorTalents']\
\9no file '/engine/ActorTalents.lua'\
At [C]:-1 \
At [C]:-1 require\
At /mod/class/Object.lua:1100 getPrice\
At /mod/class/Store.lua:108 getObjectPrice\
At /mod/class/Store.lua:261 descprice\
At /engine/dialogs/ShowStore.lua:143 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:518 interact\
At /mod/resolvers.lua:45 check\
At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
At /engine/Actor.lua:243 move\
At /mod/class/Actor.lua:462 move\
At /mod/class/Player.lua:289 moveDir\
At /mod/class/Player.lua:282 moveDir\
At /mod/class/Game.lua:912 move_or_scroll\
At /mod/class/Game.lua:939 \
At /engine/KeyBind.lua:230 "
seen = true
reported = false


The blank staff would have sold for 5700 which seems quite a good deal to me...
I'd wanted to see how much value added copying spells would be.

Tried to teleport to a different dungeon via thunderlords in Lothlorien
error = "Lua Error: /loader/init.lua:156: Error while loading base '/mod/dialogs/ResetRecall.lua':\
/mod/dialogs/ResetRecall.lua:57: '}' expected (to close '{' at line 52) near 'chars'\
At [C]:-1 \
At [C]:-1 error\
At /loader/init.lua:156 \
At [C]:-1 require\
At /data/chats/thunderlords-nest.lua:32 action\
At /engine/dialogs/Chat.lua:97 use\
At /engine/dialogs/Chat.lua:50 fct\
At /engine/ui/VariableList.lua:124 onUse\
At /engine/ui/VariableList.lua:99 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


Tried to get a staff of identity from Library in Minas Anor
error = "Lua Error: /data/chats/minas-anor-library.lua:41: attempt to index field 'store' (a nil value)\
At [C]:-1 __index\
At /data/chats/minas-anor-library.lua:41 action\
At /engine/dialogs/Chat.lua:97 use\
At /engine/dialogs/Chat.lua:50 fct\
At /engine/ui/VariableList.lua:124 onUse\
At /engine/ui/VariableList.lua:99 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

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

#468 Post by Zizzo »

Thorondor wrote:Hmmm I guess "The automizer" is a rather big topic :shock:
True, but I'm gonna have to do it eventually…
Thorondor wrote: Rather than doing a big thing on it (which is for convenience rather than actual gameplay) maybe implementing a 'destroy' object command to start would be more than sufficient.
I haven't implemented that yet? That's another thing for the TODO list, then…
Thorondor wrote:Was there ever a quest at the end of barrow downs level 10? In Fury there was a wight tomb and in Theme there was a frightened hobbit quest, from which Thorin's key was obtained.
Not in mainline T2, no. I did briefly consider putting boss monsters at the bottom of the Downs, Mirkwood and Mordor as a way of "completing" those subquests of the Dol Guldur quest, but that never panned out.
Thorondor wrote: If there wasn't one, would there have been a set of stairs from which you escape from the barrow downs? I can't really remember...
If there was a princess quest on the last level of the Downs, the princess quest room would have a down stairs in it, which would jump you straight back to wherever you recalled from. That struck me as vaguely buggy, though, so I fixed it in the module.
Thorondor wrote:Is it possible to remove the requirement to de-equip a lantern before going to world map?
Well, your lantern would run out of fuel almost immediately moving around on the worldmap. [sound F/X: source diving] We already allow this for permanent light sources.
Thorondor wrote:Mangy lepers / blubbering idiots / pitiful looking beggars / drunks : could these be made neutral (please - I don't like innocent townsfolk immolating themselves on my super firey cloak) Mercenaries / black market agents are fair game.
Hmm, I'm hesitant to deviate from T2 original behavior like that in the main module, but it would be pretty easy to whip up an addon that sets the faction of various townsfolk to neutral. Give me a little time on that.
Thorondor wrote:Would it be possible to stop auto-explore running into deep lava...?
(shrug) No idea. I don't know enough about how the engine's auto-explore works to change its behavior like that.
Thorondor wrote:The cursed ring was fully ID'd pre-sale.
Well, yes, but what kind of ring was it? Or do you mean a ring with the Cursed ego?
Thorondor wrote:It's possible to sell a wand of haste monster for 1gp
[sound F/X: source diving] Hmm, apparently "bad" items (with base cost 0) and items with "bad" egos like Cursed (ditto) are supposed to short-circuit the price computation code and return a zero price immediately, flagging them as worthless. I've got that implemented in SVN.
Thorondor wrote:Ammo: I think it's the exploding flag that bumped the price up so much and ended up giving me a 1.7million payday....
Oh, okay, yeah, exploding ammo I can believe going for 693 gold each. [Which reminds me, with all the Archery forge-ammo talents implemented, I really need to get around to implementing object discounts, so that the player can't become rich off rubble… :wink: ]
Thorondor wrote:I read a scroll of phase door whilst it was still on the ground, interestingly it cast the spell but didn't destroy the scroll. Now where's that scroll of *Acquirement*...
error = "Lua Error: /mod/class/Player.lua:1423: /mod/class/Player.lua:1258: attempt to index local 'oo' (a nil value)\
[sound F/X: source diving] Wouldn't have worked. :twisted: The game was trying to destroy the scroll after you'd read it, but since you read it off the floor, it was looking for it on the floor in your new location, where it wasn't. I've got what I hope is a fix for that in SVN.
Thorondor wrote:Tried recharging a staff of identify in Lothlorien:
error = "Lua Error: /mod/class/Actor.lua:1744: bad argument #1 to 'resume' (coroutine expected)\
[sound F/X: source diving] Ah, crap, that's right, obj_util.recharge() has to be called in a coroutine context so that it can use :talentDialog(). I even put a nice reminder comment on the method so I wouldn't forget… :oops: I'll have to dig around in the code and remember how to set up that context; give me a little time on this one.
Thorondor wrote:I copied a spell to a staff. Once I'd done this, the following error appeared when trying to enter the magic store. I was able to enter the store when I dropped the staff.
error = "Lua Error: /mod/class/Object.lua:1100: module 'engine.ActorTalents' not found:\
[sound F/X: source diving][sound F/X: forehead repeatedly striking desk] That one's just Yet Another Stupid Typo™; fixed in SVN.
Thorondor wrote:Tried to teleport to a different dungeon via thunderlords in Lothlorien
error = "Lua Error: /loader/init.lua:156: Error while loading base '/mod/dialogs/ResetRecall.lua':\
/mod/dialogs/ResetRecall.lua:57: '}' expected (to close '{' at line 52)
near 'chars'\
[sound F/X: source diving]*sigh* I wish Lua had syntax checkers for stuff like this. Fixed in SVN, I think, but I haven't tested it for more syntax errors yet.
Thorondor wrote:Tried to get a staff of identity from Library in Minas Anor
error = "Lua Error: /data/chats/minas-anor-library.lua:41: attempt to index field 'store' (a nil value)\
[sound F/X: source diving] Gah! That building does need a store, not just a store owner. Quick code sweep suggests that's the only one I missed; 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

#469 Post by Zizzo »

Zizzo wrote:
Thorondor wrote:Would it be possible to stop auto-explore running into deep lava...?
(shrug) No idea. I don't know enough about how the engine's auto-explore works to change its behavior like that.
Okay, after some source diving, I think I can do something that might help with this:

Release 0.3.2 "CAUTION: Do Not Step In Lava With Remaining Foot"

This release adds a small change in the auto-explore subsystem. Well, I say "small change"; basically, I copied the PlayerExplore module wholesale out of the engine and dropped into the module (I think that's kosher license-wise…), with the small change of checking for the 'block_run' property instead of 'block_move' — and since lava grids return true for block_run unless you have fire immunity or invulnerability, that should prevent auto-explore from running over lava. In theory. I haven't actually tested it. :? And for all I know, this could cause auto-explore to behave weirdly. :? :? What I'm saying is, if this doesn't work, let me know and I'll figure something out. Well, I'll try to. :oops:

Of course, this release also doubles as an emergency bugfix release:
  • Several spell talents were incorrectly passing back information on whether the wand/staff whence they were cast (if any) should be flavor-ID'd.
  • Remember that bug we fixed back in v0.2.9, where selling an un-ID'd item netted you the ID'd price? Well, turns out my fix for that was multiplying the price by the number of items sold twice — meaning that selling, say, 10 potions would net you 100 times the base price. :shock: :oops:
  • Waaaay back when we added tile support, we added tile image info to the various randomized object "flavors" — except for the ones that were "fixed", like Icky Green Potions of Slime Mold Juice. :oops:
  • Many usable objects, like scrolls and potions, are consumed when you use them. If you use them from the floor, the game will thus try to destroy them from the floor at your feet. If that object was, say, a Scroll of Phase Door, then that scroll is no longer at your feet when it comes time to destroy it. :? As a precaution, we remember where you are before you use an object off the floor and do our destroying there.
  • Some objects are supposed to be considered "worthless" for purpose of selling to stores, include objects with "bad" egos. That means that, say, a Wand of Haste Monster shouldn't get "credit" for its charges or for being Fireproof, nor should a Cursed ring get credit for having lots of pluses. That should be working properly now.
  • Actually create the promised Staff of Identify store in the Minas Anor library. :oops:
  • I guess no one has been playing any Archery-using characters, or at least haven't gotten any critical archery hits, because I'm pretty sure that would have gone badly. :oops:
  • Fix the recharge-wand/staff action in various stores.
  • A handful of places where we were logging talent messages wrong.
  • And the usual raft of stupid typos, as always.
As before, since this is (mostly) an emergency bugfix release, any bugs in it (not related to auto-explore) were probably already there and just haven't been found yet. :? :wink: As always, here is a good place to report them.

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

And since having them scattered throughout the thread is sort of useless, here's a reference list of all the T2 addons I've released:
  • Alchemic Arcanorum (current release 1.0.0): Starts Alchemist characters with an Alchemic Arcanorum object from my old ToME:Arcanorum T2 module, which can be used to store and extract essences.
  • Gender Parity (current release 1.0.1): Modifies assorted NPCs that don't particularly have to be male or female so that they can be either randomly.
  • Go to Landmark (current release 1.0.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.
  • (new!) Neutral Townsfolk (current release 1.0.0): As requested by Thorondor above. :wink: Modifies a few of the more harmless town denizens into the "Neutral" faction so they don't pester you.
  • ZAngbamd Monsters (current release 1.0.1): Adds ZAngband monsters (hence the name). Untested.
In the meantime, I'm actually starting to warm to the idea of getting the automatizer working for the next feature release. :? :wink: If you'd rather I work on something else, now is the time to speak up.
"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

#470 Post by Thorondor »

Hi Zizzo
Thanks for the latest update, sorry this particular bug finder has been quiet for a while...

Just a thought; - all un-ID'd weapons / armour that are un-ID'd sell for 1gp
a cursed item I sold was put up for sale.
Some wands are identified as what they do before ID / previous use; - picked up a wand of noxious cloud from an early princess quest.

There was a quite amazing error sequence when a trap disarm failed and scintillating colours confused me for a moment; - the screen flickered with constant error sequences flashing up, one-after another, until the food counter went down by 1, then the error sequences continued. I waited for the adverse effect 70 game turns to count down but then the number of turns of adverse status went negative and carried on going. Interestingly I had chaos resistance by that point.
It effectively crashed the game requiring a task manager game-kill.

Edit: Forgot the stack traces...can't remember what the first one was though :oops:

error = "Lua Error: /engine/interface/GameTargeting.lua:133: /mod/class/Game.lua:890: attempt to index global 'e' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /engine/interface/GameTargeting.lua:133 fct\
At /engine/interface/GameTargeting.lua:139 targetMode\
At /engine/interface/GameTargeting.lua:208 \
At /engine/KeyBind.lua:264 triggerVirtual\
At /engine/interface/GameTargeting.lua:240 \
At /engine/KeyBind.lua:230 "
seen = true
reported = false

error = "Lua Error: /mod/class/Game.lua:890: attempt to index global 'e' (a nil value)\
At [C]:-1 __index\
At /mod/class/Game.lua:890 \
At [C]:-1 calc_circle\
At /mod/class/Game.lua:899 tweakVisuals\
At /mod/class/Player.lua:502 act\
At /engine/GameEnergyBased.lua:129 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:616 "
seen = true
reported = false


Otherwise it's playing quite nicely :)

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

#471 Post by Zizzo »

Thorondor wrote:Thanks for the latest update, sorry this particular bug finder has been quiet for a while...
`S cool. I certainly can't claim to have a distraction-free life at the moment (hence the delay in responding, for which, as always, We Apologize™).
Thorondor wrote:Just a thought; - all un-ID'd weapons / armour that are un-ID'd sell for 1gp
[sound F/X: source diving] Hmm, the module supports specifying the unidentified cost of an object, but it doesn't set one for weapons and armor. I'll have to dig around in the T2 code to see what it does.
Thorondor wrote:a cursed item I sold was put up for sale.
Do you remember what it was?
Thorondor wrote:Some wands are identified as what they do before ID / previous use; - picked up a wand of noxious cloud from an early princess quest.
Oh, that's a small change I made to the base game: the princess quest now IDs its quest reward, as a courtesy to the player. :wink:
Thorondor wrote:There was a quite amazing error sequence when a trap disarm failed and scintillating colours confused me for a moment; - the screen flickered with constant error sequences flashing up, one-after another, until the food counter went down by 1, then the error sequences continued. I waited for the adverse effect 70 game turns to count down but then the number of turns of adverse status went negative and carried on going. Interestingly I had chaos resistance by that point.
[sound F/X: source diving] That is interesting: the T2 code for the hallucination trap actually bypasses chaos resistance, and I apparently reproduced that. We Apologize for the Inconvenience.™ :twisted:
Thorondor wrote:Edit: Forgot the stack traces...can't remember what the first one was though :oops:
`Sokay, looks like they're both basically the same bug. [sound F/X: source diving] Aaand it's Yet Another Stupid Typo™ in the hallucination code. Fixed in SVN. :oops:
Thorondor wrote:Otherwise it's playing quite nicely :)
*whew* :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

#472 Post by Zizzo »

We Apologize for the Delay™; this release finally bubbled up to the top of my ever-expanding Stuff You Really Ought To Get Done™ queue:

Release 0.3.3 "All Armor Half Off"

This is mostly an emergency bugfix release:
  • A couple typos in the hallucination code.
  • Unflavored objects, it turns out, are supposed to use their base cost as their unidentified cost. Needless to say, we were not doing that. :oops:
  • So, apparently no one had tried certain spells: Greater Identify (cast on self), Elemental Wave, Remove Curses, or Recovery (high enough level to restore exp). I sometimes get confused over whether the variable containing the Actor casting the spell is 'self' or 'who'. :oops:
But I went ahead and merged back a couple new features from trunk:
  • Objects can now have discounts. These aren't yet generated in stores or in the wild, but player-forged ammo is now 90% off as per the original T2 code, so that players can't get rich from rubble. :wink: The game option "Gameplay | Mixed-discount stacking" controls where objects of different discounts stack. Note, though, that unlike T2's "Merge discounts when stacking" option, stacked objects don't inherit the largest discount of the stack; instead, each item in the stack retains its own discount which is applied separately in Object:getPrice(), and the average discount of the stack is shown with the object's name.
  • Unidentified ands and staffs will gain the {tried} pseudo-ID when you use them (unless they get flavor-identified by the use, of course).
Of course, since this is (mostly) an emergency bugfix release, any bugs in it were probably already there and just haven't been found yet. :? :wink: As always, here is a good place to report them.

And as always, the .team file for the release is available from my site, along with the Subversion repo and WebSVN front-end thereto. And for those of you following along on SVN, the 0.3.3 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 above. :wink: Modifies a few of the more harmless town denizens into the "Neutral" faction so they don't pester you.
  • ZAngbamd Monsters (current release 1.0.1): Adds ZAngband monsters (hence the name). Untested.
In the meantime, I've actually got the very vague beginnings of an automatizer working for the next feature release. :? :wink: If you'd rather I work on something else, now is the time to speak up.
"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

#473 Post by Thorondor »

Thanks for the latest bugfix. :) 'pologies milord for the long delay...

Just joined a level 1 dungeon, the following message appeared.

error = "Lua Error: /data/quests/lost-sword.lua:71: attempt to call field 'npc_chat' (a nil value)\
At [C]:-1 npc_chat\
At /data/quests/lost-sword.lua:71 \
At [string \"return function(l, self, data) local ok=false...\"]:1 triggerHook\
At /mod/class/Game.lua:549 changeLevel\
At /mod/class/Game.lua:1119 \
At /engine/KeyBind.lua:242 "
seen = true
reported = false

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

Re: Porting ToME2 to the T4 engine

#474 Post by Thorondor »

This seems likely to be a quest issue; - there were some quest monsters generated, but no Questlog, and in spite of a fairly thorough check of the level to ensure all monsters disposed of, there wasn't any end-of-quest acknowledgement or reward etc

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

#475 Post by Zizzo »

Thorondor wrote:Thanks for the latest bugfix. :) 'pologies milord for the long delay...
`S cool; I've kind of been stuck on the automatizer rules dialog… :?
Thorondor wrote:Just joined a level 1 dungeon, the following message appeared.

error = "Lua Error: /data/quests/lost-sword.lua:71: attempt to call field 'npc_chat' (a nil value)\
[sound F/X: source diving] Yep, that's the Lost Sword quest; I was botching setup of the initial chat dialog. And that's going to pop up a lot, so I think that merits an emergency bugfix release:

Release 0.3.4 "Lost My Sword in a Void Jumpgate"

As noted above, this is primarily an emergency bugfix release:
  • Small typo that broke the chat dialog in a couple quests, notably the Lost Sword quest and the Last Alliance quest.
But that seemed pathetically little for even a bugfix release, so I merged back some random features from trunk:
  • Went back through and picked off some spells I hadn't implemented yet: Lay of Protection, Manwe's Call, Uproot, and Geomancy. This also includes better implementation of glyphs of warding; thsy should now block summons and mostly block monster movement (high-level monsters can break through them sometimes).
  • While working on glyphs of warding, I noticed that I had never properly implemented the Trap of Calling Out, which basically finds the highest-level monster on the level and teleports it to you. :twisted:
  • For the benefit of addon developers that want to make a tileset addon for this module, I've added a GameOptions:tiles hook that you can use to add your tileset to the choices on the "UI | Graphics mode" option.
In retrospect, I probably just added more bugs than I fixed… :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 WebSVN front-end thereto. And for those of you following along on SVN, the 0.3.4 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 above. :wink: Modifies a few of the more harmless town denizens into the "Neutral" faction so they don't pester you.
  • ZAngbamd Monsters (current release 1.0.1): Adds ZAngband monsters (hence the name). Untested.
In the meantime, the automatizer itself seems to be working properly; it's just setting up the dialog for the player to work with that's got me spinning…
"Blessed are the yeeks, for they shall inherit Arda..."

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: Porting ToME2 to the T4 engine

#476 Post by Lord Estraven »

Heya Zizzo, this port is fantastic and you should be proud of yourself :) I was playing it for a bit and noticed the AI is far better than in T2. Also love the silly dialog.

Anyway. Spotted a Lua bug when attacking monsters while praying to Tulkas - doing the Bree Thieves quest with a Dwarf Demonologist. Error dialog pops up, blow never happens, player energy is not spent. The error is in data/talents/player/pray.lua, about trying to perform arithmetic on the global value "bonus", which is actually nil. I'm pretty sure this something wrong in the code for Tulkas blow assist at high piety levels.

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

#477 Post by Zizzo »

Lord Estraven wrote:Heya Zizzo, this port is fantastic and you should be proud of yourself :)
*blush* [bows]
Lord Estraven wrote:I was playing it for a bit and noticed the AI is far better than in T2.
(shrug) I can't take much credit for that; I'm mostly using the T-Engine's built-in AI code, with a few T2-specific wrinkles added.
Lord Estraven wrote:Also love the silly dialog.
Well, if you've read any of my DitLs, you knew there was going to be something like that in there. :wink:
Lord Estraven wrote:Anyway. Spotted a Lua bug when attacking monsters while praying to Tulkas - doing the Bree Thieves quest with a Dwarf Demonologist. Error dialog pops up, blow never happens, player energy is not spent. The error is in data/talents/player/pray.lua, about trying to perform arithmetic on the global value "bonus", which is actually nil. I'm pretty sure this something wrong in the code for Tulkas blow assist at high piety levels.
[sound F/X: source diving] Ah, right, stupid typo, probably caused by failing to mode-switch properly between reading T2 code and writing module code. Fixed in SVN. [Oh, and for future reference: somewhere near the folder where savefiles live, there should be an "error-reports" folder, with files that have the text contents of the error dialogs; if you can include those with bug reports, it'll help a lot in tracking stuff down.]

And I think we're setting a new record for shortest time between emergency bugfix releases: :oops:

Release 0.3.5 "Blow Thine Enemies Into Tiny Pieces, In Thy Mercy"

As noted above, this is primarily an emergency bugfix release:
  • Small typo in application of the to-hit bonus when praying to Tulkas.
But again, that's kind of anemic even for even a bugfix release, so as before, I merged back a feature from trunk:
  • Encumbrance! Your maximum unencumbered carrying capacity is computed from your Strength (up to, I think, 195lb at 18/*** [a.k.a 40]), with -1 speed penalty for every excess 10% (rounded up). Most of the inventory/equipment dialogs will now show your total carried weight and percent of max in the title. This also covers drowning if you step into deep water while carrying more than half your max capacity (without feather fall or water breathing or some variation thereof).
Since this is primarily a bugfix release, any bugs in this release were presumably already present and simply not yet discovered (unless I botched the encumbrance code… :oops: ). As always, here is a good place to report said bugs.

And as always, the .team file for the release is available from my site, along with the Subversion repo and WebSVN front-end thereto. And for those of you following along on SVN, the 0.3.5 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 above. :wink: Modifies a few of the more harmless town denizens into the "Neutral" faction so they don't pester you.
  • ZAngbamd Monsters (current release 1.0.1): Adds ZAngband monsters (hence the name). Untested.
In the meantime, progress on the automatizer for the next feature release is slow but steady; I think I'm starting to get my brain wrapped around how the rules dialog needs to work…
"Blessed are the yeeks, for they shall inherit Arda..."

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: Porting ToME2 to the T4 engine

#478 Post by Lord Estraven »

Yay awesome, thank you!!!

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

Re: Porting ToME2 to the T4 engine

#479 Post by Thorondor »

Hi Zizzo
Thanks for the new patch. It's awesome you continue to work on it.
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

When you are doing the automizer, are you thinking about including a 'don't destroy' command (e.g. spellbooks getting !d!v!k)

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?
Have you activated 'destruction' in Thaumaturgy?
Is there a spellbook shop in Gondolin?

Thanks again :)

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

Re: Porting ToME2 to the T4 engine

#480 Post by Thorondor »

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)\
stack traceback:\
\9/mod/util.lua:298: in function 'find_free_grid'\
\9/mod/spell-util.lua:747: in function 'summon'\
\9/mod/spell-util.lua:2794: in function </mod/spell-util.lua:2788>\
\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:525 useTalent\
At /engine/ai//talented.lua:53 runAI\
At /engine/ai//talented.lua:63 doAI\
At /mod/class/NPC.lua:89 act\
At /engine/GameEnergyBased.lua:129 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:616 "
seen = true
reported = false

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

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

Post Reply