From The Mana World
(notes for implementing special actions like magic or special attacks)
 
(blanked the page because my current plans are completely different from what I wrote here ages ago.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Notes for implementing special actions like special attacks, magic or other special actions a player character can perform (emoticons?).


==specials.xml==
An XML file which maps special action ids to corresponding client-sided effects (particle, sound, sprite animation etc.) and server-sided effects (execute script, inflict damage in an area).
<specials>
  <action id="1">
  <particlefx>graphics/particles/heal.particle.xml</particlefx>
  <soundfx>sounds/heal.ogg</soundfx>
  <saytext>HEAL!!</saytext>
  <gameeffect
    area="point"
    position-forward="32"
    position-sideways="0"
    effect-type="heal"
    effect-factor="10"
  />
  </action>
  <action id="2">
  <particlefx>graphics/particles/firebolt.particle.xml</particlefx>
  <soundfx>sounds/fire.ogg</soundfx>
  <saytext>FIREBOLT!!</saytext>
  <gameeffect
    area="projectile"
    range="256"
    effect-type="damage"
    effect-element="fire"
    effect-factor="5"
  />
  </action>
</specials>
==Protocol:==
*Client sends '''PGMSG_USE_SPECIAL W number''' (number is the ID number of the special attack)
*Server checks if the character may perform this special action
*If yes the server does whatever the special action requires it to do (damage beings in attack zone or whatever)
*Server sends '''GPMSG_USE_SPECIAL W beingID W number''' to all clients nearby
*Clients respond with displaying the corresponding effects

Latest revision as of 10:50, 2 August 2010