Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
DF Hadley

Registered:
Posts: 23
Reply with quote  #1 
Hey, not entirely sure if this is the right forum, but here goes.

I am in the process of building consoles for a few stations, and we're close to a working Weapons prototype. I'm using a Leo Bodnar BBI-32 coupled with xPadder to translate physical button presses into keypresses for Artemis. I seem to remember this worked okay with my last try back when 2.0 was the current version, but now the hotkeys aren't working. Specifically the ones for loading tubes. What I'm getting is 1-4 select tubes when shift is not pressed, then when shift IS pressed they both load and fire.

I checked the controls.ini file, and as far as I can see there shouldn't be any problems; 1,2,3,4 for torp types, shift+1,2,3,4 for firing, 7,8,9,0 for Cycle Tube. I assumed Cycle meant Load, but I guess I'm not certain.

What I want to do is assign Ammo Type to, say, ZXCV, the have Load Tube on 7890. and then fire on SHIFT+1234. As we're using physical buttons it'd be silly if a player could just use the same four buttons for all Torpedo functions.

Is this even possible? Am I doing something glaringly obviously stupid?
Lightwave_Gecko

Avatar / Picture

Registered:
Posts: 111
Reply with quote  #2 
No, you didn't do something stupid.  You did exactly the same smart thing I did:  Build some kick ass hardware and make assumptions.  Unfortunately, we were both wrong.

In the latest version of the game, the "cycle tubes" has been removed.  The hotkeys SHIFT+1(2,3,4) now load the tube if it's empty, and fire it if it's not.  That's more intuitive if you have a standard keyboard and want to use hotkeys, but it is seriously uncool for us who built our consoles around the possible need to UNLOAD without firing. 

On my console, I worked around it by having the key move to the spot on the screen the "load" button lives and hitting the click.  It's a workaround, but it works.

I REALLY hope Thom brings this back!
DF Hadley

Registered:
Posts: 23
Reply with quote  #3 
I was afraid of that, yeah... 

How exactly did you do that workaround? I've seen people talking about using the same fix for other stuff, but sadly I'm completely green to coding. 
Lightwave_Gecko

Avatar / Picture

Registered:
Posts: 111
Reply with quote  #4 
The bit of hardware I used (A Pi Engineering programmable USB keypad) had all the macro software with it, so mine was less coding and more macro using.  Not sure how you'd do it with what you're using.

-JP
DF Hadley

Registered:
Posts: 23
Reply with quote  #5 
That sounds a million times simpler. I've spent a few hours trying to find some software to to what I need, but the ones that can set up hotkeys can't map to spesific coordinates, and the ones that can do that won't do hotkeys.


Lightwave_Gecko

Avatar / Picture

Registered:
Posts: 111
Reply with quote  #6 
Autohotkey will do it, I think.

-JP
Lightwave_Gecko

Avatar / Picture

Registered:
Posts: 111
Reply with quote  #7 
Or NirCmd...

-JP
eurobusker

Registered:
Posts: 108
Reply with quote  #8 
effectively, I tried adding to the controls ini 
SHIFT                      =           NO
etc, but to no avail.
I now have a choice of 4 useless buttons or 4 holes [frown]
Lightwave_Gecko

Avatar / Picture

Registered:
Posts: 111
Reply with quote  #9 
I looked more for you into NirCmd.  It's a little utility that runs from a dos prompt, if your program can drop out and run a batch file, it would work.  From the help page at http://www.nirsoft.net/utils/nircmd2.html#using I found:

setcursor [X] [Y] Set the position of mouse cursor. The [X] and [Y] parameters specifies the desired cursor position.
Example:
setcursor 100 50

And:

sendmouse [right | left | middle] [down | up | click | dblclick]
sendmouse [move] [x] [y]
sendmouse [wheel] [Wheel Value]
Sends the specified mouse event to the system. The operating system will behave exactly as the user really made the specified mouse action.
Heres some example of sendmouse command:
  • Sent a right click (For most applications, a context menu is opened):
    sendmouse right click
  • Sent a double-click with the left mouse button:
    sendmouse left dblclick
  • Press the left mouse button, move the mouse cursor 30 pixels left and 20 pixels down, and then release the button:
    sendmouse left down
    sendmouse move -30 20
    sendmouse left up
  • Scroll the mouse wheel 10 units in standard wheel mouse. (On standard wheel mouse, the wheel value should be a multiple of 120).
    sendmouse wheel 1200

I've used NirCmd before in Artemis by using AutoHotKey (AHK) to call the commands.  AHK "hears" the hotkey, then runs the NirCmd function.  It might be possible to do it all in AHK as well.  It depends on what works best for you.

-JP
Lightwave_Gecko

Avatar / Picture

Registered:
Posts: 111
Reply with quote  #10 
Here's the post of what I ended up using:  http://artemis.forumchitchat.com/post/custom-weapons-console-using-xkeys-24-7215148?pid=1285499974#post1285499974

-JP
jgreene@greenemyst.com

Registered:
Posts: 141
Reply with quote  #11 
autohotkey would definitely do this. It can map mouse coordinates AS part off a macro
It also has coordinate value checking and states.. so it could check the color value of a pixel at a coordinate and either send the correct key for the desired function.


__________________
Volg Clawtooth
Chief Engineer of Myst Brigade
Artemis: Greater Indianapolis
eurobusker

Registered:
Posts: 108
Reply with quote  #12 
Does Thom read the forums?
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.