Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 11

Author Topic: M.O.U.S.E Fortress - Old Thread, see New Thread  (Read 63118 times)

NRN_R_Sumo1

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #60 on: August 02, 2010, 11:23:13 pm »

Ok, it's setting the errorlevel to 1 for imagesearch. That means that for some reason, it's failing to find the pictures of the cursors on the screen. Could you capture a screenshot of DF (.png format or some other high-quality format, alt-printscreen takes a picture of the active window) while the cursor is up and pass me a link so I can see how the images are different?
Well I kinda figured that was the issue, but I'm not sure how it would occur that way if we're using the exact same images.
Spoiler (click to show/hide)
Logged
A dwarf is nothing but an alcohol powered beard.

NRN_R_Sumo1

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #61 on: August 03, 2010, 02:14:08 am »

after a little investigation of the sprite sheets myself, I'm fairly certain you've not indeed tested the pheobus set for this feature.
We all make oopsies of course, so I'll try to show you what I've found. :D

Here is the capital X from the current version of phoebus, and the X you provided.

<-has borders, when compared to other letters looks like its on top of a button.
<-flat, no borders.
« Last Edit: August 03, 2010, 06:53:36 am by NRN_R_Sumo1 »
Logged
A dwarf is nothing but an alcohol powered beard.

Shukaro

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #62 on: August 03, 2010, 01:32:00 pm »

I can assure you, on my machine, it's able to find it when using the Phoebus tileset. I'm just not sure as to why it can't find it on yours. Download this alternate yellowx.png that I cropped out of your screenshot and replace the original with it (Since these are images of tiles, as long as the image contains the image you're searching for, IE the X, and doesn't contain anything from other tiles, it will find it). If it finds it, that means that something is causing the X to be a slightly different image, then all I need to do is get screenshots of the other cursor colors from you to make it work. On the other hand, if it doesn't, that means that the issue isn't in the image files, but rather someplace else (likely a video card). If you have access to another computer to test the script, I recommend trying that as well.

As for the memory.xml, it may very well have the offsets with the values that would let me remove the imagesearch calls, so I'll check it out.
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

NRN_R_Sumo1

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #63 on: August 03, 2010, 03:56:34 pm »

Well, thats Sort of working now.
it's not actually following the mouse, but atleast its moving.
It goes left down, and just continues to do so.
Wait, I figured out the issue that way, when you have the other menus up it screws up detection of position for some reason.
so with 1/3 of the screen being view, and the other 2/3 being menu and map, unless your mouse is on the very far side of the right screen, its going left.

when the area is Square however, taking up 2/3 it works decently well enough, although it is a little hard to pinpoint specific tiles sometimes, and it moves rather slowly.. Is there a way to speed up how fast the cursor can go? I'm assuming it would be in DF's settings.


when I get back from the store I'll be cropping those SS's for you, just incase someone else is also having issues later on.  :D
Logged
A dwarf is nothing but an alcohol powered beard.

Shukaro

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #64 on: August 03, 2010, 04:45:42 pm »

Hmm, it's wierd that my image didn't match yours, but, as long as screenshots are provided, it'll work.

As for the speed and precision, I'm revising it with fewer sleeps and having it settle the middle of the cursor on the mouse.
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

s20dan

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #65 on: August 03, 2010, 07:44:23 pm »

Am very excited by this, mainly because I can't play dwarf fortress with the normal interface and my keyboard  >:(

 This seems like the answer to all my problems, but I cant get it to work right.

 On the main menu using the mouse causes the selection to skip between new game and quit, as if I were pressing Up-Down-Up-Down.
 in the game, camera movement is pretty good but to move in a straight line it seems you have to move the mouse dead straight. Which is a challenge in itself ;)

 The new menu is pretty much a gift from Armok himself, but again doesnt work correctly for me. Most things that I select with the menu cause the mouse functions to stop, and I have to reload the script. Digging seems to just dig anywhere my mouse cursor goes, which makes it difficult to designate areas accurately, I have no middle mouse button, but double click on the left button seems to work.
 Although, even without the mouse working, its still far better that the built in menus.
 
 I don't suppose its possible to keep DF as the active window when using the menu is it? As in Fullscreen the focus is lost when you right click. I can of course use window, but without zoom its a pain.

 If this can be made to work correctly, it might stop people laughing in my face when I try to introduce them to DF hehe

P.S.  Constructions should be directly under buildings, not under furniture IMO ;)

Thanks for all your efforts Shukaro.
« Last Edit: August 03, 2010, 07:46:33 pm by s20dan »
Logged

Shukaro

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #66 on: August 03, 2010, 08:12:53 pm »

There's no support for the out-of-game menus quite yet, as I'm not sure how I can get the script to recognize it's at the main menu yet.

The movement however, is one of the things that's getting improved next release. Right now, your mouse has to exactly match the original position's X or Y, so I'm adding more tolerance to that.

As for the menu bugging the functions, your mouse should always either A: let you drag the screen around, B: let you designate a box, or C: have the game cursor follow it around. It chooses one of those based on what you just selected in the menu. As for the designations where your mouse goes, that's a built-in feature of DF, I'm trying to figure out how to suppress it while a function is running though.

The focus issue is actually one that's in the OS, but I'm checking out possible solutions.

About the constructions, I agree, I'll move it when I upload the next release.
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

s20dan

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #67 on: August 03, 2010, 09:21:39 pm »

 
As for the menu bugging the functions, your mouse should always either A: let you drag the screen around, B: let you designate a box, or C: have the game cursor follow it around.

 It seems to do A and B with almost no problem, but I have yet to see C working with my setup. What could cause it to stop following the cursor around?

 EG, when I press K, I have to click and drag to move the game cursor but its supposed to follow the cursor right?

Cheers.

Edit/ I did some checking with the various functions and its whenever I select from the right click menu:  Look, Building Tasks, View Units and anything else that requires the game cursor to move about, Thats when the script stops responding, and wont respond to right clicks to select 'back'. 

 Nearly everything in tools works and digging does work also.

 I had thought it might be because I use a different Colours.txt file to the standard Ironhand, but I replaced it and it didnt seem to change it.
« Last Edit: August 03, 2010, 09:41:30 pm by s20dan »
Logged

Shukaro

  • Bay Watcher
    • View Profile

Do you play when zoomed in or out? If so, that will cause it to not find the cursor. If you use a custom tileset you'll have to swap out the original vanilla image files for the ones in the appropriate folder.

The imagesearch command is causing a lot of issues, it seems, I'll have to figure out an alternate way (fingers crossed for cursor coordinates in DF).
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile

regarding translating the screen coordinates into world coordinates, that's easy to do in DFhack

DFHack::Position::getViewCoords (int32_t &x, int32_t &y, int32_t &z); will tell you what part of the map you are looking at. from there it's easy.

the rest of the stuff in position.h is also rather useful
Logged

NRN_R_Sumo1

  • Bay Watcher
    • View Profile
Re: M.O.U.S.E Fortress v1.0.4 - Click your way to Fun!
« Reply #70 on: August 03, 2010, 09:38:11 pm »

As for the menu bugging the functions, your mouse should always either A: let you drag the screen around, B: let you designate a box, or C: have the game cursor follow it around.

 It seems to do A and B with almost no problem, but I have yet to see C working with my setup. What could cause it to stop following the cursor around?

 EG, when I press K, I have to click and drag to move the game cursor but its supposed to follow the cursor right?

Cheers.

thats because when you hit K its not activating the script, you need to right click and go into the look around menu he's made for it to work.
Logged
A dwarf is nothing but an alcohol powered beard.

s20dan

  • Bay Watcher
    • View Profile

Do you play when zoomed in or out? If so, that will cause it to not find the cursor. If you use a custom tileset you'll have to swap out the original vanilla image files for the ones in the appropriate folder.

 Normally yes I would be zoomed in, but using this tool I have not been using the zoom.
 I use the Ironhand tileset, there was an Ironhand(genesis) folder with the tool and I placed the contents into the MouseFortress folder.


thats because when you hit K its not activating the script, you need to right click and go into the look around menu he's made for it to work.

I should have perhaps been more clear, I edited the post to that effect.  I did try both right clicking and selecting look, as well as just pressing K.
« Last Edit: August 03, 2010, 09:53:33 pm by s20dan »
Logged

Shukaro

  • Bay Watcher
    • View Profile

s20dan: Did you move the files that were already there into the vanilla folder?

Japa: I actually have to do the opposite, translate world coords to screen. But, I've looked through DFHack's memory.xml, and it has world-relative cursor coordinates, world-relative window coordinates (the top left corner I believe), and screen-relative coordinates, all conveniently in tile format. What needs to be done now, is for me to write out the math to convert the cursor and window coordinates into screen coordinates.

So, non imagesearch-reliant cursorfollow function is on it's way, and that's going to fix the most annoying of the functions in the script.
Logged
Urist McHauler Cancels Give Food: Patient Insane
------------------------------------------------------------------
Mouse Fortress | Custom Menu and Hotkey Framework
Dwarven Higher Learning Mod | Alternative Skill Training

s20dan

  • Bay Watcher
    • View Profile

Yup, I followed those instructions to the letter ;)  But would that actually matter?
« Last Edit: August 03, 2010, 10:04:39 pm by s20dan »
Logged

NRN_R_Sumo1

  • Bay Watcher
    • View Profile

Yup, I followed those instructions to the letter ;)  But would that actually matter?
The error you are getting is the same as I was getting, if you take a screen shot of your cursor in each mode you should be able to crop it to the 16x16 image that you need.

It would seem that screenshots produce differant images than the tilesets, which actually would lie in the resolution of your monitor.

so in theory, if Shukaro is running an 1680x1050 resolution like I am, there should have been no issues with the image searching, but if he was using say, 800x600 or 1280x800 it would be searching for images which are effectively smaller, and therefor differant than the ones 1680x1050 are showing.
Logged
A dwarf is nothing but an alcohol powered beard.
Pages: 1 ... 3 4 [5] 6 7 ... 11