The Forums Are Now Closed!

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

[Example] Creating a New Shop Item

By on November 20, 2009 11:39:51 AM from Demigod Forums Demigod Forums

This is a mod that adds in a single set of boots for example purposes. It contains the following files:
SuperBoots\mod_info.lua
SuperBoots\hook\lua\common\Items\Boot_Items.lua
SuperBoots\hook\lua\sim\AI\AIGlobals.lua
SuperBoots\hook\units\ug\b\ugbshop10\UBHShop10_unit.bp
SuperBoots\hook\units\ug\b\ugbshop10\UBHShop10_ShopLayout.lua
SuperBoots\textures\ui\common\abilities\icons\NewIcons\Boots\BootSuper.dds
SuperBoots\textures\ui\common\abilities\icons\NewIcons\Boots\BootSuper_dis.dds

SuperBoots\mod_info.lua
-------------------------------------------------
This is the file that every mod needs. The Mod Manager uses this to display the author, description, version, etc.

SuperBoots\hook\lua\common\Items\Boot_Items.lua
-------------------------------------------------
This creates the blueprint for our new item. It is basically a copy/paste of the normal boots with some changes to the name, the buff, and almost the icon. I cannot get the mod to load in new files (ones that don't already exist in the game.) yet, so I couldn't get it to point to my new image. I'll update this once I find a way to do this.

SuperBoots\hook\lua\sim\AI\AIGlobals.lua
-------------------------------------------------
I assume this tells the AI whether to go for this item more often or not, though I didn't look at it much at all. I just added my new boots to their already-existant table with a default value that I obtained from the actual AIGlobals.lua file.

SuperBoots\hook\units\ug\b\ugbshop10\UBHShop10_unit.bp
-------------------------------------------------
This is the shop that handles the boots. This merges the blueprint with the original so that if we have two boot mods, both will be added to the shop's data.

SuperBoots\hook\units\ug\b\ugbshop10\UBHShop10_ShopLayout.lua
-------------------------------------------------
This is the layout for the same shop, pretty much how it displays it in-game. I commented out the normal layout so that you could see what it originally is. I then set the blank one beside Item_Boot_050 to my new boot.

SuperBoots\textures\ui\common\abilities\icons\NewIcons\Boots\BootSuper.dds
-------------------------------------------------
This is an altered Boot1 (the journeyman boot or whatever it is) that I saved.

SuperBoots\textures\ui\common\abilities\icons\NewIcons\Boots\BootSuper_dis.dds
-------------------------------------------------
This is an altered BootSuper made to look disabled.

Download here

+45 Karma | 1 Reply
November 20, 2009 11:52:54 AM from Demigod Forums Demigod Forums

 

Wow  +20000 helth and +26000 mana Buy 601 gold

It good idea.

Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000109   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.