Jump to content


Photo

Need help with Vampire script


  • Please log in to reply
7 replies to this topic

#1 Gel87

Gel87
  • Member
  • 195 posts

Posted 04 November 2024 - 09:05 AM

Yo, im almost done with a Vampire kit mod.
Since im pretty much garbage at scripting this has taken me maaaaaaaany hours to be at the stage i am now.

1 problem mainly remains now:
My Vampire is supposed to burn to death via GelVa31.spl if he is exsposed to sunlight and not wearing the Daywalker ring GelVa02.itm

First of all, i dont play with AI on, i hate it. Even in solos.
So my struggle is, how can i have a script to trigger on the correct PC. P1, to P6?
The only thing i have found out about is baldur.bcs and baldur25.bcs for tob.

So currently my script looks like this:
IF
Kit(PLAYER1,GeVaKit)
Class(PLAYER1,MONK)
Global("GeBurn","GLOBAL",1) // Set by GelVa70.spl, which also sets global for male/female vampire shapeshift script
!HasItemEquiped("GelVa02",PLAYER1)
TimeGT(DAWN_START)
TimeLT(DAWN_END)
//OR(5)
//!Global("WEATHER","LOCALS",3) // Rain
//!Global("WEATHER","LOCALS",4) // Snow
//!Global("WEATHER","LOCALS",5) // Fog
//!AreaType(DUNGEON)
//!AreaType(EXTENDEDNIGHT)
//!AreaType(DREAMAREA) // Dont work
OR(2)
AreaType(OUTDOOR)
AreaType(CITY)
ActionListEmpty()
THEN
RESPONSE #100
SetGlobal("GeBurn","GLOBAL",2)
ActionOverride(PLAYER1,ReallyForceSpellRES("GelVa31",PLAYER1))
//ReallyForceSpellRES("GelVa31",PLAYER1)
Continue()
END

And i use this to add it to bottom of baldur.bcs:
COPY_EXISTING ~BALDUR.BCS~ ~override~
EXTEND_BOTTOM ~BALDUR.BCS~ ~GeVaKit/Scripts/Baldur.baf~

Once this section works, i will copy it for player2, 3, 4, 5 and 6

I dont fully Even understand how «continue» works, i do not know if actionlistempty is smarte to use, i dont know if setting global value 2 is Even needed, and i dont know if ActionOverride is the right thing to use here. This is version 20, and my Vampire still refuse to burn in sunlight without his ring

The idea about the ring is that its a nerfing ring, where it would be benefitial to take it off whenever no sunlight is present. I dont want it to be cursed, or autoswapped like hexxas items etc.

Can anyone please help me, im stuck like a fish in a Jar xD

I fixed a simular problem earlier on something Else with removing the continue thing. I tried to read what continue actually does in weidu book and iesdp page, but it goes over my head. Dont understand it properly xD

Also, it dont have to be that spells, it could be scripted death as well, i just dont know enought.
In that case i would love something like:
Fire damage animation
Play visual (custom bam)
Wait(10) Dno value, but maby let burn for 2-3 seconds
Disintegrate including animation for it.
(100% bypassing resists/immunities and such)

Edited by Gel87, 04 November 2024 - 09:28 AM.


#2 paladin84

paladin84
  • Modder
  • 334 posts

Posted 04 November 2024 - 12:31 PM

So, what is your question? Script doesn't work?

 

From what I see, it should generally work, but "ActionListEmpty()" trigger only works if it is a creature script. For area or global scripts I would assume it will return "false" all the time... anyway, it should not be there. Continue() is not necessary (it goes to the next block of the script, but in this case I don't see any reasons to do this). For setting the variable (I don't know how GelVa70.spl works and if it really setting the variable in 1, though) it makes sense, so the script block only work ones. And I believe it is possible to do everything without a spell (CreateVisualEffect is the main action to use).

 

Also, I think more proper way would be to extend player1-player6 scripts. I don't remember their names, but they are there (I don't have NI right now, I can check it later). I would assume their names are "PLAYER1.BAF" or something like that.

 


Edited by paladin84, 04 November 2024 - 12:32 PM.


#3 Gel87

Gel87
  • Member
  • 195 posts

Posted 04 November 2024 - 02:21 PM

<blockquote class='ipsBlockquote'data-author="paladin84" data-cid="616902" data-time="1730752288"><p>
So, what is your question? Script doesn't work?<br />
 <br />
From what I see, it should generally work, but "ActionListEmpty()" trigger only works if it is a creature script. For area or global scripts I would assume it will return "false" all the time... anyway, it should not be there. Continue() is not necessary (it goes to the next block of the script, but in this case I don't see any reasons to do this). For setting the variable (I don't know how GelVa70.spl works and if it really setting the variable in 1, though) it makes sense, so the script block only work ones. And I believe it is possible to do everything without a spell (CreateVisualEffect is the main action to use).<br />
 <br />
Also, I think more proper way would be to extend player1-player6 scripts. I don't remember their names, but they are there (I don't have NI right now, I can check it later). I would assume their names are "PLAYER1.BAF" or something like that.<br />
<br />
 </p></blockquote>

Okay thanks, sry for the bad quote btw, im on phone.
I removed continue and action override.
I tried to change the spellcasting with just Die(PLAYER1) but that did not happen either.

In nearinfinity i find something called: player1d.bcs. It starts cutscenes and give bhaalpowers, journal entries etc.
There is also one called bdmonk01.bcs
But i think AI has to be put on for those.

The global value should be set, the same spell which is applied via clabtable lvl 1 is used to set another global value, which starts a script that polymorph me into Vampire based on gender, that thing works wonders, and since it does i copied that and only changed string into GeBurn.

And i made basicly the same creature scripts for my turned vampires, and they have that script assigned as creature override script. They dont burn either xD ofc they use myself instead of player1.

So yes, i think maby the IF section is never true :(
Dno why.

I copied:
TimeGT(DAWN_START)
TimeGT(DAWN_END)
From hexxat script.

When i look upon the script step by step:
Kit(PLAYER1, GeVaKit) // spelled correctly
Class(Player1, MONK) // is this needed? I assume im still also a monk as the kit is chosen from monk and i Get the monkfist etc.
!HasItemEquiped(«GelVa02»,PLAYER1) // trippel checked correct item name.
Time welllllll!

I was sitting here trying to explain my checks and intention for each trigger, and when ingame to TimeGT and TimeLT i decided to check hexxat script again.
I had DAWN_START/DAWN_END, so i changed into DAWN_START/DUSK_END and tested ingame, my Vampire died instantly once i took off Daywalker ring :D

It works :D now i just need to add visuals and delay that death with 2-3 seconds :D

#4 paladin84

paladin84
  • Modder
  • 334 posts

Posted 04 November 2024 - 03:21 PM

player1d.bcs is the one, I don't think you need to do it for other players (player1 is always the main character and other ones should not have this kit, right?). I don't think you need Class(Player1, MONK),  checking for the kit should be enough. Overall, I am glad it works.

 

For the killing from the script, it should be Kill(Player1) or Kill(myself).



#5 Gel87

Gel87
  • Member
  • 195 posts

Posted 04 November 2024 - 03:42 PM

<blockquote class='ipsBlockquote'data-author="paladin84" data-cid="616904" data-time="1730762512"><p>
player1d.bcs is the one, I don't think you need to do it for other players (player1 is always the main character and other ones should not have this kit, right?). I don't think you need Class(Player1, MONK),  checking for the kit should be enough. Overall, I am glad it works.<br />
 <br />
For the killing from the script, it should be Kill(Player1) or Kill(myself).</p></blockquote>

Thanks man :)
I ended up with the baldur.bcs one, incase i want to have forexample a high charisma thief as main char. Just makes stuff easier sometimes.

I included:
the weather checks now (need to test)
I included the check for not in Shadow temple land(shaded)
Responce #100
CreateVisualEffectObject(«BDFIRET»,PLAYER1)
ActionOverride(PLAYER1,Shout(ASSIST))
Wait(2)
CreateVisualEffectObject(«SPDUSTY2»,PLAYER1)
Wait(1)
Kill(PLAYER1)

#6 Gel87

Gel87
  • Member
  • 195 posts

Posted 04 November 2024 - 04:04 PM

The assist one did not work.
Hurt dont work as its not in the scout.ids

VerbalConstant(PLAYER1, HURT) works wonders ^^
And added bigger fire, bdpfirix.bam is up for the test xD

#7 Gel87

Gel87
  • Member
  • 195 posts

Posted 04 November 2024 - 04:46 PM

Lol, now i messed up, i know how to fix it thought.
Never removed my first script (GelVa02.bcs)
It shares global value with (GelVa20.bcs) for turned vampire.
When that global effect SunBurn is triggered i will force GelVa31.spl(Burned by Sun) on myself. Which means i take fire damage twice timed, then firing death after.
It only happens when i successfully turn a male character into Vampire.

- So i found out that lady vampires had GelVa201 script by mistake. She also misses the regular Vampire items, and some regular Vampire scripts which the male version has. Nice fault findings xD

- The spell named Burned by Sun pops up in feed as charname Burned by Sun, he goes argh, argh, dies in fire. And it all looks and sounds way better :P the spell ignores everything, resists etc. and has very relevant .bams which i failed to find atm when scripting xD

- So, this also means that my add script to player via spell works, both with and without AI on! Which means i dont need baldur.bcs modifications :D

So many things to fix, but this will be Even better once fixed :D

1. fix female Vampire script and items.
2. dont share global values with turned vampires, they never wear Daywalker ring and i prefer not to burn due to some turned Vampire increase the global value xD
3. Fix the script assigned to me via spell via clab table to have all the same triggers.

Was kinda funny, female Vampire attacked without wepons, had few automatic functions, meanwhile male Vampire was epic, but was certain death for me xD

#8 paladin84

paladin84
  • Modder
  • 334 posts

Posted 05 November 2024 - 03:40 AM

I am glad you make it work. It seems like rather "LOCALS" variable, not global ones should be used, They are unique for the creature. Did you try with them?