Porting ToME2 to the T4 engine
Moderator: Moderator
-
- Archmage
- Posts: 366
- Joined: Sat Dec 13, 2014 3:38 pm
Re: Porting ToME2 to the T4 engine
Yes, I may have been using a stack of Staffs of Identify.
Here's a Thunderlord Ranger log after a few missed shots at a mean-looking mercenary (the really weak starting monsters were hit first time):
https://www.dropbox.com/s/77ml3ewxyik8d ... r.zip?dl=0
Here's a High Elf Ranger log after a number of missed shots at a battle scarred veteran, note this one also missed an arrow when targeting a weak starting monster.
https://www.dropbox.com/s/lopiiij1bnq0w ... r.zip?dl=0
I've noticed that DarkGod has taken the old versions of ToME down, could you send me your version of the Tales of Middle Earth version of ToME that you're using so it is kept in more than one spot? And also, back it up to Dropbox and/or private file storage.
Also, when monsters try to pick stuff up off the ground, they always fail. Is this intended?
Here's a Thunderlord Ranger log after a few missed shots at a mean-looking mercenary (the really weak starting monsters were hit first time):
https://www.dropbox.com/s/77ml3ewxyik8d ... r.zip?dl=0
Here's a High Elf Ranger log after a number of missed shots at a battle scarred veteran, note this one also missed an arrow when targeting a weak starting monster.
https://www.dropbox.com/s/lopiiij1bnq0w ... r.zip?dl=0
I've noticed that DarkGod has taken the old versions of ToME down, could you send me your version of the Tales of Middle Earth version of ToME that you're using so it is kept in more than one spot? And also, back it up to Dropbox and/or private file storage.
Also, when monsters try to pick stuff up off the ground, they always fail. Is this intended?
-
- 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
[We Apologize for the Delay;™ minor computer issues]
Should be fixed now. Though now that I look at it, the teleport after stealing gold is supposed to have a minimum distance of 20, so the fact that it was even considering the player's grid is odd…
[What I usually do, of course, is do the Bree house quest first thing. By the time you've finished with that, you shouldn't have much problem with them.]
[sound F/X: source diving] Oops, I had the :canTouch() method implemented pretty much entirely backward. An orc would have been able to pick up a weapon of Slay Orc and similarly for other slay flags, but that's about it. Should be fixed now.Steven Aus wrote:Also, when monsters try to pick stuff up off the ground, they always fail. Is this intended?
[sound F/X: source diving] *blink* …O-kaay, the engine's Actor:teleportRandom() wasn't even checking whether its destination candidate had another actor on it.Steven Aus wrote:Also when Smeagol did his steal gold trick he teleported to the same square that I was on.

[sound F/X: source diving] …Well, that was just spectacularly stupid on my part. Screwed up the staff stacking/unstacking logic by getting a variable name wrong in a copy/paste. Should be fixed now.Steven Aus wrote:Yes, I may have been using a stack of Staffs of Identify.
I think this should be fixed. The princess quest code now sets its newly created down stair as the level's default_down{} location, and that should be persisted when you leave the level and used when you return to it from below.Steven Aus wrote:When I took the up stair on Barrow Downs Level 2 to go back to Level 1, I appeared at the exit to Bree (Barrow Downs Level 1) instead of a down stair. Is this just a funny interaction with the base module and the add-on, and is there any way to alter that behaviour?
Turns out I had a subtle error in the ego-generation logic that was supposed to be filtering out negative egos at this point. Should be fixed.Steven Aus wrote:Why does the princess give cursed items by the way,
[sound F/X: source diving] Huh. Both the T2 code and the module code are supposed to leave cursed equipment untaken. I've reimplemented that loop, and it appears to do the right thing now.Steven Aus wrote:Note: somehow the thieves removed the cursed item, even though we can't, at the start of the thieves' guild quest.
The T2 code wouldn't have been on the te4.org download page anyway. As for extra copies, there should be online archives of it somewhere… [searching] well, just conveniently to hand, Debian's repository has the source for 2.3.11, which shouldn't be significantly different from what I'm using.Steven Aus wrote:I've noticed that DarkGod has taken the old versions of ToME down, could you send me your version of the Tales of Middle Earth version of ToME that you're using so it is kept in more than one spot? And also, back it up to Dropbox and/or private file storage.
[reads logs] Well, ultimately, the issue is that Mean-looking mercenaries and Battle-scarred veterans have particularly high armor class for townsfolk (20 and 30, respectively); that's going to be hard for any low-level character to hit. On the other hand, they're supposed to have pretty low alertness, so they shouldn't wake up easily; if they're not awake, I'd recommend just leaving them alone and staying well away from them (they wake up faster the closer you get). Failing that, you could try temporarily cranking your Tactic up to berzerker for the to-hit bonus, or in extremis, temporarily cranking up Explor to running for the extra speed to escape.Steven Aus wrote:It's so hard to hit the starting monsters in Bree with arrows (apart from the really weak ones).
[What I usually do, of course, is do the Bree house quest first thing. By the time you've finished with that, you shouldn't have much problem with them.]
"Blessed are the yeeks, for they shall inherit Arda..."
-
- Archmage
- Posts: 366
- Joined: Sat Dec 13, 2014 3:38 pm
Re: Porting ToME2 to the T4 engine
Thanks for all your hard work! I've been playing a lot of Thea: The Awakening recently (they recently released a free DLC: Return of the Giants), which is why I haven't made a reply in this thread for a little bit. Did you want to use the time to make a new version and/or work on the map generation code?
-
- 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
No worries; I was just chasing down a last few bugs (famous last words…) before:Steven Aus wrote:Thanks for all your hard work! I've been playing a lot of Thea: The Awakening recently (they recently released a free DLC: Return of the Giants), which is why I haven't made a reply in this thread for a little bit.
Release 0.2.2 "Well, That Escalated Quickly"
New in this release:
- Implement losing, and restoring, experience.
- Implement race talents for Thunderlords and DeathMolds. Still need to implement semi-random DeathMold movement (including special worldmap handling…).
- Implement some more scrolls.
- Implement (most) wands, staffs and rods, and the various juggling required to actually use them.
- Implement archery and related stuff, including auto-pickup of ammo that we fire.
- Implement the Forge Arrows, Forge Bolts, Forge Shots and Copy Spell talents.
- Implement the Trolls and Wights quest in Bree.
- You can now actually set your number of random quests from the character creation dialog. (And there was much rejoicing. ["Yaaay…"])
- Implement the drain-mana/life/experience equipment flags (and Maiar's innate exp drain at high levels) as temporary effects conferred by wielding said equipment. Black Breath handling also gets neatly folded into this infrastructure, except that that effect doesn't go away when you remove the equipment.
- In a somewhat similar vein, standing on stuff like lava will now actually damage you, by way of a temporary effect that remains active while you remain on the grid (as an extension of the infrastructure I was using for the "you are in a trap-detected area' effect).
- Equipment (and Maia) with the aggravation flag now properly wake everybody up.
- On the other hand, don't wake up NPCs when you're outside their sense range or out of their line of sight. That one had all the Mean-looking mercenaries and Battle-scarred veterans waking up and pestering the poor player in Bree. We Apologize for the Inconvenience.™
- Light/unlight grids when hit by appropriate damage types.
- NPC cause-wounds spells can now curse equipment.
Tangentially related, wielding cursed equipment now gets the "Oops! It feels deathly cold." message.
- Potion shattering is now (mostly) handled. For all the good that it does when you can't actually throw them yet…
- Support dragging stuff around in the inventory dialog to wear/unwear them.
- Lots and lots of bug fixes; notably:
- Actually check our inventory limit; anything that won't go into our inventory gets dropped on the floor. Similarly for stores, homes and mathom-houses.
- Better tracking of which town we're supposed to be recalling to.
- Potions of Experience were accidentally granting 1 million experience instead of 100 thousand.
- Choosing one of multiple adjacent doors to open was supposed to use adjacent-grid targeting mode, but was doing it wrong.
- NPCs can actually touch (and pick up) things now.
- Assorted fixes to the princess quest — notably that the princess should actually be there, and that she shouldn't give {cursed} rewards.
- Better checks for which NPCs can cross which terrain types and which NPCs can be princess/lost-sword quest monsters.
[Oh, and on the subject of Subversion, those of you who have been following my pseudo-trunk side branch will probably want to 'svn switch' to the release branch for this release; bugfixes will go both there and onto trunk. I'll leave the pseudo-trunk branch around for a few days before attempting to merge it back into trunk and deleting it. Trunk itself may or may not be usable at the moment, and doesn't yet have most of the bugfixes from pseudo-trunk, so following it may be hazardous for the near future.]
"Blessed are the yeeks, for they shall inherit Arda..."
-
- Archmage
- Posts: 366
- Joined: Sat Dec 13, 2014 3:38 pm
Re: Porting ToME2 to the T4 engine
Are you going to upload it to the te4 modules page?
-
- 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
*lblink* I… already did.Steven Aus wrote:Are you going to upload it to the te4 modules page?
"Blessed are the yeeks, for they shall inherit Arda..."
-
- Archmage
- Posts: 366
- Joined: Sat Dec 13, 2014 3:38 pm
Re: Porting ToME2 to the T4 engine
Okay, you just didn't mention it, and I got it from your web-page. 
EDIT: Yes, you did mention it, via the release name, number and link.
Sorry about that. 

EDIT: Yes, you did mention it, via the release name, number and link.


-
- 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
No worries.Steven Aus wrote:Okay, you just didn't mention it, and I got it from your web-page.
EDIT: Yes, you did mention it, via the release name, number and link.Sorry about that.

"Blessed are the yeeks, for they shall inherit Arda..."
-
- Sher'Tul Godslayer
- Posts: 2000
- Joined: Fri May 07, 2004 8:26 pm
- Location: Nahgharash
Re: Porting ToME2 to the T4 engine
Query, courtesy of the mention for 'aggravte' flag. When I had telepathy in T2, I always felt like I was waking things up (even without aggravate) as if I was in line of sight of them, and was never sure if this was a result of telepathy, something that happened and I just wasn't aware of it (didn't feel like it, especially between stealthy and non-stealthy characters), or random chance. If this was a result of telepathy, was it intended? (and will this behaviour be mimicked in the port? And will aggravation affect it by making us 'in sight' of said enemies?)
Currently playing under the name Aura of the Dawn 4 down, 227 to go!
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
SadistSquirrel wrote:DarkGod has two arms, one with an opened hand, one with a closed fist. You got the fist.
-
- 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
Telepathy (of the player) doesn't enter into it. The relevant T2 code is process_monsters() and process_monster() in src/melee2.c, which the module attempts to duplicate in class/ai/tome2.lua. Here's the gist of it:Crim, The Red Thunder wrote:Query, courtesy of the mention for 'aggravte' flag. When I had telepathy in T2, I always felt like I was waking things up (even without aggravate) as if I was in line of sight of them, and was never sure if this was a result of telepathy, something that happened and I just wasn't aware of it (didn't feel like it, especially between stealthy and non-stealthy characters), or random chance. If this was a result of telepathy, was it intended? (and will this behaviour be mimicked in the port? And will aggravation affect it by making us 'in sight' of said enemies?)
- You know the bit in monster descriptions that says "{He|she|it} {is ever vigilant for|takes a while to see|pays little attention to|etc.} intruders, which {he|she|it} may notice from N feet"? That's describing the monster's initial sleep counter (the less observant it sounds, the higher said counter is) and its sense radius (10 feet = 1 grid). As long as the monster's sleep counter is above zero, it doesn't act.
- Each monster turn, if you're within its sense radius or it has line of sight to you, there's a chance (decreasing with greater stealth) that you will reduce its sleep counter by some amount (inversely proportional to distance). Once its sleep counter goes to zero, it wakes up and starts heading for you.
- If you have aggravation, "within the monster's sense radius" becomes "within 100 grids of the monster" and "a chance of reducing its sleep counter" becomes "always reduces its sleep counter by at least 1".

"Blessed are the yeeks, for they shall inherit Arda..."
-
- Sher'Tul Godslayer
- Posts: 2000
- Joined: Fri May 07, 2004 8:26 pm
- Location: Nahgharash
Re: Porting ToME2 to the T4 engine
Shouldn't that be.... We Apologize for the Aggravation?Zizzo wrote:so everyone effectively had aggravion. We Apologize for the Inconvenience.™]

So telepathy does not inherently create a negative situation. Good to know. Always wondered about that.
Currently playing under the name Aura of the Dawn 4 down, 227 to go!
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
SadistSquirrel wrote:DarkGod has two arms, one with an opened hand, one with a closed fist. You got the fist.
-
- Archmage
- Posts: 366
- Joined: Sat Dec 13, 2014 3:38 pm
Re: Porting ToME2 to the T4 engine
An error when a rogue attacked me (High Elf Ranger) and used a steal gold attack. Maybe Entity is spelt incorrectly?
https://www.dropbox.com/s/4yp6bvzgi46fu ... 2.zip?dl=0
https://www.dropbox.com/s/4yp6bvzgi46fu ... 2.zip?dl=0
-
- 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
[sound F/X: source diving] Close; misspelled Map:checkEntity() in Actor:teleportRandom(). That error was your rogue attacker trying to teleport away and failing badly. I've uploaded an updated .team with a fix.Steven Aus wrote:An error when a rogue attacked me (High Elf Ranger) and used a steal gold attack. Maybe Entity is spelt incorrectly?
"Blessed are the yeeks, for they shall inherit Arda..."
-
- Archmage
- Posts: 366
- Joined: Sat Dec 13, 2014 3:38 pm
Re: Porting ToME2 to the T4 engine
I was only talking about the word "Entity" being misspelled somewhere, I didn't mean that was the exact piece of code.



-
- 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
Well, that took longer than I would have liked. We Apologize for the Delay™:
Release 0.2.3 "A Room With a View (To a Kill)"
This release is mostly about level generation, in particular special room generation. Orc Cave actually looks like Orc Cave again.
Notes on the subject:
I don't doubt I missed a fair number of them, since this is a pretty large code change. We Apologize for the Inconvenience.™
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 either traps or alchemy…
Release 0.2.3 "A Room With a View (To a Kill)"
This release is mostly about level generation, in particular special room generation. Orc Cave actually looks like Orc Cave again.

- I've tried to make it reasonably extensible, with room and vault definition files in the style of T4. [Prob'ly ought to whip up some documentation on those, now that I think of it…]
- The infamous "Always generate very unusual rooms" option (a.k.a. "ironman rooms") is also implemented, since we now can.
- An improvement over T2 that I'm maybe a bit too proud of: Veteran T2 players have probably run into the problem of finding, say, a checkerboard vault in Moria, which turns out almost entirely inaccessible because the inner walls that you're expected to be able to tunnel through are all undiggable mountains. We catch that and replace those with a special "diggable" kind of mountain chain.
- And on the subject of digging, we now implement digging through walls and other terrain with shovels and the like, including digging gold out of magma/quartz veins and finding stuff under rubble.
- Lava/water/tree streamers and magma/quartz veins.
- The "double-size" scaling of Erebor.
- I think late Angband levels are supposed to have a cavern area in the middle.
- Obviously not maze level generation for… well, the Maze, or the constantly changing game-of-Life level generation for Heart of the Earth of them (man, that one's gonna be nasty…).
- Small typo that was completely short-circuiting ESP handling.
- `Nother small typo that was completely short-circuiting magic mapping.
- It suddenly occurred to me that because of the way game options work by default, you could actually change a character's birth options like preserve/maximize just by starting a new character with different settings. This is, of course, not how that's supposed to work, so now we keep a copy of your chosen birth option settings in game state for each character. [Actually, now that I think of it, should I be doing this for other options?]

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 either traps or alchemy…
"Blessed are the yeeks, for they shall inherit Arda..."