Some 'mods' (input change and inventory quick move)

Post Reply
User avatar
Profound_Darkness
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Some 'mods' (input change and inventory quick move)

Post by Profound_Darkness » Mon Nov 02, 2009 7:13 am

Using the first post to have the updated versions of these scripts as well as key details on usage now...

The scripts are still fairly rough because I hope that some future update will allow customizing controls - 99% of what these scripts are doing and hence make these scripts useless :) .

In order to use these scripts you will need to download and install the interpreter/compiler from here. It's pretty strait forward and you don't need to know anything about programming. Once that is installed you can just double click on either (or both) of the scripts included to run them. They show up in the tray bar as an H on a green background. Right-click exit to close. They should only be changing input while you are in the Fort Zombie game and be inactive otherwise.


The script quickmove.ahk is only useful in 1.02. It doesn't work in previous versions and it is useless in 1.03+ - in 1.03 simply right click on the item to swap inventories, this script is *not* needed for 1.03. This is meant to assist in moving items between inventories quickly (again, 1.02 only).

Usage - hold alt and left click on the item. The script will then simulate the click-drag motion to place the item on the right side. Used this a LOT in 1.02 to move items between fort/backpack to keep things organized.


The script keyremap.ahk is the big one so to speak. This simulates keypresses for various events. See below for the list. Not all the features are heavily tested and some of the controls are a little wonky still but I can't use the same keys as the game already uses or we have some annoying problems (mentioned in posts below this). I leave these files open for editing if you don't like something or want to have different keys.

*NOTE: you much have numlock OFF for proper function of this script. - movement related keys will be disabled with numlock ON. All other features will work with numlock On however. Only the number keys will be effected.
**NOTE2: Currently sprint and walk are toggles... Playtesting is suggesting sprint should be held down, not a toggle.

Key List:
-Right-Mouse Button - While held the cursor is prevented from moving vertically (up or down). This is so that I can play the game still (extreme and sudden nausea for me without). Cursor movement is freed upon release of the Right Button. Also attempts to keep you from hitting the edge of the screen while rotating (keep spinning in one direction with right click held down to see). There is a demonstration of this in my video thread at about 3:50.

-Keypad Up (8) - Move forward (w)*
-Keypad 5 - Move backward (s)
-Keypad Left (4) - Move left (d)*
-Keypad Right (6) - Move right (a)*
-Keypad Home (7) - Toggle Sprint on/off (shift hold/release)
-Keypad End (3) - Toggle Walk on/off (ctrl hold/release)
-Keypad Ins (0) - Jump (space0
-End - Dive Roll (shift+space)
-Keypad Enter - Default Interaction (e)
-Keypad Del (.) - Search (f)
-Keypad Add (+) - Next weapon (tab)
-Keypad Subtract (-) - Reload (r)
-Home - Inventory (i)
-Keypad Divide (/) - Pause (p)
-Insert - Advance frame (ctrl+alt+space)
-Keypad Multiply (*) - Toggle orders to defend/clear. NOTE this doesn't do any in game state tracking so if you hit this key (defend) and then hit another order, the next time this key is pressed it will clear orders.

-Delete - Holster Weapon (u); not in manual, was added in game v1.0.3
-Backspace - Special key to clear the mouse cursor movement lock. Use this if your mouse cursor stops responding properly to vertical input after you had held the right mouse button down. This key is active outside of the game btw so if the mouse stays wonky hit this to fix. Also right click the mouse once.

* - Indicates an item where I am not doing anything, the game already has some controls mapped in this way (ie numeric keypad up/left/right arrows).


Warning about the script language... As with most scripting languages it is possible for these to access your filesystem and do things you might not want. Use some caution in running files like this from people you don't trust. This language can even do DLL calls which can allow it to do things that a full fledged language might do, good and bad. I use a dll call in this script for the mouse movement limitation.
Last edited by Profound_Darkness on Sat Nov 14, 2009 8:01 pm, edited 4 times in total.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)

cheeba
Posts: 28
Joined: Tue Oct 27, 2009 3:07 pm

Re: Some 'mods' (input change and inventory quick move)

Post by cheeba » Mon Nov 02, 2009 7:59 am

Nice work there, I'm sure a few people will find these useful for sure.

User avatar
Profound_Darkness
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: Some 'mods' (input change and inventory quick move)

Post by Profound_Darkness » Mon Nov 02, 2009 7:07 pm

Probably... I figure that it will end up being an interim thing until the next update since inventory and controls are supposed to get a bit of attention.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)

User avatar
Mecron
Kerberos
Posts: 38676
Joined: Fri Aug 05, 2005 7:26 pm

Re: Some 'mods' (input change and inventory quick move)

Post by Mecron » Tue Nov 03, 2009 1:40 am

you may want to warn them about the whole getting stuck walking thing :thumbsup:

User avatar
Profound_Darkness
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: Some 'mods' (input change and inventory quick move)

Post by Profound_Darkness » Tue Nov 03, 2009 4:43 am

Yeah. That got rather annoying. I have refined the code a bit, played the game w/script for several hours, and cleaned things up. Basically the script engine couldn't block 100% of the original keyboard input so sometimes the real key press got through but the real key release didn't... lots of other fun problems but I haven't done an autohotkey script since the sots ones, forgot about all the fun quirks.

The script now more closely fits my own preferred style of play which means that it's harder for other people to mod it...

It probably needs more work but I rarely encounter a problem with stuck moving anymore (or stuck anything else). The toggles don't always work either but they are there most of the time.


Anyway, attached is the updated file. A bit messy as I tweaked things while playing. Updated keys:
Numpad Up (8): Forward (w)
Numpad Clear (5): Backward (s)
Numpad Left (4): Left (a)
Numpad Right (6): Right (d)
Numpad Home (7): Sprint (shift)
Numpad End (3): Walk (control)
Numpad Insert (0): Jump (space)
Numpad Enter: Default Interaction (e)
Numpad Delete (.): Search (f)
Numpad Add (+): Switch weapon (tab)
Numpad Subtract (-): Reload (r)
End: Inventory (i)
Numpad Divide (/): Pause (p)
Numpad Multiply (*): Frame advance (ctrl+alt+space)

IMPORTANT: numpad must be OFF. I could force this in script but didn't. The pause key and a few other keys work regardless of numpad but if you want to move, it needs to be off.

Anything unmentioned, is unchanged, and of course original input is still possible.

I may add one more key for the diving jump since the sprint/walk are still both toggles (this can still be disabled).

Quickmove got a small update as well (small code change to keep it from thinking you were playing the game when you weren't)
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)

User avatar
Profound_Darkness
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: Some 'mods' (input change and inventory quick move)

Post by Profound_Darkness » Wed Nov 11, 2009 11:43 pm

I figured out how to edit files away here (noticed delete file in the edit post screen) so I will be editing the first post with an updated version (yet again). This is still based around my style of play but also the limitations of having to 'share' controls with the base game as well - can't bind my stuff to anything the game already uses.

I haven't had the time to fully test it but here is what is new.
Added the 'u' key to holster weapons. This is bound to delete...
Added the ability to do a dive jump regardless of move speed (1 keypress gets you sprinting and then diving). This is bound to the end key.
Added the asterisk key on numeric keypad to toggle defend/clear orders.

Biggest one related to 1.0.3 (for me anyway)
Added feature to lock the mouse cursor's vertical movement while right mouse button is held down. This keeps the camera locked when moving (and prevents me from throwing up while playing).

I haven't had the chance to test things thoroughly - the dive roll is a little goofy (sometimes you jump instead of dive roll, even without a big gun in hand). Minimal testing on the camera lock but it seems to release the lock.

Just in case you can hit backspace to free the lock. Complete details in original post.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)

Post Reply

Return to “FZ Modding”

Who is online

Users browsing this forum: No registered users and 2 guests