Nico

Community Newbie
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

6 Neutral

About Nico

  • Rank
    Tiro
  1. The full screen resolution is 1920*1080 (about 1920*1050 under Ubuntu in Window mode ; I use the window mode because I have 3 monitors and in full screen mode, 0AD is displayed on the first monitor and not in the second monitor... this is bug). The minimap is a square. My patch keep the ratio of the minimap. You can not display the minimap as a rectangle. I added a button to change the size of minimap. As you can see in minimap_panel.xml (http://www.pyryp.com/0ad/minimapZoomAndAlliedFlag/minimap_panel.xml), there is now 3 size levels (small, medium and big). In menu.js (http://www.pyryp.com/0ad/minimapZoomAndAlliedFlag/menu.js), I writed a function with these resize levels : /** * Update to modify the display size of the minimap panel + allied flag (Nicolas BOILLOT 02/05/2017) */ function setMiniMapSizeLevel(minimapNewSizeLevel) { if (minimapNewSizeLevel==0) // Mini (default) { minimapPanel_wh=212; // width=height } else if (minimapNewSizeLevel==1) // Medium { minimapPanel_wh=550; // width=height } else if (minimapNewSizeLevel==2) // Big { minimapPanel_wh=800; // width=height } else { error("Unknown minimap size level."); } minimap_wh=minimapPanel_wh-2*MINIMAP_PANEL_BORDER; miniMapSizeLevel=minimapNewSizeLevel; var minimapPanel_right=minimapPanel_left+minimapPanel_wh; var sizeMiniMap=minimapPanel_left+" 100%-"+minimapPanel_wh+" "+minimapPanel_right+" 100%"; Engine.GetGUIObjectByName("minimapPanel").size=sizeMiniMap; drawPositionOfMiniMapAlliedFlag(alliedFlagXRatio,alliedFlagYRatio); } The small size is 212*212 pixel (default size, the same defined in Alpha 21) The medium size is 550*500 pixels. The big size level is 800*800 pixels. If you click on the magnifying glass button, It will change the scale level (small, medium, large, then small, medium, large...). You can bind an hotkey for this button : Exemple : hotkey.minimapview.bigpanel = "k" When I press the key "k", the minimap size level change.... So, I press 2 times to go from the small level to the big level... NB : I moved the minimap panel to the right of the screen because I don't want that the position of the magnifying glass button change. Like this, you can click 1, 2 or 3 time without moving the mouse. At the beginning of the game, I let the minimap in small level... After some minutes, I put it in medium size and play like this. The small level is too small and I can not see motion of my friends or attacks... The medium size is perfect to play. When we talk strategy with Skype, I expand the minimap to big size level... We move the allied flag and I listen with care. So, I don't want a auto-expandable minimap because sometime I need medium size, sometime big size.... It depend of the game. You can see some snapshot on http://www.pyryp.com/0ad/minimapZoomAndAlliedFlag/help.htm
  2. Ok, I will look at http://trac.wildfiregames.com/wiki/SubmittingPatches. Please, note that I tagged all my changes on the source code through comments. If you search "Update to modify the display size" or my name, you will find the begin and the end of each block of change. I thought that if someone need to check this or to copy/cut, it would be easy. As I seen the JS functionnalitites for the minimap are very limited and a more important change would imply to modify the CPP file (which imply to install the dev environnement... which need a long work :-)) . PS : Before to add the "allied flag" functionnality, I added only the minimap zoom feature. => http://www.pyryp.com/0ad/minimapZoom/help.htm (version of the 02/05/2017 => Minimap rescale ) => http://www.pyryp.com/0ad/minimapZoomAndAlliedFlag/help.htm (version of the 05/05/2017 => Minimap rescale + allied flag)
  3. Hello, I developped a shared marker on the minimap (allied flag). Sometimes, I play 0AD with friend through Internet. We like to talk with Skype during the game. We noticed a problem to explain our position and strategy on the map. "Where do you want to attack ?" => "My army is in Azimut 22 deg North/North-East at a distance of 40% of the map center." This kind of communication is very hard... So, I developped an shared flag. There is only one flag because we should buy the cartography on the market. The allied flag should not be a cheat but only a communication help. NB : At the moment, this patch is a proof of concept. I looked at 0ad/source/gui/MiniMap.cpp and there is no function to translate a world coordinate to a pixel position in the minimap. On the line 248 (https://github.com/0ad/0ad/blob/master/source/gui/MiniMap.cpp), the event does not contain the map size. I need to modify this CPP file and to recompile... The "allied flag" patch has been implemented only in javascript. As a consequence, it contain a bug when we rotate the view (if the map view change, the orientation relatively to the north change also). So, If you want to play with this patch, do not rotate you view. When I will have time, I will implement the C++ changes to do this properly. PS : I also added a button to resize the minimap (small size, medium and big size). Patch is loadable from http://www.pyryp.com/0ad/minimapZoomAndAlliedFlag/help.htm Thanks for 0AD, great work ! Nico