|
05/29/14, 09:21 PM | #1 |
Help with Complex Array.
Help with Complex Array.
Localization/HarvestMapData-en.lua Localization/HarvestMapData-de.lua Localization/HarvestMapData-fr.lua I have three files in my manifest file listed like this. I have them that way to I can use a diff program like BeyoneCompare to line up the names so they are always in the exact sequence. Lua Code:
Lua Code:
Lua Code:
Lua Code:
Zone : alikr : lang : en : subzone : alikr_base : map : Aldunz Lua Code:
Lua Code:
EDIT: Nope none of my variations are working. Last edited by Sharlikran : 05/29/14 at 10:42 PM. |
|
05/29/14, 11:44 PM | #2 |
|
I don't have an answer for you, but after glancing through this, my brain is screaming "anonymous closure".
Not sure that will do anything, though Lua is odd, but this code just bothers me at a gut level. Code:
Harvest.DataStore = { ["alikr"] = Harvest.DataStore[Harvest.langs]["alikr"], ........ } |
05/30/14, 12:36 AM | #3 | |
|
||
05/30/14, 12:39 AM | #4 |
The answer to 'how do I store this info' will largely rest on the question "What are you doing with the info?"
Note that you can store the information as sparsely as you need for storage purposes, and recombine them in game for speed of reference and create lookup tables and the like. |
|
05/30/14, 12:43 AM | #5 |
I am going to try this Lua console from source forge, no idea how to use it yet though. ^_^
Does anyone know a good Lua console that is easy to run like Python and Ruby? Lua Code:
That all works fine, so I have to build off of it and try to apply it to what I want with the map names. |
|
05/30/14, 01:07 AM | #6 | |
|
||
05/30/14, 01:38 AM | #7 | |
Lua Code:
|
||
05/30/14, 01:40 AM | #8 | |
Warning: Spoiler
Lua Code:
If you click the spoiler, as you can see I need to make it modular or I'll end up with a wall of text. Each map file is already over 1200 lines long.
Last edited by Sharlikran : 05/30/14 at 01:58 AM. |
||
05/30/14, 03:21 AM | #9 | |
As for your requirements, there are two ways you can go about it, depending on how often the information is requested. If the requests are relatively scarce, you can do as you do above, and just create functions that loop through the tables, til you find a match, then create a chunk of info for your use. If you need more speed, ie, your requests are very very often, you can create lookup tables in memory so that when you reference MapName["Aldunz"] it'll return { [Zone] : "alikr", [lang] : "en", [subzone] : "alikr_base", [map] : "Aldunz"}. This will frontload the work, by doing it all at load, but will speed up lookup. You just need to know what information you're using, and what format you need the result in. I advise you read up on how Lua handles tables and references first though, so you understand just what sort of structures you're creating. |
||
ESOUI » Developer Discussions » Lua/XML Help » Help with Complex Array. |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|