Changing shift+direction behavior


Questions, Explanations, Howtos

User avatar

Shoals Surfer

Posts: 251

Joined: Friday, 19th August 2016, 21:21

Post Monday, 8th October 2018, 16:09

Changing shift+direction behavior

Hi, I hope this is the right place to ask.
The current behavior of shift+direction is going in a straight line until I bump into a wall or spot a monster.
I'd like to change it so that it only moves 1 square unless there's a monster in LOS. Is there an option already for this?
If not, I'd like to try writing a lua script for it. Could someone point me in the right direction? Preferably a few pre-existing bits of code dealing with movement and/or monster los detection. I should figure it out from there.
I'd also like to create a script that skips a turn unless there's a hostile monster in los. I suppose if I manage to write the previous one, this would be simple in comparison.

Thanks in advance, guys
make food great again

Lair Larrikin

Posts: 19

Joined: Wednesday, 31st October 2018, 15:02

Post Wednesday, 31st October 2018, 15:17

Re: Changing shift+direction behavior

I'm not sure if this will solve moving into one direction until you hit a wall as I've transferred my rc file from offline to online and I've never had this problem before in offline, but here's what I did:

Include in your rc file this line:
include = safe_move_shift.txt

What it will do is that it will make your letter direction keys (y,u,h,j,k,l,b,n) when pressed with shift to move only when there are no monsters in LOS, otherwise you will get a message that 'monster is in sight' and not move.

Since I'm used to play with numpad keys as movement keys what I did is that , in game, I've set up a macro for each numpad key to represent an upper case letter, for example Shift+Num7 is macro'ed as Y. It's a bit tedious to set it up but you can save the macros and use them on any other character.

Hope this helps.

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.