AutoCombat (similar to DCSS)

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
don
Posts: 1
Joined: Thu Feb 07, 2013 12:10 pm

AutoCombat (similar to DCSS)

#1 Post by don »

I just started to write a little Addon to do AutoCombat similar to how it's done in DCSS. With alot of help from the really nice people on irc.rizon.net/#tome i got it somewhat to work.

Why do you need AutoCombat:
archery is really tedious, so tedious that every bit making it less annoying helps.

What AutoCombat does:
activating the talent checks the area for hostiles, if any are in range use shoot/attack the "closest one" otherwise walk towards it.

How do i use AutoCombat:
extract the zip in your addon folder, create a new character - you will have a new innate talent called "autocombat"

What about the Code?
It's still mostly the tourist example addon, the changes are in talents/tourist.lua; i'm sorry about the terrible documentation :p

TODO:
- remove example code
- FIX: add it to party members (golem, summons, etc.)?
- FIX: some traps trigger errors, i don't think it's related to the talent though rather to the tourist class
- FIX: sometimes alternating between autoexplore and autocombat gives confusing results
- prefer last targeted enemy if possible

MAYBE:
- call autoexplore if no hostiles are in the area (might generally replace autoexplore?)
- make movement safer so you don't lose a turn against a enemy (sidestep if distance is odd, move towards enemy if even)

Greetings Dondy

---

Changelog:
added superloading Player.lua, for all classes
added talent to tourist class
Attachments
tome-example.zip
(20.39 KiB) Downloaded 120 times
Last edited by don on Fri Feb 08, 2013 11:06 am, edited 3 times in total.

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: AutoCombat (similar to DCSS)

#2 Post by tiger_eye »

Nice start. Might I suggest that you add a particle effect to the targeted enemy? Try something like:

Code: Select all

target:addParticles(engine.Particles.new("notice_enemy", 1))
Also, initiating auto-explore if you don't see anything may be undesirable. For example, what if you're fighting a stealthy rogue or ghost, or what if something becomes invisible (via rune or talent)? If you're wanting to auto-attack it but you suddenly can't see it, then you probably don't want to go auto-exploring all around the level.
darkgod wrote:OMFG tiger eye you are my hero!

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: AutoCombat (similar to DCSS)

#3 Post by darkgod »

Nice, may I suggest uploading it to te4.org ? ;)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply