Author Topic: upgrade sub-menu thing  (Read 985 times)

Zoythrus

  • Guest
upgrade sub-menu thing
« on: 17 February 2012, 07:20:39 »
hey, i was looking at the new thing that allows us to put upgrades in a sub-menu like buildings, but it didnt fully make sense to me. can i get an example showing multiple upgrades? also, can someone explain how it fully works?

-Zoy

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: upgrade sub-menu thing
« Reply #1 on: 18 February 2012, 04:56:29 »
hey, i was looking at the new thing that allows us to put upgrades in a sub-menu like buildings, but it didnt fully make sense to me. can i get an example showing multiple upgrades? also, can someone explain how it fully works?

-Zoy

Code: (https://docs.megaglest.org/XML/Commands#Upgrade) [Select]
<command>
<type value="upgrade" />
<name value="upgrade" tip="tip_name" />
<image path="images/image.bmp" />
<unit-requirements>
<unit name="my_unit" />
</unit-requirements>
<upgrade-requirements>
<upgrade name="my_upgrade" />
</upgrade-requirements>
<upgrade-skill value="upgrade_skill" />
<produced-upgrades>
<upgrade name="my_upgrade1" tip="tip_name1" />
<upgrade name="my_upgrade2" tip="tip_name2" />
</produced-upgrades>
</command>

Pretty straight forward, move the <produced-upgrade> element one level down so it's a child of the new <produced-upgrades> element. There can be multiple <produced-upgrade> elements, which are each a single upgrade (work the same way as the tag did in vanilla Glest). The rendered output will be a menu just like how the build command normally is.
« Last Edit: 18 June 2016, 13:40:22 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

 

anything