Page 25 of 46

Re: Porting ToME2 to the T4 engine

Posted: Mon Nov 28, 2016 2:47 am
by Zizzo
And here I was thinking this one would be such a quick and simple one… :?

Release 0.2.4 "It's a Trap!"

This release is mostly about traps, and things related to traps. Which actually covers a lot more ground than I was expecting:
  • Chests have traps, so they're now implemented.
  • Scrolls of Trap Creation and the Create Traps NPC spell now live up to their names.
  • And as long as I was in the neighborhod of NPC spells, I picked off a few more unimplemented ones: Teleport Away, Teleport Level, Darkness, Cause Amnesia, Mind Blast, Brain Smash and Drain Mana. :twisted:
  • Disarming traps is also important, of course, so we implement various disarming spells and items, as well as T2's 'D'isarm command, mapped to shift-D by default.
  • Known traps will block running and moving by default; the latter can be changed via the "Automatically disarm traps" option, which will attempt to disarm a known trap when you walk on it.
  • Some traps apply timed effects that do damage (notably the Poison Needle Trap), so we tweak the message on damage dealing so that we get, for instance, "Poison from Poison Needle Trap hits player for 1 poison damage."
  • Some traps paralyze, so finally got around to implementing the "Paralyzed" temporary effect and the related PARALYZE damage type. This includes T2's hack of having paralysis attacks do a point of actual damage if you're already paralyzed, to prevent Floating eyes from becoming a perma-paralysis trap.
  • The Trapping ability is now implemented, allowing the player to use trap kits to set traps for monsters. And as a neat use of the T-Engine's flexibility, if you have the Trapping ability, the object descriptions of wands, staffs, rods, potions and scrolls that can be used in trap kits will include a description of what they do in that capacity.
    • Interestingly, wands and staffs don't actually appear to do anything when loaded into trap kits, at least not in the v2.3.9 code I've got or the C++ rewrite AnonymousHero's got going. I suppose I could take a stab at trying to decipher the commented-out partial implementation that's there, but I'm not sure where they were going with it; for now, we punt and only allow rods to be used in a Device Trap Set.
    • In my first-pass implementation of archery, I hadn't implemented critical ranged hits or ammo slay/brand flags; since some trap kits use those, I figured I ought to cover that for this pass.
    • Some scrolls that can be used in trap kits weren't implemented yet, so I implemented them while I was setting up their trap effects: Summon Monster, Summon Undead, Darkness, Dispel Undead, Genocide and Mass Genocide.
    • And speaking of genocide, implementing those scrolls gave me the infrastructure I need to implement the Udun Genocide spell (and thereby Staffs of Genocide), a couple genocide-activating artifacts, and genocide/mass-genocide junkarts.
  • For traps that you actually want to trigger, like Acquirement traps, T2 has a command to deliberately walk onto and trigger a known trap. I don't recall what key it was bound to, so I've mapped it to ctrl-shift-D by default.
  • Speaking of Acquirement Traps, implementing them gave me the infrastructure I needed to implement Scrolls of Acquirement and *Acquirement* (which, amusingly, can also be used in trap kits) and junkarts that activate for acquirement.
  • Similarly, implementing the Earthquake Trap gave me the infrastructure I needed to implement the Shake and Horns of Ylmir spells, the Earthquake randart power ( :o yeah, surprised me too) and weapons of Earthquakes.
  • And getting weapons of Earthquakes right led to a massive rearchitecting of how weapon flags like IMPACT for earthquakes are handled internally, allowing me to also implement Chaotic and Vampiric weapons.
  • And as long as I was in the neighborhood of weapon flag handling, I fiddled a bit with how weapon slays and brands are handled, allowing me to implement the Poison Hands temporary effect from the Poison Blood spell.
  • Earthquake handling checks for the Wraith Form effect to see if it needs to knock the player out of the way of falling rocks, so that effect is now (mostly, I think) implemented and lets the player pass through walls.
  • And since Spectral weapons are a primary source of the Wraith Form effect, I finally figured out how to implement egos that confer an activation.
I have punted for now on implementing the Trap of Stair Movement as too annoyingly difficult to bother with. I'm sure you're all disappointed. :wink: In addition, by executive fiat I have ruthlessly excised the purely cosmetic Traps of Aging, Growing, Shrinking, Femininity, Masculinity and Neutrality.

"Oh, now you think of this, genius?"

*sigh* Well, this wouldn't have helped you, Gathraka, because it's a completely different system, but yes, I don't think there's any point in any characters in the T2 module having to go through what you want through with that Trap of Neutrality back in T2 proper.

*blink* "…O-kaay, I think I understood about half of that."

"Meh, don't sweat it, orc babe. See, the trick when Dude starts goin' on about that whole parallel perpendicular business is to just, like, let it wash over you, y'know? It's like, 'confusion is the mind killer' and all that junk. Or maybe it's that hobbit farmer dude's mushrooms that's the mind killer, I can never remember…"

:roll: "Thank you, oh wise and eloquent sage. That makes things ever so much clearer."

"No prob'. Glad to be of help."

*facepalm* "Seriously, can I at least wound him a little?"

Okay, break it up, you two. You see what I have to put up with… :wink: Any-way, this release also includes the usual batch of bugfixes:
  • As I discovered while testing stat reduction traps, I had forgotten to implement the orange coloring for temporarily reduced stats. [I had remembered to do it in the character sheet dialog, but apparently I had gotten it wrong there. :oops: ]
  • I don't think I had properly implemented learning the "flavor" of stacks of scrolls/potions/etc. on identify/use.
  • Apparently monsters that were supposed to drop guaranteed good/great items weren't reliably doing so. We Apologize for the Inconvenience.™ :oops:
  • Fates to find an object or monster on a level would, I think, have broken badly… :oops:
  • Related to the damage source description tweaks above, it's lucky no one ever got down to starving, because it was badly broken.
  • So I was supposed to be scaling down initial monster generation on small levels. We Apologized for the Overwhelming Deadliness.™
  • Staffs of Summon are supposed to summon hostile monsters, not friendly ones. :oops: :twisted:
  • I think Actor:resolveLevel() was leveling up the level-0 townsfolk to level 1, making them that much tougher. Poor Steven Aus… :oops:
  • Worse, if I'm reading this right, the 'add_levels' field in Actor filters both requests an out-of-depth monster and levels the monster up even further. That gets used in vaults and orc/troll/etc. pits, so that would be very bad. :shock: Needless to say, I've nipped that in the bud. I hope. :?
  • Testing of stat-draining traps revealed that I was botching stat reduction.
  • Was also getting Potions of Self Knowledge and related effects wrong.
  • Another :talentDialog()-related glitch would have prevented Scrolls of Artifact Creation from successfully prompting you for a name for your new artifact.
  • And more generally dialog-related, right-clicking on a temporary effect marker to cancel it early wasn't working, nor did the message-log dialog (bound to Ctrl-M by default).
Plus a few things I apparently just stumbled across in the code and said, "hey, I should implement that":
  • Implemented the Melkor prayer functionality of summoning friendly undead/demons when you get knocked below 25% max life, and auto-applying the Curse spell as appropriate.
  • Implemented a few more spells and staff/devices: Summon Animal (which is how I found those leveling bugs above…), Elemental Minion, Staffs of Mana and the Golden Horn of the Thunderlords. Oh, and Wands/Staffs of Nothing. :wink:
  • Since I was in the neighborhood implementing other junkart activations, I also covered level-teleport junkarts.
  • Timed Roots now properly prevents you from moving, taking stairs, teleporting or using a void jumpgate.
  • You now have a much lower chance of unlocking a door if you're blind, confused or hallucinating. :twisted:
  • Never got around to implementing object price modifications for egos and flags and stuff before. Done now.
Now, this isn't quite as massive a code change as the previous version, but it's pretty wide-reaching and touches a lot of stuff; in particular, just about every trap we just added is a potential source of bugs. This is, as always, 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.

Next up, barring requests, I'm thinking alchemy… maybe antimagic?

Re: Porting ToME2 to the T4 engine

Posted: Mon Nov 28, 2016 9:20 am
by darkgod
Nice! Congrats as usual!

Antimagic sounds neat :)

Re: Porting ToME2 to the T4 engine

Posted: Mon Nov 28, 2016 9:37 am
by darkgod
BTW as a warrior with a chain mail & broad sword (startinggrea) I can't hit anything. Removing the mail helps a lot

Re: Porting ToME2 to the T4 engine

Posted: Mon Nov 28, 2016 1:27 pm
by darkgod
Oh and a little patch to make ascii mode non squre, because this looks way better :) http://te4.org/images/tmp/rectascii.patch

Re: Porting ToME2 to the T4 engine

Posted: Tue Nov 29, 2016 2:11 am
by Zizzo
darkgod wrote:Oh and a little patch to make ascii mode non squre, because this looks way better :) http://te4.org/images/tmp/rectascii.patch
[sound F/X: testing] Hmm, interesting. Here's a side-by-side comparison, at 24x24 vs. 12x24:
hmm1a.png
hmm1a.png (12.21 KiB) Viewed 9661 times
hmm2a.png
hmm2a.png (17.42 KiB) Viewed 9661 times
What do people think? I could probably make this configurable as a game option, if people want it both ways.
darkgod wrote:BTW as a warrior with a chain mail & broad sword (startinggrea) I can't hit anything. Removing the mail helps a lot
*scratches head* …Maybe I'm doing to-hit checks wrong? I'll probably have to do some deep debugging on that.
darkgod wrote:Antimagic sounds neat :)
I'm on it, then. :wink:

Re: Porting ToME2 to the T4 engine

Posted: Tue Nov 29, 2016 8:30 am
by darkgod
IMO the new way more closely ressembles the old angband stuff. Also square ascii always looks wrong to me, too much empty space

Re: Porting ToME2 to the T4 engine

Posted: Sat Dec 24, 2016 7:15 am
by Jaylow7
First off, I'm glad to see this is still actively under development.
Zizzo wrote:
darkgod wrote:BTW as a warrior with a chain mail & broad sword (startinggrea) I can't hit anything. Removing the mail helps a lot
*scratches head* …Maybe I'm doing to-hit checks wrong? I'll probably have to do some deep debugging on that.
I had a similar issue. Level 1 warrior, starting equipment (broad sword / chain mail), even setting Tactic to "berserker" had major issues hitting monsters in the thieves quest.

Re: Porting ToME2 to the T4 engine

Posted: Thu Dec 29, 2016 2:58 pm
by Vaknuva
Hello everyone!
First off, I am very happy that you're doing this Zizzo, not only the port (which you have my infinite respect for attempting, let alone doing so well so far :wink: ), but some of the changes you made.
Before I go any further, I am using the 0.2.4 team file, and normally play T.o.M.E. 2.3.5.
Now onto the questions:
1 to Zizzo: I almost don't want you to fix it, but the Rohanknight right now is the most badass epic fail I have ever seen. They've lost their innate accelerating speed bonus (+3 at lv 1, +1 on every level up that's a multiple of five, for an innate +13 at lv 50) :( ,BUT the lightspeed jump ability you botched makes it irrelevant: originally you needed to be at lv30 to use it, & I'm pretty sure it had a spell point cost; here you can activate it from lv1 :) , reactivating it refreshes the duration :D , and it has no mana cost :shock: , +50 speed and all I have to do is keep hitting a button every few turns like I did with mimicry :lol:
2 To Zizzo and DarkGod, Coder from Hell:
I'm pretty sure this is a bug in tome2.3.5 seeing as how tome SX and theme1.2.0 don't do it, but if your character in tome 2.3.5 is following Yavanna, Manwe, or Melkor, as long as you are on the "surface" i.e. not in a dungeon or quest area, your piety doesn't drop over time when you aren't praying. This bug was a real help in the early game for my Manwe and Melkor followers. Just finally want to know if it was intentional, and if so, can it be implemented.
3 also to Zizzo and DarkGod:
When I read the help file for Manwe back in 2.3.5 it read as if your piety dropped at the same rate whether you were praying or not, now I know it didn't actually work like that (Thanks DarkGod :roll: ), but could it work like that here, maybe if you have mid to high prayer or mid to high wisdom or some combination of the two or something?
4 to Zizzo:
I noticed that the magic shop and the library don't stock any books except for beginner cantrips, did I miss something in the forum, are the other books not implemented yet, is it a bug?

I may have other comments/questions, but I can't remember them right now.
Keep it up!

Re: Porting ToME2 to the T4 engine

Posted: Wed Jan 18, 2017 2:04 am
by Zizzo
darkgod wrote:BTW as a warrior with a chain mail & broad sword (startinggrea) I can't hit anything. Removing the mail helps a lot
Jaylow7 wrote:I had a similar issue. Level 1 warrior, starting equipment (broad sword / chain mail), even setting Tactic to "berserker" had major issues hitting monsters in the thieves quest.
Okay, I've done some tests on this, taking a level-1 character straight into the Thieves quest to see how it fares. Specifically, these calculations are based on a Human Swordmaster with 18/30 STR and 18 DEX. I'm working from the original T2 code here [literally; I've peppered the T2 code with debugging printf()'s to make sure I've understood what it's doing].

Chance to hit in melee is based on the attack's "power". For a player melee attack, that's based on the player's Fighting ability ('skill_thn' in the T2 code) and to-hit mods from skills, stats and equipment. In our case:
  • Our Swordmaster starts with Combat skill level 2 and Weaponmastery skill level 1, which combine to a Fighting ability level of 5.
  • Our general to-hit is +2: +3 from DEX, +1 from STR, and -2 from the Chain Mail.
  • Our melee-specific to-hit is +1 from Swordmastery skill level 1, since we're wielding a sword.
  • Our starting sword is unenchanted, so that's +0.
  • This all combines to an attack power of 5+3*(2+1+0) = 14.
  • Our starting luck ranges from -5 to +5; scaled down for the to-hit calculation, this will adjust our attack power by -2 to +1.
Now, to determine whether we hit a monster [cf. test_hit_norm() in src/powers.c in the T2 code, or mod.class.interface.Combat:checkHit() in the module code], we take our attack power P and pick a random integer from 0 to P-1 (inclusive); this number must be greater than or equal to 3/4 the target's AC to count as a hit. A Novice rogue has AC 12, so our target is 9.

What this means is that our Swordmaster, assuming +0 starting luck, will hit with probability 5/14, or roughly 36%. -5 birth luck will reduce that to 3/12, or 25%; +5 birth luck will increase it to 6/15, or 40%. This is borne out by my testing in T2; our hapless Chain-Mail-wearing Swordmaster had a devil of a time actually hitting any Novice rogues.

Taking off that Chain Mail will help a lot, because it increases our general to-hit to +4 and thus our attack power to 5+3*(4+1+0) = 20; that jumps us up to a 55% chance to hit at +0 luck. Berserker tactic confers +8 to-hit, so that takes us up to attack power 5+3*(12+1+0) = 44, for a roughly 80% chance to hit [or, if we insist on the Chain Mail, 5+3(10+1+0) = 38, for a roughly 76% chance to hit]. Again, this is borne out by my testing; even in the module, with berserker tactic and no Chain Mail, our (now hapful?) Swordmaster successfully hit oncoming Novice rogues nine times out of nine attacks — even a Skeleton Novice rogue with AC 17.

This all tracks with my T2 experience (in which it was pretty much SOP to sell off the starting Chain Mail and buy some light armor pieces with the proceeds). Is this inconsistent with what everyone else is encountering in the module?

Vaknuva wrote:1 to Zizzo: I almost don't want you to fix it, but the Rohanknight right now is the most badass epic fail I have ever seen. They've lost their innate accelerating speed bonus (+3 at lv 1, +1 on every level up that's a multiple of five, for an innate +13 at lv 50) :(
[sound F/X: source diving][sound F/X: forehead repeatedly striking desk] Fixed in SVN. :oops:
Vaknuva wrote:BUT the lightspeed jump ability you botched makes it irrelevant: originally you needed to be at lv30 to use it, & I'm pretty sure it had a spell point cost; here you can activate it from lv1 :) , reactivating it refreshes the duration :D , and it has no mana cost :shock: , +50 speed and all I have to do is keep hitting a button every few turns like I did with mimicry :lol:
[sound F/X: source diving] Ah, the min level and mana cost information for that power was buried in the use-power code itself, rather than in the powers definition table whence I was scraping said info. Fixed in SVN. We Apologize for the Inconvenience.™ :twisted: :mrgreen:
Vaknuva wrote:I'm pretty sure this is a bug in tome2.3.5 seeing as how tome SX and theme1.2.0 don't do it, but if your character in tome 2.3.5 is following Yavanna, Manwe, or Melkor, as long as you are on the "surface" i.e. not in a dungeon or quest area, your piety doesn't drop over time when you aren't praying.
That effect is present as of at least T2 v2.3.9, and AFAICT it's intentional. [sound F/X: source diving] Ah, I had that implemented wrong; fixed in SVN.
Vaknuva wrote:When I read the help file for Manwe back in 2.3.5 it read as if your piety dropped at the same rate whether you were praying or not, now I know it didn't actually work like that (Thanks DarkGod :roll: ), but could it work like that here, maybe if you have mid to high prayer or mid to high wisdom or some combination of the two or something?
(shrug) In my experience, at least, by the time I hit Moria or thereabout, I'm killing so many evil monsters that I can afford to leave Manwe Prayer on full time, because the small increase in piety loss from praying is being completely overwhelmed. Piety loss for Manwe is already reduced somewhat by high WIS (see my god spoiler for the full details), but I suppose we could tweak it further. What do people think?
Vaknuva wrote:I noticed that the magic shop and the library don't stock any books except for beginner cantrips, did I miss something in the forum, are the other books not implemented yet, is it a bug?
[sound F/X: testing] …Hmm, that's clearly wrong. I'll investigate.


And a poll as long as I'm in the neighborhood: what would people think of a map effect following the player a la Arcane Storm (except significantly more subtle :wink: ) visually indicating the area of effect of an Unbeliever's antimagic field? I'd have to double-check the map effect code to make sure that it can handle effects that don't actually do any damage, but it should be doable.

Re: Porting ToME2 to the T4 engine

Posted: Mon Jan 23, 2017 2:59 pm
by Vaknuva
Zizzo wrote:
darkgod wrote:BTW as a warrior with a chain mail & broad sword (startinggrea) I can't hit anything. Removing the mail helps a lot
Jaylow7 wrote:I had a similar issue. Level 1 warrior, starting equipment (broad sword / chain mail), even setting Tactic to "berserker" had major issues hitting monsters in the thieves quest.
Okay, I've done some tests on this, taking a level-1 character straight into the Thieves quest to see how it fares. Specifically, these calculations are based on a Human Swordmaster with 18/30 STR and 18 DEX. I'm working from the original T2 code here [literally; I've peppered the T2 code with debugging printf()'s to make sure I've understood what it's doing].

Chance to hit in melee is based on the attack's "power". For a player melee attack, that's based on the player's Fighting ability ('skill_thn' in the T2 code) and to-hit mods from skills, stats and equipment. In our case:
Our Swordmaster starts with Combat skill level 2 and Weaponmastery skill level 1, which combine to a Fighting ability level of 5.
Our general to-hit is +2: +3 from DEX, +1 from STR, and -2 from the Chain Mail.
Our melee-specific to-hit is +1 from Swordmastery skill level 1, since we're wielding a sword.
Our starting sword is unenchanted, so that's +0.
This all combines to an attack power of 5+3*(2+1+0) = 14.
Our starting luck ranges from -5 to +5; scaled down for the to-hit calculation, this will adjust our attack power by -2 to +1.

Now, to determine whether we hit a monster [cf. test_hit_norm() in src/powers.c in the T2 code, or mod.class.interface.Combat:checkHit() in the module code], we take our attack power P and pick a random integer from 0 to P-1 (inclusive); this number must be greater than or equal to 3/4 the target's AC to count as a hit. A Novice rogue has AC 12, so our target is 9.

What this means is that our Swordmaster, assuming +0 starting luck, will hit with probability 5/14, or roughly 36%. -5 birth luck will reduce that to 3/12, or 25%; +5 birth luck will increase it to 6/15, or 40%. This is borne out by my testing in T2; our hapless Chain-Mail-wearing Swordmaster had a devil of a time actually hitting any Novice rogues.

Taking off that Chain Mail will help a lot, because it increases our general to-hit to +4 and thus our attack power to 5+3*(4+1+0) = 20; that jumps us up to a 55% chance to hit at +0 luck. Berserker tactic confers +8 to-hit, so that takes us up to attack power 5+3*(12+1+0) = 44, for a roughly 80% chance to hit [or, if we insist on the Chain Mail, 5+3(10+1+0) = 38, for a roughly 76% chance to hit]. Again, this is borne out by my testing; even in the module, with berserker tactic and no Chain Mail, our (now hapful?) Swordmaster successfully hit oncoming Novice rogues nine times out of nine attacks — even a Skeleton Novice rogue with AC 17.

This all tracks with my T2 experience (in which it was pretty much SOP to sell off the starting Chain Mail and buy some light armor pieces with the proceeds). Is this inconsistent with what everyone else is encountering in the module?
Zizzo you pretty much hit it spot on. For everyone else who didn't get it (hopefully no-one), this is how the heavier armors are supposed to work.
In fact, if, early on in the game, you stumble across a heavy armor you haven't encountered before, don't ID it, and sell it to a shop, and it turns out to be an average piece that the shopkeeper didn't/doesn't stock (i.e. leather jackets), the shopkeeper will pay you a little bit more than normal and be pissed, because the negative to-hit chance wasn't seen.
Also, back in the Angband game, there is an ego type specifically for DSMs called "of craftsmanship" that eliminates the negative to-hit mod on the DSM (this is also somewhat carried over with the [mod-only] Aule spell enchant armor, which, at a high enough spell lv., starts increasing the to-hit chance on armor [in addition to other nice stuff at higher lvs.]).
Finally, the neg mod is used as a balancing technique, early game every class is hindered by heavy armor, meleers and archers get their to-hit lowered, everyone-else takes a hit to their max spellpoints. You end up having to wait to get the extra AC, either by boosting STR and/or combat to get around the encumberment, or boosting your to-hit chance to offset your armor.
Zizzo wrote:[sound F/X: source diving] Ah, the min level and mana cost information for that power was buried in the use-power code itself, rather than in the powers definition table whence I was scraping said info. Fixed in SVN. We Apologize for the Inconvenience.™ :twisted: :mrgreen:
Don't you mean: "We Apologize for the Convenience.™"? :wink:
Also, if that's what you did to get the powers, you might want to recheck some of the other powers, i don't know if their are any issues with them, but if it happened here...
Zizzo wrote:(shrug) In my experience, at least, by the time I hit Moria or thereabout, I'm killing so many evil monsters that I can afford to leave Manwe Prayer on full time, because the small increase in piety loss from praying is being completely overwhelmed. Piety loss for Manwe is already reduced somewhat by high WIS (see my god spoiler for the full details), but I suppose we could tweak it further. What do people think?
So...
It wasn't until after I posted that I realized that those spoilers were YOURS (great job btw!).
Looking at them now, yeah your right, but something seems odd...
Zizzo wrote:Manwe Sulimo
Normal piety change:
-(4-(W@3)) every 300 game turns, with adjustments of -1 if you are praying and +(W@2) if you are of an elven race (Elf, Half-Elf, High-Elf, Dark-Elf or Wood-Elf), and a maximum of -1.
Am I wrong in reading this as:

[piety change] = -(4-(W@3))
then if (praying), [piety change] = [piety change]-1
then if (Elf, Half-Elf, High-Elf, Dark-Elf or Wood-Elf), [piety change] = [piety change]+(W@2)
then if [piety change]>-1, [piety change] = -1
every 300 game turns (piety) = (piety)+[piety change]

Meaning that if I am playing as one of the elven races, and have maxed out wisdom, praying will not change the drain rate?
Zizzo wrote:And a poll as long as I'm in the neighborhood: what would people think of a map effect following the player a la Arcane Storm (except significantly more subtle :wink: ) visually indicating the area of effect of an Unbeliever's antimagic field? I'd have to double-check the map effect code to make sure that it can handle effects that don't actually do any damage, but it should be doable.
That would be nice, and if you did, you could also use it for other stuff, like trap detection zone edges, lit squares, vision edges, telepathy edges, and so on.

Finally, how do i apply the fixes in the SVN directory to the .team file i downloaded? Or should I just wait for the next release?

Re: Porting ToME2 to the T4 engine

Posted: Tue Jan 24, 2017 4:49 am
by Zizzo
Vaknuva wrote:Also, if that's what you did to get the powers, you might want to recheck some of the other powers, i don't know if their are any issues with them, but if it happened here...
Yeah, I was also giving Ride the Straight Road and Return to Town to Thunderlords early. Fixed that at the same time.
Vaknuva wrote:It wasn't until after I posted that I realized that those spoilers were YOURS (great job btw!).
*blush* [bows]
Vaknuva wrote:Am I wrong in reading this as:

[piety change] = -(4-(W@3))
then if (praying), [piety change] = [piety change]-1
then if (Elf, Half-Elf, High-Elf, Dark-Elf or Wood-Elf), [piety change] = [piety change]+(W@2)
then if [piety change]>-1, [piety change] = -1
every 300 game turns (piety) = (piety)+[piety change]

Meaning that if I am playing as one of the elven races, and have maxed out wisdom, praying will not change the drain rate?
[sound F/X: source diving] That looks right, and pans out in testing — assuming that by "maxed out wisdom" you mean absolute max WIS (40 in linear-display mode, 18/220 in non-linear-display mode). Even a step down at 39 [18/210] WIS, W@3 works out to 2 and W@2 to 1, not quite enough to get the desired effect.
Vaknuva wrote:
Zizzo wrote:And a poll as long as I'm in the neighborhood: what would people think of a map effect following the player a la Arcane Storm (except significantly more subtle :wink: ) visually indicating the area of effect of an Unbeliever's antimagic field? I'd have to double-check the map effect code to make sure that it can handle effects that don't actually do any damage, but it should be doable.
That would be nice, and if you did, you could also use it for other stuff, like trap detection zone edges, lit squares, vision edges, telepathy edges, and so on.
Trap-detected grids wouldn't work with this particular method; I looked into it a while back and couldn't see any obvious way to do it. The other things you mention would certainly be doable by this method, although I imagine it could lead to a cluttered UI.
Vaknuva wrote:Finally, how do i apply the fixes in the SVN directory to the .team file i downloaded? Or should I just wait for the next release?
Well, if you have Subversion, you can check out a working copy of the module repository into a tome2/ subdirectory in game/modules/ and play directly from that (you'd probably also need to move the .team file out of the way, as I think that gets priority). Without Subversion, it gets trickier. :wink: I think I'm pretty close to a release, though (famous last words…).

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 27, 2017 4:51 am
by Zizzo
Well, that wasn't as bad as I'd feared:

Release 0.2.5 "Thomas Covenant Was Here"

As promised, this release is mostly about antimagic and the related Unbeliever class, and things related thereto:
  • Antimagic fields are implemented, of course. For display convenience, they're implemented as a temporary effect (cleverly named "Antimagic Field" :wink: ) triggered by wielding antimagic equipment or having a non-zero Antimagic skill level, with a tooltip listing the field strength and radius.
  • Speaking of antimagic equipment and display convenience, the object descriptions of antimagic equipment (which for now is basically Dark Swords) also includes a description of the antimagic field power/radius boosts it will confer when wielded, based on your current Antimagic skill and its enchantment level.
  • The optional visual display effect for the antimagic field didn't come out as impressive as I'd hoped:
    am-field.png
    am-field.png (18.7 KiB) Viewed 9197 times
    I was kind of envisioning something like Ghouls' Retch effect, but that appears to involve shaders, which I haven't worked out yet. On the flip side, one idea I'm toying with for future releases is to use the presence of the effect itself in an NPC's grid to determine whether we need to check it for antimagic jamming, rather than have to check distance to the player every time. That would depend on whether a map effect can be modified in situ to add or remove its visual overlay.
  • Also covered are the Antimagic-conferred talents Disrupt the Continuum and Detect Traps (which also disarms traps at Antimagic skill level 35). I'm reasonably sure I've caught all the places that Disrupt the Continuum's teleport jamming needs to be checked to prevent the player or NPCs from teleporting — which, of course, involves the same infrastructure used by the Anchor of Space-Time (for NPCs) and various equipment that prevents teleportation (for the player), so those are now implemented too.
Also the usual batch of bugfixes:
  • Was not applying damage bonus for Tulkas prayer correctly.
  • Wasn't properly applying the drain-hit-points flag from various equipment.
  • Piercing Shots is supposed to be instant-use (as I noticed when I was trying to remember whether Disrupt the Continuum and Detect Traps were supposed to be instant-use).
  • A few bugs in the modify-visuals infrastructure:
    • Forgot that some grid entities were cloned, so just setting user-pref visuals on the master grid list wouldn't cover them.
    • A Sneaky Hack™ to make ASCII visual overrides from user preferences play nice with graphical tiles: just have the setting "override" the tile's image to the same image.
  • Several found by Vaknuva:
    • Wasn't applying level-up changes to pval-based flags properly. This includes Ents' speed penalty, RohanKnights' speed boosts, Rogues' bonus to crit chance, and Wood Elves' bonus to ammo multiplier. :oops:
    • Wasn't charging mana costs for RohanKnight powers, and was giving several powers to both RohanKnights and Thunderlords earlier than they were supposed to get them. :oops:
    • Piety is not supposed to change on the worldmap — but for Eru followers, it is supposed to change in the wilderness.
    • Some internal object renaming was causing single-spell spellbooks not to appear in stores. This would also have prevented the Magic Shop from selling Wooden Rods, and was preventing several classes from getting their starting spellbook. :oops:
And unrelated extra features:
  • Added DarkGod's half-width ASCII tiles modification (slightly tweaked; your patch would have shrunk graphical tiles to half-width too… :twisted: ).
  • Improved the log flasher at the top and the log display at the bottom by enabling them to handle repeated lines as e.g. "You failed to pick the lock. (×5)" a la T2. (That's how I discovered that log flasher bug I mentioned elsewhere, which this release also fixes.)
  • Since we now have instant-use talents, I figured the talent description should mention usage speed. This also reflects the spell speed bonus for wielding a Mage Staff.
  • Expanded monster memory support to include learning an NPC's alertness, which happens by observing it wake up (or not wake up) enough times. Those who have the 'Learn monster information' option disabled, will see that information immediately in the actor tooltip.
  • While I was in the area of Mimicry marking its powers as blocked by antimagic, I decided to spruce it up a bit:
    • Creating a new mimicry form used to require both defining the form via ObjectData:newMimicryForm() and defining a talent to be conferred by the associated mimicry cloak. For simplicity, I've consolidated the latter into the former.
    • Also finally got around to implementing the Mouse form's invisibility power and the Spider form's spin-web power — and the infrastructure for the latter was conveniently reusable to finally implement Ents' grow-trees power and the Grow Grass (Yavanna) and Grow Trees (Nature) spells.
Now, this wasn't as massive and overarching an update as the last release, but there are almost certainly bugs to be found it; as always, here is a good place to report them. :wink:

And as always, the .team file for the release is available from my site, along with the Subversion repo and WebSVN front-end thereto.

Next up, barring requests, maybe I'll get around to alchemy this time (although I confess I'm both idly tempted and vaguely intimidated by the prospect of resurrecting the automatizer… :shock: :twisted: ).

Re: Porting ToME2 to the T4 engine

Posted: Fri Jan 27, 2017 11:30 pm
by Chopkinsca
Cool beans. I downloaded and will check it out some time soon.

Re: Porting ToME2 to the T4 engine

Posted: Sun May 07, 2017 5:45 am
by Steven Aus
I've got a new computer, and I got my old Persistent Dungeons Add-on from my Dropbox account. I made a little change to it, but it is bringing up an error when I try to load T2 with it active. Can you help me find out why it is crashing?

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

Also, would the current version of the T2 module for T4 work perfectly on the latest version of T-Engine4? (1.5.3)

Re: Porting ToME2 to the T4 engine

Posted: Tue May 09, 2017 3:21 am
by Zizzo
Steven Aus wrote:I've got a new computer, and I got my old Persistent Dungeons Add-on from my Dropbox account. I made a little change to it, but it is bringing up an error when I try to load T2 with it active. Can you help me find out why it is crashing?
[sound F/X: source diving] Well, at a first look, I'm not sure you've got your superloaded mod.class.Player right; in my experience, superloaded files need to start with the line:

Code: Select all

local _M = loadPrevious(...)
and end with the line:

Code: Select all

return _M
(also, pretty sure that file needs to be at superload/mod/class/Player.lua instead of superload/class/Player.lua). Other than that, nothing jumps out at me. Do you have a stack trace?
Steven Aus wrote:Also, would the current version of the T2 module for T4 work perfectly on the latest version of T-Engine4? (1.5.3)
Best guess? Probably not. I've already tripped over a few things that could cause problems; for instance, I'm pretty sure just about any talent usage will choke on some logging functions that the 1.5 engine now expects modules to provide (and which the current T2 module release doesn't provide… :oops: ).