Jump to content


Photo

How to determine if creature is exsposed to sun light?

Vampire Sunlight HideInShadows

  • Please log in to reply
2 replies to this topic

#1 Gel87

Gel87
  • Member
  • 195 posts

Posted 30 December 2023 - 11:58 PM

Yo,

 

Im building a vampire kit. And it will turn stuff into custom vampires as well.

The main character with relevant kit and race vampire will die by a custom spell if exsposed to sunlight, if he is not wielding a nerfing ring called Daywalker Ring. And the vampire he turns will be the same.

 

But how do i determine if they are exsposed to sunlight?

 

I know hide in shadow dont work in sunlight. But it does not work if spotted by enemy as well.

I know there are many weather conditions.... Dusk to dawn, dawn to dusk, city, rainy forest, dungeon, etc? How do it see difference if the creature is in a tavern/house contra outside in the city during daylight?

Maby there is something in the scripts for vampire NPC's already in the game?

There are drow items who turn to dust if exsposed to sunlight? How is this set up? Just by leaving underdark? Or does it has actual sunlight code?

Is there sunlight factors? Such as Sunlight Sensitivity, sunlight exsposure in the game already?

How do i uncompile a script? Cause i cant read scripts already compiled^^

Any pointers?


Edited by Gel87, 31 December 2023 - 12:09 AM.


#2 Gel87

Gel87
  • Member
  • 195 posts

Posted 31 December 2023 - 02:56 AM

If someone wants to help, i have used chatGPT to create scripts for, maby there are faults which im to incompetent to find:
Spell (Bat Swarm)
Spell (Vampire orignator, custom one so far used for draining "The First Vampire blood to become "Vampire Orginator", it will summon a genie who promts you and ask if u want to summon the first vampire so u can steal his powers)

 

I use AI to help script as i dont know the programming language.

GelVa00.baf (dialog script for genie who summons the first vampire)
GelVa00.bcs (script for same genie)
GelVa00.spl (Spell who summons genie, and set global value)
GelVa00.cre (genie)
GelVa01.spl (spell that summons "The First Vampire)
GelVa01.cre (The First Vampire)
GelVa01.baf (Dialog script to the first vampire)
GelVa01.bcs (Script for the first vampire)
GelVa02.spl (Custom Blood Drain spell that triggers scripts, and simulate draining blood from the first vampire)
GelVa03.cre (Custom bat creature)
GelVa03.spl (Bat Swarm, Spell to trigger script and set global value)
GelVa03.bcs (Creature scripts for bats)
GelVa03_SPL_Spell (script for Bat Swarm spell)
GelVa03_Start_SpellActivated (also script for Bat Swarm spell)
GelVa03_SummonBat (also script for Bat Swarm spell)
 

 

// GelVa00.baf Dialog Script:


IF
  True()
THEN
  BEGIN
    SetDialog("LastSummonerOfMyself")
    SetText("Child of Baal, you would be the perfect candidate to replace The First Vampire. Would you like to summon him so you can steal his powers?")
    AddResponse("Yes, bring him here.", 1)

 

// GelVa00.bcs Script for GelVa00.cre
// Mission: 1. Cast Dimension Door effect on self 2. Start Dialog with 'GeKitVa' Shadow Lurker kit. 3. Summon GelVa01.cre "The First Vampire". 4. Teleport out away and kill itself after First Vampire.


IF
  LastSummonerOfMyself
  Race(Player1) == VAMPIRE
  Class(Player1) == THIEF
  Kit(Player1) == 'GeKitVa'
  Global("GelVa00_SpellActivated","GLOBAL",0)
  !InDialog(Player1) // Check if Player1 is not in dialog mode
THEN
  RESPONSE #100
    ActionOverride(Player1, PauseGame())
    ActionOverride(Player1, PlayEffect("DOOR01"))  // Play Teleport effect
    SetGlobal("GelVa00_SpellActivated","GLOBAL",1)
    ActionOverride(Player1, StartDialog("GelVa00.baf"))


IF
  Global("GelVa00_SpellActivated","GLOBAL",1)
  See([LastSummonerOfMyself])
  !InDialog(Player1) // Check if Player1 is not in dialog mode
THEN
  RESPONSE #100
    ActionOverride(Player1, ForceSpellRes("GelVa01.spl", Player1))
    SetGlobal("GelVa01_SpellActivated","GLOBAL",2)
    ActionWait(4000) // It will wait 4 seconds to make sure The First Vampire GelVa01.cre is dead prior to casting dimension door, to not have overlapping effects covering up whats happening
    ActionOverride(Player1, ForceSpellRes("Door01.spl", Myself)) // Cast Dimension Door (will make sure he either teleport away or become invisible prior to dying)
    ActionWait(500) // Wait time to make sure he destroys himself after all other actions are done
    DestroySelf()

 

 

// GelVa01.baf Dialog Script:


IF
  True()
THEN
  BEGIN
    SetText("What's going on? Who are you to awaken me from my long sleep?")
    AddResponse("Your powers will be mine, time to die!", 1)
  END


IF
  Response #1
  Global("GelVa01_Dialog_1", "GLOBAL", 0)
THEN
  BEGIN
    SetGlobal("GelVa01_Dialog_1", "GLOBAL", 1) // Set the global variable for GelVa01.bcs
    // Your actions for Response #1 go here
  END

 

// GelVa01.baf Script for GelVa01.cre:


// Creature is summoned and starts dialog
IF
  Global("GelVa01_SpellActivated","GLOBAL",1)
THEN
  RESPONSE #100
    ActionOverride(Player1, StartDialog("GelVa01.baf"))


// GelVa01.cre force GeKitVa to use blood drain on GelVa01.cre, spell is made in NearInfinity program and contains GelKitVa to Kneel over target, inflict piercing damage so that GelVa01.cre bleeds, and a red animation around GelkitVa to simulate him consuming GelVa01.cre's blood. 
// The spell also contains relevant buffs to GeKitVa.
// GelVa01.cre dies after sleeping 2 seconds


IF
  See([LastSummonerOfMyself])
  Global("GelVa01_Dialog_1","GLOBAL",1)
THEN
  RESPONSE #100
    ActionOverride(Player1, ForceSpellRes("GelVa02.spl", Myself))
    PlayAnimation("Sleep")
    ActionWait(2000)
    DestroySelf()

 

// GelVa03.bcs Script for GelVa03.cre


IF
  True()
THEN
  RESPONSE #100
    // Move toward LastSummonerOfMyself (Player1's target)
    ActionOverride(Player1, MoveToObject("LastSummonerOfMyself"))


    // If the bat has reached its destination, play an attack animation and deal damage
    ActionOverride(Player1, PlayAnimation("batattack"))
    ActionOverride(Player1, Damage("LastSummonerOfMyself", DAMAGE_TYPE_PIERCING, 30)) // Deal piercing damage to LastSummonerOfMyself


    ActionWait(200)


    // Move toward LastSummonerOfMyself (Player1's target) second time
    ActionOverride(Player1, MoveToObject("LastSummonerOfMyself"))    
    ActionOverride(Player1, Damage("LastSummonerOfMyself", DAMAGE_TYPE_PIERCING, 30)) // Deal piercing damage to LastSummonerOfMyself


    ActionWait(200)


    // Destroy self after completing the actions
    DestroySelf()

 

// GelVa03_SPL_Spell Script


IF
  Class(Player1) == THIEF
  Kit(Player1) == 'GeKitVa'
  Global("GelVa03_SpellActivated", "GLOBAL", 0)
THEN
  RESPONSE #100
    SetGlobal("GelVa03_SpellActivated", "GLOBAL", 1)
    SetGlobal("GelVa03_Start_SpellActivated", "GLOBAL", 1) // Ensure the start script knows the spell has been activated




    // Force each enemy in sight to cast a spell summoning bats on Player1
    SetGlobal("GelVa03_EnemyList", "GLOBAL", 0)
    FOR (Enemy = 0 ; Enemy < GetSightRange(Player1) ; IncrementGlobal("GelVa03_EnemyList"))
    BEGIN
      ActionOverride(GetGlobal("GelVa03_EnemyList"), "ForceSpellRes(\"GelVa04.SPL\", Player1)")
      ActionWait(200) // Wait 200ms before the next enemy's action
    END
    ActionOverride(Player1, ResumeGame()) // Resume the game immediately

 

 

 

// GelVa03_Start_SpellActivated Script


IF
  True()
THEN
  RESPONSE #100
    SetGlobal("GelVa03_Start_SpellActivated", "GLOBAL", 1)
    ActionOverride(Player1, PlaySound("GelVa03_Start")) // Optional: Play a sound effect


    // Summon a bat on Player1
    ActionOverride(Player1, EvaluateScript("GelVa03_SummonBat", Player1))
    ActionWait(200) // Wait 200ms before the next bat summon


    // Get the list of enemies in the sight range
    SetGlobal("GelVa03_EnemyList", "GLOBAL", 0)
    FOR (Enemy = 0 ; Enemy < GetSightRange(Player1) ; IncrementGlobal("GelVa03_EnemyList"))
    BEGIN
      ActionOverride(Player1, EvaluateScript("GelVa03_SummonBat", Enemy))
      ActionWait(200) // Wait 200ms before the next bat summon
    END


    ActionWait(200) // Wait 200ms before resuming the game
    SetGlobal("GelVa03_Start_SpellActivated", "GLOBAL", 0)

 

 

// GelVa03_SummonBat Script


IF
  True()
THEN
  RESPONSE #100
    // Summon a bat creature on the target
    ActionOverride(Player1, SummonCreature("GelVa03.cre", GetTarget()))


    // Optional: Play a sound effect for the summoning
    ActionOverride(Player1, PlaySound("summonbat"))

 

I assume i have to nerf the damage of those bats in Bat Swarm spell as each bat deal damage twice, and each enemy get attacked by 3 bats. And that is 30*2*3 = 180 damage. So i guess i nerf it to 15 piercing damage. 15*2*3 = 90 piercing damage(it's an endgame HLA albility)

I figured it would be nice to have a Bat Swarm Single Target spell as well.
So i will make creature: GelVa08.cre
with creature script: GelVa08.bcs
It will basicly work such that i cast a spell on a target, which force him to summon 20 bats on me with delay of 50ms between each bat summon. 
I can ofc splitt this in to level progression spell with less bats for lower levels, and possible more bats for super high levels, simply by changing the number of times enemy summons bats on me in the spell itself.
Bats will then do random walk for a period(to provoke randomness in motion), then move to LastSummonerOfMyself and deal 2 piercing damage, then randomwalk again for 500ms and destroy self to dissapear.
So 20 x 2piercing damage = 40 damage. So i guess this is nice around level 10-12 or smt, and i could half number of bats for level 5-7, and double ammount of bats for level 22+ or smt. And maby just 3-4 bats at level 1 if i want spell early(6 or 8 damage)
 

 

// GelVa08.bcs - Bat Swarm Script for GelVa08.cre


IF
  True()
THEN
  RESPONSE #100
    ActionOverride(RandomWalk("Myself")) // RandomWalk for 500ms 
    ActionWait(500)


    // Move to Last Summoner of Myself
    ActionOverride(Player1, MoveToObject("LastSummonerOfMyself"))


    // Check if Last Summoner of Myself is alive
    IF
      IsValidForPartyList(GetTarget())
    THEN
      RESPONSE #101
        ActionOverride(LastSummonerOfMyself, Damage("Myself", DAMAGE_TYPE_PIERCING, 2)) // Deal piercing damage to LastSummonerOfMyself
        ActionWait(10)
        ActionOverride(RandomWalk("Myself")) // RandomWalk for 500ms if Last Summoner is alive
        ActionWait(500)
    ELSE
      RESPONSE #102
        ActionOverride(RandomWalk("Myself")) // RandomWalk for 500ms if Last Summoner is alive
        ActionWait(500)
    // Destroy self in the end
    DestroySelf()

 

GelVa08.spl i will make in NearInfinity, this is basicly just a description of the spell as I have to make it when i get home xD

// GelVa08.spl Bat Swarm Target Spell
// Actions:
// Play animation over caster
// Play animation over target
// Play sounds for bats and wingstrokes
// Force Target to cast uninterupted GelVa09.spl
// Force Target to cast uninterupted GelVa09.spl (delay 50ms)
// Force Target to cast uninterupted GelVa09.spl (delay 100ms)
// Force Target to cast uninterupted GelVa09.spl (delay 150ms)
// Force Target to cast uninterupted GelVa09.spl (delay 200ms)
// Force Target to cast uninterupted GelVa09.spl (delay 250ms)
// Force Target to cast uninterupted GelVa09.spl (delay 300ms)
// Force Target to cast uninterupted GelVa09.spl (delay 350ms)
// Force Target to cast uninterupted GelVa09.spl (delay 400ms)
// Force Target to cast uninterupted GelVa09.spl (delay 450ms)
// Force Target to cast uninterupted GelVa09.spl (delay 500ms)
// Force Target to cast uninterupted GelVa09.spl (delay 550ms)
// Force Target to cast uninterupted GelVa09.spl (delay 600ms)
// Force Target to cast uninterupted GelVa09.spl (delay 650ms)
// Force Target to cast uninterupted GelVa09.spl (delay 700ms)
// Force Target to cast uninterupted GelVa09.spl (delay 750ms)
// Force Target to cast uninterupted GelVa09.spl (delay 800ms)
// Force Target to cast uninterupted GelVa09.spl (delay 850ms)
// Force Target to cast uninterupted GelVa09.spl (delay 900ms)
// Force Target to cast uninterupted GelVa09.spl (delay 950ms)

 

GelVa09.spl will just be a summoning spell, dno if i want any animations or sounds yet. Its the spell enemy are forced to cast several times. So should be instant etc.

 

GelVa09.spl Summon Bat Swarm Single Target spell


// SummonCreature 'GelVa08.cre' on player1.

 

Other stuff i have planned, be aware this is a kit i plan to use in Legacy Of Baal difficulty as solo playtrue, its overpowered, but i think i still will struggle
Its a Vampire Thief, which focuses on backstabs, invisibility and Necromancy Albilities and Vampire Albilities, it will have ring of daywalker and custom vampireclaws wepons with Short Sword profience, and may put 3 profience to short sword and 2 profience to single wepon style, and cannot wear armor or shield. It will also have a few acid spells.:
Spells as Innate albilities:
Vampiric Domination
Vampiric Fear
Vampiric Death (Innate Death Spell basicly, i decide if i want a little buff on higher levels or not when it comes to saving throw or Hit Dice restrictions)

Vampiric Finger of death (Finger of death innate, i decide if i want to modify it or add progression)

Greater Malison
Animate dead (well, it will be as normal spell, but the wepon will be repaced to have +1 fire damage on higher levels, only way to deal with trolls within resonable level, i will also add progression for very high levels)


Blood drain:
The Vampire drain the enemies blood, empowering him and increase his regenration and heals himself in the process. At higher levels enemy will be turned into a vampire upon death. These vampires will die if exsposed to sunlight.
Theese vampires will also have nerfed or no level drain albilities.
Level 1: 10 Piercing damage, Vampire Heals for 8 HP, Enemy sleep for 5 seconds (no save), Vampire regen 1hp/2sec for 10 seconds, +1 to taco and ac for 30 seconds.
Level 5: 20 Piercing damage, Vampire Heals for 15 HP, Enemy sleep for 5 seconds (no save), Vampire regen 1hp/2sec for 10 seconds, +1 to taco, ac and speed bonus for 30 seconds.
Level 7: 25 Piercing damage, Vampire Heals for 20 HP, Enemy sleep for 5 seconds (no save), Vampire regen 1hp/2sec for 10 seconds, +1 to taco, ac, speed bonus, strenght and constitution for 30 seconds.

Level 12: 35 Piercing damage, Vampire Heals for 25 HP, Enemy sleep for 10 seconds (no save), Vampire regen 1hp/sec for 10 seconds, +1 to taco, ac, speed bonus, strenght, constitution and saving throws for 30 seconds.

Level 15: 45 Piercing damage, Vampire Heals for 35 HP, Enemy sleep for 10 seconds (no save), Vampire regen 1hp/sec for 20 seconds, +1 to taco, ac, speed bonus, strenght, constitution, saving throws and 10% physical resists for 30 seconds, enemy dies unless saving throw(+2) vs death and gets turned into a vampire if dies.
Level 17: 55 Piercing damage, Vampire Heals for 40 HP, Enemy sleep for 10 seconds (no save), Vampire regen 1hp/sec for 20 seconds, +1 to taco, ac, speed bonus, strenght, constitution, saving throws and 10% physical resists for 30 seconds, enemy dies unless saving throw(0) vs death and gets turned into a vampire if dies.
Level 22: 75 Piercing damage, Vampire Heals for 60 HP, Enemy sleep for 10 seconds (no save), Vampire regen 1hp/sec for 20 seconds, +1 to taco, ac, speed bonus, strenght, constitution, saving throws and 10% physical resists for 30 seconds, enemy dies unless saving throw(-2) vs death and gets turned into a elder vampire if dies.
Level 35: 100 Piercing damage, Vampire Heals for 100 HP, Enemy sleep for 10 seconds (no save), Vampire regen 1hp/sec for 20 seconds, +1 to taco, ac, speed bonus, strenght, constitution, saving throws and 10% physical resists for 30 seconds, enemy dies unless saving throw(-4) vs death and gets turned into a ancient vampire if dies. If enemy not die he will take 4 piercing damage per second for 10 seconds.

Vampire: Normal Vampire stats, Immunities and spells, but no level drain
Elder Vampire: Elder vampire stats, immunities and spells, but only 10% chance to level drain 2 levels.
Ancient Vampire: Ancient vampire stats, immunities and spells, but 20% chance to level drain 2 levels.

 

Feeblemind
Emotion: Hopelessness
Invisibility
Spell Immunity: diviation
Vampiric skull trap: Normal skull trap in innate slot
Abi-Dalzim's Horrid Wiltling
Wail of banshee
Summon Bat Swarm (aoe batswarm spell)
Soul Harvest (custom spell from my Banshee kit, will turn it innate albility ofc. Its a nice spell that starts weak with like 5 magic damage, and increase rapidly on levels so its usefull at any time)
Globe of Blades
Shadow Step
Acid Rain (like meteor shower, only acid)
True sight
Vampiric Unholyness (Single target spell that comes as a acid beam from the sky and deal acid and crushing blow damage on impact and force enemy to sleep for short period. It starts with like 15crushing/15acid damage and in high levels ends at like 35/35 or higher cant remember)
Use all items: Hla
Vampiric Assassination: Hla, slightly longer duration than normal assassination

Plague wepon
 

It will have no traps.

Ring of daywalker will have nerfs, but protects you vs certain death/burning dissintergration spell in sunshine. 
It will not be able to use other items than his vampire wepons.

Progression scenario, after writing this down i think i will reduce some progression, espesially have a look at the Thaco/AC/Backstabber modifiers lol, and maby tune down the innate spell ammounts:

 

Level 1:
Vamp.itm(custom): Short sword profience, 1d6+2 crushing (0 enchantment, speed 0, 0 taco bonus) - It also have cold steel and silver tags.
None of the vampire immunities
No regeneration
1 bonus to taco and AC
20% psn res
5% cold res
5% light res

Shadow step
Recast Vampire Current shape and wep
Bloodrain
Shapechange Fledged vampire: Visual only(will still use a vampire animation, cause i think fledging is only male)

 

Level 2:

Soul Harvest
and Bat Swarm Single Target(will make a weak level 1 version, and instead progress spell)

Level 3:

1 bonus taco and ac

Plague wepon skill

Level 4:

Vampiric Fear(i guess i will nerf it a little if given this early, dno)
1 bonus to backstab modifier
Shadow step

Level 5:

Soul Harvest

Blood drain

Invisibility
Permanent Spell that increases poison res to 40, cold and light res to 10.

 

Level 6:
1 bonus to thaco and ac
Vampiric fear

Level 7:

Shapechange: Vampire (visual) 
VampireWeponUpgrade: 1d6+4 (+1 bonus thaco, speed and has +1 enchantment)
Invisibility
Blood Drain
Immune to Panic
Immune to sleep
Immune to moral break

Immune to charm

Level 8:
+1 to backstabber modifier
Emotion: Hopelessness
Blood drain

Level 9:
+1 bonus to taco and AC

Invisibility
Vampiric Domination

 

Level 10:
Animate dead
Greater Malison

Level 11:
Emotion: Hopelessness
Greater Malison

Level 12:
Shapechange: Elder Vampire(only visual animation)
WeponUpgrade: 1d6+6(+2 taco, speed, and is enchantment +2)
Res increase: Poison to 60, electric to 15, cold to 15.
Immune to Berserk
Immune to paralyze
Immune to Held
Regeneration 1HP/2sec
+1 to Backstabber modifier

Level 13:

1 bonus to taco and ac
Invisibility
Feeblemind

Level 14:
Vampiric Skull Trap
Animate Dead

True Sight
Blood Drain

Level 15:
Vampiric skull trap
Feeblemind
Vampiric Domination
Vampiric Unholyness

Level 16:
Vampiric death
Vampiric finger of death
Greater Malison
1 bonus to taco and ac

Level 17:
Shapechange: Ancient Vampire (only visual animation ofc)
WeponUpgrade: 1d6+8crushing+4acid+1poison/sec for 10sec (+4 taco, +3 speed, enchantment +4), 10% chance of level drain 2 levels
Immune to none magical wepons
Regeneration Increased to 1hp/sec
Res increased to: 100 poison, 50 cold, 50 electric, 25 acid, 25 fire, 25 magical reducement, 25 physical, 15% magic res
Hasted
+1 to backstabber modifier
Summon Bat Swarm
Immunity: Divination
Soul Harvest
Vampiric Domination

 Level 18:
+1 bonus to taco and AC
True sight
Vampiric Skull Trap
Vampiric Finger of death

Level 19:
Invisibility

Level 20:
Blood drain
Greater malison

Level 21:
Summon Bat Swarm

Level 22:
1 bonus to taco and AC

Feeblemind
Emotion: Hopelessness

Level 23:
Permanent alacricimity (dno, maby :P)
Vampiric Unholyness

Level 24:
+1 backstabber modification
Animate Dead

Level 25:
Vampiric Death

Level 26:

Summon Bat Swarm

Level 27:
+1 bonus to taco and AC
Wail Of Banshee

Level 28:
Invisibility
True sight

Level 29:
Blood Drain
Bat Swarm Single Target
 

Level 30:
Abi-hazim horrid witling

Level 31:
Soul Harvest

Level 32:
Invisibility

Level 33:
Vampiric Unholyness

Level 34:
Spell Immunity: diviation
Blood drain

Level 35:
Greater Malison
+1 backstabber modififer

 

Level 36:
1 bonus to taco and AC


Level 37:
Summon Bat Swarm
Soul Harvest

Level 38:
Vampiric Unholyness

Level 39:

Wail of Banshee

 

Level 40:
Acid Rain
Invisibility
True Sight
Vampiric skull trap

 

HLA:
- Shapechange: Vampiric Orginator (must pick 4 or 5 other prior to this):
Immune to enchantment up to +2
Resists raised to:
100 poison, 60cold, 60 light, 40fire, 40acid, 40magic reduce, 40 magic res, 40 physical res.
WeponUpgrade: 1d6+10crushing + 10acid + 4psn/s for 15 seconds (Taco +5, speed +4, Enchantment +6), steal 10 life, 25% chance of level drain 2 levels
Improved haste

Remove spell: Recast Current Form and Wepon
Add spell: Recast Vampiric Orginator Shape and Wepon.

- Use all items(i dno, but maby I will continue to not be able to use armor and shield, i dno)
- Wail of banshee(2)
- Acid Rain (4)
- Vampiric Assassination (6)
- Vampiric Unholyness (5)
- Time Stop (2)
- Sirculatum (2)
- Summon Bat Swarm (3)
- Bat Swarm Single Target (3)

- +1 all attributes, ac, taco, saving throws(2)
- Vampiric finger of death (5)
- Globe of blades (2)


Edited by Gel87, 31 December 2023 - 08:43 AM.


#3 Gel87

Gel87
  • Member
  • 195 posts

Posted 01 January 2024 - 01:17 AM

To much to do lol, making this kit. Contiue my custom solo fighter/mage/thief kit adventure and also wanna do legacy of monk solo baal walktrue xD







Also tagged with one or more of these keywords: Vampire, Sunlight, HideInShadows