RC file help with skill targets!


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

Halls Hopper

Posts: 82

Joined: Tuesday, 15th September 2015, 01:06

Post Tuesday, 19th December 2017, 03:00

RC file help with skill targets!

Hi, does anyone know how to use LUA to make an rcfile script to set skill targets?

Is such a thing even possible?

My goal is to have my skill growth be completely automated. IE, set a target for skill X for 10. When it is reached, set a target for skill X for 20, and skill y and z for 10. When all those are done, it would then set the next target specified.

Can you automatically set skill targets in response to events, for example, setting a target for invocations if you worship a certain god?

Any and all help is appreciated, and thanks in advance!

Dungeon Master

Posts: 388

Joined: Monday, 18th August 2014, 20:04

Post Tuesday, 19th December 2017, 03:21

Re: RC file help with skill targets!

There are two bindings, you.set_training_target and you.get_training_target, they should be pretty straightforward to use, e.g.

  Code:
:you.set_training_target("short blades", 14)


They obey the same rules that setting training targets from the skill menu obeys, e.g. you can't set a target for a skill you can't train. 0 is off. There's also an api for controlling what you're training: you.can_train_skill, you.skill_cost, you.train_skill, you.base_skill, etc

There's no specific hooks for events in the clua api, but rather you typically need to check state every turn when ready() is called (e.g. qw has tons of examples of this, and for that matter an automated training system, see choose_skill). Some kind of hook has been requested for reaching training targets specifically (which isn't easy to check for in the ready() loop) and I'd like to do it, but I haven't figured out exactly what the best way is. So far I don't think many script writers are using training targets, but I'm interested to see what people come up with.

For this message the author advil has received thanks:
mibe420

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 21 guests

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