[Utility] Scening Hotkeys for Warband - AI meshing, scaling objects, faster G-movement, & more

Users who are viewing this thread

Download Link (05.11.2024)
It requires installing AutoHotkey (which is only a 20mb installation and has existed since 2003, so it's safe).
Then you just open warband Edit Mode as normal, double-click the file I uploaded above, and enjoy enhanced scening. You can end the script by right clicking the H icon on the taskbar.


Features:

Additional hotkeys
This script adds additional hotkeys to the Warband scene editor. For example you can press Spacebar to activate the "Extrude" command when AI-meshing, or Tab key to re-add the currently-selected object.
;--AI meshing--
Code:
Spacebar = extrude
F = fill
C = connect
U = subdivide
O = grow selection
Ctrl + O = grow selection to max
L = weld
R = remove

;--Objects-- (only works on already-placed objects for now)
Code:
F = Toggle the Find Props window on/off
P = Toggle the Previously Placed Props menu on/off
Tab = Duplicate selected object and set same scale and position (not rotation)
Mousewheel up/down = Increase/decrease the value of selected text box (eg scale or pos)

+ = Scale up object by 0.5
Ctrl + + = Scale up object by 0.1
- = Scale down object by 0.5
Ctrl + - = Scale down object by 0.1

Ctrl + 1 = Scale object to 1.0
Ctrl + 2 = Scale object to 2.0
Ctrl + 3 = Scale object to 3.0
Ctrl + 4 = Scale object to 4.0
Ctrl + 5 = Scale object to 5.0
Ctrl + 6 = Scale object to 6.0
Ctrl + 7 = Scale object to 7.0
Ctrl + 8 = Scale object to 8.0
Ctrl + 9 = Scale object to 9.0

Ctrl + L = Hide placed items list (in very heavy scenes can reduce the lag slightly when placing an object)
Ctrl + C = Copy the currently selected prop's position data
Ctrl + V = Paste the copied position data onto the currently selected prop

;--Ground sculpting--
Code:
1 = Select Up
2 = Select Down
3 = Select Smooth
4 = Select Level

;--General--
Code:
M = toggle off mouse acceleration when holding G (on by default)
Ctrl + T = turns the Edit Mode window semi-transparent

The user can customise the keys by right-clicking the .ahk file and selecting "Edit". Then look for the parts with a letter/key followed by a double colon:
Code:
~f::
Change the letter here. A ^ symbol means it requires Ctrl to be held.

Faster prop/mesh dragging
When G is held to move objects/ai-mesh their movement rate is accelerated. Visually and practically it's much less frustrating to use than native. Use M to toggle it, and it's disabled when Ctrl held. There's a ON/OFF indicator next to the Selected Object label.

Previously Placed Props window
The script keeps a list of props used in the session so far easy re-selection. Clicking one of the entries automatically selects it in the normal way. The window can be moved around the screen, and toggled off/on with P.
It should remember the position, prop history list and toggle setting even if you exit/enter Edit Mode. Theoretically until you close/restart AHK.
02SVu.png

Prop Search window
Pressing the F key when in object mode shows a window to search for props/items/plants. The first search of each type in a session should take about 5 seconds (depending on the size if your mod), and after that should be instantaneous. Then you just click the name and it will be selected in the normal prop-select window.
F0ozx.png

Where possible the script also resizes the Edit Mode window slightly by cutting off the bottom, to allow more viewing space. For example here you can see the selected object label on the bottom left without needing to move the Edit Mode window.
VQZ3l.png


Changelog:
05.11.2024
-Fixed object duplication not working when placed objects list disabled.
-Highlight search box automatically when Find Props is activated.
-If transparency is enabled it will be reduced when hovering over the Edit Mode windows.
-Made Edit Mode not take up additional taskbar space.
04.11.2024
-made Find Props window remember its position
-Previous Props window arranges newest props at the bottom as that's where the cursor goes automatically
-Made the script's Warband/Edit-Mode detection simpler and more reliable
-various other small fixes
01.10.2024
added a find-props function with F key
-disabled Enter key to duplicate prop, Tab only now
-other small fixes
30.10.2024
-The script keeps a list of props used in the session so far. Clicking one of the entries automatically selects it in the normal way. Can be moved around the screen, and toggled off/on with P.
-Also now you can use Ctrl+c when a placed prop is selected to copy its position data. Then Ctrl+v on another prop to paste the position data onto it.
28.10.2024
-When G is held to move objects/ai-mesh the mouse input is accelerated. Use M to toggle it. Disabled when Ctrl held.
--On by default, can be set to off by default in the file
--ON/OFF Indicator is next to the Selected Object label
--Ensured original mouse speed is restored automatically on exit
-Added link to forum thread with controls etc in the Help window.


If you have feedback, suggestions, feature-requests or bug reports please leave a comment below.
 
Last edited:
Thanks for posting it here. Genius idea, honestly. Simple, practical without reinventing the wheel and easy to customize. Implementing new commands like copy-paste by cobbling together a bunch of scripted UI messages blew me away.
 
Thanks guys.
.
Added feature: faster movement of placed objects and AI-mesh.


-When G is held to move objects/ai-mesh the mouse input is accelerated. Use M to toggle it. Disabled when Ctrl held.
--On by default, can be set to off by default in the file
--ON/OFF Indicator is next to the Selected Object label
--Ensured original mouse speed is restored automatically on exit

-Added link to forum thread with controls etc in the Help window.
-Some general cleaning/efficiency in the file.
 
Last edited:
Added feature: The script keeps a list of props used in the session so far. Clicking one of the entries automatically selects it in the normal way. Can be moved around the screen, and toggled off/on with P.
02SVu.png
.
Also now you can use Ctrl+c when a placed prop is selected to copy its position data. Then Ctrl+v on another prop to paste the position data onto it.
 
Last edited:
Added feature: Find props window
F0ozx.png
Pressing the F key when in object mode shows a window to search for props/items/plants. The first search of each type in a session should take about 5 seconds (depending on the size if your mod), and after that should be instantaneous. Then you just click the name and it will be selected in the normal prop-select window.
Press F key again to close the window. Current search should be saved until AHK is restarted.
 
Update:
-Made the script's Warband/Edit-Mode detection simpler and more reliable as it was sometimes not detecting them.
-Find Props window will now remember its position when unhidden or refreshed (until AHK is restarted).
-Previous Props window now arranges newest props at the bottom as that's where the cursor goes automatically.
-Various other small fixes & QoL tweaks.
 
Tested the latest version and the searching thingie is a lifesaver. Thanks a ton, mate!
Feel free to disregard, this is already pretty good, but if I had to nitpick some improvements then:
  • The prop clone macro with Tab does not currently work when Ctrl + L is toggled on.
    • Could be interesting to enable it temporarily while it's needed and restore it back.
  • Another thing that could be interesting is to highlight the Find Props window and its search field when pressing F and toggling it on.
    • So that one can type directly, as the cursor can still click the list elements anyway, and moving the cursor back into the 3D view allows you to keep using the F hotkey to toggle the search dialog off.
  • Maybe moving the color paint and edit weather controls up and reducing the height for those too.
    • There has always been a ton of empty space there in the official toolbar layout.
    • Other controls in there could potentially use some tighter and tidier layout.
  • Maybe reduce the translucency when the toolbar is selected and Ctrl + T is enabled.
  • Maybe change the window style flags to turn the title bar into a smaller tool-style one, given that there's no close button. With the whole WS_EX_TOOLWINDOW flag stuff.
Hope that helps. :fruity:
 
Last edited:
Good suggestions, cheers!

Sorted the first 2 points.

For the third, it's quite awkward. The bottom sliders are actually the same controls shared between the ground-colour, weather and objects tabs. So if I move them up they'll be visible on the objects tab. I can move/hide them when switching to it...but it's not instantaneous for some reason, so there's an annoying effect of seeing them flicker off one by one. And cant press buttons underneath while they're doing this. Also they seem to get re-enabled behind the scenes when clicking some of the tabs that don't even use them!
It's rather vexing, I went through all this when I started as I didn't want the weather controls on the object tab. Then it turned out the best solution was just to lop the bottom of the window off.

Fourth sorted, though not entirely sold. Will use it for a bit and see. Tried this a while back with full-to-partial dynamic transparency switching but it was kinda jarring. It's less so with partial-to-less-partial. And made it not activate when LMB is down, which makes it more palatable.

Last one, I tried it and it hid it from the alt-tab list and taskbar. But didn't change the appearance. Will play about with it some more.

Updated
05.11.2024
-Fixed object duplication not working when placed objects list disabled.
-Highlight search box automatically when Find Props is activated.
-If transparency is enabled it will be reduced when hovering over the Edit Mode windows.
-Made Edit Mode not take up additional taskbar space.
 
Last edited:
Back
Top Bottom