Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 2014-12-25 in all areas

  1. Merry Christmas!1 I have a gift for you all! Introducing (by popular demand) this: Yes, that is the structure/tech diagram. And yes, that is running inside 0AD. (Well, who didn't see this coming?) If you're running A17, you can grab this: https://github.com/s0600204/0ad-structree-mod/archive/master.zip If you're running SVN, (or have a time machine2 and are running A18), you will need this version: https://github.com/s0600204/0ad-structree-mod/archive/A18.zip To use: download the appropriate version, move it to one of your mods folder, see Game Data Paths for the appropriate path, and extract the contents. Rename the resultant folder "structree", start up 0AD, and enable the mod through the interface found through "Tools & Options" > "Mod Selection" on the Main menu. You'll find the structure tree on the main menu under "Learn"/"Learn to Play"3 > "Structure Tree". I would advise disabling all other mods (except the core 0ad one, duh) before trying the mod. Otherwise, make sure it is last in the list of loaded mods. Known problems:On resolutions narrower than 1280px 1360px(?), the entire structree will not fit horizontally on the screen, and the current lack of a horizontal scrollbar means that you can't scroll.Some building names are too long to fit in their boxes. I'm considering removing them and only having them in tooltipsThe structree doesn't like the Rise of the East mod. I like it, it's a great looking mod, but the structree turns its nose up at it. This appears to be because the wallset templates (chin_wallset_stone & chin_wall_*) are encoded in utf-16 rather than utf-8. The fact that I can't use Engine.ReadXMLFile()4 and so coded a crude substitute may have something to do with it as well. Meh. Problem resolved. This now works with Rise of the East fine. Haven't tested any other mods yet. prodigalson and wowgetoffyourcellphone have both got mods that have a fourth phase. I have an idea as to how to support this, but it might not work and I haven't had time to implement/test my theory. Therefore their mods may cause a lot of errors if you attempt to use my structree with either of their mods. Sorry! Anyhow, enjoy, and I hope you have (had) a good day! 1 - Disclaimer: other mid-winter celebrations are available. 2 - Wibbley-wobbley timey-wimey... 3 - While coding, I was using windowed mode in 1024x768 to ease going back and forth, and found that simply adding a new button to the main menu caused an overlap with the box directly below the buttons. So I created a new submenu and moved the original "Learn to Play" and "History" options inside to join my structree. 4 - Because it's not exposed to GUI scripts. Edit: Problem resolved with regards to Rise of the East, and adding in the "Game Data Paths" option in the "to use" paragraph. Edit2: To coincide with recent changes.
    8 points
  2. The user-writeable mod folder is where mods should be installed (as that should be user-writeable on all systems). If someone wants to install a mod system-wide they can surely find the installation folder anyways. I knew I missed some documentation. Thanks for pointing that out. Nice work (haven't tested the mod yet, but looked at the code a bit)! Might it be easier to just create a simulation to query it? Or should we just expose the template loader to the GUI? It seems like quite some code is at least partially duplicated from functionality already implemented in the simulation. I might have to take a look at scrolling of gui objects now... (pesky contributors contributing ) Thanks for a nice testcase . Also using the nested repeats might help with making the GUI XML files a bit more readable.
    1 point
  3. In that case I can help you. For the map 'A Silent Day In Gaul' I needed the player to be in a later Phase to allow him to build a Civic Center. I doubt it is the most elegant way to do so but it works. var cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);var playerEnt = cmpPlayerManager.GetPlayerByID(1);var technames = ["phase_town_generic", "phase_city_gauls"];var cmpTechnologyManager = Engine.QueryInterface(playerEnt, IID_TechnologyManager); for(var i = 0; i < technames.length; i++) { var template = cmpTechnologyManager.GetTechnologyTemplate(technames[i]); // check, if technology is already researched if (!cmpTechnologyManager.IsTechnologyResearched(technames[i])) cmpTechnologyManager.ResearchTechnology(technames[i]); }At the second line the playerID is defined (player 1 in my case). At the 4th line the to be researched techs. Your full trigger code would then be something like this: Trigger.prototype.ResearchStartingTechs = function() { var cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager); var playerEnt = cmpPlayerManager.GetPlayerByID(1); var technames = ["phase_town_generic"]; var cmpTechnologyManager = Engine.QueryInterface(playerEnt, IID_TechnologyManager); for(var i = 0; i < technames.length; i++) { var template = cmpTechnologyManager.GetTechnologyTemplate(technames[i]); // check, if technology is already researched if (!cmpTechnologyManager.IsTechnologyResearched(technames[i])) cmpTechnologyManager.ResearchTechnology(technames[i]); }};var cmpTrigger = Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger);cmpTrigger.DoAfterDelay(0, "ResearchStartingTechs", {});Edit: forgot argument in latest line.
    1 point
  4. I was talking about this a few month's back. Since it's a fund-raising, we are accountable, and we should at least give the perks easily given (like the copies of the soundtrack etc. etc.). I for one, haven't received one. I don't mind really, but for accountability's sake, we should give out the perks as soon as possible.
    1 point
  5. I confirm this. Lots of errors that break it. However, this is still really cool for vanilla version ofg the game! Works perfectly with vanilla version.
    1 point
  6. I don't think that the current gaul buildings are too far different than what you have posted. Also remember that the artists like to make their mark with stylistic choices that are probably not always accurate 100%. I think it would help them if you maybe did a presentation of each gaul building in the game and show what you would change about each one to make it better. For the lether armor, that looks great. Good idea. Nice reference.
    1 point
  7. The resources are marked per directional trip, therefore 90 means 90 there and 90 back.
    1 point
×
×
  • Create New...