SphereCommunity
56c/56d AI - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: 56c/56d AI (/Thread-56c-56d-AI)



56c/56d AI - DarQside - 04-22-2018 03:58 PM

My server has been 56b for quite a long time. I'm making the switch to 56c/56d (not sure which one im going to settle on in the end)

and I've got most things working. But I've noticed the NPC's are just... really slow and stupid compared to 56b lol.
They take their time to attack characters. it's hard to even get them to notice you so they will attack.

They won't cast any spells. at all.
Used to be that you could set a monsters magery to 100.0, and it'd go off on you, spell after spell until its mana is gone.

Am I missing something? Has anyone else noticed this?


RE: 56c/56d AI - Capes - 04-22-2018 09:31 PM

Hello!

I'm using 0.56d, what I noticed was the monster chardef's weren't complete.
Simply adding a spellbook & spells to their definition allowed them to go gang-busters with magic.
ITEMNEWBIE=i_spellbook
ADDSPELL=s_mana_drain
ADDSPELL=s_lightning

Also there are settings in sphere.ini that increase the AI of the npc's at the cost of cpu load.


Capes


RE: 56c/56d AI - DarQside - 04-23-2018 12:54 AM

Thank you! Spellbook thing worked. New issue, there is no cast time at all. Every spell coming from an NPC is instant. Is there a quick fix to add proper spellcasting times in here?

Normally argn3 in @spellcast is used to set the length of time it takes to cast a spell. I can set this to 1000 and its still instant.


EDIT: Solved issue with spell cast time. Seems that the Magery Skill -must- have DELAY=0.
Thanks for your help! I'll update if I run into any more snags.


RE: 56c/56d AI - Capes - 04-26-2018 06:05 AM

What did you do to fix the spell casting issue?

I did add DELAY=0 to magery skill but it did nothing... They still spam the spells..

Capes


RE: 56c/56d AI - DarQside - 04-26-2018 06:57 AM

(04-26-2018 06:05 AM)Capes Wrote:  What did you do to fix the spell casting issue?

I did add DELAY=0 to magery skill but it did nothing... They still spam the spells..

Capes

All I had to do was add delay=0 into the magery skill. NPC's still cast like crazy but at least theres cast time for their spells.
Not sure why they need a spellbook now, though.


RE: 56c/56d AI - x77x - 04-26-2018 08:41 AM

back in the old days...

Code:
ON=@SpellCast
DORAND 4
    SAY
    ATTACK
    SAY
    SAY
ENDDO
RETURN 0

1in4chanceoffizzle