Hello again
I just change default movements to better one (in my opinion)
i mean enable default WDSA, so its simple now you can rotate by left shift+W or shift+a etc.
and if you want to message somethink you must press enter (chat is enable),
when you press enter again to send message chat is disabled(to enable WDSA)
in npc chat this doesn't work, so you can easly write everythink without pressing enter every time
I Suggest to press tab when you end talking with npc
THIS CHANGES GIVE YOU PLAY WITHOUT USING ARROWS!!
so, to change movement to better one(again in my opinion)
go to \modules\game_console\console.lua
change
to
and replace old function enableChat()
to
then replace default function disableChat()
to
then in function addTab(name, focus)
add
after
then go to function addPrivateText(text, speaktype, name, isPrivateCommand, creatureName)
add
after
next go to file \modules\game_interface\gameinterface.lua
add
before
this is it, now you can play using WDSA thats makes easy using macros F1,F2....
and easy rotate character when press shift by left little finger.
I belive this changes make you better life!!!
I just change default movements to better one (in my opinion)
i mean enable default WDSA, so its simple now you can rotate by left shift+W or shift+a etc.
and if you want to message somethink you must press enter (chat is enable),
when you press enter again to send message chat is disabled(to enable WDSA)
in npc chat this doesn't work, so you can easly write everythink without pressing enter every time
I Suggest to press tab when you end talking with npc
THIS CHANGES GIVE YOU PLAY WITHOUT USING ARROWS!!
so, to change movement to better one(again in my opinion)
go to \modules\game_console\console.lua
change
Code:
g_keyboard.bindKeyPress('Tab', function() consoleTabBar:selectNextTab() end, consolePanel)
Code:
g_keyboard.bindKeyPress('Tab', function() consoleTabBar:selectNextTab() disableChat() end, consolePanel)
to
Code:
function enableChat()
local gameInterface = modules.game_interface
consoleTextEdit:setVisible(true)
consoleTextEdit:setText("")
g_keyboard.unbindKeyUp("Space")
g_keyboard.unbindKeyUp("Enter")
g_keyboard.unbindKeyUp("Escape")
gameInterface.unbindWalkKey("W")
gameInterface.unbindWalkKey("D")
gameInterface.unbindWalkKey("S")
gameInterface.unbindWalkKey("A")
gameInterface.unbindWalkKey("E")
gameInterface.unbindWalkKey("Q")
gameInterface.unbindWalkKey("C")
gameInterface.unbindWalkKey("Z")
local quickFunc = function()
local npcTab = consoleTabBar:getTab('NPCs')
local message = consoleTextEdit:getText()
local curTab = consoleTabBar:getCurrentTab()
if npcTab and curTab == npcTab then
--if #message == 0 or #message == 'bye' then
--g_game.closeNpcChannel()
--end
return
end
consoleToggleChat:setChecked(true)
disableChat()
end
g_keyboard.bindKeyUp("Enter", quickFunc)
consoleToggleChat:setTooltip(tr("Disable chat mode, allow to walk using ASDW"))
end
to
Code:
function disableChat()
local gameInterface = modules.game_interface
consoleTextEdit:setVisible(false)
consoleTextEdit:setText("")
gameInterface.bindWalkKey("W", North)
gameInterface.bindWalkKey("D", East)
gameInterface.bindWalkKey("S", South)
gameInterface.bindWalkKey("A", West)
gameInterface.bindWalkKey("E", NorthEast)
gameInterface.bindWalkKey("Q", NorthWest)
gameInterface.bindWalkKey("C", SouthEast)
gameInterface.bindWalkKey("Z", SouthWest)
local quickFunc = function()
if consoleToggleChat:isChecked() then
consoleToggleChat:setChecked(false)
end
enableChat()
end
--g_keyboard.bindKeyUp("Space", quickFunc)
g_keyboard.bindKeyUp("Enter", quickFunc)
--g_keyboard.bindKeyUp("Escape", quickFunc)
consoleToggleChat:setTooltip(tr("Enable chat mode"))
end
add
Code:
enableChat(false)
Code:
consoleTabBar:selectTab(tab)
add
Code:
enableChat()
Code:
focus = true
next go to file \modules\game_interface\gameinterface.lua
add
Code:
g_keyboard.bindKeyPress('Shift+W', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+D', function() g_game.turn(East) changeWalkDir(East) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+S', function() g_game.turn(South) changeWalkDir(South) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+A', function() g_game.turn(West) changeWalkDir(West) end, gameRootPanel)
Code:
g_keyboard.bindKeyPress('Ctrl+Up', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
this is it, now you can play using WDSA thats makes easy using macros F1,F2....
and easy rotate character when press shift by left little finger.
I belive this changes make you better life!!!
Last edited: