hollth Posted January 5, 2014 Report Share Posted January 5, 2014 In a game I just played I noticed that with the attack upgrade for champion units my civilian bowmen were upgraded too. Didn't notice if it applied to all soldiers or only the bowmen. I was playing as the Mauryans on Oasis. I'll try to test again next time I play to see if I can reproduce it and if it works with other civs. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted January 5, 2014 Report Share Posted January 5, 2014 You can use imagen to see him? F2 for screen capture. Quote Link to comment Share on other sites More sharing options...
hollth Posted January 9, 2014 Author Report Share Posted January 9, 2014 I didn't take a screen shot. Still getting used to mac commands etc.Just then I was able to reproduce it with Carthaginians as well. So it doesn't seem to be related to civilisation.Both civilian soldiers and champion soldiers are getting the +2 attack from the 'Heroism' tech Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted January 9, 2014 Report Share Posted January 9, 2014 And your opponents are...? All tactical desition you do in this game are based in your enemy. And the map where you are playing. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted January 9, 2014 Report Share Posted January 9, 2014 Interesting, that tech affects all units, and even buildings.I investigated the code, first take a look at the technology definition. You see that there is no general "affects" part, as in most other technologies (f.e. the first infantry hack armour tech). But there are affects per modification.Now, in the code, these two affects get combined. The combination looks like [ [ ], ["Champion", "Melee"] ]. To check if the technology applies, it loops over the sub arrays, and checks if the entity has all classes of those sub array. So you could read it as "nothing OR ("Champion" AND "Melee")". Here, the "nothing" means that there is nothing required, so everything entity is affected.Now, I don't know who's wrong. If the "affects" per modification is supposed to further refine the general "affects", then the code is wrong. But if the "affects" is supposed to work as an "OR" combination (and thus generalise the original "affects"), the code is right, but the template is wrong. In that case, the template should have set a general "affects" to "Champion Melee Ranged".I can see both cases wanted. So before changing it, we need to find out if a change won't break other technologies.Thanks for reporting this. Quote Link to comment Share on other sites More sharing options...
Zeta1127 Posted January 9, 2014 Report Share Posted January 9, 2014 (edited) I would imagine the intention for coding the Heroism tech that way is so Melee Champions only get a hack damage bonus, while Ranged Champions only get a pierce damage bonus. Surely there must be a way to make it work as intended, though it seems like you are on the case.Apparently, its counterpart in the champion vs citizen soldier damage tech pair, Will to fight, is also coded the same way.Edit: I figured it out, there is no need to specify Melee and/or Ranged, affects Champion, or CitizenSoldier for Will to fight, for the tech itself is all that is needed, because the way the modifications work was well thought out. Edited January 9, 2014 by Zeta1127 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.