Skip to content

In game kit switch...

GreenerGreener Member Posts: 430
I am currently attempting to create Oriental Adventures - Rise of the Samurai
http://forum.baldursgate.com/discussion/34758/bgee-mod-oriental-adventures-rise-of-the-samurai#latest

and I'm trying to figure out how to code a kit switch once the parties reputation reaches 20

The NPC starts as a dishonoured Ronin with a debilitating 50% experience point penalty, but once the party reaches a reputation of 20, he becomes rehonored thus regaining his Samurai status, hence the kit switch
I believe there is a way to script this, but I'm unsure

Furthermore both the Ronin and Samurai kits are installed with the mod, thus I don't know if that impacts how to script the change.

For what it's worth I took a look at the Refinements mod which changes Imoen's kit to a Swashbuckler but I wasn't able to follow it through.
Any assistance would be appreciated

Comments

  • AquadrizztAquadrizzt Member Posts: 1,065
    Something like this should work. Add it to the NPC's script.

    IF
    InParty(Myself)
    ReputationGT(Player1,19)
    Global("SAMURAI_SWITCH","GLOBAL",0)
    THEN
    RESPONSE #100
    SetGlobal("SAMURAI_SWITCH","GLOBAL",1)
    AddKit(75)
    END

    Where the integer argument of AddKit (in the example: 75) is whatever number the Samurai kit has in KITLIST.2da.
  • GreenerGreener Member Posts: 430
    edited October 2014
    Thank you for your assistance, what about various integers added to the KITLIST.2da based on what other mods a person may have installed?

    I can't guarantee that the samurai kit will always be a set number as with the pre-installed kits
  • AquadrizztAquadrizzt Member Posts: 1,065
    That is the part I am also uncertain about. I know its possible to locate kits and store the kit variable during install, but I'm not sure if you could send the variable from the .tp2 to the .BCS.
  • The user and all related content has been deleted.
  • GreenerGreener Member Posts: 430

    You can use the kit name assigned at install. E.g. my Kensai subkit focusing on long swords is installed by

    BEGIN ~Kensai Weapon Focus Component~
    ADD_KIT ~D5KLSWO~
    ... [yadda yadda kit stuff]
    So the script to switch Charname to that kit simply goes
    AddKit(D5KLSWO)
    Easy-peasy.
    Thank you, I'll try that
  • GreenerGreener Member Posts: 430
    edited October 2014
    It worked, thank you very much!
Sign In or Register to comment.