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

#451 Post by Zizzo »

darkgod wrote:Just a silly question zizzo, do you have a macro/keybind/something to quickly insert "[sound F/X: source diving]" where you want ? ;)
:lol: Well, for longer comments like these, I generally compose the comment in a text file before posting it (building it up as I track down and fix the reported bugs), so there's usually some other instance of the phrase already in the file that I can copy/paste to wherever I want to use it.
"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

#452 Post by Thorondor »

Hi Zizzo

RE adverse status things that could adjust appearance; I quite like the stunned / confused ones on TE4 main game, and also a red warning when you're about to get eaten :cry:

Couple of new bits:
Interesting: Selling un-id'd scrolls / potions etc is now allowed; the price is agreed (e.g. 15 gold) but the actual remuneration reflects the value of the sale (as if it had been ID'd previous to trying to sell it). The same doesn't seem to be true for ammo.
Also, selling 1 un-ID'd ammo from a stack doesn't identify the rest of the stack in your inventory.

Auto-explore doesn't mind walking onto Lava... :roll: bye bye acquirement scroll... :cry: :cry: :cry:

Bugs:
This happened when I walked on ice created by an ice ball (that I'd cast over lava)
error = "Lua Error: /data/damage_types.lua:200: attempt to compare number with nil\
At [C]:-1 __lt\
At /data/damage_types.lua:200 projector\
At /data/timed_effects.lua:1909 on_timeout\
At /engine/interface/ActorTemporaryEffects.lua:85 timedEffects\
At /mod/class/Actor.lua:239 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:564 "
seen = true
reported = false


Read a scroll of light
error = "Lua Error: /mod/class/Player.lua:1349: /data/general/objects/scrolls.lua:262: attempt to index global 'DamageType' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Player.lua:1349 playerUseItem\
At /mod/dialogs/UseItemDialog.lua:69 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

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

Re: Porting ToME2 to the T4 engine

#453 Post by Thorondor »

Hi Zizzo,

Couple more bits:

Outside of Bree, are there any other mayors etc that are currently activated? (it's not currently possible to test the other house quests as the other 'Mayors' aren't implemented yet)

Are you able to implement an inventory re-stock for shops? They will get very full of dungeon loot and i guess that when they're full the only way of selling your dragon mail in mid-late game would be to buy-out the armory shop's supply of leather boots etc.

Used a staff of disarm (unidentified) - Thorondor fails to disarm an unknown trap

Activating Rilia caused an error
error = "Lua Error: /mod/class/Player.lua:1349: /data/general/objects/artifacts.lua:2567: attempt to index global 'DamageType' (a nil value)\
At [C]:-1 \
At [C]:-1 error\
At /mod/class/Player.lua:1349 action\
At /mod/dialogs/ShowEquipInvenFloor.lua:73 use\
At /engine/dialogs/ShowEquipInven.lua:57 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

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

#454 Post by Zizzo »

Thorondor wrote:RE adverse status things that could adjust appearance; I quite like the stunned / confused ones on TE4 main game, and also a red warning when you're about to get eaten :cry:
Let's see, is stunned the wobbly-screen one or the spinning-stars one? Confused, I think, is the blurry-screen one. And… "eaten"? :shock:
Thorondor wrote:Interesting: Selling un-id'd scrolls / potions etc is now allowed; the price is agreed (e.g. 15 gold) but the actual remuneration reflects the value of the sale (as if it had been ID'd previous to trying to sell it). The same doesn't seem to be true for ammo.
[sound F/X: source diving] Ah, right, it's recomputing the sale price after the object is identified during the selling process. That will be tricky to disentangle… ah, since I'm already overriding Store:doSell(), I can just have it pass the computed price through to Store;onSell(). Fixed in SVN.
Thorondor wrote:Also, selling 1 un-ID'd ammo from a stack doesn't identify the rest of the stack in your inventory.
Hmm, presumably I can handle that by ID'ing the stack before peeling off the one to sell. I forget, does doing this fully *ID* the remainder of the unsold stack, or just ID it? The latter is what I've put in SVN; if it's supposed to be the former, that's easy enough to fix for the next release.
Thorondor wrote:Auto-explore doesn't mind walking onto Lava... :roll: bye bye acquirement scroll... :cry: :cry: :cry:
Now, there I'm out of my depth. I know very little about how the engine's auto-explore works; I'm just putting scaffolding around it that I copied from elsewhere. Maybe we need to have it check for 'block_run' rather than 'block_move', which would stop it running across lava unless you're immune to fire; I have no idea whether that's even possible, though.
Thorondor wrote:This happened when I walked on ice created by an ice ball (that I'd cast over lava)
error = "Lua Error: /data/damage_types.lua:200: attempt to compare number with nil\
[sound F/X: source diving] Ah, typo in the temporary effect conferred by standing on ice; I'd copy/pasted it from the ones for lava, which do random damage, and forgot to adapt it for ice, which does fixed damage. Got nether mist wrong the same way. Fixed in SVN.
Thorondor wrote:Outside of Bree, are there any other mayors etc that are currently activated? (it's not currently possible to test the other house quests as the other 'Mayors' aren't implemented yet)
Not yet; that's what I'm working on for the next release.
Thorondor wrote:Are you able to implement an inventory re-stock for shops?
That's also what I'm working on for the next release. :wink:
Thorondor wrote:Used a staff of disarm (unidentified) - Thorondor fails to disarm an unknown trap
[sound F/X: source diving] Oh, right, this is why I added the 'force' flag to Trap:disarm(); I should probably use it, shouldn't I? :oops: Fixed in SVN.
Thorondor wrote:Read a scroll of light
error = "Lua Error: /mod/class/Player.lua:1349: /data/general/objects/scrolls.lua:262: attempt to index global 'DamageType' (a nil value)\
[…]
Activating Rilia caused an error
error = "Lua Error: /mod/class/Player.lua:1349: /data/general/objects/artifacts.lua:2567: attempt to index global 'DamageType' (a nil value)\
Yeah, these are the same bug as before. It really is going to crop up in all sorts of annoying places; I guess this calls for an emergency bugfix release:

Release 0.2.9 "We're Gonna Be Meaner Now"

As noted, this is mostly a bugfix release:
  • Fixed a lot of object activations that weren't defining damage types properly. :oops:
  • Fixed the tooltips for some talents related to Summoning and Possession. [Not that they do anything yet, but at least they won't stack dump anymore…]
  • Small typo in the level-up dialog was screwing up the check for whether to show a skill; in particular, we need to show Geomancy for non-Geomancer Mage-related classes even they they can't learn it, because Fire/Water/Air/Earth all live under it.
  • Tweak the messages for a couple timed effects that assumed the player was the target of the effect.
  • Evil monsters are supposed to be in the "Enemies" faction — including that Spectral/Zombie/etc. version of something that used to be in a friendly faction. :twisted:
  • Fix the Copy Spell inventory dialog so that you can actually select an item to copy onto.
  • Relatedly, properly describe spell-copyable items as "A spell (can be/has been) copied onto this item."
  • Fix grid damage for standing on ice or in nether mist.
  • Couple fixes for selling things to stores:
    • When selling one item from a stack, ID the rest of the stack in inventory. This is mainly for selling ammo, to get the (+x,+y) bonuses.
    • Bit of internal juggling to ensure that the un-ID'd price the store offered you is the same price it actually pays you after identifying what it just bought from you.
  • The Disarm spell (and Staffs thereof) obviously shouldn't have to check against the player's disarming ability, nor should it give the player the usual trap-disarming experience. :oops: We also reproduce T2's "There is a bright flash of light!" message for this case.
  • The usual raft of stupid typos that I really wish Lua did "compile-time" checking for, notably one in the Galadriel chat.
I did add one feature, though:
  • As long as I was in the area of the Copy Spell talent, might as well hook it into the use-item dialog, as new action 'Copy spell onto item' for suitable items.
Now, as before, since this is mostly an emergency bugfix release, I'm pretty sure any bugs in it were 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.2.9 release branch will get bug fixes for all the aforementioned inevitable bugs.

Feature work for the main release is proceeding slowly but surely; I should be close to a feature release, but I've said that before. :?
"Blessed are the yeeks, for they shall inherit Arda..."

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Porting ToME2 to the T4 engine

#455 Post by darkgod »

Oh my I remember when you first posted that you were mad enough to try to do it!
Well it's not finished but you most certainly have much much progress to boast! And I'm sure much more later! :>

Congrats! :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

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

#456 Post by Zizzo »

darkgod wrote:Oh my I remember when you first posted that you were mad enough to try to do it!
Well it's not finished but you most certainly have much much progress to boast! And I'm sure much more later! :>
You planned this timing, didn't you? :twisted:

So, after the massive Rube Goldberg artifice that was Alchemy, I decided to go for something simpler and less stressful for this release. I'm not sure how well I succeeded: :?

Release 0.3.0 "Buy Local"

[Since I've embarked on the emergency-bugfix-release strategy, I figured I should start using the "major.minor.patch" version number pattern in the intended manner. This may lead to some version number inflation, but c'est la guerre, as they say. :wink: ]

This release is mostly about stores and buildings where you can buy services and get quests. In particular, the newly implemented and/or changed stores are:
  • The Soothsayer and Prancing Pony in Bree now vary the prices of their services according to player race, as do all the other stores; the Soothsayer also now sells Scrolls of Divination. There's also a Soothsayer in Gondolin, for your convenience. :wink:
  • The Seat of Ruling in Lothlorien offers the house quest, the Spiders of Mirkwood quest, and the Poisoned Water quest.
  • The Castle in Minas Anor offers the house quest and the Last Alliance quest.
  • The Tower of the King in Gondolin offers the house quest, the Eöl quest and the Nirnaeth Arnoediad quests, and also participates in the Last Alliance quest and the Invasion of Gondolin quest.
  • Khazad-dûm doesn't have a "mayor" to hand out quests, but its house quest is now implemented (and dangerous enough that it gets both a warning on entry and an achievement for completing it).
  • The Wizards Spire in Lothlorien can ID your possessions or recharge wands/staffs/rods, and offers the fireproofing quest; the Tower of Magery in Minas Anor and the Star-Dome in Gondolin are the same, but without the quest. The Minstrels Haven in Gondolin can only ID your possessions.
  • The Library in Minas Anor can *ID* items, sells Staffs of Identify, and offers the custom-spellbook quest. The Library in Gondolin is the same, but without the quest.
  • The Priests Circle in Lothlorien, the Inner Temple in Minas Anor and Khazad-dûm, and the Valarin Temple in Gondolin can heal plus remove several detrimental effects or restore stats. The Earth-Dome in Gondolin can also cure Black Breath.
  • The Rangers' Guild in Lothlorien and Minas Anor and the Golden Flower in Gondolin can repair/enchant bows and arrows; the Fighters' Hall in Minas Anor and Khazad-dûm can repair/enchant weapons and armor; the Paladins' Guild in Minas Anor and Khazad-dûm can heal and repair/enchant armor.
  • The Thunderlords' Nest in Lothlorien, Minas Anor and Gondolin can recall you back into the dungeon or (for a hefty fee) transport you to any level of almost any dungeon, even if you haven't been there yet.
  • The Beastmaster Shanty in Lothlorien and Minas Anor can research a monster for you, populating your monster memory (which is only meaningful if you've enabled the "Learn monster information" option), and offers bounty quests, in which you obtain and return specified monster corpses to learn the Monster-lore and/or Corpse-preservation skills. The two stores share records and bounty quests, so you can take a quest corpse to either one.
  • The Inn in Lothlorien and Minas Anor and the White Tree in Gondolin are basically duplicates of the Prancing Pony without the local color. The "meal" option now properly declines to feed Vampires, but I still haven't gotten the "room for a night" option worked out; if anyone is deeply troubled by this, let me know. :wink:
Stores that are still unimplemented:
  • The Merchants Guild in Minas Anor and Gondolin. AFAICT these were associated with an abandoned Merchant class, and now effectively do nothing anyway.
  • The Casino in Minas Anor. Did anyone ever actually go there?
  • The Sea-Dome in Gondolin has a "Morph restoration" service, which just clears your mimic form and thus is basically useless. (In one of my T2 patches, I hijacked it to instead reverse the effects of Traps of Masculinity/Femininity/Neutrality, but we don't need that since we've removed those traps.) It's also supposed to offer a quest, but I can't figure out what it's supposed to be…
  • Some zones in T2 can have "dungeon towns", with stores appearing on various levels. I'll get to those later.
For stores in general:
  • Store restocking is now more or less implemented according to original T2 behavior: every 1000 game turns, a store will cycle out 1-9 items and restock with 1-9 new items, both bounded by the store's preferred min/max stock levels.
  • The black market gets some improved filtering to stock better objects: as per T2's evocatively named black_market_crap() filter, :wink: anything that isn't positively enchanted and has the same base object type as anything currently being sold anywhere else in town is rejected by the black market's stocking code, along with anything too cheap (<10gp base value).
Also a few bugs that didn't make it into the last bugfix release:
  • Fun Fact: in T2, worldmap grids have levels, indicating how tough the monsters in their corresponding wilderness zones are going to be. Grass, for instance, is level 5, while shallow water is level 20 and deep water is level 70. Less fun fact: I was propagating that information to the wrong place, so it wasn't being taken into account when generating Actors for a wilderness zone. We Apologize for the Increased Deadliness.™
  • Wasn't updating FOVs properly when opening doors, which I think meant NPCs behind the door weren't being made immediately visible. :o :oops:
  • Apparently none of our playtesters has ever been stunned, as that effect was badly broken… :oops:
  • Fix some name juggling; we want a Dagger of Westernesse (1d4) and a Wooden Rod of the Istari (20), for instance, not a Dagger (1d4) of Westernesse or a Wooden Rod (20) of the Istari.
  • Apparently no one has gone onto the worldmap in tiles mode, because worldmap grid tile image references were completely wrong… :oops:
  • Due to a handful of spectacularly stupid typos, pretty much any spell effect that was supposed to affect terrain grids or object on the floor, well, wasn't. Notably including prety much all disarm effects. :oops: :oops:
And assorted extra features of varying degrees of relatedness:
  • Shaders! We crib relevant bits of the T4 module's framebuffer/shader infrastructure and bludgeon them into submission until they actually work, :wink: notably including a handful of fragment shader files copied verbatim (I'm pretty sure that's kosher license-wise) to implement some requested full-screen feedback for visual effects, controlled by new game option "Full-screen effects feedback" (off by default, so be sure to turn it on if you want it). Currently support effects and conditions are confused, stunned and low HP (as controlled by your "Hit point warning threshold" setting).
  • The infrastructure needed for the Thunderlords's Nest also allows us to implement Scrolls of Reset Recall.
  • Refusing (or failing) the Invasion of Gondolin quest causes Gondolin to be destroyed; implementing that gave me the infrastructure to destroy all the towns when you wear the One Ring.
  • Maeglin in the Invasion of Gondolin quest has a special AI (to prioritize trying to get to the Gondolin exit you came in from); implementing that gave me some insights into the engine's AI handling. In particular, we now implement the AI_ANNOY flag on monsters like Fruit bats. We Apologize for the Annoyance.™ :twisted: And this could get a lot more involved if we want to implement T2 options like "Monsters behave stupidly" (well, for that option, more like implemening the "off" state thereof… :? ).
  • Not a feature yet, but the infrastructure needed for the Lothlorien Poisoned Water quest will eventually be essential in implementing the Bree Mushroom quest.
  • Also, as a courtesy to the player, the Poisoned Water quest is highlighted on the worldmap so that the player knows where to find it. Now, doing this involved re-jiggering the persistence handling of the worldmap zone, including the placement of relic quests on the map, so if those stop appearing, let me know and I'll fix it… :oops:
  • And as long as I was fiddling with quests in wilderness areas, I went ahead and implemented worldmap ambushes. :twisted: For those not familiar with them from T2, there is a chance for each movement on the worldmap grid, relative to the grid's level versus player level, that you will be ambushed and dropped in to the wilderness, where the only way to escape is to make it to the edge of the map and cross to another wilderness area. Again, We Apologize for the Increased Deadliness.™ :mrgreen:
  • Using a wand or staff will now learn its "flavor" if it does something noticeable (not its number of charges, though; that still requires an ID).
  • You can now close and bash doors. With proper FOV updates. :wink: :oops:
  • Since the quest reward for the Eöl quest is a Dwarven Lantern of the Magi, I figured I ought to implement said ego's Magic Map object power. And as long as I was in the area of object powers, we also pick off Swap Position, Panic Hit, Teleport, Illuminate and Stone to Mud. Also Half-Ogres' Explosive Rune power (actual explosive runes not yet implemented; We Apologize for the Inconvenience™).
  • It turns out that Snaga sappers, which figure prominently in the Invasion of Gondolin quest, are actually ZAngband monsters, and so had long since been filtered out in generating my NPC actor list. They're back now, but they shouldn't appear randomly outside the quest (let me know if they do). This also required slight updates to the Gender Parity and ZAngband Monsters addons, both now at v1.0.1.
  • Based on a tip from elsewhere, :mrgreen: I've incorporated some map tweaks from T4's mod.class.AsciiMap to make ASCII-mode maps look tidier. Specifically, instead of layering actor on top of object on top of trap on top of terrain semi-transparently, we use only the "highest" one in the stack.
  • Some preliminary internal infrastructure for cone-effect spells, which could eventually be used to make an addon implementing Thorondor's suggestion for cone-shaped NPC breaths.
  • On a lark, I renamed one of the achievements. :mrgreen:
And for more fun: while running around various towns testing various stores, I quickly found myself wishing I had my Go to Landmark addon from T4 — so I did a quickie port of it to T2.

Now, I was expecting this to be a simple release (famous last words…), but it turned out to be involved enough that I've probably added some nice juicy bugs for our intrepid bugfinders to find. :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.0 release branch will get bug fixes for all the aforementioned inevitable bugs.

Now, for the immediate future, I'm probably going to be poking around with the T4 1.6 alpha to see how much work is going to be involved in upgrading all my addons (and as many as I have, that could take a while... :? ). So now is the time to put in requests for what you'd like to see in the next feature release.
"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

#457 Post by Thorondor »

Hi Zizzo,

fab news on the update, thank you again for all your work - the change list looks brill :)
Unfortunately I couldn't get anything to work on 1.57 - there was an error on startup. A character can be created and saved, and then you can exit to the main menu, but it puts up an error message on attempting to reload the character which then doesn't load.

I'm not sure if it's just a compatibility issue with 1.57 vs an earlier version, - any thoughts?

error = "Lua Error: /mod/class/Game.lua:731: attempt to index field 'level' (a nil value)\
At [C]:-1 __index\
At /mod/class/Game.lua:731 "
seen = true
reported = false


error = "Lua Error: /engine/Target.lua:93: attempt to index a nil value\
At [C]:-1 __index\
At /engine/Target.lua:93 enableFBORenderer\
At /mod/class/Game.lua:311 createFBOs\
At /mod/class/Game.lua:271 setupDisplayMode\
At /mod/class/Game.lua:214 loaded\
At /engine/Savefile.lua:552 delay\
At /engine/Module.lua:1055 instanciate\
At /engine/utils.lua:2284 showMainMenu\
At /engine/init.lua:191 \
At [C]:-1 dofile\
At /loader/init.lua:217 "
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

#458 Post by Zizzo »

Thorondor wrote:error = "Lua Error: /mod/class/Game.lua:731: attempt to index field 'level' (a nil value)
[sound F/X: source diving] You were in caps-lock mode? Apparently it hadn't finished building the level yet. That method does check to make sure the map is finished before trying to display it in non-caps-lock mode, so I suppose it makes sense to do the same check on this path too. That's checked in.
Thorondor wrote:error = "Lua Error: /engine/Target.lua:93: attempt to index a nil value\
At [C]:-1 __index\
At /engine/Target.lua:93 enableFBORenderer
[sound F/X: source diving] …urk. This is looking unnervingly like an error I'm choking on while testing ZOmnibus: both track back to core.display.loadImage() in the engine returning nil for no obvious reason. Bizarrely, it works fine when run from the unpacked directory, but when I run from the .team, I can reproduce the error you're seeing. I'm beginning to suspect engine trouble…
"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

#459 Post by Zizzo »

With some much-appreciated help from our benevolent Dark Lord, :mrgreen: I've uploaded an updated .team with both of the above problems fixed, and with the engine version bumped up to 1.5.9. It's a fair bit bigger, since one of the fixes involves using Zip compression level 0 when packaging the .team; 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

#460 Post by Thorondor »

Thanks Zizzo,
Got it working :D . My current eru-following character seemed invincible to physical damage in the thieves quest, at least at level 2...

error = "Lua Error: /data/birth/gods.lua:98: bad argument #2 to 'range' (number expected, got no value)\
At [C]:-1 \
At [C]:-1 range\
At /data/birth/gods.lua:98 cbs\
At /mod/class/interface/ActorCallbacks.lua:97 all_cbs\
At /mod/class/interface/ActorCallbacks.lua:151 fireCallbacks\
At /mod/class/Actor.lua:681 onTakeHit\
At /mod/class/Player.lua:639 onTakeHit\
At /mod/class/Actor.lua:658 takeHit\
At /data/damage_types.lua:209 projector\
At /mod/class/AttackType.lua:67 monAttackTarget\
At /mod/class/NPC.lua:512 bumpInto\
At /mod/class/Actor.lua:986 attack\
At /mod/class/Actor.lua:532 check\
At [string \"return function(self, x, y, what, ...) local ...\"]:1 checkAllEntities\
At /engine/interface/ActorAI.lua:64 aiCanPass\
At /engine/interface/ActorAI.lua:86 runAI\
At /engine/ai//talented.lua:67 doAI\
At /mod/class/NPC.lua:89 act\
At /engine/GameEnergyBased.lua:129 tickLevel\
At /mod/class/GameEnergyBasedEvilHack.lua:32 tick\
At /engine/GameTurnBased.lua:51 tick\
At /mod/class/Game.lua:616 "
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

#461 Post by Zizzo »

Thorondor wrote:My current eru-following character seemed invincible to physical damage in the thieves quest, at least at level 2...

error = "Lua Error: /data/birth/gods.lua:98: bad argument #2 to 'range' (number expected, got no value)\
[sound F/X: source diving][sound F/X: forehead repeatedly striking desk] Stupid typo in the callback that gives Eru a chance to block melee damage from evil NPCs while you're praying, depending on your piety. I assume you hadn't gotten as far as the Novice warrior, who shouldn't have triggered this bug, being non-evil. Fixed in SVN; I'm not sure whether this will fix your current character, as the broken callback is probably already installed. We Apologize for the Inconvenience.™

And since the above error is going to crop up pretty much constantly while playing an Eru character, this looks like a job for an emergency bugfix release:

Release 0.3.1 "The Hand of Error Illogical Blocks Your Damage"

Only a few bugfixes this time out:
  • Caps-lock scroll mode forgot to check whether the level map was actually ready to draw before trying to draw it. :oops:
  • Fix implementation of the praying-to-Eru power of blocking melee attacks from evil NPCs (with probablilty increasing with your piety and decreasing with NPC level.
Now, as before, since this is an emergency bugfix release, I'm pretty sure any bugs in it were 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.1 release branch will get bug fixes for all the aforementioned inevitable bugs.

Now, in the meantime, I was briefly poking around with the T4 1.6 alpha to see how much work is going to be involved in upgrading all my addons, but I got stopped cold by a rather nasty worldmap bug. So now is the time to put in requests for what you'd like to see in the next feature release. :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

#462 Post by Thorondor »

Thanks - that seems fixed.
I've had the following error on using detect invisible / monster, - the spells seem to work but error message pops up each time (whether clicking on hotkey or typing "4" / "5" which is where they happen to be.

error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /data/talents/spell/divination.lua:76: attempt to index field 'stick' (a nil value)\
stack traceback:\
\9/data/talents/spell/divination.lua:76: in function </data/talents/spell/divination.lua:68>\
\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/Player.lua:673 useTalent\
At /engine/interface/PlayerHotkeys.lua:170 \
At /engine/interface/PlayerHotkeys.lua:162 activateHotkey\
At /mod/class/Game.lua:1065 \
At /engine/KeyBind.lua:230 "
seen = true
reported = false

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

Re: Porting ToME2 to the T4 engine

#463 Post by Thorondor »

Weird error when dueling Boldor - I think during summoning. There's two errors at the same time so not sure which one refers to Boldor - presume the first one...

error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /mod/class/Actor.lua:1270: attempt to index local 'msg' (a nil value)\
stack traceback:\
\9/mod/class/Actor.lua:1270: in function 'convertTalentMessage'\
\9/mod/spell-util.lua:2781: in function </mod/spell-util.lua:2764>\
\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


error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /data/talents/spell/divination.lua:76: attempt to index field 'stick' (a nil value)\
stack traceback:\
\9/data/talents/spell/divination.lua:76: in function </data/talents/spell/divination.lua:68>\
\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/Player.lua:673 useTalent\
At /engine/interface/PlayerHotkeys.lua:170 \
At /engine/interface/PlayerHotkeys.lua:162 activateHotkey\
At /mod/class/Game.lua:1065 \
At /engine/KeyBind.lua:230 "
seen = true
reported = false

Also, when Boldor tries to heal himself there was the following:
@source@ concentrates on @source.pronoun.possessive@ wounds. @source@ looks healthier

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

#464 Post by Zizzo »

Thorondor wrote:I've had the following error on using detect invisible / monster, - the spells seem to work but error message pops up each time (whether clicking on hotkey or typing "4" / "5" which is where they happen to be.

error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /data/talents/spell/divination.lua:76: attempt to index field 'stick' (a nil value)\
[sound F/X: source diving] Ah, stupid typo; it was trying to tell its caller that if it was cast from a wand or staff, said stick should be flavor-ID'd. I actually botched that in several places, it turns out; the affected spells are Wings of Winds, Thunderstorm, Demon Blade, Sense Monsters, Sense Hidden, Reveal Ways, Probability Travel and Healing. Fixed in SVN.
Thorondor wrote:Weird error when dueling Boldor - I think during summoning. There's two errors at the same time so not sure which one refers to Boldor - presume the first one...

error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /mod/class/Actor.lua:1270: attempt to index local 'msg' (a nil value)\
[sound F/X: source diving] Yet Another Stupid Typo™, this time passing the wrong arguments to Actor:convertTalentMessage(), which does things like replacing "@source@" with the caster's name. Also fixed in SVN.
Thorondor wrote:error = "Lua Error: /engine/interface/ActorTalents.lua:322: /engine/interface/ActorTalents.lua:295: /engine/interface/ActorTalents.lua:162: /data/talents/spell/divination.lua:76: attempt to index field 'stick' (a nil value)\
Looks like the same as the first error.
Thorondor wrote:Also, when Boldor tries to heal himself there was the following:
@source@ concentrates on @source.pronoun.possessive@ wounds. @source@ looks healthier
[sound F/X: source diving] …And of course, there are the times where I forget to actually call Actor;convertTalentMessage(). [sound F/X: forehead repeatedly striking desk] Fixed in SVN.

And I think some of those errors are likely to crop up often enough that I've pushed an updated .team file to te4.org.
"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

#465 Post by Thorondor »

Thanks - previous reported bits seem fixed. Also I like Lothlorien's town being more active, and an identify shop. :D - it plays very like T2 now. Like the confused character display.

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...
I guess for me, things to think about for the next version would include automizer, strength being relevant to carrying capacity, and ??potential for importing some T4 engine tiles / graphics though this is less important than getting the actual game to work as you intend.

I've found a couple of "features"...
icky green potion represented by a ! rather than a potion symbol
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.

Magic shop in Lothlorien will buy cursed ring

Shops will buy some ammo at very nice prices!
I went to sell 23 bolts (1d5)(1d5) (+2,+1) 15939 gold :) Little did I know that'd give me 366597 gold
This seems to apply to all ammo, hence I achieved the "You'll never spend it all" achievement at level 18. Its not an un-useful feature whilst play-testing as it makes the survivability of a character a bit higher. If only the ammo store used bitcoin...

Post Reply