Aurium Posted December 29, 2012 Report Share Posted December 29, 2012 Hi all,I still far away to understand how magically things are placed on the game interface and the game structure at all... However, as i did my first task with Leper orientation, i want to make a bigger step: the capture ability, with your orientation.First query: How to add a button on unity details area?I didn't find myself here, but i believe i will touch the unit_commands.js file. But, how? And, where more? Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted December 29, 2012 Report Share Posted December 29, 2012 that be usefully if you add Attack Command Button and some missing Buttons that are planned and that are no Focus for now. i support you if you want anything. Quote Link to comment Share on other sites More sharing options...
Aurium Posted December 29, 2012 Author Report Share Posted December 29, 2012 Ok Lion! You can point me to the discussion or to the ticket about this attack button? And what function/method must be called by that? Quote Link to comment Share on other sites More sharing options...
Pedro Falcão Posted December 30, 2012 Report Share Posted December 30, 2012 The attack command button has the same effect as right-clicking an enemy unit, but can also be used for the attack-move command, by clicking the ground instead. There is a ticket related to the attack-move feature and some minor discussing about it, but i haven't seen no one talking about the button itself... Quote Link to comment Share on other sites More sharing options...
zoot Posted December 30, 2012 Report Share Posted December 30, 2012 The actual layout of the UI is defined in XML: https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/gui/session/session.xmlThe behavior of the buttons below the unit portrait is defined in input.js: https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/gui/session/input.js Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted December 30, 2012 Report Share Posted December 30, 2012 see that guys, we can help to main team to little work, to advance little more. The team is not Alone, we can help too. Quote Link to comment Share on other sites More sharing options...
quantumstate Posted December 30, 2012 Report Share Posted December 30, 2012 The way that we do multiplayer in 0 AD is to send all of the players commands over the network and have the simulation run identically on each users computer. This is why the GUI buttons use the following function (this example is the promote units debug command).Engine.PostNetworkCommand({"type": "promote", "entities": g_Selection.toList()});These messages are received by Commands.js on each player's computer. Commands.js is part of the simulation code so it can then call the necessary simulation functions.The simulation is made up of lots of components. There is some fairly good documentation about components here . You will want to add some components, perhaps Capture and Loyalty, as you design the code this should become clearer. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted December 30, 2012 Report Share Posted December 30, 2012 Ok Lion! You can point me to the discussion or to the ticket about this attack button? And what function/method must be called by that? I Make a list for most popular with fans http://www.wildfiregames.com/forum/index.php?showtopic=16932&pid=259608&st=0entry259608 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.