Announcement: Remember: you are giving away your fantastic ideas for free, and somebody else might even make money from them (or appear to). That's just how the world works! If you're worried about it, maybe you shouldn't post your ideas here.


Caravel Forum : DROD Boards : Feature Requests : Find natural target (A new scripting command)
New Topic New Poll Post Reply
Poster Message
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Find natural target (+16)  
I've just (mostly) finished coding a new scripting command Find natural target which sets two new global variables, _ReturnX and _ReturnY to the position of the natural target if a monster of given type was standing in the character's position.

A small gif presenting it: https://twitter.com/CaravelGames/status/661989478538600448/photo/1

Currently the only type of monster targeting you can simulate is "regular monster" but in the future (either later in 5.1 or in some other update) more targeting types will be implemented. The planned targeting modes are: Regular monster, Brained monster, Puff, Guard and Stalwart.

You can also see this in action: https://twitter.com/CaravelGames/status/662001688778317824/photo/1

The script used here is (without the starting "animation"):
  Imperative 22
  Imperative 3
  Imperative 7
Label Loop
  Set var "_MyScriptX" = -9999
  Find natural target Regular monster
  Set var "_MyScriptX" = _ReturnX
  Set var "_MyScriptY" = _ReturnY
  If ... 
        Move to 0,0,0,1
  Else 
     Set var "_MyScriptX" = -9999
     Wait 0
  If End 
  Go to Loop


____________________________
My website | Facebook | Twitter

[Last edited by skell at 11-04-2015 11:17 PM]
11-04-2015 at 08:19 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Find natural target (0)  
The function will be available in 5.1.0.1007

____________________________
My website | Facebook | Twitter
11-04-2015 at 08:22 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
Insoluble
Level: Smitemaster
Avatar
Rank Points: 1638
Registered: 09-04-2014
IP: Logged
icon Re: Find natural target (0)  
I feel the need to post here to tell you how exceptionally awesome this is skell.

____________________________
Links to neat forum tools that I always have trouble finding:
Click here to view the secret text

11-04-2015 at 09:20 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2668
Registered: 07-11-2014
IP: Logged
icon Re: Find natural target (+2)  
I tested a bucket-load of different configurations for this and it appears to be rock solid, I was unable to find fault.
* Correctly deals with multiple decoys according to my understanding of how it breaks ties with them (closest distance by number of squares, then by pythagoras, then by movement order).
* Correctly deals with stealth (doesn't detect player), including working correctly when a timeclone breaks stealth and then vanishes, leaving a stealthed player.
* Correctly deals with invisibility and timeclones including shallow water or via previously collected potion.
* Correctly deals with stalwarts / soldiers, breaking ties in the same way as it does with decoys, except always preferring a stalwart / soldier over the player in a tie between those two (actually, I don't know if this is correct because I don't know what's supposed to happen in this case).
* Correctly deals with decoys being chosen if they are in range and no other target is within 5 squares.

... And a bunch more basic and trivial stuff that doesn't seem worth listing. Nice one :thumbsup

[Last edited by kieranmillar at 11-17-2015 07:29 AM]
11-09-2015 at 09:52 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Find natural target (0)  
Wow! Another excellent feature by Skell, with excellent validation by Kieranmillar. You two are a dynamic duo! :batman

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
11-17-2015 at 05:05 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Feature Requests : Find natural target (A new scripting command)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.