Item Effects

Page last edited 3,702 days ago
From Artisan
Jump to navigation Jump to search

Item Interface[edit | edit source]

This page outlines the interface of the Item class, which behaves as the storage model for user-made custom items within the Artisan world. Instances of this class originate in the Item Creation Workshop / UI, and are used throughout the game world, notably in the combat system.

Attributes[edit | edit source]

The attributes that are inherent to each custom-created item.

Since the game revolves around this unique part of gameplay, each of these attributes must be:

  • Influenced by the item creation process
  • Stored adequately in the item's internal representation in the program, and
  • Useful or visible in the world outside the workshop, especially in combat; the item's custom nature (and perhaps also how it is used) are critical to determining the outcome of a combat situation.

Material

  • Density:float (determines mass, speed) - this is an attribute of the materials used
  • Hardness:float (determines armor-piercing ability) - also a material and treatment effect, alloys will affect this
  • Toughness:float (how much shock can it take before it will break?)
  • Flexibility:float (can it bend? How much? - yellow; more complex and maybe less useful in demo)
  • Balance? (maybe determines speed of various parts of animations: easier to swing one way than another)
  • Length:float (pure property of geometry. Longer weapons can hit from further away...what's the benefit of a shorter weapon? Less time required to strike.)
  • Qualitative effects of the material used (i.e. elemental weaknesses, magical creatures being weak to iron, etc)

Geometry GetMesh() : Mesh - This contains the Unity Mesh which has all of the Item's vertices, triangles, normals, etc. 2D editor to 3D model conversions will need to take place at the controller level.

  • Sharpness:float (ditto; plus determined by geometry to some degree. Other methods can enhance sharpness)
    • Edge Type:Enum (blunt, sharp (flat, convex, concave), serrated)

GetTemplate(): get the template the user chose (may be partly on the controller to pass this off)(Factory class for templates?) GetWeaponParts() : Returns sub-Items grouped within this Item GetBoundingBox(weaponPart): Returns a 2d polygon that specifies the bounding box for the current weaponPart in the current template

Open Questions:[edit | edit source]

How will the item be able to interact with the game world post-creation? How will we incorporate these attributes into the creation process?