The Guild II: Renaissance

The Guild II: Renaissance

Not enough ratings
How to get keyboard shortcuts via AHK
By alx.dobre
I could not stand not having proper keyboard shortcuts in this unpolished gem of a game so I made my own :)
Keyboard shortcuts for pretty much everything:
  • bottom and right action bars
  • important people screen
  • enter/exit building
  • select businesses, employees/carts
  • send cart to market
And many more :)
   
Award
Favorite
Favorited
Unfavorite
Shout out to Fajeth and ThreeOfMe
Firstly I would like to reccomend you guys play with Fajeth's mega mod pack here:

https://steamcommunity.com/app/39680/discussions/0/535152276590981564/

His mega mod pack which includes the rework of the auto trade routes by ThreeOfMe made the game playable for me. Without them I could not have enjoyed this game past owning 3 businesses.

See the guide on setting up trade routes here:
http://www.gilde2.de/social/thread/7141-english-how-to-use-trading-routes/?postID=97630#post97630

How to get keyboard shortcuts
I could not stand having to click everything so I made my own set of shortcuts using ahk. I would like to share them with you, please feel free to change and distribute this as you wish.

Firstly, you will need to install AHK (auto hot keys):
https://autohotkey.com/download/

Then just run the script I placed in the next section.

Please note that the script mainly just moves the mouse around to predetermined points and clicks. The positions are dependant on screen resolution so you may have to adjust them to your screen.

All the position numbers are at the top of the file.

To get the cursor's position there is another AHK script that you can run. Please note that the tooltip with the cursor position will not show in the Guild2 game itself so what I did to get positions was to hover the mouse over the desired location, then alt + tab without moving the mouse and write down the position.

Also please note that the displayed position is relative to the current active window so you will need a maximized window to get accurate readings. I just used an empty notepad text file.

Once the script is active it replaces key presses so you won't be able to easily name save files or buildings unless you alt tab out and suspend the hotkeys (AHK icon in your task bar next tothe date -> right click -> suspend hotkeys).
If you alt+tab out of the game while it's paused or in the escame mebu there is a bug that sometimes makes the game unresponsive when you tab back in. To recover from this just save then exit to main menu then reload again. The bug does not seem to trigger if you are not paused.

Finally if you want an easier time modifying the AHK script file there is a great AHK studio available here:
https://github.com/maestrith/AHK-Studio/wiki

It's an AHK script itself so just run it like the other scripts.
Shortcuts script file
This is the keyboard shorctucs script file:

Shortcuts included:
q ->press to move camera
e,r,t,y -> first few lower bar actions
o -> important people screen
f -> enter /exit building
Alt+1, Alt+2, Alt+3 -> send cart to market 1,2,3
x+1, x+2,x+3 -> select char 1,2,3 via their portraits - it frees up the kays 1,2 and 3 which before I always assigned to the 3 main characters

Alt + w, Alt + d ... Alt + f -> moves the mouse over the 11 businesses on the right hand side bar, after the town hall and the markets

Ins -> Toggle business buildings
Home -> Toggle official buildings
PgUp -> toggle residences

Arrow Keys -> navigate the right hand side menu once you are in the proper hover using Alt + w...Alt + f -> up and down arrows move one business up and down, left and right arrows allow you to hover over employees and carts

Del -> equivalent to 4 left arrows
PgDown -> equivalent to 4 right arrows
End -> Mouse click

I use the above keys to navigate to a business, employee or cart and select it without having to tediously mouse over them. I find it useful when manually selling stuff.

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance force #IfWinActive, GuildII LOWER_BAR_Y = 1025 RIGHT_BAR_X = 245 LOWER_BAR2_X := 210 LOWER_BAR3_X := 210 + 50 LOWER_BAR4_X := 210 + 50 + 50 LOWER_BAR5_X := 210 + 50 + 50 + 50 IMPORTANT_PPL_X := 1855 IMPORTANT_PPL_Y := 950 ENTER_BLDNG_X := 1780 ENTER_BLDNG_Y := 1030 MARKET1_X := 1890 MARKET1_Y := 245 MARKET2_X := 1840 MARKET2_Y := 245 MARKET3_X := 1790 MARKET3_Y := 245 SEND_TO_POPUP_X := 1800 SEND_TO_POPUP_Y := 190 NOTIF_BTN_X := 20 NOTIF_BTN_Y := 850 RIGHT_BAR_1_X := 1870 RIGHT_BAR_1_Y := 285 PORTRAIT_AREA_X := 1840 PORTRAIT_AREA_Y := 70 CART_EMPLOYEE_GAP := 38 UI_BTN_GAP := 55 RESIDENCE_TOGGLE_X := 1903 RESIDENCE_TOGGLE_Y := 143 PUBLIC_BUILDINGS_TOGGLE_X := 1885 PUBLIC_BUILDINGS_TOGGLE_Y := 145 BUSINESS_BUILDINGS_TOGGLE_X := 1869 BUSINESS_BUILDINGS_TOGGLE_Y := 141 ;moves the mouse and clicks mouseMoveClick(x, y) { MouseMove, x, y, 0 ; Move cursor to inventory button Sleep 100 Send {LButton down} Sleep 50 Send {LButton up} return } ;moves the mouse to the given absolute coordinates, left click then return to original mouse position mouseMoveClickReturn(x, y) { MouseGetPos, StartX, StartY mouseMoveClick(x,y) MouseMove, StartX, StartY return } ;move camera q::MButton ;quick save !q:: Send, q Return ;disable mid button to get used to new camera btn MButton::h ;inventory 2 e::mouseMoveClickReturn(LOWER_BAR2_X, LOWER_BAR_Y) ;inventory 3 r::mouseMoveClickReturn(LOWER_BAR3_X, LOWER_BAR_Y) ;inventory 4 t::mouseMoveClickReturn(LOWER_BAR4_X, LOWER_BAR_Y) ;inventory 5 y::mouseMoveClickReturn(LOWER_BAR5_X, LOWER_BAR_Y) ;important people screen o::mouseMoveClickReturn(IMPORTANT_PPL_X, IMPORTANT_PPL_Y) ;enter exit building f::mouseMoveClickReturn(ENTER_BLDNG_X, ENTER_BLDNG_Y) ;move to notification z:: MouseMove, NOTIF_BTN_X, NOTIF_BTN_Y Return ;select first char x & 1:: mouseMoveClickReturn(PORTRAIT_AREA_X - UI_BTN_GAP, PORTRAIT_AREA_Y) Return ;select second char x & 2:: mouseMoveClickReturn(PORTRAIT_AREA_X, PORTRAIT_AREA_Y) Return ;select third char x & 3:: mouseMoveClickReturn(PORTRAIT_AREA_X + UI_BTN_GAP, PORTRAIT_AREA_Y) Return ;move to business 1 -> 11 !w:: MouseMove, RIGHT_BAR_1_X, RIGHT_BAR_1_Y Return !s:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP) Return !x:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*2) Return !e:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*3) Return !d:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*4) Return !c:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*5) Return !r:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*6) Return !f:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*7) Return !v:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*8) Return !t:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*9) Return !g:: MouseMove, RIGHT_BAR_1_X, (RIGHT_BAR_1_Y + UI_BTN_GAP*10) Return ;arrow keys move between businesses, employees and carts Up:: MouseMove, 0, -UI_BTN_GAP, 0, R Return Down:: MouseMove, 0, UI_BTN_GAP, 0, R Return Left:: MouseMove, -CART_EMPLOYEE_GAP, 0, 0, R Return Right:: MouseMove, CART_EMPLOYEE_GAP, 0, 0, R Return ;Del, PgDn moves 4 carts/employees over Del:: MouseMove, -CART_EMPLOYEE_GAP*4, 0, 0, R Return PgDn:: MouseMove, CART_EMPLOYEE_GAP*4, 0, 0, R Return ;Enter is a Click End::LButton ;residence Toggle PgUp::mouseMoveClick(RESIDENCE_TOGGLE_X, RESIDENCE_TOGGLE_Y) ;public buildings toggle Home::mouseMoveClick(PUBLIC_BUILDINGS_TOGGLE_X, PUBLIC_BUILDINGS_TOGGLE_Y) ;business buildings toggle Insert::mouseMoveClick(BUSINESS_BUILDINGS_TOGGLE_X, BUSINESS_BUILDINGS_TOGGLE_Y) ;send cart to market 1 !1:: MouseGetPos, mrkx, mrky mouseMoveClick(LOWER_BAR4_X, LOWER_BAR_Y) Sleep 100 mouseMoveClick(MARKET1_X, MARKET1_Y) Sleep 500 mouseMoveClick(SEND_TO_POPUP_X, SEND_TO_POPUP_Y) MouseMove, mrkx, mrky return ;send cart to market 2 !2:: MouseGetPos, StartX, StartY mouseMoveClick(LOWER_BAR4_X, LOWER_BAR_Y) Sleep 100 ;hover over market 1 MouseMove, MARKET1_X, MARKET1_Y, 5 ;move over to market 2 MouseMove, MARKET2_X, MARKET2_Y, 5 Send {LButton down} Sleep 50 Send {LButton up} Sleep 500 mouseMoveClick(SEND_TO_POPUP_X, SEND_TO_POPUP_Y) MouseMove, StartX, StartY return ;send cart to market 3 !3:: MouseGetPos, StartX, StartY mouseMoveClick(LOWER_BAR4_X, LOWER_BAR_Y) Sleep 100 ;hover over market 1 MouseMove, MARKET1_X, MARKET1_Y, 5 ;move over to market 3 MouseMove, MARKET3_X, MARKET3_Y, 5 Send {LButton down} Sleep 50 Send {LButton up} Sleep 500 mouseMoveClick(SEND_TO_POPUP_X, SEND_TO_POPUP_Y) MouseMove, StartX, StartY return

Get cursor position script file
CoordMode, Mouse, Screen SetTimer, Check, 20 return Check: MouseGetPos, xx, yy Tooltip %xx%`, %yy% return Esc::ExitApp
Existing UI features you may not know of
You can have several characters in one group:

Either drag your mouse to select several characters or Shift + Click each character at a time. You will see that multiple chars are selected via their portraits top left of the screen.

You can assign the selection to a Ctrl + 1 .. 9 group.

You can issue some orders to all characters at the same time such as move or attack but many orders will not be available if several characters are selected.