New Keybinds

Jun 6, 2015 at 5:01 PM
Senior Member
"Wahoo! Upgrade!"
Join Date: Mar 13, 2012
Location: Jourzar
Posts: 64
My question:

Is it possible to make a new keybind for Cave Story? Like, making a different key that is not normally used for Cave Story gameplay be used for something else, such as running a script? Is there a certain program that does such?
 
Jun 6, 2015 at 5:16 PM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
Yes, but you need to have at least a decent understanding of Cave Story ASM hacking to do so. That means either getting someone knowledgeable in the subject to hack that for you (not likely), or taking the time to learn it yourself to hack it in the game. Also, from what I understand of TSC, it's also possible to do some crazy things with flags regarding the controls, but if I had to guess it's not something that would help you with what you specifically want to do.

In other words, yes it's possible, but it's not going to be easy.
 
Jun 6, 2015 at 5:21 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Jun 6, 2015 at 6:43 PM
Senior Member
"Wahoo! Upgrade!"
Join Date: Mar 13, 2012
Location: Jourzar
Posts: 64
Thanks for the info.
 
Jun 7, 2015 at 8:47 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6212
Age: 38
You can change key bindings without asm knowledge, all you need is a hex editor.

Cue massive info dump in 3.. 2.. 1..

ctrl=133A4/134A4
break=133A6/134A6
esc=133AE/134AE
space=133B3/134B3
pageup=133B4/134B4
pagedown=133B5/134B5
end=133B6/134B6
home=133B7/134B7
left=133B8/134B8
up=133B9/134B9
right=133BA/134BA
down=133BB/134BB
insert=133C0/134C0
delete=133C1/134C1
0=133C3/134C3
1=133C4/134C4
2=133C5/134C5
3=133C6/134C6
4=133C7/134C7
5=133C8/134C8
6=133C9/134C9
7=133CA/134CA
8=133CB/134CB
9=133CC/134CC
a=133D4/134D4
b=133D5/134D5
c=133D6/134D6
d=133D7/134D7
e=133D8/134D8
f=133D9/134D9
g=133DA/134DA
h=133DB/134DB
i=133DC/134DC
j=133DD/134DD
k=133DE/134DE
l=133DF/134DF
m=133E0/134E0
n=133E1/134E1
o=133E2/134E2
p=133E3/134E3
q=133E4/134E4
r=133E5/134E5
s=133E6/134E6
t=133E7/134E7
u=133E8/134E8
v=133E9/134E9
w=133EA/134EA
x=133EB/134EB
y=133EC/134EC
z=133ED/134ED
f1=13403/13503
f2=13404/13504
f3=13405/13505
f4=13406/13506
f5=13407/13507
f6=13408/13508
f7=13409/13509
f8=1340A/1350A
f9=1340B/1350B
f10=1340C/1350C
f11=1340D/1350D
f12=1340E/1350E
semicolon=1344D/1354D
equals=1344E/1354E
comma=1344F/1354F
dash=13450/13550
dot=13451/13551
slash=13452/13552

01/01=quit
02/02=left
03/03=up
04/04=right
05/05=down
06/06=change weapons left
07/07=up(alt)
08/08=inventory
09/0A=change weapons right
0A/0A=map
0B/0B=attack/jump(alt)
0C/0C=jump/attack(alt)
0D/0D=resume
0E/0E=reset
0F/13=(no idea)
10/0F=up(alt)
11/10=left(alt)
12/11=down(alt)
13/12=right(alt)
14/13=do nothing

The first list is in the format of key=offset1/offset2 and the second list is value1/value2=action.

Essentially you need set offset1 to value1 and offset2 to value2 to map a key to a given action.

Note 1: I am aware that there are keys missing, but not every offset in either block maps to a key on my keyboard, there are a large number of seemingly dud offsets, so feel free to flesh out what I have.

Note 2: The suffix "(alt)" represents an alternate (non-default) config from DoConfig.
 
Jun 10, 2015 at 3:07 AM
LSD
"..."
Join Date: Jun 2, 2011
Location:
Posts: 397
Age: 25
andwhyisit said:
Essentially you need set offset1 to value1 and offset2 to value2 to map a key to a given action.
Is there any way to change what a particular action does? ie run a script ingame?
 
Jun 10, 2015 at 3:27 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6212
Age: 38
That would require ASM hacking. There's no other way to create new actions or edit existing ones.
 
Jun 10, 2015 at 3:16 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
andwhyisit said:
[massive list of key codes]
You could've just put those in spoiler tags, y'know.
 
Jul 8, 2015 at 2:22 AM
Senior Member
"Wahoo! Upgrade!"
Join Date: Mar 13, 2012
Location: Jourzar
Posts: 64
Random example:

A wizard mod (that I do not plan on making). Different keys cast different spells (ex. press F for Fireball, [keys that are not in the original Cave Story] press L for Lightning bolt, ect.).
 
Jul 8, 2015 at 5:25 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6212
Age: 38
You can only use this to map keys to existing actions. If you want to create a new action then you need to write that action yourself in ASM. Say if you wanted to change the jump button to the spacebar for instance, this allows that. But if you want two different attack buttons or a button that fires a specific event number then that is a new action, and you would have to write that action yourself in order to assign it to a key. Depending on the nature of the action it can take varying amounts of difficulty to implement.
 
Top