Need help with a simple backstab script.

Yo. Im in the making of a kit called:
«Woodclan Ninja»
He is going to have a «Ninja Charge» innate skill.
This skill will have projectile simulating the Ninja charge at rapid speed into a targeted enemy, meanwhile he will infact teleport to him, plan is that it will also increase taco and perform a backstab. I know how to set a script to my char, but not how i can make the backstab happen.
So skill will:
- Teleport to target, projectile perform the visual movement.
- Increase taco shortly or for next attack.
- Set global value to trigger script.
- Set backstab active unless script can handle this.
- Make char invisible.
So all script needs to do, is to perform the actual backstab.
Other versions are welcome as well.
Will be a fun ninja built upon a stalker kit, but with ninja stars and wepons
«Woodclan Ninja»
He is going to have a «Ninja Charge» innate skill.
This skill will have projectile simulating the Ninja charge at rapid speed into a targeted enemy, meanwhile he will infact teleport to him, plan is that it will also increase taco and perform a backstab. I know how to set a script to my char, but not how i can make the backstab happen.
So skill will:
- Teleport to target, projectile perform the visual movement.
- Increase taco shortly or for next attack.
- Set global value to trigger script.
- Set backstab active unless script can handle this.
- Make char invisible.
So all script needs to do, is to perform the actual backstab.
Other versions are welcome as well.
Will be a fun ninja built upon a stalker kit, but with ninja stars and wepons

0
Comments
So if you want a scripted backstab, you need an effect like Assassinate. Which opens up issues if you interrupt that script. And the invisibility doesn't matter.
Note that enemies ignore the facing element; they get a backstab just by being invisible.
Okay thanks.
Yes i found this topic. I will have a look when im on a none work pc
https://forums.beamdog.com/discussion/66096/backstabbing-script
So I guess i will be able to use something of that.
Topic also contains information of creature scripts i can browse.
I will also make a HLA where i ninjacharge 2-3 enemies, and then summons 2-3 ninja stars as magical wepons and throw those at nearest, secondnearest and 3rd nearest enemy xD
I will use global values to prevent backstabbing features such as assassinate active longer than intended.
So i made some stuff:
GelNi12.spl:
Projectile: None (Copied a flamestrike and modified to innate and removed effects.)
BLUR, self 1 second.
Invisibility, self, 40 seconds. (Will be removed by the attack itself, require testing)
Movement rate bonus(126). self, increase, 10, 4 seconds (want to make sure i reach enemy)
Thaco bonus, self, increase, 4, 4 seconds
Damage: Preset target, permanent/until death, ammount 1, Piercing. (dont know how to let script target if not xD)
Modify Global Value: Set, 1, "NinjaCharge"
GelNi10.spl:
Backstab every hit, self
GelNi11.spl:
Remove Effects by resources(321), self, backstab every hit
Script:
Can this work?
I think i need to make a spell with Set AI Script (82) casted at level 1 from Clab table to put script on myself.
Worked fine with vampire SunBurn script i made. If it was another OP code i can crosscheck with that kit when i get home
Maby i need Modify collission behaviour (300) to avoid lame stucks? Or maby i need to use FlyToObject instead? Did not exist, it was FlyToPoint...
Also, do I need to use ActionOverride()?
Weidu message:
Kit part of tp2:
Dno why sneakattt has 3 x t. But i copied this kit from before i think
https://github.com/Argent77/A7-add_kit_ex
Traplimit seems to miss ~~
Maby only 9 taco bonus is max?
Maby to old weidu version?
If i fail i use the good old add kit ee:
https://forums.beamdog.com/discussion/34119/how-to-making-kit-mods-for-the-ee/p1
In this example the kitname is before all the numbers in every point, maby i need here too.
Different setup in example:
kit_class = 4 // Parent class: Thief
mixed = RESOLVE_STR_REF(~Adventurer~)
lower = RESOLVE_STR_REF(~adventurer~) // Not strictly necessary: will be auto-generated if omitted
help = RESOLVE_STR_REF(~ADVENTURER:
The example also says
Kit Name «Adventurer»
Dont understand where he put kit internal name?
Would love if someone would have a full example, cause this thing looks very good if one know how to formulate it possible.
There are full examples in the add kit ee version which allows people like me to make kits
INCLUDE ~%MOD_FOLDER%/lib/a7#add_kit_ex.tpa~
ACTION_IF GAME_IS ~iwdee~ BEGIN
<<<<<<<< .../example/inlined/CLABMFI1.2DA
2DA V1.0
****
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
ABILITY1 GA_SPCL922 **** AP_SPCL124 **** **** AP_SPCL124 **** **** AP_SPCL124 **** **** AP_SPCL124 **** **** AP_SPCL124 **** **** AP_SPCL124 **** **** **** **** AP_SPCL124 **** **** **** **** AP_SPCL124 **** **** **** **** AP_SPCL124 **** **** **** **** **** **** **** ****
ABILITY2 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** **** **** **** **** ****
ABILITY3 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
>>>>>>>>
END ELSE BEGIN
<<<<<<<< .../example/inlined/CLABMFI1.2DA
2DA V1.0
****
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
ABILITY1 **** **** AP_SPCL122 **** **** AP_SPCL122 **** **** AP_SPCL122 **** **** AP_SPCL122 **** **** AP_SPCL122 **** **** AP_SPCL122 **** **** **** **** AP_SPCL122 **** **** **** **** AP_SPCL122 **** **** **** **** AP_SPCL122 **** **** **** **** **** **** **** ****
ABILITY2 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** GA_SPCL121 **** **** **** **** **** **** **** ****
ABILITY3 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
>>>>>>>>
END
COPY ~.../example/inlined/CLABMFI1.2DA~ ~override~
// Note: Parent class values are used for omitted parameters
LAF ADD_KIT_EX
INT_VAR
kit_class = 2 // Fighter
mixed = RESOLVE_STR_REF(~Marksman~)
lower = RESOLVE_STR_REF(~marksman~)
help = RESOLVE_STR_REF(~MARKSMAN: (Marksman kit description...)~)
// EE-specific arguments
briefdesc = RESOLVE_STR_REF(~MARKSMAN: (Marksman kit description...)~)
STR_VAR
kit_name = ~XX_MARKSMAN~
unusable = ~0x00008000~
// clasweap = ~1 1 1 1 1 1 1 1~
weapprof = ~2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5 5 1 1 1 1~
// abclasrq = ~9 0 0 0 0 0~
// abclsmod = ~0 0 0 0 0 0~
// abdcdsrq = ~17 0 0 0 0 0~
// abdcscrq = ~15 0 0 0 0 0~
// alignmnt = ~1 1 1 1 1 1 1 1 1~
// dualclas = ~0 1 1 1 1 0~
// luabbr = ~Fi0~
stweap = ~LEAT14 * HELM07 BAG20 RING06 RING31 CLCK02 BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 BOW18 XBOW09 STAF08~
clab_path = ~override/CLABMFI1.2DA~
// kittable = ~K_F_H K_F_D K_F_G K_F_E K_F_HE K_F_HL K_F_HO~
// EE-specific arguments
// clsrcreq = ~1 1 1 1 1 1 1~
// clswpbon = ~1 0 2~
// hpclass = ~HPWAR~
// numwslot = ~4~
// clascolr = ~30 91 93 23 93~
bdstweap = ~LEAT05 * HELM01 * RING06 * * * * BRAC09 BELT02 AROW02,40 BULL02,40 BOLT02,40 POTN08,5 POTN17,3 * BOW06 XBOW05 STAF02~
RET
kit_id
END
PRINT ~XX_MARKSMAN kit value = %kit_id%~
In this example, is XX_MARKSMAN the internal kit name?
What does this last PRINT function do?
In this example:
Does he add theese spells to an existing clab table in the start here?
Also: does this allows me to make forexample:
Cleric/Ranger with usuability flag for cavalier, or is the Cleric/Ranger usability flag always overwriting in a «hardcoded» way?
First part with items and stuff works wonders.
Second part, installing the kit dont work...
DEBUG FILE for second part, kit:
I will put them here to think about a way to combine theese for a correct targeting system
For test:
I even tried to move that entire other mod into another place on my pc. It dont help.
I tried to move entire bg1ee from steamapps common, into C: Games, make sure write protection is off on the folder and all underlaying folders. Still this script refuse to try to install, and instead it complains about those 3 other scriptd which are not even present anymore.
It also seems to refuse to write new names on spells, items, kit etc. Kit is findable in creation of character, the issue is thats its name is like half a page long, but squezed into that small kit chosing box. All spells and items refuse to take the new names.
My ninja stars with new projectile and custom selfmade bams actually works.
My ninja charge albility dont work, because there is no script to find, but now i remember i have forgotten to chose the global value though as well.
Even thought my TP2 file command looks like this:
BEGIN ~Install Script~
COMPILE ~GelNinj/Scripts/GeNinj1.BAF~ ~Override~
The weidu debug says:
Compiling 4 scripts:
Failed to install GelVa02.baf
Failed to install GelVa20.baf
Failed to install GelVa30.baf
It does not even mentioning GeNinj1.baf....
Is there a huge issue with steam version bg1ee?
Back home i have full version of game.
Is it worth to try in BG2EE instead? I heard something about patching of SOD files may cause a issue on steam and gog versions?
My weidu versionb was 239.0.0.0.0 or smt
Do i need to use some:
DLC Merger
Never tried such stuff before i think :P
Kit works epic in BG2EE xD
Steam version bgee...
Time to get DLC Merger.
Added all form of Ninja Stars.
Added Stalker Gloves to Valgyar
Now i just need to find out how to get Gromwell to have an option to upgrade those stalker gloves.
Ninja Charge works now.
Clab table assign the kit with OP code Set Script(82)
Ninja Charge spell:
- Blur 1 second (simulates acceleration)
- Movement speed increase by 15 (4 seconds)
- Invisibility 40 seconds(will be broken by game rules when attacking)
- Taco bonus of 4 for 6 seconds
- sets global value 1.
Then this script:
The issue is that I may land more than 1 backstab during 1 round attack.. But dno how to do it better xD
First version i had my char was so stuck running script 24/7 i could not even use a scroll or book xD
Please let me know if I need to use any ActionOverride() as i kinda dont understand that thing xD
I may need below to let blind say blinded, instead of a long dialog when using different games:
Or:
COPY ~yourmodsfoldername/whateveryourspellfilesnameis.spl~ ~override/weysfni.spl~
... rest of the previous code
To add item upgrade to cromwell:
Ovbious i need to learn some more, xD
Code installed fine after some attemtps and fixes and i can test another evening
Okay, tested the spell string. My epic charname of xmdgsgds got the text blinded^^
Minsc still got the "Insert Random dialog string here" text.
So fix will be to change parameter in code to affect preset target instead of self, and remove the old string from spell itself
Changed into Target = 2
Will spend some time getting to cromwell to test that part xD
Also, Ninja star still gets wrong projectile... Have to manual change it... Im on version 4 of selfmade ninja stars now. Starting to look good xD
ANY1 KNOW WHY MY NINJA STAR HAS GELSMOK.PRO instead of GELSTAR.PRO? Im starting BG2EE so i have the +2 wepon.
Do i need to write: ADD_PROJECTILE ~GelNinj/PRO/GelSmok.PRO~ every time?
EDIT: Also notice now i have copied old code here, the new projectile i have in code is %GelStar% ofc, %GelShur% is version 1 of ninjastar.
I find many ways of adding projectiles now...
This way should work:
This method works for someone else:
Ref this:
https://forums.beamdog.com/discussion/63148/creating-new-dialogs-and-also-bams-and-projectiles
Have to uplead it here then i guess.