Graphical clock for ToME 1.0.1

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Re: Graphical clock for ToME 1.0.1

#46 Post by nate »

Thanks, edited the add-on page, should take care of validation (I have cheats on every time I start the game, except when I'm looking for an MD5-- must have debug tools at all times, lol)
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

MIC132
Wayist
Posts: 18
Joined: Sat Jan 05, 2013 10:31 pm

Re: Graphical clock for ToME 1.0.1

#47 Post by MIC132 »

Quick feedback. I just started using this addon, and I love it!
But.. I can't see the marker that's supposed to show when I mousover a monster. And I also think that some other parts don't work.
Now, I have a bunch of other addons on. They are:
ZOmnibus pack
Infinite500 - I'm certain it didn't work before I installed this.
Rest Tweaks
Constitution based stamina and other stamina buffs
Plenum Tooltip

If I figure out whether it's just a conflict with one of them, I'll report back. But maybe there is some other cause, or I'm just doing something wrong..

nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Re: Graphical clock for ToME 1.0.1

#48 Post by nate »

Mic, I suspect it's the plenum tool tip. I've seen people using zomnibus without problem, and none of the other ones should affect the code that Chrono affects. We're probably using the same functions in ways that are incompatible. When I have a chance (which is a long time in the future, I've got a big project going on), I'll try to recreate your problems and find a way for plenum and Chrono to work well together.

Not sure what other parts you think don't work, but would like to hear about it. Chrono is really a pretty simple mod-- all it does is draw the clock.
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

MIC132
Wayist
Posts: 18
Joined: Sat Jan 05, 2013 10:31 pm

Re: Graphical clock for ToME 1.0.1

#49 Post by MIC132 »

I confirm that it works properly now that I disabled Plenum. Which is a shame, cause I really got used to it, but I think I'll keep the chronometer on and plenum off.. It's just that useful.

If you find some time, please try to fix this. But until then, it's still a great addon!

nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Re: Graphical clock for ToME 1.0.1

#50 Post by nate »

I've posted on the plenum page-- we both use the same function, but PTT doesn't call a base_function, so when PTT is on top of Chrono, Chrono tooltip code never gets called.

I can revise Chrono code, but that's a big change, that might just cause incompatibility with different add-ons.

If you'd like to use both add-ons, right now, you might want to play with the "weight" setting.
You can get at this value by opening the .teaa (they're just .zip) and editing init.lua. Not sure how it works, but I imagine that higher weight means loaded later. If you can manage to get Chrono loaded after PTT, both will work fine.
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

MIC132
Wayist
Posts: 18
Joined: Sat Jan 05, 2013 10:31 pm

Re: Graphical clock for ToME 1.0.1

#51 Post by MIC132 »

I confirm that changing weight does indeed work. Plenum has it set to 150, and yours to 100 by default, so I bumped it to 200, and everything works fine. As a temporary fix you might want to change that and reupload the addon, so others don't have to figure it out by themselves.

One more question. What exactly does the "verbose" and the other one (don't remember the name) modes do? I can't see any difference when I select them.

Also, thanks for quick answer!

nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Re: Graphical clock for ToME 1.0.1

#52 Post by nate »

On next release, I will adjust the weight. I'm not sure it's a big enough change to ask DarkGod to pay for a few extra kb of server space though :)

Verbose mode should show you more information when mousing over mobs. Rather than a single black bar, it will show you a full arc of that creature's speeds. It's confusing unless you're already comfortable with the Chrono display, and maybe even then, so that's why I hid it behind a menu.

Jotwebe mode is a mode I put in for one particular person. It's hard to explain. Look through this thread-- jotwebe makes a request for a way for it to work, and I add it, in the form of jotwebe mode. If nobody says anything about positive about jotwebe mode, it'll probably get removed in next version.
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

Lynn
Wayist
Posts: 15
Joined: Mon Apr 22, 2013 6:54 pm

Re: Graphical clock for ToME 1.0.1

#53 Post by Lynn »

I like the idea, but the clock representation threw me off. So (mostly as a coding exercise since this is my first addon) I'm going to make my own version that throws up a buff icon or text (probably buff) when you have an extra move of some sort. Maybe add on from there, we'll see.

Love the level of documentation you wrote into it, btw!

nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Re: Graphical clock for ToME 1.0.1

#54 Post by nate »

Lynn wrote:I like the idea, but the clock representation threw me off. So (mostly as a coding exercise since this is my first addon) I'm going to make my own version that throws up a buff icon or text (probably buff) when you have an extra move of some sort. Maybe add on from there, we'll see.

Love the level of documentation you wrote into it, btw!
Lol, this was my first add-on, and I thought I was going to be all awesome and show people how it's done :) Unfortunately, the code is full of poor decisions, so hopefully you can break from those.

It's hard to do X when you have an extra move, because you never really have an extra move-- you have an extra move on this mob, but not that mob, if you take this kind of action, but not that kind of action.

Will love to see what you end up with!
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

Lynn
Wayist
Posts: 15
Joined: Mon Apr 22, 2013 6:54 pm

Re: Graphical clock for ToME 1.0.1

#55 Post by Lynn »

So I finally figured out exactly how the code works... and now I understand what you meant by
It's hard to do X when you have an extra move, because you never really have an extra move-- you have an extra move on this mob, but not that mob, if you take this kind of action, but not that kind of action.
I was thinking though... maybe you could check all visible enemies and display an icon for extra move you'd have on them, and hovering over that icon gives you

"You have a free move of [action type] on
  • "

    I just need to figure out how to get a list of all the visible enemies >.>

jotwebe
Uruivellas
Posts: 725
Joined: Fri Apr 15, 2011 6:58 am
Location: GMT+1

Re: Graphical clock for ToME 1.0.1

#56 Post by jotwebe »

nate wrote: a) Test it, and report bugs
b) Run code that I supply if you run into bugs (I won't upload new versions for jotwebe mode bug fixes)
c) Send me a save without cheats enabled where the conditions jotwebe describes are valid-- it never happens for me without cheating, and I don't trust the game when cheating
d) Come up with a concise synopsis of how jotwebe mode works
e) Come up with a name for jotwebe mode
f) Just say that that's how you prefer to run the add-on
Got around to playing ToME again lately: (2.32 on 1.0.3).

One general feature request: If it's easy to do, it would be convenient if the clock treated NPCs under a targeting cursor as if they were mouseovered.
As it is, I often target something, then remember that I want to check the timing. Before I can do that I then have to cancel the skill, mouseover, and then re-target.

As for jotwebe mode's name, perhaps it could be called "dynamic mode", since the clock behaviour changes with different positions - movement. Or "tactical mode?" "Tactics mode?" "Heuristic mode?"

Is it supposed to give some feedback if you select jotwebe mode? Because that doesn't seem to do anything.

Here's a ghoul of mine standing close to a mouse:
distant1.png
distant1.png (113.76 KiB) Viewed 7823 times
My ghoul cast a spell, and before his next action came up, the mouse moved and attacked. This is a situation where jotwebe mode should have showed a ring:
jotwebe wrote: 1) circle the clock face in the movement color if the NPC under the cursor
a) is not adjacent to the PC
b) could make at least two steps if the PC moves
The point is to clearly show "this NPC can move and attack you if you don't move away."
One lightning bolt later...
One lightning bolt later...
distant2.png (115.12 KiB) Viewed 7823 times
In this case all types of speed are the same. So here it does not make a difference which kind of action the ghoul takes.

I had thought it would make sense to compare the NPC's move speed with the PC's, but on reflection that doesnt make sense - the clock needs to take the speed for whatever action the PC would take instead of moving. And I don't think the addonn can guess which speed to use if they differ. Drat. (I do have an idea for how that may work, will come to it below).

Anyway here's how I thought it would work with the NPC adjacent:
mockup
mockup
adjacent-ring.png (189.12 KiB) Viewed 7823 times
jotwebe wrote: 2) circle the clock face in the combat color if the NPC under the cursor
a) is adjacent to the PC
b) could attack at least twice if the PC attacks in melee
Same problem with B, although here it is a bit more obvious to assume the player will melee and compare combat speeds.

However, if it turns out that the clock can be kept in the loop when the player is using the targeting cursor for a skill: then it would know what type of action the player was contemplating and could adjust the display to suit.

So, if this is possible, the fixed jotwebe mode would then work like this:

When you are targeting an enemy,
* the clock will be circled in RED if your target could attack you twice if you go ahead with the action you are targeting.
* the clock will be circled in GOLD if your target is not adjacent to you, but could reach and attack you if you go ahead with the action you are targeting.
Ghoul never existed, this never happened!

nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Re: Graphical clock for ToME 1.0.1

#57 Post by nate »

Jotwebe, I'm probably done with coding addons for Tome (at least for a good long while). I'm not sure of the feasibility of some of the things your're talking about, but I encourage you to take a look at the code and see if you can make it work as you'd prefer. It's less complicated than you might think. Especially since I don't plan on doing any more coding, it's not just fine if somebody releases code based on this (GPLed and I mean it)-- it would actually be wonderful for somebody to fork this, because then it would get maintained.
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

Lynn
Wayist
Posts: 15
Joined: Mon Apr 22, 2013 6:54 pm

Re: Graphical clock for ToME 1.0.1

#58 Post by Lynn »

I'm working on my own version of this, with a different method than a clock. It uses boolean checks for whether or not you are going to get a free move, and can also be easily changed to show if the enemy is about to have a move on you (i.e. an extra one).

It's almost done, 90% of the basic functionality is in!

It also runs off of all visible enemies (using the same function to determine that as auto talent targeting)

The thing you suggested with move plus attack is something I could easily add in. Psuedocode, using my variables:

Code: Select all

if y_ticks_till_move > e_turns_till_move[movement] + e_turns_till_move[fight] then
display(an_icon_telling_you_as_much)
end
The "if adjacent" check could be easily pulled from the autobattle code

Here's a quick paste of the bulk of the code

http://pastebin.com/Z1EzZznG

I'll probably make my own topic about it once it's actually working. The only thing left to figure out before it's functional is how to get my images to draw properly.

ibanix
Wyrmic
Posts: 244
Joined: Thu May 23, 2013 12:25 am

Re: Graphical clock for ToME 1.0.1

#59 Post by ibanix »

Is this abandoned? Doesn't seem to work for v1.0.4.
Please help with the ToME wiki!

MIC132
Wayist
Posts: 18
Joined: Sat Jan 05, 2013 10:31 pm

Re: Graphical clock for ToME 1.0.1

#60 Post by MIC132 »

Works for me in 1.0.5, though the game puts me in offline as the addon is outdated. Update would be nice. I gives neat info.

Post Reply