niektb Posted July 28, 2014 Report Share Posted July 28, 2014 The skirmishreplacers are completely changed. Nowadays they are defined in the civil .json files. This is far more convenient. I think playing around with unit classes could work but I'm not sure since I don't know the exact look of your units. Could you upload a zip with your mod? 1 Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted July 29, 2014 Author Report Share Posted July 29, 2014 (edited) Sorry for the late reply, I was busy doing some other things.Oh, oops... I even checked the civs before and only found it now after you've told me. I don't know how I missed that...Sure, I can upload it - but please ignore that it is mostly unfinished :]Will do that later. I don't want everyone to have it right now though, is it okay if I password-protect the archive?lion.kanzen, did you refer to my profile picture? Thanks then Did the best I could.Here are some screenshots:https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/0ad_10-02-2014_0001.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/0ad_10-02-2014_0002.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/0ad_10-02-2014_0003.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/0ad_10-02-2014_0004.jpgOlder shots:https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0003.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0004.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0009.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0011.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0014.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0012.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0020.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0021.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0022.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0023.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0024.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0025.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0017.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0030.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0031.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0032.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0033.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0034.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/ancemp/oldscreenshot0013.jpg Edited July 29, 2014 by Phoenix4646 Quote Link to comment Share on other sites More sharing options...
niektb Posted July 29, 2014 Report Share Posted July 29, 2014 (edited) You also can PM me if you like keep it hidden for the time being...No worries, I've seen multiple unfinished mod projects (no wonder either, taking into account that I'm a modder myself and involved in multiple projects) Edited July 29, 2014 by niektb 1 Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted July 29, 2014 Author Report Share Posted July 29, 2014 Alright then, I'll PM it to you as soon as it's uploaded! Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted July 31, 2014 Author Report Share Posted July 31, 2014 Might actually take a little bit longer. I'm fixing some stuff first right now and I'll send it to you later. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted November 1, 2014 Author Report Share Posted November 1, 2014 And it's me again, today with a question regarding techs.So I changed the look of the house for the first phase.https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_ancemp_house_01.jpgThen in the third phase it is supposed to change its look to the 0ad hellenes house model, which works fine.Except when the building is placed, destroyed or hidden in the fog of war. At those times it goes back to the old phase 1 model.https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_ancemp_house_02.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_visualactorchange_01.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_visualactorchange_02.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_visualactorchange_03.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_visualactorchange_04.jpgThe same goes for units with actor changes. When they are created, they use the new phase x model, but when they die they go back to their old one.https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_visualactorchange_05.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_visualactorchange_06.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_visualactorchange_07.jpgAm I missing something or is something wrong on 0ad's scripting part? Quote Link to comment Share on other sites More sharing options...
thamlett Posted November 1, 2014 Report Share Posted November 1, 2014 It's probably just a way of what model is loaded when you are placing things. That might be in the engine, I don't know. Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 1, 2014 Report Share Posted November 1, 2014 Double check templates and actors there might be something relevant there. Also what you could do is creating a new faction. What´s the aim of your mod ?=) Quote Link to comment Share on other sites More sharing options...
leper Posted November 1, 2014 Report Share Posted November 1, 2014 Am I missing something or is something wrong on 0ad's scripting part?Seems like you're the first one testing this to this extent. Looks like the actual actor isn't copied over for Fogging (there is no way to do this currently, but it should be trivial to add), while the techs are not applied in the preview and corpse cases because we do not send messages for local entities to scripts that globally subscribed to that message (to prevent them from picking up non-network-synchronized data). I'll open a ticket. EDIT: #2907 Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted November 2, 2014 Author Report Share Posted November 2, 2014 Ah, alright then. Better ask first before opening a ticket Well, and then there's another thing with techs setting RequiredXP to 0 (e.g. promote units permanently). If I research an upgrade that promotes a certain type of unit and then somehow get control of a pre-stage unit (e.g. I can create advanced hoplites and get a basic one from the enemy by using the convert cheat), the experience points bar glitches and stretches across the screen (similar to the tech bug that has been reported in a ticket some months ago and which got fixed). Now this is a scenario that is very unlikely to happen in 0ad since you don't convert units, but how can I fix the display myself? I know that it happens because it tries to show 0 / x on a bar that is 0 points long and thus it stretches endlessly. Maybe I can force the display (*only* the display) to use the value 1 instead if RequiredXP is 0 and then fill the bar up?Tested in most recent SVN version with a mod that adds the promotion techs back to the barracks queue:https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_requiredxp_visbug_01.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_requiredxp_visbug_03.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_requiredxp_visbug_04.jpgAlso, these converted units cannot be promoted in any way (since the requiredXP stuff is bugged on this one it cannot correctly promote them)https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_requiredxp_visbug_02.jpgIt says the unit has 10 / 0 requiredXP but it doesn't promote it.One way to do it would be just to promote converted units if the new owner has the particular upgrade researched. But I'd rather have it like this, converted units stay like they are and get all the other techs (damage/armor/hp upgrades, speed etc. and whatnot). Instead in this case I'd like the unit to get promoted if it kills any kind of unit (gets any amount of XP).PS:: Just wanted to say: some very minor things I noticedhttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_workercarrying_01.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_workercarrying_04.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_workercarrying_07.jpgThe workers are using the carry animations even though they don't carry any resources. Can be reproduced by selecting multiple workers and sending them to get resources. Then when all of them carry resources, tell them to drop them off. Do that by rapidly clicking on the town centre / storehouse / farmstead (for whatever resource they are carrying) and keep clicking until all of them have dropped the resources off. If you make them walk now, they still look like they're carrying stuff.And this:https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_workerturn_01.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_workerincorrectrot.jpgIncorrect rotation of workers when the resource is directly at a drop off structure Quote Link to comment Share on other sites More sharing options...
leper Posted November 4, 2014 Report Share Posted November 4, 2014 The attached patch only promotes units that are newly created or already owned by the player when the technology is researched. I'm not really sure what way we should prefer for the game (though I agree that promoting units upon conversion is strange) (the other possible change is just adding a message handler for ownership changes and calling IncreaseXp(0)). The attached patch might also lead to strange behaviour if there are multiple promotion techs that build upon each other and only include the (n-1)th rank. That way you could research the first promotion tech, then convert an entity and after that research the second promotion tech and the entity would remain at rank one. Up until it gets a normal promotion where it will go straight to rank 3. Some discussion about how we want to handle techs in the context of conversions would be nice as currently we seem to have some mixed behaviour (with some components applying changes on-the-fly) and others caching them and only changing values if they get a ValueModification message. Is the third issue easily reproducible? Can you please create a ticket with instructions on how to reproduce that? The last issue reminds me of a bug we had with some interpolation optimization code some time ago, but those changes were reverted. Is this easily reproducible? Again a ticket would be nice.promote_later.diff Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted November 4, 2014 Author Report Share Posted November 4, 2014 (edited) No problem, I'll open a ticket for each issue.Btw., all of a sudden promotion of converted units works like a charm (without having modified Promotion.js) which confuses me because it didn't work before as you can see on the screenshot.Also I managed to make a temporary workaround for the visual bug. All I did was editing GuiInterface.js in lines 520 to 527:var cmpPromotion = Engine.QueryInterface(ent, IID_Promotion);if (cmpPromotion){ var bugreqxp = cmpPromotion.GetRequiredXp(); if ( cmpPromotion.GetRequiredXp() == 0) { bugreqxp = cmpPromotion.GetRequiredXp() + 1; } ret.promotion = { "curr": cmpPromotion.GetCurrentXp(), "req": bugreqxp };}I simply add +1 to the shown RequiredXP amount if it is 0 and there you go, it acts as if the unit needs 1 XP to advance (although I still would prefer it to still say x / 0 and make only the bar think that requiredXP is 1, but as a beginner I got to take a closer look on that).PS: And while I'm at making tickets, I'll also make a ticket of this:https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_herostar_01.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_herostar_02.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_herostar_03.jpghttps://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_herostar_04.jpgGarrisoning a hero inside a building lets the star stay exactly where the unit was before it went inside the structure.EDIT:: There they are http://trac.wildfiregames.com/ticket/2909http://trac.wildfiregames.com/ticket/2910http://trac.wildfiregames.com/ticket/2911 Edited November 4, 2014 by Phoenix4646 Quote Link to comment Share on other sites More sharing options...
leper Posted November 4, 2014 Report Share Posted November 4, 2014 I'm still able to reproduce the bug with the steps you listed above, did you change anything else? You could just usecmpPromotion.GetRequiredXp() || 1but that is a workaround for a bug, nothing else. The issue is that the requiredXp apply the tech change, while nothing calls IncreaseXp(). See the patch above, and the other possibility listed in that post. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted November 4, 2014 Author Report Share Posted November 4, 2014 Yeah, I'm aware that it's only a temporary workaround. I was talking about a workaround for the GUI problem only (the experience bar that expands endlessly when RequiredXP is 0). I just felt like saying what I've done because I thought it might help others for the time being, you never know I cannot get the promotion bug to happen again though. Once a converted unit kills anything (= gains some XP) he gets promoted. Maybe when I took the screenshot I converted a slinger that already had gotten XP prior to converting. Or were you unable to get them promoted afterwards? I'm absolutely sure that I haven't changed anything since I'm testing that without mods (except the mod that adds the promotion tech back in the game so I could test it).And sorry about the duplicate. Quote Link to comment Share on other sites More sharing options...
leper Posted November 4, 2014 Report Share Posted November 4, 2014 Ah, I just misunderstood you. Yes, the unit must have gained the XP before being converted (else it would have been promoted). The GUI problem is only the visible manifestation of a simulation issue which shouldn't happen in that way (but does because we mix two different ways to handle technolgies on ownership changes). Quote Link to comment Share on other sites More sharing options...
niektb Posted November 4, 2014 Report Share Posted November 4, 2014 out of curiosity, Phoenix, what code do you use for conversion? Something like this: https://github.com/0ADMods/convert_attack (not sure if it still works)? Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted November 4, 2014 Author Report Share Posted November 4, 2014 I haven't implemented anything related to converting yet, I've only been messing around with the convert cheat for testing stuff and then I noticed the experience bar thing. But if I ever plan on adding conversion I think it'd be useful if some stuff already worked I didn't even know about that mod. For how long has that one been around? Quote Link to comment Share on other sites More sharing options...
niektb Posted November 4, 2014 Report Share Posted November 4, 2014 The repo was created in May this year (and was before included in Aristeia), but it probably needs some sorting out/cleaning to work with a different mod than Aristeia (but I think that is doable) Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted December 24, 2014 Author Report Share Posted December 24, 2014 So I've been making some scenarios again and now I wondered if it is possible to have some technologies already researched when the game starts, e.g. already being in Town Phase. I was thinking about if that could be implemented in the maps' script? Quote Link to comment Share on other sites More sharing options...
niektb Posted December 24, 2014 Report Share Posted December 24, 2014 Do you mean it to be scenario specific? Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted December 24, 2014 Author Report Share Posted December 24, 2014 (edited) Yes, right now I'm trying to do that in specific scenarios. Although sometime later on I'd also like to implement a ''starting age'' setting into the match setup, but not right now So, any ideas? Edited December 24, 2014 by Phoenix4646 Quote Link to comment Share on other sites More sharing options...
niektb Posted December 25, 2014 Report Share Posted December 25, 2014 (edited) 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. Edited December 25, 2014 by niektb 1 Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted December 25, 2014 Author Report Share Posted December 25, 2014 Works like a charm, thanks a lot! While talking about civic centres, are Or-requirements for templates similar to technology requirements possible yet? I'd like to be able to build only one civic centre when I got none and as many as I want once I reach the third phase.Also I'm looking for the file where the standard playercolors are set because I'd like to adjust some of them and I've been searching through a lot of files but found nothing.Where are they located at?And what about unit limits? How can I set up a units' / buildings' limit so it can only be created x times at the same time? I've only seen the BuildRestrictions and TrainingRestrictions stuff which included setting a category, but I'd be thankful if someone could explain how this works. Quote Link to comment Share on other sites More sharing options...
niektb Posted December 25, 2014 Report Share Posted December 25, 2014 [...]And what about unit limits? How can I set up a units' / buildings' limit so it can only be created x times at the same time? I've only seen the BuildRestrictions and TrainingRestrictions stuff which included setting a category, but I'd be thankful if someone could explain how this works.You mean like only have one hero at a time? Look at simulation/templates/special/player.xml Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted December 25, 2014 Author Report Share Posted December 25, 2014 Ah, got it. Alright then! 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.