From The Mana World
Line 43: Line 43:
   So, which modifications will prevail?
   So, which modifications will prevail?
   Best regards.
   Best regards.
   Bertramk, 2 august 2010
   Bertram, 2 august 2010

Revision as of 10:44, 2 August 2010

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_ATTACK B direction W type ("type" is the ID number of the special attack. No number is interpreted as a normal attack)
  • Server checks if the character may perform this special action right now.
  • If yes the server does whatever the special action requires it to do (damage beings in attack zone or whatever)
  • Server sends GPMSG_BEING_ATTACK W being id, B direction, W type to all clients nearby
  • Clients respond with displaying the corresponding effects
 Hi Crush,
 I can see you change a bit the protocol in here:
 In those, I can see you're making the client send the direction, which remains to be dicussed.
 I can also see that the packets PGMSG_USE_SPECIAL and GPMSG_SPECIAL_STATUS were added.
 So, which modifications will prevail?
 Best regards.
 Bertram, 2 august 2010