Phoenix4646 Posted February 3, 2014 Report Share Posted February 3, 2014 (edited) Hi again,making further progress in my mod I came along other questions about the game, which I'm going to ask in here.Trying out the SVN version I found out that you added the possibility of creating upgrades that make units rank up, which is quite awesome. Now, this can be used for making upgrades that change a unit entirely (specific name, generic name, icon, description, etc.) similar to upgrading the short swordsman to the broad swordsman in AoE for example.Now my question is, can you do this without allowing the unit to gather experience? I could of course just set the RequiredXP to 10000 or even 100000 since it's quite unlikely that any unit would reach that value, but I simply want the units to not gain any experience since they are supposed to be upgraded with researches. Now, is that possible or do I have to implement another way of upgrading units similar to promotions?Another question I have is about the armor system in 0 A.D. If a unit has 3 attack and the attacker has 1 armor (reducing the damage by 10%), then the attack would deal 2,7 damage to the other unit. Now, how does that work? How does the game take 2,7 damage from a unit with 100 health?EDIT:: for some reason, my post was sent to early when it was unfinished. Sorry about that. Edited February 3, 2014 by Phoenix4646 Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted February 3, 2014 Report Share Posted February 3, 2014 Hi again, making further progress in my mod I came along other questions about the game, which I'm going to ask in here. Trying out the SVN version I found out that you added the possibility of creating upgrades that make units rank up, which is quite awesome. Now, this can be used for making upgrades that change a unit entirely (specific name, generic name, icon, description, etc.) similar to upgrading the short swordsman to the broad swordsman in AoE for example. Now my question is, can you do this without allowing the unit to gather experience? I could of course just set the RequiredXP to 10000 or even 100000 since it's quite unlikely that any unit would reach that value, but I simply want the units to not gain any experience since they are supposed to be upgraded with researches. Now, is that possible or do I have to implement another way of upgrading units similar to promotions?Promotions aren't meant for this. You can edit most stats via technologies, and a tech to modify the look of the unit is in the pipeline too: http://trac.wildfiregames.com/ticket/2243 You still won't be able to change the name, icon and similar stuff, but this is something we'll never support, as it can cause confusion for the users. Of course, the promotion system and the gui is moddable, so you can change those things if you want, but it's not intended that way, so it will be hacky. Another question I have is about the armor system in 0 A.D. If a unit has 3 attack and the attacker has 1 armor (reducing the damage by 10%), then the attack would deal 2,7 damage to the other unit. Now, how does that work? How does the game take 2,7 damage from a unit with 100 health? Health is decimal, so you'll end up with 97.3 hp, only in the GUI, it's rounded to 97 or 98 hp. I don't remember if it's mathematically rounded, or always up or always down, but that shouldn't matter too much I think. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted February 3, 2014 Author Report Share Posted February 3, 2014 Promotions aren't meant for this. You can edit most stats via technologies, and a tech to modify the look of the unit is in the pipeline too: http://trac.wildfiregames.com/ticket/2243You still won't be able to change the name, icon and similar stuff, but this is something we'll never support, as it can cause confusion for the users.Of course, the promotion system and the gui is moddable, so you can change those things if you want, but it's not intended that way, so it will be hacky.That's a shame, those things could have been useful for modders. Well, then I'll think about how I'm going to do it. Quote Link to comment Share on other sites More sharing options...
wraitii Posted February 3, 2014 Report Share Posted February 3, 2014 We could support a "replace unit from production queue" technology which would achieve just that… Isn't there one yet? Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted February 3, 2014 Author Report Share Posted February 3, 2014 Why yes, that sounds great.I wonder, how did Age of Empires and Empire Earth do all of this stuff? It would be interesting to take a look at the code. Quote Link to comment Share on other sites More sharing options...
Romulus Posted February 3, 2014 Report Share Posted February 3, 2014 Age of Empires never had unit ranking, but only upgrades via tech. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted February 4, 2014 Author Report Share Posted February 4, 2014 I know, I wasn't talking about ranking, I just thought it would be interesting to know how they got all the stuff working they have, like upgrades and units keeping their stats after a conversion. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted February 7, 2014 Author Report Share Posted February 7, 2014 Now I ran into a little problem with siege catapults.It seems like when my catapults get close to a building (or unit?), they start unpacking by themselves and I can't stop them from doing that. If I click the cancel button, they just stop unpacking and then immediately start again which makes them completely immobile until they are unpacked. Only then I can tell them to pack by moving them somewhere.https://dl.dropboxusercontent.com/u/93679544/siegeuncancellable-01.jpghttps://dl.dropboxusercontent.com/u/93679544/siegeuncancellable-02.jpghttps://dl.dropboxusercontent.com/u/93679544/siegeuncancellable-03.jpghttps://dl.dropboxusercontent.com/u/93679544/siegeuncancellable-04.jpghttps://dl.dropboxusercontent.com/u/93679544/siegeuncancellable-05.jpghttps://dl.dropboxusercontent.com/u/93679544/siegeuncancellable-06.jpgThe only difference between this one and 0 A.D.'s lithobolos is that these have more health, attack and range. Any idea what might be causing this? Quote Link to comment Share on other sites More sharing options...
Radagast. Posted February 26, 2014 Report Share Posted February 26, 2014 Have you tried changing the mode of aggressiveness to a more defensive value? Never experienced such behaviour before. Did you change some underlaying code? Quote Link to comment Share on other sites More sharing options...
niektb Posted April 5, 2014 Report Share Posted April 5, 2014 I didn't want to create a separate topic for it but I have a question.When you have a script in your mod that is a modified version from an existing one in public. Now what happens in the game when when the file in public in changed? As in will those additional lines added/ removed in public have influence in your custom script? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted April 5, 2014 Report Share Posted April 5, 2014 Files in mods overwrite files in the public mod. So it won't change if the public file changes.But JS is very modular. The OO paradigm it uses is based on prototypes, which means you can extend the prototypes in other files too.F.e. if you want to have a separate attack function, you can just have a file withAttack.prototype.newFunction = function(a) { /* body */};You can use the above thing also to just redefine an existing function when needed. In this case, you don't have to copy the entire file from the public mod, and you'll automatically inherit changes from there, as it won't overwrite existing files, but only extend existing prototypes. When a change happens to a function you've redefined, you will have to update that manually. But there's nothing we can do against that.The only thing you have to watch out for is that your file is loaded after the file in public (else it would try to extend a prototype that doesn't exist yet, and crash badly). The files are loaded alphabetically. So you could either append something to it, like call the file "AttackMyMod.js" (the 'M' is sorted after the '.'), or use lowercase letters (lowercase is sorted after uppercase IIRC). 3 Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 10, 2014 Report Share Posted April 10, 2014 (edited) Hi again,making further progress in my mod I came along other questions about the game, which I'm going to ask in here.Trying out the SVN version I found out that you added the possibility of creating upgrades that make units rank up, which is quite awesome. Now, this can be used for making upgrades that change a unit entirely (specific name, generic name, icon, description, etc.) similar to upgrading the short swordsman to the broad swordsman in AoE for example.Why yes, that sounds great.I wonder, how did Age of Empires and Empire Earth do all of this stuff? It would be interesting to take a look at the code.you can change and look at age of empires with programs like advanced genie editor 2 this is part of the roman legionnaire code<Promotion> <Entity>units/rome_centurio_imperial</Entity> <RequiredXp>300</RequiredXp> </Promotion>you could simply do it by making a tech that makes the required xp become 0 so then whenever you train the unit he immediately becomes his upgrade this would also effect already built units.i'm not sure if it can be easily done right now? Edited April 10, 2014 by Veridagorin Quote Link to comment Share on other sites More sharing options...
niektb Posted April 10, 2014 Report Share Posted April 10, 2014 (edited) you can change and look at age of empires with programs like advanced genie editor 2 this is part of the roman legionnaire code<Promotion> <Entity>units/rome_centurio_imperial</Entity> <RequiredXp>300</RequiredXp> </Promotion>you could simply do it by making a tech that makes the required xp become 0 so then whenever you train the unit he immediately becomes his upgrade this would also effect already built units.i'm not sure if it can be easily done right now?That is exactly what is done right now.There is a rank upgrade technology (in simulation/data/technologies)upgrade_rank_****_infantry/cavalry.json:{ "genericName": "Advanced Citizen-Infantry", "specificName": { "hele": "Metikoi", "mace": "Metikoi", "spart": "Metikoi", "athen": "Metikoi" }, "description": "Upgrade all of your citizen-soldier infantrymen to Advanced rank.", "cost": {"food": 200, "wood": 300, "stone": 0, "metal": 0}, "requirements": {"tech": "phase_town"}, "requirementsTooltip": "Unlocked in Town Phase.", "icon": "upgrade_advanced.png", "researchTime": 40, "tooltip": "Upgrade all of your citizen-soldier infantrymen to Advanced rank. This increases their military prowess, but decreases their resource gathering rates -25%. Unlocks Elite Citizen-Infantry technology.", "modifications": [{"value": "Promotion/RequiredXp", "replace": 0}], "affects": ["Infantry Basic"], "soundComplete": "interface/alarm/alarm_upgradearmory.xml"} Edited April 10, 2014 by niektb Quote Link to comment Share on other sites More sharing options...
Radagast. Posted April 10, 2014 Report Share Posted April 10, 2014 Indeed. That line: "modifications": [{"value": "Promotion/RequiredXp", "replace": 0}],contains an 'XPath', a path into the XML. This is how you access XML nodes (here: leaves). There is a patch for Actor change on tech research in trunk here. Though I guess the team would need more help from our community to get things done. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted June 3, 2014 Author Report Share Posted June 3, 2014 Yup, hi everyone, it's me again. Took a little break until this Alpha came out and now I'm back, facing the same problems as before Yet again I am happy to see that this game gets better and better every release, with the units behaving much better than before and more possibilities with techs. Only a matter of time when the lag is finally fixed!We could support a "replace unit from production queue" technology which would achieve just that… Isn't there one yet?I wonder, has anything regarding that been done already? I don't see why you wouldn't implement something like this because it just opens more and more ways for mods, if you plan on having a nicely moddable game.I'm using promotions right now so I can get the units to upgrade entirely, but as sanderd said it isn't meant for stuff like that (and promotions are something that I maybe would like to implement in my mod, too, rather than replacing them).In the ''Modern warfare reaches 0 A.D.'' thread I also read about turrets being added because they would be used by some ships in 0 A.D. in the future. I hope you guys didn't abandon that...? Would again give a lot more options. On another note in terms of issues, since this Alpha me and my friends are experiencing weird OOS and ''pyrogenesis.exe has stopped working'' errors in multiplayer games in both vanilla 0 A.D. and my mod, and on top of that we experienced some visual bugs when we found the new graphics setting menu and thought about enabling most of the stuff (we reverted it by unticking those things again / removing our configs, though one of us still gets a totally black landscape sometimes). We were 3 guys playing against 2 Petra AI's. In the first 3 minutes we got a random OOS error, but for some strange reason the game was still sync. This random OOS error occured in every game we played. We had to end the game after 8 minutes because one of us got disconnected, and oddly enough, he couldn't rejoin. The game said he joined and immediately disconnected, making us abandon the game. Then we started a new game, same settings, and played for some time. Sadly, that same guy who got disconnected had to leave withing the first 12 minutes, so there was only 2 of us left. After some more time, approx. another 20 minutes, my game crashed all of a sudden with the oh so descriptive windows error ''pyrogenesis.exe has stopped working'' and the game ended.We got that crash everytime we played with Petra. This windows error message seems to appear everytime around the same time into the game for a random player (?). Sadly, we only have a crashlog.txt of the last time we had the crash and that time my friend had it happen to him.https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/B/crashlog.txtAlso, there's some weirdness about the Petra AI. After some time in a match it decides to send its attacks to the lower left corner of the map, spamming the console with a warning regarding a ''toBeContinued'' attack path / plan. You might want to check that, too https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/B/interestinglog.htmlWe just played another match (this time 2 guys vs. one Aegis AI) and it ran just fine, up until 59 minutes into the game (I pressed F12 to check for how long the game went on) when we got an OOS error when the AI attacked my friend. I made a screenshot of that and uploaded both OOS dumps from me and my friend.https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/A/oos_dump.txthttps://dl.dropboxusercontent.com/u/93679544/0AD%20logs/B/oos_dump_03_06_2014_B-7pm49.txtThe game went on fine again though. Then when we had won the game I wanted to take another screenshot, and suddenly the game crashed with two different error messages, showing the last one twice after I pressed ''break''.https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/A/crashlog.txthttps://dl.dropboxusercontent.com/u/93679544/0AD%20logs/A/crashlog.dmpI hope you guys don't mind if I put all that stuff here, just tell me if this stuff is worthy of a ticket and I'll do it.Regards Quote Link to comment Share on other sites More sharing options...
niektb Posted June 3, 2014 Report Share Posted June 3, 2014 [...]In the ''Modern warfare reaches 0 A.D.'' thread I also read about turrets being added because they would be used by some ships in 0 A.D. in the future. I hope you guys didn't abandon that...? Would again give a lot more options. [...]This has been implemented, but not in Alpha 16. It will come in A17. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted June 3, 2014 Report Share Posted June 3, 2014 When you are modding, I recommend you to mod with the SVN version. So your mod is about ready against the next version comes out. And you have something stable you can distribute to your friends.That OOS problem is known, we've found the cause meanwhile. It's related with firing on someone who's just garrisoning. Difference is very small though, happens only for a split second, and normally (AFAIK), the states come back in sync again.The turrets are in the game (well, the positional part of the turrets, there are still some scripts missing, but it's hard to write code that doesn't get used).We probably won't add a technology that replaces units in the production queue, because it's a bit complicated and error prone. There has to be found a different way to do that. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted June 4, 2014 Author Report Share Posted June 4, 2014 Oh great, didn't know about that :] Good to hear.We probably won't add a technology that replaces units in the production queue, because it's a bit complicated and error prone. There has to be found a different way to do that.So by saying you won't add a technology for that you mean you might do it another way? But how? That's a shame really, I was hoping to make some AoE-like upgrades.I don't know if it's any different if a technology triggers a script or smth. that changes units? Just pure speculation from a newb. Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted July 27, 2014 Author Report Share Posted July 27, 2014 (edited) Yeah it's me again, I've tried myself at Blender this time. I don't get what this error means:ERROR: art/meshes/structural/myjeep.dae: Assertion not satisfied (line 574): failed requirement "mesh has vertex tex coords"What did I do wrong? Edited July 27, 2014 by Phoenix4646 Quote Link to comment Share on other sites More sharing options...
Radagast. Posted July 27, 2014 Report Share Posted July 27, 2014 Did you UV unwrap it? (EDIT MODE -> Select all vertices (A) -> Press U -> Unwrap) Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted July 27, 2014 Author Report Share Posted July 27, 2014 No, I hadn't. Total beginner here Thanks a lot!Is this worth adding to this error list? http://trac.wildfiregames.com/wiki/ExportingErrors Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 27, 2014 Report Share Posted July 27, 2014 Depends if you think that's a common exporting errors. To know that ask yourself if unwrapping is a part of modelling Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted July 27, 2014 Author Report Share Posted July 27, 2014 (edited) Well, common for newbs maybe. But I guess that's a no :]So I got some new questions again.Did you change something regarding the SkirmishReplacer in the SVN version? I tried this in default_infantry_melee_b: <SkirmishReplacer> <general>units/{civ}_infantry_spearman_b</general> <athen>units/athen_infantry_warrior</athen> </SkirmishReplacer>It tells me that it didn't expect <athen> and failes to load. Did that feature get removed?Also I need to make a modified version of the Petra AI for my mod.There is only one building unit, the rest are all fighters. The AI doesn't make any workers and does nothing with the ones you get on gamestart except for placing some buildings but the workers don't go there to actually build them. Now I couldn't get around to where all that stuff happens as the AI is kind of complex for me, is there any guide on the wiki that explains how to modify the AI? Edited July 28, 2014 by Phoenix4646 Quote Link to comment Share on other sites More sharing options...
Phoenix4646 Posted July 28, 2014 Author Report Share Posted July 28, 2014 Bump - I always forget that editing a post doesn't mark it as new Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted July 28, 2014 Report Share Posted July 28, 2014 Nice units , can show more images please sorry for topic off. May be you can ask to Mimo or agentx they are the men of Ai now. 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.