Jump to content


Photo

Hotkey for Sell button


  • Please log in to reply
3 replies to this topic

#1 lotrfan

lotrfan

    title available

  • Project Team
  • 318 posts

Posted 20 March 2010 - 10:13 AM

Hi,

I'm looking where i can set the hotkey for the sell button (Command_Sell in Commandbutton.ini).
Can anyone tell me where it is?

Thanks
Posted Image

#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 20 March 2010 - 11:37 AM

Check Lotr.STR?
Ridder Geel

#3 Crusard

Crusard

    Local n00b

  • Project Team
  • 483 posts
  • Location:Buenos Aires, Argentina
  • Projects:Crusard's Tower Defense
  •  Poor feedback kills mapper.

Posted 21 March 2010 - 12:10 AM

Yes, all hotkeys depend on the STR files. Just add a "&" before the letter you want to use in your string.

Lotr.str can be found inside English.big (\The Battle for Middle-earth ™ II\lang folder).

Posted Image


#4 Prolong

Prolong
  • Members
  • 133 posts

Posted 25 March 2010 - 02:55 AM

Command_Sell is going to be different from most hotkeys though. Normally as they said you assign a hotkey to a command by typing an & before the desired letter in the strings file (lotr.str or lotr.csf). So if I want to give a hotkey to the button that constructs a horde of Hobbits, I would change

CONTROLBAR:ConstructElvenHobbitShirrif
"Hobbits"
End
to

CONTROLBAR:ConstructElvenHobbitShirrif
"Hobbi&ts"
End
in lotr.str. Now the hotkey to build Hobbits is 'T'. Can't use H as the hotkey as that is the Home command (jumps you to your Fortress). You don't want hotkeys to do two different things. ^_^

Of course when you are extracting lotr.str, make sure to get the most recent version. For example, if you're modding RotWK, you don't want to extract this file from English.big, you want to extract it from englishpatch201.big.



However Command_Sell will not have a hotkey like this because the hotkey is the DELETE key of course, and you cannot exactly type DELETE as one character in the strings file after an & to have it work. Plus "DELETE" is not a letter in "Sell" so it is pointless anyway. :p

You need to go into your original language file and pull out commandmap.ini (this one is located in the ORIGINAL language file, so English.big or its equivalent, as opposed to englishpatch201.big). I have never edited it before but the SELL command is at the very bottom of the file, shouldn't be hard to figure out how it works.

CommandMap SELL
;SELL is overriding DELETE_BEACON, so code has been added to process both cases.
	Key = KEY_DEL
	Transition = DOWN
	Modifiers = NONE
	UseableIn = GAME
End
KEY_DEL is the hotkey, Modifiers can be used to make it so that, for example, KEY_DEL only does something if another button is held down (usually control). No idea what Transition and UseableIn do. Remember this is a language-specific file so I have no idea what will happen if you try to use your file with other language games!

Edited by Prolong, 25 March 2010 - 03:02 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users