Skip to content

Dual class through scripts - how to?

PozaniczkaPozaniczka Member Posts: 7
Hello again.

I've stumbled upon some problems I cannot solve, namely
1. How to (can you?) dual class through scripts/effects?
2. How to (can you?) change the original class of a dual class through scripts/effects?

It's easy enough to change the class. You can change xp without much of a problem either. You can change the kits easily enough. However, dualing seems impossible without the player actually clicking the dual button on the character screen.

I could artificially create the conditions for dualing so as to force the player to click the button or be stuck, unable to do anything else but that way of doing it just doesn't make me happy.

Any help is appreciated.

Comments

  • AquadrizztAquadrizzt Member Posts: 1,069
    edited April 2023
    (1) To my knowledge, there is no way for a script to set the appropriate flag on a creature to indicate that it has a dual class.

    (2) For the same reasons, I don't think you can change the original class via script once a character is dual-classed . You can always change the kit though.

    Both of these *might* be possible with EEEx.

    Can you elaborate on what you're trying to do?
  • PozaniczkaPozaniczka Member Posts: 7
    edited April 2023
    Thanks for confirming my fears.

    What I'm trying to do is to grant a mage some thieving abilities. Balance issues aside.

    I've had limited success with it so far:
    - by creating a trap disarming / lock opening / pickpocketing spells (very hacky, but well... works just fine)
    - by changing up the familiar to be resummonable and granting it thieving abilities (that grow nicely with caster level).

    But ultimately, I would like to simply grant the thieving abilities to a mage directly, no workarounds. Since thieving abilities only show up for thief multi/dual classes, I figured going this way was the right choice.

    So what I envisioned was to: make a mage kit that would automatically dual to thief, set thief as the main class, set thief level to 1 (0xp) and then let the player level up thieving skills through custom abilities of the mage kit.

    If I couldn't change the main class but could still dual - no problem - I make a thief kit that auto-duals to mage, then changes the kit to the mage one.

    But I didn't find a way to dual through scripts.

    You mention EEex. This is the second time I've been directed there. I suppose I will have to see what it is all about. Then there is GemRB.

    Edit: existence of function "void CScreenCharacter::MakeDualClass(CGameSprite* pSprite, unsigned char nNewClass)" gives me some hope. Although why would it need a sprite as an argument is a mystery so far.
    Post edited by Pozaniczka on
  • AquadrizztAquadrizzt Member Posts: 1,069
    In GemRB, I am pretty sure you can just specify the kit's hotbar to be whatever you want. (e.g. you can say "for this kit, I want 2 weapon slots, 1 quick spell, and all three Thief skill buttons).

    It might be easier to do something like making a multiclass kit (for mage/thief) that has a 100% experience multiplier but otherwise has mage progression for things like hit dice and weapon proficiency and gains no skill points/backstab progression. It won't have perfect parity with a dual-classes thief/mage, but it would be pretty close.

    Can you elaborate on the theming of this class too? is it meant to be Arcane Trickster esque or something else?
  • morpheus562morpheus562 Member Posts: 304
    If you want a mage kit to use thieving skills like find traps/detect illusions, disarm traps, pick locks/pockets, then EEex is 100% a viable solution for you. I do this to allow a myriad of classes the ability to use these abilities that normally do not have access to them.
  • jmerryjmerry Member Posts: 3,881
    The EE does have a script trigger that can detect dual-classing: OriginalClass(object,class). There's a script action to change a creature's class. Nothing specific for changing levels, but it can be done through the general ChangeStat(object,stat,value,modifier) action. Setting a dual-class flag to make a character dual-classed or change their original class ... no, I don't see any script action that could do that.
    Opcodes can change a creature's level and their title, but not their actual class or anything around dual-classing.
  • PozaniczkaPozaniczka Member Posts: 7
    Aquadrizzt wrote: »
    Can you elaborate on the theming of this class too? is it meant to be Arcane Trickster esque or something else?
    It's a mage who can sacrifice daily spell slots for various skills. Just something I wanted to make then play.
    If you want a mage kit to use thieving skills like find traps/detect illusions, disarm traps, pick locks/pockets, then EEex is 100% a viable solution for you.
    I'm looking at the "Thieving skills for bards" right now. I think I can learn from it how to do my thing.
    jmerry wrote: »
    but it can be done through the general ChangeStat(object,stat,value,modifier) action.
    Great, that's gonna save me some time researching.

    Ok, so the way is clear - EEex it is. Many thanks.
  • morpheus562morpheus562 Member Posts: 304
    Pozaniczka wrote: »
    Aquadrizzt wrote: »
    Can you elaborate on the theming of this class too? is it meant to be Arcane Trickster esque or something else?
    It's a mage who can sacrifice daily spell slots for various skills. Just something I wanted to make then play.
    If you want a mage kit to use thieving skills like find traps/detect illusions, disarm traps, pick locks/pockets, then EEex is 100% a viable solution for you.
    I'm looking at the "Thieving skills for bards" right now. I think I can learn from it how to do my thing.
    jmerry wrote: »
    but it can be done through the general ChangeStat(object,stat,value,modifier) action.
    Great, that's gonna save me some time researching.

    Ok, so the way is clear - EEex it is. Many thanks.

    I actually have specific kits get thieving skills in my Skills and Abilities mod. If you are going off examples, that will probably be a better bet for you.
Sign In or Register to comment.