ID:158326
 
For sure they've been similar posts on this topic and for sure they've made demos and tutorials on this topic as well, I've searched through and read through all of 'em but I honestly STILL don't quite get how it really works and thus, I can't figure out how to get done what I want done here:

I have 3 Grids here. All visible. 1 to show a player's Inventory, 1 to show a player's Techniques and 1 to show a players Skills [For the time being, there's a difference between Techniques and Skills]. Now, for the longest time, I've been fighting and STRUGGLING to understand why, "var/slot" is used in almost EVERY SINGLE code I've seen concerning, "Updating Grids", but I can't seem to figure it out. So if you can explain to me how I can get it done for these 3 Grids / explain to me this, "Slot" variable thoroughly and it's purpose, I would be very thankful.

As a Note: As for as I can understand concerning the, "Slot" variable, it's used along for updating / to tell the difference between normal equippable items and inventory items.
Read: http://www.byond.com/members/ DreamMakers?command=view_post&post=33582

And "var/slot" is nothing special - anywhere in DM where you create a new var, you can name it any valid name you want and there will be no difference. It's just a regular var, if you're having trouble with understanding those then you should get more background info first.
In response to Kaioken
You seem to misunderstood what I meant about the Slot var.. I meant, what purpose it served..... Not what a variable is. Not to mention, you seem to have not read what I said properly as I've said, "I've been through the tutorial"... So linking me back there, isn't any help...
In response to YoukoSieg
YoukoSieg wrote:
I meant, what purpose it served.....

The name "slot" is used for vars in that article multiple times, so the purpose varies on context. The code implements an equipment system where every obj attaches to a certain slot (e.g. armor slot, helmet/hat slot, weapon slot, or if you will, hand slot, feet slot, body slot...), so each such obj has a slot var that specifies to which slot it belongs. It is implied the slots are specified by text strings. The mobs' equipment list is an associative list (article) that contains the slots (text strings) associated by whatever object is equipped in that slot, if any. So when a for() loop is used to loop through that list, it goes through every text string (each representing a slot in it), and of course checks if there's an object associated with it (which means it's equipped and so should be displayed).
Here's a code example in a similar style:
obj/item/equipment
var/slot
longsword
slot = "weapon"
iron_shield
slot = "shield"
mob/person
//persons start with a longsword and iron shield already equipped:
var/list/equipment = list("weapon" = new /obj/item/equipment/longsword,
"shield" = new /obj/item/equipment/iron_shield)
proc/UpdateEquipmentGrid()
//actual grid handling left out for simpleness
Reset_Grid_Here
for(var/slot in src.equipment)
var/obj/O = src.equipment[slot] //get the associated value
if(O) //(if an object IS equipped in that slot)
Output_O_to_Grid_Here


Not to mention, you seem to have not read what I said properly as I've said, "I've been through the tutorial"... So linking me back there, isn't any help...

You've said you've been through certain resources, but haven't specified which, so it was worth a try seeing as that article pretty much explains grids in-depth. Well, other than the code, that is - it's probably assumed that the reader is already comfortable with the language and lists, so it's not for the basic beginner.
In response to Kaioken
Well, using the code you've just given me in mind, on explaining how the slot variable functions, I've figured out now how the Updating the Grid works. At least, if not fully, to a better extent that I'd actually know what I want done now. Thank you.