Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 7 8 [9] 10 11 ... 14

Author Topic: Mouse Fortress v1.4d for DF 34.11 - Roller Coastery Wooh!  (Read 93306 times)

Vic Romano

  • Bay Watcher
    • View Profile
Re: Mouse Fortress v1.2b - Custom Menu and Hotkey Framework - Mouse Control!
« Reply #120 on: March 24, 2012, 01:45:15 pm »

Even though I know what this is, every time I see this thread I imagine a fortress with mice in it.  Too much Redwall as a child. Thank you for your time.
Logged

Shukaro

  • Bay Watcher
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.06 - Custom Menu and Hotkey Framework!
« Reply #121 on: March 24, 2012, 04:40:02 pm »

Alright, uploaded a new version, 1.2c for 34.06. :)

Tons of bug fixes in this one, so most issues should be fixed. I'm still looking into the tracking detection issue, so in the meantime simply reload the script (Ctrl + r by default) to fix it. Enjoy!
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

Noffie

  • Escaped Lunatic
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.06 - Custom Menu and Hotkey Framework!
« Reply #122 on: March 29, 2012, 05:24:10 pm »

Does this work with alternate tiles or graphics?
Logged

Shukaro

  • Bay Watcher
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.06 - Custom Menu and Hotkey Framework!
« Reply #123 on: March 30, 2012, 09:51:30 pm »

Does this work with alternate tiles or graphics?

Yep, it's fully compatible with any tileset or graphics pack that you'd like to use.  :)

E: I'll have an updated version for 34.07 out sometime tomorrow as well.
« Last Edit: March 30, 2012, 09:54:03 pm by Shukaro »
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

Shukaro

  • Bay Watcher
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #124 on: April 01, 2012, 12:40:59 pm »

Heyo, updated version for 34.07 is now live!  :D
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

Rybec

  • Escaped Lunatic
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #125 on: April 05, 2012, 11:39:01 am »

Just a quick question: The cursor controls are always really zippy, unless it needs to move diagonally. Why doesn't the script shift-move diagonally like it does orthogonally? Or even just jump quickly on an orthogonal to close the distance faster?
Logged

vonduus

  • Bay Watcher
  • This is your captain speaking
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #126 on: April 22, 2012, 05:53:14 pm »

Great utility, just what I always hoped for ever since I started playing DF, thanks a lot.

Minor bug: Workshops did not show up in the menu, so I had to change a line in menus.txt:

Instead of "Workshops|g(Buildings)" I wrote "Workshops|Buildings" and now everything seems to work as intended.

I was unsure if I should retain the original line, but I decided that it probably was a meaningless command, a sort of mental typo on the developerīs part (as I believe it can be translated into "go to in-game Building-menu", and DF has no Building-menu (but MouseFort has)), so I left it out. Hope I didnīt break anything, I have no programming skills whatsoever :).
Logged
DF: where imagination beats animation

vonduus

  • Bay Watcher
  • This is your captain speaking
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #127 on: April 22, 2012, 06:48:59 pm »

Another minor bug/glitch/unintended complication: Somehow ( :o) I accidentally triggered the zoom with my mousewheel to a very, very far out zoom, and it seems I canīt access this function again to zoom back in, unless I quit the script.

I tried to add two new lines to the keys.txt file, to trigger the default DF MouseWheel command with a ctrl-command, like:

^Wheelup|k{Wheelup}
^Wheeldown|k{Wheeldown}

but it didnīt work. I also tried to leave the "k" out, as a wheelup probably isnt a key (?), but to no avail.

I guess the script does not understand the term {Wheelup}, or perhaps it needs another function trigger instead of "k", but as I said, I am no programmer, and have no idea what I am talking about. Nevertheless, I have already added some more valuable DFHack functions to my script, like copystock and some watch functions, and I really would like to be able also to define some more functions for my mouse.

What shall I write on the right side of the vertical line, to make the script understand that when I use ctrl-Wheelup/down I want the script to do a default Wheelup/down, ie. a zoom?

edit: I checked the syntax and found out that I had left out some "("s and ")"s. The following string makes the game zoom on Ctrl-Mousewheel(up/down):

^Wheelup|k({Wheelup})
^Wheeldown|k({Wheeldown})



« Last Edit: April 24, 2012, 07:24:03 am by vonduus »
Logged
DF: where imagination beats animation

vonduus

  • Bay Watcher
  • This is your captain speaking
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #128 on: April 22, 2012, 07:23:55 pm »

Two more question:

How do I install the non-compiled scripts to try them out?

And after installing them, how do I figure out what they actually do? Do they show up in the menu?

Reading the said files gave me no clues whatsoever, not being a programmer and all that. Reading the tutorials on the AHK site just made me even more confused. Please, help. I apologize for being so stupid :-[

edit: Okay, now I understand, the uncompiled scripts are provided for inspection - sorry again for being stupid.



PS I just found an old post i made on this forum back in 2010:

Quote: "I wish someone with programming skills (and I believe quite a few DF-players are programmers) would create some kind of consistent interface on top of the existing interface, so that you could input orders with the mouse from a menu and place structures on the map with the mouse (or something). I have no programming skills so I don't know if this is at all possible."

Thanks again, Shukaro!!!!

« Last Edit: April 24, 2012, 07:34:53 am by vonduus »
Logged
DF: where imagination beats animation

Shukaro

  • Bay Watcher
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #129 on: April 24, 2012, 08:36:09 am »

Sorry about the delay in responding, I've been pretty busy lately. (And the forum decided not to notify me about the new posts for some reason) :(

Just a quick question: The cursor controls are always really zippy, unless it needs to move diagonally. Why doesn't the script shift-move diagonally like it does orthogonally? Or even just jump quickly on an orthogonal to close the distance faster?

The reason why it can't shift-move diagonally is because the game only seems to support shift-moving with the arrow keys. :) I'll see if it's faster if I omit the diagonal movement, though.

Great utility, just what I always hoped for ever since I started playing DF, thanks a lot.

Minor bug: Workshops did not show up in the menu, so I had to change a line in menus.txt:

Instead of "Workshops|g(Buildings)" I wrote "Workshops|Buildings" and now everything seems to work as intended.

I was unsure if I should retain the original line, but I decided that it probably was a meaningless command, a sort of mental typo on the developerīs part (as I believe it can be translated into "go to in-game Building-menu", and DF has no Building-menu (but MouseFort has)), so I left it out. Hope I didnīt break anything, I have no programming skills whatsoever :).

Yeah, that looks like it was just a typo on my part  :'(, I'll be sure to fix it for the next release.

Another minor bug/glitch/unintended complication: Somehow ( :o) I accidentally triggered the zoom with my mousewheel to a very, very far out zoom, and it seems I canīt access this function again to zoom back in, unless I quit the script.

I tried to add two new lines to the keys.txt file, to trigger the default DF MouseWheel command with a ctrl-command, like:

^Wheelup|k{Wheelup}
^Wheeldown|k{Wheeldown}

but it didnīt work. I also tried to leave the "k" out, as a wheelup probably isnt a key (?), but to no avail.

I guess the script does not understand the term {Wheelup}, or perhaps it needs another function trigger instead of "k", but as I said, I am no programmer, and have no idea what I am talking about. Nevertheless, I have already added some more valuable DFHack functions to my script, like copystock and some watch functions, and I really would like to be able also to define some more functions for my mouse.

What shall I write on the right side of the vertical line, to make the script understand that when I use ctrl-Wheelup/down I want the script to do a default Wheelup/down, ie. a zoom?

edit: I checked the syntax and found out that I had left out some "("s and ")"s. The following string makes the game zoom on Ctrl-Mousewheel(up/down):

^Wheelup|k({Wheelup})
^Wheeldown|k({Wheeldown})

Ah, that looks like something I'll have to add in. I usually don't zoom, so I forgot you could do that. :) The {} just denote a key name, without those it would send each letter, so the syntax for sending keys is a bit different in that way from the hotkey syntax.

Two more question:

How do I install the non-compiled scripts to try them out?

And after installing them, how do I figure out what they actually do? Do they show up in the menu?

Reading the said files gave me no clues whatsoever, not being a programmer and all that. Reading the tutorials on the AHK site just made me even more confused. Please, help. I apologize for being so stupid :-[

edit: Okay, now I understand, the uncompiled scripts are provided for inspection - sorry again for being stupid.



PS I just found an old post i made on this forum back in 2010:

Quote: "I wish someone with programming skills (and I believe quite a few DF-players are programmers) would create some kind of consistent interface on top of the existing interface, so that you could input orders with the mouse from a menu and place structures on the map with the mouse (or something). I have no programming skills so I don't know if this is at all possible."

Thanks again, Shukaro!!!!

The uncompiled scripts are just there in so that people can look through them if they want to see how it works, the actual running script always references the compiled ones. If you have any questions about the script, feel free to ask! :) Hehe, yeah, the main reason I made this is because I always thought that DF could be improved by adding actual mouse support.
« Last Edit: April 24, 2012, 08:37:53 am by Shukaro »
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

vonduus

  • Bay Watcher
  • This is your captain speaking
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #130 on: April 24, 2012, 11:42:40 am »

I have both the cursor tracking and the forced tray problem on my Win7-64.

Some scientific facts:

Set-up: DF in full screen mode.
The cursor tracking is definitely working in all sub-modes like view, look, designate etc. :D
Right-clicking immediately sends DF to tray >:(

Set-up: DF in windowed mode.
Cursor tracking does not work. Toggling tracking off and then on does not help. Reloading the script does not help. Reloading the game does not help. >:(
Right-clicking is definitely working, all my new menu items are accessible and working as intended. :D

Field reports, difficult to reproduce:
Sometimes mouse-tracking works in windowed mode. I have seen it perhaps five or six times over the last few days. Most of the times I have no idea why it suddenly worked.
Twice I have seen it begin to work after clicking the button that resizes the DF window (the button between the minimize and close buttons in the top right corner of the windows frame). My window filled the whole screen, then I clicked the resize button (and had DF in a smaller than full size window), and immediately clicked it again for full screen, and suddenly mouse tracking worked. Another time I accidentally hit the resize button instead of the tray button and noticed that the window did a very slight adjust (indicating it was almost but not wholly full size before I clicked the button), and voila: Mouse-tracking. Unfortunately I have not been able to reproduce this.
Both times I later shifted to some other program that was open in the background (DFHack and Firefox resp.) and when I came back to DF, mouse tracking was irretrievably gone, no matter how much resizing I did.

Finding:

It is possible to go to full screen mode to benefit from the mouse tracking (to find a spot or a dorf or some interesting stone, fx), then push F11 to go to windowed mode to use the menu (select a building or a task), then push F11 again to go back to full screen mouse-tracking, (to place the building or designate the dig field).

This is a bit inconvenient as a work-around. And it is difficult to automate, because how can the script know that I intend to right-click (so as to press a virtual F11 before I do so) before I actually right-click, and then it is too late, because DF is in the tray?

Shukaro, how do you track the mouse? I tried to read the scripts, and I figured out that when first the script knows where the mouse is, it just uses virtual arrow-keys to get there. But how does it detect the position of the cursor? Is it measuring it  from the top-left corner of the screen? And why does it detect this correctly (and every time!) in full-screen mode and not in windowed mode?  The only difference I can think of is that the top-left corner has moved a little bit inward and a little bit more downward to free up space for the win7 window frame. Is this displacement the same across all screen sizes?

If this cannot be fixed for full screen DF, then so be it, I am biased here, always play in windowed mode. But I believe there must be a fix for windowed mode, because mouse-tracking  has worked for me several times in that mode. I believe it is a question of customizing the script to allow for my screen size. Perhaps I am wrong, I am no programmer and all that.

STOP PRESS:

If I grab the DF window and move it slightly upwards and to the left, so that its top and left borders actually disappear out of the screen, then mouse tracking works. This is fully reproducible.
« Last Edit: April 24, 2012, 11:58:51 am by vonduus »
Logged
DF: where imagination beats animation

Shukaro

  • Bay Watcher
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #131 on: April 24, 2012, 12:23:08 pm »

I have both the cursor tracking and the forced tray problem on my Win7-64.

Some scientific facts:

Set-up: DF in full screen mode.
The cursor tracking is definitely working in all sub-modes like view, look, designate etc. :D
Right-clicking immediately sends DF to tray >:(

Set-up: DF in windowed mode.
Cursor tracking does not work. Toggling tracking off and then on does not help. Reloading the script does not help. Reloading the game does not help. >:(
Right-clicking is definitely working, all my new menu items are accessible and working as intended. :D

Field reports, difficult to reproduce:
Sometimes mouse-tracking works in windowed mode. I have seen it perhaps five or six times over the last few days. Most of the times I have no idea why it suddenly worked.
Twice I have seen it begin to work after clicking the button that resizes the DF window (the button between the minimize and close buttons in the top right corner of the windows frame). My window filled the whole screen, then I clicked the resize button (and had DF in a smaller than full size window), and immediately clicked it again for full screen, and suddenly mouse tracking worked. Another time I accidentally hit the resize button instead of the tray button and noticed that the window did a very slight adjust (indicating it was almost but not wholly full size before I clicked the button), and voila: Mouse-tracking. Unfortunately I have not been able to reproduce this.
Both times I later shifted to some other program that was open in the background (DFHack and Firefox resp.) and when I came back to DF, mouse tracking was irretrievably gone, no matter how much resizing I did.

Finding:

It is possible to go to full screen mode to benefit from the mouse tracking (to find a spot or a dorf or some interesting stone, fx), then push F11 to go to windowed mode to use the menu (select a building or a task), then push F11 again to go back to full screen mouse-tracking, (to place the building or designate the dig field).

This is a bit inconvenient as a work-around. And it is difficult to automate, because how can the script know that I intend to right-click (so as to press a virtual F11 before I do so) before I actually right-click, and then it is too late, because DF is in the tray?

Shukaro, how do you track the mouse? I tried to read the scripts, and I figured out that when first the script knows where the mouse is, it just uses virtual arrow-keys to get there. But how does it detect the position of the cursor? Is it measuring it  from the top-left corner of the screen? And why does it detect this correctly (and every time!) in full-screen mode and not in windowed mode?  The only difference I can think of is that the top-left corner has moved a little bit inward and a little bit more downward to free up space for the win7 window frame. Is this displacement the same across all screen sizes?

If this cannot be fixed for full screen DF, then so be it, I am biased here, always play in windowed mode. But I believe there must be a fix for windowed mode, because mouse-tracking  has worked for me several times in that mode. I believe it is a question of customizing the script to allow for my screen size. Perhaps I am wrong, I am no programmer and all that.

STOP PRESS:

If I grab the DF window and move it slightly upwards and to the left, so that its top and left borders actually disappear out of the screen, then mouse tracking works. This is fully reproducible.

Well, the issue of the menu not working in full-screen mode is known. It's caused by the fact when DF is in full-screen control it takes control of on-screen rendering, much like any other full-screen game, then when the script tries to bring the menu up, DF loses focus. That's just a thing with windows, sadly. :( The issue is usually trivial to fix, but DF doesn't play nice with being resized and having its styles changed, so unless that issue is addressed, menus in full-screen mode won't work.  :'(

As for the mouse tracking issue, I'll have to ask you to do a few things for me so I can get some more information, if you don't mind. Mouse Fortress reads DFs memory for any data it needs for speed, reliability, and ease-of-coding, and I use Cheat Engine to find anything I need in DFs memory, so the next time the mouse tracking stops working I'd like you to take the following steps:

  • Confirm the menu is working
  • Reload the script (Make sure you get the traytips at the bottom right)
  • Open the task manager and look for mouse.ahk, cursor.exe, and watch.exe
  • Open cheat engine and connect to DF
  • Load this table up
  • Upload a screenshot of all the values CE displays

I'd also like to view your menus.txt, keys.txt, and config.ini from your mouse folder
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

vonduus

  • Bay Watcher
  • This is your captain speaking
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #132 on: April 24, 2012, 12:41:00 pm »

Last things first: Here are my menus.txt, keys.txt (both modified) and config.ini (unmodified, I believe)

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Spoiler (click to show/hide)

I am downloading Cheat Engine.
Logged
DF: where imagination beats animation

vonduus

  • Bay Watcher
  • This is your captain speaking
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #133 on: April 24, 2012, 01:53:59 pm »

It is a funny world. I thought I could very easily make your script not work again, but no such luck. I resized my windows, I quit and restarted DF, but cursor tracking has apparently come to stay. Instead the link to DFHack seems to be broken: When I send the stonesense command (or any other) through the menu, nothing happens.

So I tried out the Cheat Engine to see if I could figure out how to use it, and I believe I can. I am not supposed to push the scan button? Just upload a pic of the data in the bottom half of Cheat Engine?

Btw,   the data I got now from Cheat Engine is about cursor, window and mouse position, so I guess it is of no help to you with respect to the new DFHack issue, so I'll wait before I upload anything.

Is it at all possible to upload pictures here?



Logged
DF: where imagination beats animation

vonduus

  • Bay Watcher
  • This is your captain speaking
    • View Profile
Re: Mouse Fortress v1.2c for DF 34.07 - Custom Menu and Hotkey Framework!
« Reply #134 on: April 24, 2012, 02:14:51 pm »

This is with cursor tracking in working order and DFHack not working.

cheat data

Just testing, seems it works.
Logged
DF: where imagination beats animation
Pages: 1 ... 7 8 [9] 10 11 ... 14