The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

Need help understanding something *updated* with questions

By on November 28, 2009 9:58:36 AM from Demigod Forums Demigod Forums

Can someone please explain to me why the line "Layout[4][2] = 'Item_Boot_SUPER'" is there.

This is the line from  Chimaya's superboots mod. The file is called "UGBShop10_ShopLayout.lua"

Greatly appreciated.


#Layout = {
#    {'Item_Boot_010','Item_Boot_020',},
#    {'Item_Boot_040','Item_Boot_030',},
#    {'Item_Boot_070','Item_Boot_060',},
#    {'Item_Boot_050',             '',},

Layout[4][2] = 'Item_Boot_SUPER'


edit: I don't get how this adds the item to the boots shop. That is why i'm asking.

0 Karma | 3 Replies
November 28, 2009 10:42:06 AM from Demigod Forums Demigod Forums

Currently, that file already runs its code before the mod runs its own, so you already have that commented out layout. "Layout" stores tables in a table. Layout[1] is the first entry in the table Layout, so:

Layout[1] = {'Item_Boot_010','Item_Boot_020',}


Layout[1] = {


Layout[2] = {'Item_Boot_040','Item_Boot_030',}


Layout[2] = {

See that Item_Boot_040 in Layout[2]? That is the first entry (and a simple string, not another table) in Layout[2]'s table, which can be accessed like this:

Layout[2][1] = 'Item_Boot_040'

Before the mod is run, we have:

Layout[4] = {'Item_Boot_050',             '',}

So what we are doing is changing the second string variable in Layout[4] from a blank to what we want.

Layout[4][1] = 'Item_Boot_050'
Layout[4][2] = ''

After we have set that with our mod, the game goes through code and looks at the Layout table for the shop, and then generates the UI layout of the shop based on the file. In this case, shop10 or whatever it is is the shop specifically made for boot items.

November 28, 2009 11:07:33 AM from Demigod Forums Demigod Forums

Thank you very much Chirmaya.

That helped me out alot.

Thank you again.

November 28, 2009 12:41:22 PM from Demigod Forums Demigod Forums

Hi. Chirmaya I can't get another item to load into the boots shop ui.

Can you please tell me how I can get an item to be displayed in the boots shop.

btw: i removed your item the Item_boot_SUPER and added mine and i could see it in the ui, I bought it and worked fine.

The only problem i'm having is that i can't get my item "MYSHOES" to show up in the boots shop ui with your "Item_boot_SUPER" item, with mine added.

Can you please tell me why it won't show up in the boots shop along with yours. Can you please tell me the code.

Also I used the "Boots of Speed" as my item"MYSHOES" and changed the item's attributes.


The image on the left is when I added my item "MY SHOES" along with your item "Item_boot_SUPER", and the image on the right is when I took your item "Item_boot_SUPER" out, and put only mine in.


Can you please tell me how I it is possible to add more, item(s), to the boot shop UI.

Thank you.


Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000078   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.