Page 1 of 1

RC file help with skill targets!

PostPosted: Tuesday, 19th December 2017, 03:00
by mibe420
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!

Re: RC file help with skill targets!

PostPosted: Tuesday, 19th December 2017, 03:21
by advil
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.