Object categorization

Unstructured ideas, requests and suggestions for the development of the game.
Post Reply
nerdmaster
Posts: 6
Joined: Wed Aug 29, 2012 7:58 pm
android_version: 2.3 - Gingerbread

Object categorization

Post by nerdmaster »

Hi,
Before elaborating on my idea I would like to congratulate the developers for their good work that makes this game possible.

While playing I have realised that there are numerous similar object types (by objects I mean equipment and monsters but as I am a programmer too I use the word object) that could be categorized for several reasons. For example you can encounter a forest wolf, a bloodthirsty wolf, a ferocious wolf, a longsword, an iron longsword a hardened ironsword etc.

Naturaty it is required to add several similar objects on a game to achieve the required divercity (especialy on a rpg game). The problem is that when there are several content developers and the game includes hundreads of objects it becomes increasingly difficult to manage check and balance all those independent objects. Creating multiple similar object types can therefore be a source of inconsistencies.

What I would like to propose is to create standard objects and then aply moddifiers on them to achieve divercity. It is important to note that this idea goal is not to change how the game works for the player but to help developers create more consistent content and faster.
One example (purely to make my point clear) to this is to create a monster wolf. This object would have several properties like:

Code: Select all

public class wolf extends monster
{
      monster_type type = monster_animal;
      boolean is_legendary = false;
      boolean has_subtypes = true;
      xml_doc xml_subtypes = "wolf_subtypes.xml"; //or null if there are no subtypes
      monster_properties properties = new monster_properties(wolf_health, wolf_attack_chance, wolf_block_chance);
      string name = monster_wolf_name;
      public on_attack()
      {
             (attack ai)
      }
      public on_move()
      {
           (move ai)
      }
     ....
}
Notice that the object has a reference of an xml file that contains all the subtypes. This is essential because it would be pointless to hardcode monster types on source code. Of course the original monsters like the wolf should also be initialised from resources (xml files for example).

The subtype xml file should contain information like:

Code: Select all

<wolf_subtypes>
<prefix_modifier>
<name>bloodthirsty<name>
<attack_chance>20<attack_chance>
<block_chance>-5<block_chance>
<critical_chance>20<critical_chance>
<movement_ai>offensive_ai<movement_ai>
....
<prefix_modifier>
<wolf_subtypes>
Naturaly more should be applied like experience and rarity of modification.

The same can be applied on weapons too. However I believe there is an even better way to create subtypes. Instead of creating seperately subtypes and defining individualy the parameters for each object it is much easier and consistent to create global modifiers along with individual modifiers on certain cases and then determine if an object is eligible to receive it. There are other problems like textures that may need to be changed as well but i believe those problems can be dault with.

For example one could create the modifiers bloodthirsty ferocious wild and rabid that can only be applied on monsters -> animals -> furry
But the hardened vile fast venomous can be applied on monsters -> reptile

Of course specific monsters like Irdegh could for example forbid certain modifications like venomous since all Irdegh are expected to be venomous anyways.
The map editor can determine the strength of the modifications. For example one forest can contain savage wolfs deep into the woods and scared wolfs or peaceful foxes while entering it.
Completing a quest that is supposed to calm or reduce the monsters could change modifications on zombies for example from bloodthirsty or unstoppable to rotten slow and weakened and affect the spawning rate. All those modification changes are based on chance of encountering of course. One could still encounter a rabid wolf on a peacefull forest. This however would be rare.

The modifiers can contain flat and percentage increases. The increase to be applied should be the one that gives the most benefit to the monster. (so that weak and strong monsters are benefited accordingly).

There can also be sufix modifiers at the same time like Ferocious wolf of Remgard lake.
For weapons this can lead to Rusty shortsword of Fallhaven.

Creating several item modifications can add extreme amount of depth to the equipment part of the game.

Please tell me what you think of this. Do you find this idea feasible to implement? If yes do you find it desirable?
Lvl:40, XP: 1167238, Gold: 11879, RoLS: 0, ElyR: 0, RoL: 0, GoLF: 0, ChaR: 0, SHAF: 0
HP: 114, AC: 197%, AD: 23 - 33, AP: 3, BC: 97%, DR: 5, CC: -%, CM: -
Restore HP/Kill: 0
User avatar
Zukero
Lead Developer
Posts: 2028
Joined: Thu Jul 21, 2011 9:56 am
android_version: 8.0
Location: Eclipse

Re: Object categorization

Post by Zukero »

Hello nerdmaster, and welcome to the forums.
Thank you for sharing your ideas. As we're both coders, I'll get in the technical details to explain why I don't think it would be desirable.
1 - Items and NPCs are defined as JSON data, not in an OOP way. Having a form of inheritance would require to code it from scratch, or change our data definition method. None are extremely difficult, but require a hefty amount of work.
2 - Items do not exist as individual instances of objects per se. They are only counted. The inventory is a map of item_class_id -> number. So modifiers cannot be applied to a given instance of an item.
3 - The JSON format allows to quickly and efficiently create clones and derivatives of existing objects.
4 - Prefix/suffix based modifiers in names are a nightmare for translators and for the localization code. For example, in chinese, giving a name an adjective could change the whole way the word is written, which would break the way we use for translating.

Don't hesitate to give your future ideas, or to dig in the code and see what you can do !
Lvl: 78, XP: 8622632, Gold: 271542, RoLS: 1, ElyR: -, RoL: -, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 1, VSH: 1, WMC: 1, GoW: 1
HP: 71, AC: 301%, AD: 38-47, AP: 3, ECC: 50%, CM: 3.75, BC: 101%, DR: 2
Mourngrim
Posts: 50
Joined: Wed Aug 06, 2014 8:24 am
android_version: 4.0
Location: Scotland

Re: Object categorization

Post by Mourngrim »

Zukero wrote: Don't hesitate to give your future ideas, or to dig in the code and see what you can do !
I agree. Nice idea, but anything that requires a major re-write is probably not a good idea.

M
Lvl: 49, XP: 2184338, Gold: 15918, RoLS: 0, ElyR: 0, RoL: 0, ChaR: 0, GoLF: 0, ShaF: 0, SRoV: 0, VSH: 0, WMC: 0, GoW: 0
HP: 86, AC: 256%, AD: 30-35, AP: 3, ECC: 0%, CM: -, BC: 108%, DR: 1
nerdmaster
Posts: 6
Joined: Wed Aug 29, 2012 7:58 pm
android_version: 2.3 - Gingerbread

Re: Object categorization

Post by nerdmaster »

3 - The JSON format allows to quickly and efficiently create clones and derivatives of existing objects.
Indeed it is one of the best if not the best way to handle content in andors trail case.
4 - Prefix/suffix based modifiers in names are a nightmare for translators and for the localization code. For example, in chinese, giving a name an adjective could change the whole way the word is written, which would break the way we use for translating.
This totaly slipped my mind. Maybe the fact that my native language (greek) is not hard to translate had much to do with it. I would have started translating the game if I wasnt so busy with my studies.
Lvl:40, XP: 1167238, Gold: 11879, RoLS: 0, ElyR: 0, RoL: 0, GoLF: 0, ChaR: 0, SHAF: 0
HP: 114, AC: 197%, AD: 23 - 33, AP: 3, BC: 97%, DR: 5, CC: -%, CM: -
Restore HP/Kill: 0
Post Reply