Development of Manasource and anything else related to the Mana Project.
#134336 by Ablu
Mon May 13, 2013 5:46 pm
The server currently expects some hardcoded ids for attributes (like HP for example). However the attribute itself is freely defineable on the xml side.

This could lead to bad setups, like the HP attribute in wrong scopes or maybe missing.

Another problem is that attributes like HP are only read by their base values and never by their modifiers (or at least supposed to be handeled this way). However you can define modifiers for them in the attributes.xml.

My proposal would be this:
  • add some info tag to the attributes which take a named string like "hp" or "maxhp".
  • make the server reading those tags and mapping the ids of those attributes to the internal ids (ATTR_HP)
  • write a function which checks the status of the attributes after loading. This would check for all required tags being available in their correct scopes for example.

Any comments on that? (please only take this as a rough sketch in my mind)

Regards,
Ablu
#134360 by Bjørn
Tue May 14, 2013 9:14 am
Tagging and checking the built-in attributes sounds sane to me.

How many of these "built-in" attributes do we currently have? Probably the list found in defines.h, right? If I trim that from stuff that are unused or will soon be unused I'm left with:

  • health
  • maximum health
  • health regeneration speed
  • movement speed
  • money
  • inventory capacity
#134362 by Ablu
Tue May 14, 2013 2:42 pm
Bjørn wrote:If I trim that from stuff that are unused or will soon be unused I'm left with:

  • health
  • maximum health
  • health regeneration speed
  • movement speed
  • money
  • inventory capacity


Yep, that list looks ok.

Who is online

Users browsing this forum: No registered users and 1 guest