View Single Post
  #18  
Unread 11-20-2010, 08:48 AM
Temil2006 Temil2006 is offline
The Unscathed
Interface Author - Click to view interfaces
 
Join Date: Nov 2010
Posts: 17
Quote:
Originally Posted by Chiran
A good start would be:

Recipes = {}; -- creates empty table
Recipes = Turbine.PluginData.Load(Turbine.DataScope.Characte r, "Recipes") or Recipes; -- This makes the data scope character specific, tries to load Recipes.plugindata from characters PluginData folder (that's where the file needs to be placed) and defaults to the empty table if not found

Then you can reference to it, for example:

Recipes.Cook.Tier1.Recipe1["Name"]

and so on (depending on how it's structured)

-Chiran
well, since we are going to be doing some kind of referencing, would it be best to remove the section "RECIPE1" from the main data file?

example::
Code:
Recipes.Cook.Tier1["Name"]
I can see how having RECIPE# in there can cause issues with later updates, if thge Recipe# changes due to new recipes being added in the middle then it would be trying to reference the wrong recipe. Let me know if it would be best to remove that, and I'll repost a data file without that section if so. Thanks for the feedback on this.
Reply With Quote