Target Trouble

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #9001
    fiffi
    Participant

    Hello.
    I’m working on a profile for Ultima Underworlds. I had an idea that I will make almost all clickable areas on the game screen tappable. That involves making a lot of deadly strikes like the one below in different layers, and pixel traps to turn the different layers on or off. It’s coming along nicely, but I ran into a weird problem, so I thought I’d ask all the clever people in here if they had a suggestion.
    Deadly strike

    I’m playing with relative mouse. The first mouse navigation in the deadly strike sets absolute mouse, and the last one sets relative.

    The problem happens when I try to tap the same widget twice in a row. The second time it does not work! If I move the mouse cursor a little, I can press the widget again. This is especially annoying when I try to place widgets over the arrow keys in the status display, see below. For these to be functional, they need to be used several times in a row,
    Arrows

    I’ve been testing adding more rests between commands, changing the order of the commands and removing rests and mouse reset altogether, but nothing seems to help. Does anyone have a suggestion?

    #9002
    Al ex
    Keymaster

    It seems to be tied to the mouse reset function. If you only use three items (absolute mouse / target / relative mouse), it works fine, see this video (very crude layout 😇, just for testing purposes).

    #9003
    Al ex
    Keymaster

    My guess is that while mouse reset is being executed, it gets messed up again with the next taps. It should work if you set the Rest command to 500ms or higher, but that would defeat the whole purpose of this particular deadly strike widget. You could place a target & mouse reset widget over the small chain that rotates the character sheet. So that when you’re done scrolling yout stats, you can execute it while the sheet flips over.

    #9004
    SongJiang
    Participant

    Maybe it could work by calling another deadly strike/combo widget ?
    I mean in your widget:
    Absolute mouse
    Reset mouse
    Deadly strike/combo

    And in the new combo called previously:
    Wait X ms
    Click target
    Relative mouse

    Anyway, the Al_ex solution sounds way easier

    #9005
    fiffi
    Participant

    Hi guys. Thank you for good suggestions and instructive video.

    I have worked with this game on and off since I started using Magic Dosbox, but I feel that it’s one of the most complicated games out there to get working properly. I took a break and worked with other games to improve my skills. Now I thought it was time to get started with Ultima Underworlds again, I’m itching to play through it for the first time in 29 years. 😊

    I have tried using Al ex suggestion (absolute mouse / target / relative mouse) before, and I tried it again today. And yes, it works. Until it suddenly doesn’t work anymore. Then I do some other stuff, like pressing other widgets, and it works again for a while. It seems to me that there need to be mouse reset in there somewhere for it to be stable, and I would rather not have a separate widget for mouse reset if I can help it.

    However, I have continued working with this after starting this topic, and I think I have found a workaround. On the deadly strike I have added a second target after the click, this one just moves the cursor. This seems to make the widget working every time, and it also solves another problem. The widgets on the arrow icons shown above is activated by a pixel trap on one of the arrows, and that means that the cursor might deactivate the widgets. Moving the cursor away solves that problem as well. Deciding how to set up the pixel traps is a puzzle in itself when it comes to this game.

    By the way, no rests seem to be needed, either. We want maximum snappiness, right? 😊

    I will continue working with this, keeping your advice in mind. We’ll see where I end up. Thanks again.

    #9006
    Al ex
    Keymaster

    Sounds like you’re really into it. 😉
    I’ve played (and finished) Ultima Underworld on my phone with Magic Dosbox, it’s definitely doable. Mine was a very old layout though, and it took a lot of enthusiasm to actually complete it. I’ve been working on and off on a portrait mode layout ever since, I might give it another spin if something more user friendly than my initial layout pops up. 🙂

    #9007
    SongJiang
    Participant

    Great ! It sounds clear to me that the pixel trap might be the cause of your problem. It could be because the widget was disabled (because pixel trap disabled it due to the cursor) that it simply “didn’t work”.
    The move mouse trick is a good way to deal with the cursor annoyance. I used it in a lot of adventure games layout where you want the user click on the screen to do the action but don’t want the ugly cursor stay on the place where the user click. I usually move it after a click on the down right (or left) corner of the screen. Good way to hide it.

    Good luck for next steps 👍

    #9010
    fiffi
    Participant

    Yes, I’m getting really excited about it. It’s gotten to the point that I plan to play it for a while and see how it goes. You can see below what it looks like now, but I already have found things that I will change. Beside the visible buttons I have about 10 layers of invisible widgets turned on and off by pixel traps, so far.

    SongJiang, my original problem was not related to the pixel traps. That was just an additional problem that turned up when the pixel trap and target click where on the same spot. While I’m developing I keep all my widgets transparent and visible, so I can see my different layers kick in and out. When I manually move the cursor over the pixel trap I can see the widgets disappear, and return when I move the cursor again. Anyway, having a move in my deadly strike solves both problems.

    Thanks for your thoughts, guys.
    Ultima Underworld beta

    #9012
    Al ex
    Keymaster

    That looks really cool! I have to dig out my old layout and fix it. It got corrupted during the Pixel Trap development process, but should work again when I delete the Pixel Trap entries in the profile’s xml file. 🤔

    #9013
    fiffi
    Participant

    Thanks Al ex! I’ve made several changes to it today. Most notably I moved the attack widgets to the lower left corner, so I can hold the tablet and the attack button I want with the left hand, and maneuver with my right hand.

    Do you have to edit the XML to get rid of the Pixel Traps? Can’t you just remove them in the interface?

    Another question on the same note: I tried to extract one of the mgc-files, remove some icons that I did not end up using, and rezip it. I then renamed it back to mgc, but I got an error when I tried to import it. Is there a trick to the zip-ing these files? I made sure to keep the folder structure, obviously.

    #9016
    admin
    Keymaster

    can you please post the mgc file? I can check it

    #9017
    Al ex
    Keymaster

    If you repack the zip file with a normal archiver, it doesn’t always work. Not quite sure, but I think you have to store it as uncompressed zip. Easiest way is to rename the original .mgc file to .zip, open it with 7zip, delete/add items, then save the file, and rename to .mgc – that works for me, at least.

    And regarding the xml file: no, during the development process of pixel traps, there were some fundamental changes made that completely broke the profiles. If I launch one that still contains “old” pixel traps, Dosbox will crash completely. But it’s easy enough, just remove the code between the tags. I already got my UW profile working again, just need to add some new pixel traps. 🙂

    #9018
    admin
    Keymaster

    I think I am adding there one extra slash (or removing one slash) at beginning, it is some time, dont remember it well. I think it should be fixed, but I am now extra busy with deep jni learning due workaround for fatal bug in android 11, so it must wait. But I will look at this.

    #9019
    Al ex
    Keymaster

    What, the pixel trap incompatibility? Never mind, I’m probably the only person affected by this, and I’ve repaired all of my layouts now. If it’s about zip files, you can check it out when you find the time, of course. 😉

    #9020
    fiffi
    Participant

    Admin, I do not have the profile anymore. It was just an experiment, so when it didn’t work I just deleted it. It’s no biggie anyway. A couple of extra icons in the file don’t make much difference. I keep my icons at 192×192 pixels, that is what’s recommended, right?
    If I feel like trying again, I will work a little harder, keeping Al ex advice in mind. I probably used Windows built-in Add to compressed folder command to zip it. I’ll try with 7zip next time.

    Al ex, good luck with your pixel traps. I guess this problem won’t affect me, then, I just started using them. Together with layers they make a fabulous tool! The sky is the limit to what we can do with this. I’m getting more excited by Magic Dosbox every day.

    It’s also great to rediscover my old favorite games in this way. First Might and Magic: World of Xeen (which I have now completed), and now Ultima Underworlds. I have now explored most of the first level and just found my first shrine. But all the acrobatics needed to move about in this world, and to put down the monsters, can be frustrating at times. I remember feeling the same back in the day, and then I was playing with a mouse. I miss the Teleport spells from M&M already. 😊

Viewing 15 posts - 1 through 15 (of 32 total)
  • You must be logged in to reply to this topic.