ui modding question (construction menu)

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

ui modding question (construction menu)

Postby Rienzilla » 01 Apr 2013, 22:19

Hey all,

In FA, if you queue a factory to upgrade to tech t2, the build menu will update to display the tech 2 units, so t2 units can be queued without having to wait for the upgrade to finish. What part of the code accomplished this?

I looked at OnSelection in ui/game/construction.lua, which seems to make sure the construction menu is made with the correct build options present. It does this from its buildableCategories parameter, which, I think eventually comes from a call to GetUnitCommandData in the engine (that call is in OnSelectionChanged in gamemain.lua)

Where oh where is are the icons added for units that are not buildable yet? Any ideas?
--
Rien

PS: The concrete issue is as follows: I have a t1 factory that is able to build a building (called activator). That building will remove a build restriction to t2 units and factories once finished. Ideally I want to be able to queue t1 units, an activator (resulting in t2 factory being displayed in my constructionmenu), t2 factory (resulting in t2 units being displayed in my constructionmenu) and then t2 units... Any ideas?
User avatar
Rienzilla
Contributor
 
Posts: 145
Joined: 09 Aug 2012, 22:08
Has liked: 0 time
Been liked: 9 times
FAF User Name: Rienzilla

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest