Aurium Posted December 29, 2012 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? Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted December 29, 2012 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. Link to comment Share on other sites More sharing options...
Aurium Posted December 29, 2012 Author 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? Link to comment Share on other sites More sharing options...
Pedro Falcão Posted December 30, 2012 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... Link to comment Share on other sites More sharing options...
zoot Posted December 30, 2012 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 Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted December 30, 2012 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. Link to comment Share on other sites More sharing options...
quantumstate Posted December 30, 2012 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. Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted December 30, 2012 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now