Pages

Thursday, June 6, 2013

Items and Alchemy and Headaches Oh My!

Designing the Item System

Over the last couple days I've been trying to work out a way to do the inventory.  I got something basic working but for what I want to do with the alchemy system I'm going to need a more sophisticated way of storing information about items.


Right now as far as an "Item database" I have a text file that is delimited by commas like this:
ID,Name,Basevalue
1,Water,0
2,Mineral,20
3,Leaf,10

The script called ItemDatabase takes this text file and turns it into a String[,] so the information can be looked up using an x and a y coordinate.  This array is then used in a function called GetItem that will return a new "Item" class that can be used in various parts of the game.  The GetItem function should also feed more stats about an item for use in alchemy but they should be generated randomly within the logical range of that object.  For example I want the information about "Leaf" to come from the database file, but then I want the type of leaf, genus of leaf, species of leaf and various chemistry-like information to be stored into the unique item that's created.

The way that items get into the players inventory right now is by the playing being close enough to an object that has an item in it, and then clicking on that object.  When the mouse cursor is over the object the object is highlighted to show that it can be clicked. 



My Ideas on Alchemy so far

My ideas on alchemy are a little fuzzy right now but I'll do my best to explain what I'm thinking, maybe I'll look back at this post later and realize what I was actually talking about.  Anyways:

An "Reactable item" will have these additional variables:
State
Temperature
State Change Points
SNumber (explained below)
Good/Evil Axis Value
Acid/Base/Neutral Axis Value
Natural/Supernatural Axis Value

State/State Change Points:

Every reactable item will be able to be in different phase states (solid, liquid or gas).  But the temperature and pressure that these items change states will vary based on each item; these temperatures and pressures are the state change points of the item.

Temperature/pressure: 

Temperature is not a static variable and it changes with environment, more on how "environment" will play a part in this when I figure out how the hell it will work ;).  

SNumber:

All objects want to get to 0 SNumber, or 0 charge.  For example if an object has an SNumber of 3 and meets an object with SNumber -2 then they turn into SNumber 1 and SNumber 0.

Objects only react if their SNumbers 

Axis Values:

The axis values (Temperature/Pressure/Good-Evil/Acid-Base-Neutral/Natural-Supernatural).  Will be  changeable through procedure and determine the current SNumber of the Item.

Alchemy done in game would be done through actual "pouring" of gameobjects into other gameobjects.  I hope to use a sort of "Atomic weight" variable to upscale so that things can be measured in proper weight and volume.

However, there still seems to be something fundamentally wrong with how I'm thinking about this system.  I want the system to be emergent.  I want as the programmer to be playing with it and go, "Wow, I didn't know I could make that into that!" And I feel like that wont happen with the current imagined implementation, but I just can't put my finger on it. Anyways, here's my crazy Alchemy chart, see what you can make of it:




No comments:

Post a Comment