chaosislife Posted June 16, 2013 Report Share Posted June 16, 2013 I've been digging around in the xmls and i've figured out how to make my tower o' doom prefer to fire at infantry, cavalry, and siege. The problem I've got now is that I can not find a way to tell it to never ever ever fire on support, buildings and walls. Any ideas? Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted June 16, 2013 Report Share Posted June 16, 2013 Something like: <RestrictedClasses datatype="tokens">Structure</RestrictedClasses> Quote Link to comment Share on other sites More sharing options...
chaosislife Posted June 16, 2013 Author Report Share Posted June 16, 2013 (edited) Tried it, got errors, and the unit couldn't be built. On another note, I'm apparently just a forest model away from having a wood farm. Just setting the field's resource type to wood.tree was enough to make them use axes on it. Edited June 16, 2013 by chaosislife Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted June 17, 2013 Report Share Posted June 17, 2013 Automatic behavior can work better ins some classes. Cavalry can never try attack a spear infantry class. But you mean may be a ram attacking a horseman? Quote Link to comment Share on other sites More sharing options...
chaosislife Posted June 17, 2013 Author Report Share Posted June 17, 2013 (edited) Actually, in this case, I just want my siege tower to only attack military units and let economy units just walk right by. With the preferred classes it attacks the military units first, but then goes on to attack the economy units once the military ones are all dead. I also want it to not attack walls because I like to try to salvage the walls in the fortress maps so I can build my new base inside them. Allowing the economy units to live weakens their military in that they can't build many new military units when they've got 200 plus gatherers. Edited June 17, 2013 by chaosislife Quote Link to comment Share on other sites More sharing options...
Sighvatr Posted June 17, 2013 Report Share Posted June 17, 2013 I think its really stupid for siege weapons like the battering ram to attack individual military units. I can understand the ballistae and the catapult to shoot at military units, but a battering ram? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted June 17, 2013 Report Share Posted June 17, 2013 I think its really stupid for siege weapons like the battering ram to attack individual military units. I can understand the ballistae and the catapult to shoot at military units, but a battering ram?Since when can battering rams attack units? When I try it, it can only attack buildings. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted June 17, 2013 Report Share Posted June 17, 2013 Many ago that happenstance 0AD. Otherwise with Spartan females they can defend from enemy. Quote Link to comment Share on other sites More sharing options...
Sighvatr Posted June 17, 2013 Report Share Posted June 17, 2013 Since when can battering rams attack units? When I try it, it can only attack buildings.Really? I need to install the latest version and SVN Quote Link to comment Share on other sites More sharing options...
chaosislife Posted June 17, 2013 Author Report Share Posted June 17, 2013 You really should, it's great being on the bleeding edge of development. Sure ya get some horrible bugs from time to time but you can report them, which helps the project. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted June 17, 2013 Report Share Posted June 17, 2013 Actually, in this case, I just want my siege tower to only attack military units and let economy units just walk right by. With the preferred classes it attacks the military units first, but then goes on to attack the economy units once the military ones are all dead. I also want it to not attack walls because I like to try to salvage the walls in the fortress maps so I can build my new base inside them. Allowing the economy units to live weakens their military in that they can't build many new military units when they've got 200 plus gatherers.see: template_unit_mechanical_siege_ram.xml<RestrictedClasses datatype="tokens">Organic</RestrictedClasses><PreferredClasses datatype="tokens">Gates Structure</PreferredClasses>Replicate this. This is how it's done for what you are talking about in this thread. In the example you give with your siege tower, you would put "Support" where "Organic" is in my example. 1 Quote Link to comment Share on other sites More sharing options...
chaosislife Posted June 18, 2013 Author Report Share Posted June 18, 2013 (edited) Hmmm, didn't get errors this time, probably entered it wrong last time. Still, it doesn't work the way I want. It might not be attacking the support units with it's main attack but it's definitely firing off a million garrison arrows at them so I can't really tell if it's working or not. I'll try that on my archers and see if it works there. Also, I forget just what civ's ram it is, possibly Persians, but the one that has a beam that goes up and down still auto attacks all types of units, at least when it's in the hands of the AI players. Edit : It works for the archers, but still doesn't work for the towers garrison attack. Still, very useful for controlling my victims military capability. Edit 2: Nope doesn't even work for the tower's regular un-garrisoned attack Edited June 18, 2013 by chaosislife Quote Link to comment Share on other sites More sharing options...
leper Posted June 18, 2013 Report Share Posted June 18, 2013 That is because buildings (and by extension siege towers and ships (sort of a hack)) don't check for preferred or restricted classes in the attack component. If we want them to support that, we should create a new ticket to make cmpBuildingAI adhere to those cmpAttack restrictions. (Note to whoever creates the ticket: Should have the 'simple' keyword) Quote Link to comment Share on other sites More sharing options...
chaosislife Posted June 19, 2013 Author Report Share Posted June 19, 2013 (edited) Ticket Created : http://trac.wildfiregames.com/ticket/1985Hmmm, until that's done, could a full unit type handle garrison attack capability or unit building? My tower o' doom is pretty much a mobile command base. Could make an elephant o' doom I suppose. Or a PF-51 Mustang O' Doom? hmmmmm.Edit: do the elephants somehow use the building AI? I just added restrictions to my amped versions of the Mauryan war elephants and they completely ignored them and went about attacking the civies once the buildings were knocked down. Edit 2: I'll have to test it on other unit types to be really sure, but so far it looks as if the AI needs work in reference to this. My elephants obey the restrictions fine only so long as they're in standground stance. Once I put them in violent, aggressive, or defensive they ignore the restrictions and target everything. But then since they're in stand ground and they're melee they couldn't attack anything anyhow unless it walked into them. Could it have something to do with them being allowed to attack walls by default? I've never found what controls that. Edited June 21, 2013 by chaosislife Quote Link to comment Share on other sites More sharing options...
Unarmed Posted June 25, 2013 Report Share Posted June 25, 2013 Since when can battering rams attack units? When I try it, it can only attack buildings.One of the moments I started laughing was when I was playing the game for the first time and I build a watchtower and then the Ai started building a watch tower on the other side. I was like; Haha, what is this for silly game!Another moment was when a battering ram attacked another battering ram. Though I guess it would work in theory. Quote Link to comment Share on other sites More sharing options...
chaosislife Posted June 25, 2013 Author Report Share Posted June 25, 2013 It'd work well in practice too, a battering ram is similar in function to a tank, it's meant to be nearly impervious to arrows, and decent against swords......it's basically a rolling house afterall. But another ram would tear it apart. In all honesty a ram would also destroy any infantry or cavalry that make the mistake of standing directly in front of it. In practice however infantry and cavalry don't tend to stand directly in front of an oncoming ram, so having our rams able to attack them is impractical. Quote Link to comment Share on other sites More sharing options...
Unarmed Posted June 25, 2013 Report Share Posted June 25, 2013 It'd work well in practice too, a battering ram is similar in function to a tank, it's meant to be nearly impervious to arrows, and decent against swords......it's basically a rolling house afterall. But another ram would tear it apart. In all honesty a ram would also destroy any infantry or cavalry that make the mistake of standing directly in front of it. In practice however infantry and cavalry don't tend to stand directly in front of an oncoming ram, so having our rams able to attack them is impractical.Oh god I made this topic off-topic.Well it would work in practice if you would ever face battering ram to battering ram. Hehe.I assume the way to destroy them was fire (I thought I read that in a medieval book) and simply going inside and kill the men manning it.I think the battering rams need a bit of work. They seem too fast, and on the other hand way to vulnerable to arrows. Though they are already quite strong.I'm not going to respond to a second post regarding this topic. I don't want to derail this thread. Quote Link to comment Share on other sites More sharing options...
chaosislife Posted June 25, 2013 Author Report Share Posted June 25, 2013 you can use the following lines within their melee attack bracket to enable them to only attack walls, buildings, and seige weapons. <PreferredClasses datatype="tokens">Wall Structure Siege</PreferredClasses><RestrictedClasses datatype="tokens">Infantry Cavalry Support Organic</RestrictedClasses>and if you add the following to the <identity> bracket in "template_unit_mechanical_siege_ram" you should be able to change the "Siege" to "SiegeRam" so they only attack walls, buildings and rams.<Classes datatype="tokens">SiegeRam</Classes>This should all work, unless of course the ram is buggy like the siege elephant is. Just make sure you put everything in the right place and whatnot. 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.