SphereCommunity
Experimental Spells Build - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: General Discussion (/Forum-General-Discussion)
+--- Forum: News (/Forum-News)
+--- Thread: Experimental Spells Build (/Thread-Experimental-Spells-Build)

Pages: 1 2


Experimental Spells Build - ShiryuX - 05-12-2012 02:23 PM

Hello,
First of all, sorry for my lack of activity in the last time, some of you reported some bugs in the forum and I didn't send them to the SVN. The main reason I had files heavily modified, and the second one is I have a bad memory.

Now, to the topic, this is an experimental build and bugs MUST BE submitted only IN THIS TOPIC. At the end of the post you will find a download link with the modified files and the sphere version. So, more or less, this is a public alpha testing.

This is the changelog:
Code:
* SPELLFLAG_SCRIPTED changes behavoir and allows to mix with _SUMMON, _FIELD, _AREA, _FX_BOLT, _POLY.
* SPELLFLAG_FX_BOLT will totally work now. EFFECT_ID can be overrided with LOCAL.CreateObject1.
* SPELLFLAG_FIELD too, affecting default spells. EFFECT_ID can be overrided with LOCAL.CreateObject1/2.
  The default Width is 7 and Gauge is 1, overrided with LOCAL.fieldWidth/fieldGauge.
* SPELLFLAG_AREA also works, the default radius are the following:
    - SPELL_Arch_Cure = 5
    - SPELL_Arch_Prot = 5
    - SPELL_Explosion = 2
    - SPELL_Mass_Curse = 5
    - SPELL_Reveal = 12
    - SPELL_Chain_Lightning = 5
    - SPELL_Mass_Dispel = 15
    - SPELL_Meteor_Swarm = 4
    - SPELL_Earthquake = 12
    - Default if none = 4
  The effect of course, if it's a custom spell, must be scripted.
* SPELLFLAG_SUMMON is supposed to work. Default IDs are already known, overrided with LOCAL.CreateObject1.
* Even default spells must have the correct flags or else they won't work.
* Spells that will work anyway:
  - 1st: Create Food, Heal, Night Sight, Reactive Armor, Clumsy, Feeblemind, Weaken
  - 2nd: Agility, Cunning, Cure, Protection, Strength, Harm, Magic Trap, Magic Untrap
  - 3rd: Bless, Poison, Magic Lock, Unlock, Telekinesis, Teleport
  - 4th: Great Heal, Curse, Lightning, Recall
  - 5th: Dispel Field, Mind Blast, Magic Reflection, Paralyze, Incognito, Summon Animal
  - 6th: Invis, Dispel, Mark
  - 7th: Flame Strike, Gate Travel, Mana Drain, Mana Vampire, Polymorph
  - 8th: Resurrection
* Can modify flamestrike effect id now.
* Also, spell Summon Creature can be overrided with LOCAL.CreateObject1.
* Added SPELLFLAG_TARG_DEAD so you can create spells for dead people. (I believe there's a Necro spell that should use this)
* Added SPELLFLAG_DAMAGE for damage that along with produce HARM they deal DAMAGE. The default types are the following:
    - SPELL_Harm        = DAMAGE_MAGIC | DAMAGE_POISON | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - SPELL_Mind_Blast        = DAMAGE_MAGIC | DAMAGE_POISON | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - SPELL_Explosion        = DAMAGE_MAGIC | DAMAGE_HIT_BLUNT | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - SPELL_Energy_Bolt        = DAMAGE_MAGIC | DAMAGE_HIT_PIERCE | DAMAGE_NOREVEAL
    - SPELL_Magic_Arrow        = DAMAGE_MAGIC | DAMAGE_HIT_PIERCE | DAMAGE_NOREVEAL
    - SPELL_Fireball        = DAMAGE_MAGIC | DAMAGE_HIT_BLUNT | DAMAGE_FIRE | DAMAGE_NOREVEAL
    - SPELL_Fire_Bolt        = DAMAGE_MAGIC | DAMAGE_HIT_BLUNT | DAMAGE_FIRE | DAMAGE_NOREVEAL
    - SPELL_Fire_Field        = DAMAGE_MAGIC | DAMAGE_FIRE | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - SPELL_Flame_Strike    = DAMAGE_MAGIC | DAMAGE_FIRE | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - SPELL_Meteor_Swarm    = DAMAGE_MAGIC | DAMAGE_HIT_BLUNT | DAMAGE_FIRE | DAMAGE_NOREVEAL
    - SPELL_Earthquake        = DAMAGE_MAGIC | DAMAGE_HIT_BLUNT | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - SPELL_Lightning        = DAMAGE_MAGIC | DAMAGE_ELECTRIC | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - SPELL_Chain_Lightning    = DAMAGE_MAGIC | DAMAGE_ELECTRIC | DAMAGE_GENERAL | DAMAGE_NOREVEAL
    - Default            = DAMAGE_MAGIC | DAMAGE_GENERAL | DAMAGE_NOREVEAL
  You can override the Damage Type under @(Spell)Effect with LOCAL.DamageType.
* MAGICF_NOANIM so you can disable animation/direction update of the character in every spell.
* MAGICF_OSIFORMULAS which modifies the Duration/Damage of spells according OSI Formulas (NOT FINISHED YET).
* Added SPELLFLAG_POLY for making a polymorph spell with other name, LOCAL.CreateObject1 is the NPC ID (NOT FINISHED YET).
* Fixed: WOPPlayer to 0 overrided the EquippedCast check and players could cast while equipped.

(Updated links 12/05)
Download Link: http://scripts.sphere.torfo.org/releases/sphereSvr_Spells.zip
Bug Reports: http://forum.spherecommunity.net/tracker/projects.php?project=4


RE: Experimental Spells Build - jeem - 05-12-2012 07:18 PM

First blood.

- Summon Creature or .add or .addnpc seem to summon two of the intended npc. This doesn't apply to blade spirits.
- Blade Spirits/8th circle summon spells after Summon Creature/.add/.addnpc summons the last summoned char instead of the intended npc.


RE: Experimental Spells Build - Wap - 05-12-2012 10:08 PM

This is great, but what about problems with network(unstable NetworkThreads, UseAsyncNetwork)?


RE: Experimental Spells Build - Crusader - 05-12-2012 10:13 PM

well i think u made a very good improvement, thx a lot shiryux


RE: Experimental Spells Build - ShiryuX - 05-13-2012 01:45 AM

(05-12-2012 07:18 PM)jeem Wrote:  First blood.

- Summon Creature or .add or .addnpc seem to summon two of the intended npc. This doesn't apply to blade spirits.
- Blade Spirits/8th circle summon spells after Summon Creature/.add/.addnpc summons the last summoned char instead of the intended npc.
I forgot to add an 'else' Lol
It should be fixed, updated link on the first topic.

(05-12-2012 10:08 PM)Wap Wrote:  This is great, but what about problems with network(unstable NetworkThreads, UseAsyncNetwork)?
You can open a thread in General Discussion with all the issues and discussion. Or just link me. The network was made by MrSugarCube and the source code of Sphere has to be analyzed by parts. Anyway, I'll take a look once this is done, just keep this thread to the spells.


RE: Experimental Spells Build - Anarch Cassius - 05-13-2012 05:52 AM

This is great. Especially point #1. Mostly I script new spells, tweaking the old ones is definitely good but I like opening up options.

To that end, with all these tweaks to defaults, is there anyway we could define an internal spell to copy as a base for a new slot? Like INHERITSPELL=X and X is the number of a hardcode spell. It would function the same except for differences in values and scripts in the spell def.


RE: Experimental Spells Build - darksun84 - 05-13-2012 06:16 AM

Wonderful Shock

What is the difference of behaviour between old spellflag_scripted and new spellflag_scripted?


RE: Experimental Spells Build - Anarch Cassius - 05-13-2012 06:48 AM

I believe scripted disables are hardcode for the spell but now leaves the modifier flags fully functional. So you can define a summon, field or polymorph with a few lines and any custom spell could be made area or bolt with less code.

Is this correct ShiryuX?


RE: Experimental Spells Build - ShiryuX - 05-13-2012 11:01 AM

You can use _SCRIPTED with other flags (fully functional) or you can use the other flags alone (may have problems if they mix with hardcoded behavoir).
Just added a project in the forum tracker for this. You can report the bugs in there, link in the main post.


RE: Experimental Spells Build - admin phoenix - 05-18-2012 05:55 PM

deleted my feature wishes in the bugboard?