가상 키패드 (DOS / DOSX 콘솔용) : 도스게임 플레이어

 dosgameplayer

가상 키패드

DOS/DOSX 콘솔용 설명입니다 

마우스의 움직임, 마우스 버튼 클릭, 키보드의 입력키 를 지원합니다
JSON 데이터를 수정해서 키패드를 추가 / 삭제 가능합니다

UI 를 이용한 변경


아래의 수작업을 UI 로 선택해서 가상 키패드를 변경할 수 있습니다.


JSON 을 이용한 변경

키패드 추가 방법

1. 사용자 키패드 설정 : True
2. DOSGamePlayer.com 에서 게임 설정 가져오기 클릭
3. Set1 버튼 클릭

필요시 연필 아이콘 클릭해서 직접 변경



설정된 값은 게임 실행시에 자동 적용 됩니다.


JSON 파일 구조

Layer : 여러 개의 키를 조합한 그룹
1개의 Layer 에 70개의 Key 를 배치 가능
레이어 구조

Layer 는 여러 개로 구성 가능 (Layer1, Layer2 ... ) 레이어간은 type: Switch 키로 이동합니다

{
   "version":2,
   "layers": [
        {
            "grid": "square",
            "title": "layer1",
            "controls": [
                {
            		"row": 0,
                	"column": 0,
                	"symbol": "↑",
                	"type": "Key",
                	"mapTo": [
                		328
                	]
                },
                .....
                여러 개의 Key 추가 가능
            ]
        },
        ...
        여러 개의 Keypad Layer 추가 가능
   ]
}
JSON 코드를 레이어로 나타내면 row 0 , column 0 에 ↑ 모양의 버튼을 넣고 클릭시 328 번으로 작동된다
layer

Type 종류

  • Key : 키보드의 키 입력
    • mapTo : 클릭시 입력되는 값 (배열 가능)
    • symbol : 표시할 기호 (아무 문자나 입력가능, 3자리까지 표시됨)
  • Switch : Layer 간의 화면 이동
    • layerName : 설정한 layerName 으로 이동
    • symbol : 표시할 기호 (아무 문자나 입력가능, 3자리까지 표시됨)
  • Keyboard : 가상 키보드를 띄우거나 해제 하거나
    • symbol : ⌨
  • PointerButton : 마우스 버튼 입력
    • button : 0 또는 1 (0:왼쪽버튼, 1:오른쪽버튼)
    • click : true 또는 false (true : 클릭 후 button 값이 0 으로 회귀, false : 클릭 후 button 값 회귀되지 않음)
    • symbol : 표시할 기호 (아무 문자나 입력가능, 3자리까지 표시됨)
  • NippleActivator : 주변 8칸을 가상 스틱으로 입력할 수 있게 변경
    • symbol : 표시할 기호 (아무 문자나 입력가능)
  • PointerMove : 마우스 포인터를 정한 x, y 위치로 이동
    • x : 0...1
    • y : 0...1
    • symbol : 표시할 기호 (아무 문자나 입력가능, 3자리까지 표시됨)
  • ScreenMove : 마우스 포인터를 방향으로 정한 화면의 끝으로 이동
    • direction : up, down, left, right, up-left, up-right, down-left, down-right
    • symbol : 표시할 기호 (아무 문자나 입력가능, 3자리까지 표시됨)
모든 Key 들은 row 와 column 값은 기본 입니다. (동일한 layer 에서 중첩되면 안됨)
  • row : 0..6
  • column : 0..9

삼국지 영걸전 Keypad 수정하기


삼국지 Keypad 정보는 아래와 같다

{
    "version": 2,
    "layers": [
        {
            "grid": "square",
            "title": "left",
            "controls": [
                {
                    "row": 5,
                    "column": 0,
                    "type": "PointerButton",
                    "symbol": "RMB",
                    "button": 1,
                    "click": true
                },
                {
                    "row": 0,
                    "column": 7,
                    "type": "Switch",
                    "symbol": "L",
                    "layerName": "left"
                },
                {
                    "row": 0,
                    "column": 8,
                    "type": "Switch",
                    "symbol": "R",
                    "layerName": "right"
                },
                {
                    "row": 0,
                    "column": 9,
                    "type": "Keyboard",
                    "symbol": "⌨"
                }
            ]
        },
        {
            "grid": "square",
            "title": "right",
            "controls": [
                {
                    "row": 5,
                    "column": 9,
                    "type": "PointerButton",
                    "symbol": "RMB",
                    "button": 1,
                    "click": true
                },
                {
                    "row": 0,
                    "column": 7,
                    "type": "Switch",
                    "symbol": "L",
                    "layerName": "left"
                },
                {
                    "row": 0,
                    "column": 8,
                    "type": "Switch",
                    "symbol": "R",
                    "layerName": "right"
                },
                {
                    "row": 0,
                    "column": 9,
                    "type": "Keyboard",
                    "symbol": "⌨"
                }
            ]
        }
    ]
  }

이미지로 구성하면
가상키패드

에디터 선택을 위한 숫자 1, 숫자 2 버튼
화면 클릭시 마우스 왼쪽 버튼이 클릭되는 것을 막는 버튼
마우스 왼쪽 버튼을 추가 한다

에디터 선택을 위한 숫자 1, 숫자 2 버튼

{
    "row": 0,
    "column": 0,
    "type": "Key",
    "symbol": "1",
    "mapTo": [ 49 ]
},
{
    "row": 1,
    "column": 0,
    "type": "Key",
    "symbol": "2",
    "mapTo": [ 50 ]
},
화면 클릭시 마우스 왼쪽 버튼이 클릭되는 것을 막는 버튼

{
    "row": 1,
    "column": 9,
    "type": "PointerButton",
    "symbol": "MBx",
    "button": 2,
    "click": false
},
마우스 왼쪽 버튼

{
    "row": 5,
    "column": 8,
    "type": "PointerButton",
    "symbol": "LMB",
    "button": 0,
    "click": true
},

left 레이어에 추가 (RMB 를 5,1 로 이동)

{
    "row": 0,
    "column": 0,
    "type": "Key",
    "symbol": "1",
    "mapTo": [ 49 ]
},
{
    "row": 1,
    "column": 0,
    "type": "Key",
    "symbol": "2",
    "mapTo": [ 50 ]
},
{
    "row": 1,
    "column": 9,
    "type": "PointerButton",
    "symbol": "MBx",
    "button": 2,
    "click": false
},
{
    "row": 5,
    "column": 0,
    "type": "PointerButton",
    "symbol": "LMB",
    "button": 0,
    "click": true
},
{
    "row": 5,
    "column": 1,
    "type": "PointerButton",
    "symbol": "RMB",
    "button": 1,
    "click": true
},
right 레이어에 추가

{
    "row": 1,
    "column": 9,
    "type": "PointerButton",
    "symbol": "MBx",
    "button": 2,
    "click": false
},
{
    "row": 5,
    "column": 8,
    "type": "PointerButton",
    "symbol": "LMB",
    "button": 0,
    "click": true
},
keypad


수정된 Keypad
{
    "version": 2,
    "layers": [
        {
            "grid": "square",
            "title": "left",
            "controls": [
                {
                    "row": 0,
                    "column": 7,
                    "type": "Switch",
                    "symbol": "L",
                    "layerName": "left"
                },
                {
                    "row": 0,
                    "column": 8,
                    "type": "Switch",
                    "symbol": "R",
                    "layerName": "right"
                },
                {
                    "row": 0,
                    "column": 9,
                    "type": "Keyboard",
                    "symbol": "⌨"
                },
                {
                    "row": 0,
                    "column": 0,
                    "type": "Key",
                    "symbol": "1",
                    "mapTo": [ 49 ]
                },
                {
                    "row": 1,
                    "column": 0,
                    "type": "Key",
                    "symbol": "2",
                    "mapTo": [ 50 ]
                },
                {
                    "row": 1,
                    "column": 9,
                    "type": "PointerButton",
                    "symbol": "MBx",
                    "button": 2,
                    "click": false
                },
                {
                    "row": 5,
                    "column": 0,
                    "type": "PointerButton",
                    "symbol": "LMB",
                    "button": 0,
                    "click": true
                },
                {
                    "row": 5,
                    "column": 1,
                    "type": "PointerButton",
                    "symbol": "RMB",
                    "button": 1,
                    "click": true
                }
            ]
        },
        {
            "grid": "square",
            "title": "right",
            "controls": [
                {
                    "row": 5,
                    "column": 9,
                    "type": "PointerButton",
                    "symbol": "RMB",
                    "button": 1,
                    "click": true
                },
                {
                    "row": 0,
                    "column": 7,
                    "type": "Switch",
                    "symbol": "L",
                    "layerName": "left"
                },
                {
                    "row": 0,
                    "column": 8,
                    "type": "Switch",
                    "symbol": "R",
                    "layerName": "right"
                },
                {
                    "row": 0,
                    "column": 9,
                    "type": "Keyboard",
                    "symbol": "⌨"
                },
                {
                    "row": 1,
                    "column": 9,
                    "type": "PointerButton",
                    "symbol": "MBx",
                    "button": 2,
                    "click": false
                },
                {
                    "row": 5,
                    "column": 8,
                    "type": "PointerButton",
                    "symbol": "LMB",
                    "button": 0,
                    "click": true
                }
            ]
        }
    ]
  }

변경 전
before


변경 후
after


MapTo 정보

0 = 48;
1 = 49;
2 = 50;
3 = 51;
4 = 52;
5 = 53;
6 = 54;
7 = 55;
8 = 56;
9 = 57;

a = 65;
b = 66;
c = 67;
d = 68;
e = 69;
f = 70;
g = 71;
h = 72;
i = 73;
j = 74;
k = 75;
l = 76;
m = 77;
n = 78;
o = 79;
p = 80;
q = 81;
r = 82;
s = 83;
t = 84;
u = 85;
v = 86;
w = 87;
x = 88;
y = 89;
z = 90;

f1 = 290;
f2 = 291;
f3 = 292;
f4 = 293;
f5 = 294;
f6 = 295;
f7 = 296;
f8 = 297;
f9 = 298;
f10 = 299;
f11 = 300;
f12 = 301;

kp0 = 320;
kp1 = 321;
kp2 = 322;
kp3 = 323;
kp4 = 324;
kp5 = 325;
kp6 = 326;
kp7 = 327;
kp8 = 328;
kp9 = 329;

kpperiod = 330;
kpdivide = 331;
kpmultiply = 332;
kpminus = 333;
kpplus = 334;
kpenter = 335;

esc = 256;
tab = 258;
backspace = 259;
enter = 257;
space = 32;
leftalt = 342;
rightalt = 346;
leftctrl = 341;
rightctrl = 345;
leftshift = 340;
rightshift = 344;
capslock = 280;
scrolllock = 281;
numlock = 282;
grave = 96;
minus = 45;
equals = 61;
backslash = 92;
leftbracket = 91;
rightbracket = 93;
semicolon = 59;
quote = 39;
period = 46;
comma = 44;
slash = 47;
printscreen = 283;
pause = 284;
insert = 260;
home = 268;
pageup = 266;
delete = 261;
end = 269;
pagedown = 267;
left = 263;
up = 265;
down = 264;
right = 262;
extra_lt_gt = 348; 
↖ ↑↗  
←    →
↙↓↘
␛ ↵ Ⓡ Ⓛ Ⓧ Ⓞ ⇥ ␠ ␈ ␡ ␛ ⌥ ⇧ ⌘ ⌫ ⌨

v0.53.0 부터는 가상 키패드의 UI 를 설정할 수 있습니다

설정 가능한 정보는
  • 글자 크기
  • 글자 색상
  • 버튼 색상
  • 버튼 테두리 색상
  • 버튼 반경 - 사각 버튼부터 원형 버튼 표시 가능

색상은 투명도를 조절하여 게임화면 위에 흐리게 배치 할 수 있습니다

Post a Comment

Previous Post Next Post