Skip to content

[QUESTION] Assigning 'ALREADY EXISTING SCRIPTS' to 'HOTKEYS'?

RodrianRodrian Member Posts: 426
As I searched through the forum, all I have found was how to create your own scripts, or how to assign just single actions to hotkeys etc., with usage of various tools, and what I want to know is:

* Is there any way to (as in the topic) assign already existing scripts (like STANDARD ATTACK: AGEN, PASSIVE: APASS or IWDPGEN) to hotkeys, so I can easily switch between them without entering CHAR Customize sheet all the time?

..and if this was already known/explained, can I ask for the link to the step-by-step tutorial?

Comments

  • BigfishBigfish Member Posts: 367
    I just barely started looking at scripting myself, so take this with a grain of salt.

    Is there a way? Yes. It looks like there is an action called "ChangeAIScript(S:ScriptFile*,I:Level*Scrlev)" which will change the AI script assigned.

    Is it easy to implement? Not really. One way to do it would be to set the hotkeys in each AI script that would let them change which AI script is assigned, but to do that you would need to have a full set of modified AI scripts that spell out to change the script to another in the set. I imagine there is also a way to globally set hotkeys to do whatever, but that probably gets more involved with having to define what characters you want to assign the script to, and has the issue of being limited to the script names that are reasonably expected to be present, which is really counter to the idea of AI scripts being highly modable and customizable.

    If you're trying to change behavior, you seem to be better off setting a variable in the script that is toggled by a hotkey that sets some subset of Actions and Triggers to be active instead of another. It really depends on what you have in mind as far as how extensively you're trying to modify behavior. I can't imagine most people are having an issue with switching a character between individual scripts enough to really warrant trying to implement a faster method of swapping assigned AI.
    JuliusBorisovRodrian
  • RodrianRodrian Member Posts: 426
    Good AO.. thankfully I gave up with this idea some time ago..
    I realised that everything I TRULY need from in-game scripts are AGEN + turn on/off Party AI :smirk:

    Nevertheless, Thank You @Bigfish, for your time and response. Maybe someone else will benefit from it :smile:
    BigfishJuliusBorisov
  • BigfishBigfish Member Posts: 367
    No problem. I was looking in to it because I'm trying to learn scripting and it seemed like a good challenge given how fractured info on the subject is. I did actually manage to get some scripts to switch to each other after some fiddling, so it's definitely possible, and I learned some interesting stuff on the side, like needing to add strings to the dialogue file to get custom text to appear. That and using Near Infinity to decompile this stuff so I can see what scripts are actually trying to do.

    Definitely have my work cut out for me.
    Rodrian
Sign In or Register to comment.