wowgetoffyourcellphone Posted November 28, 2014 Report Share Posted November 28, 2014 Trying to enable the corral food trickle with an aura. This is what I have for the aura. <Auras> <Aura1> <Type>garrisonedUnits</Type> <Affects>Animal</Affects> <Modifications> <ResourceTrickle.FoodRate> <Add>1</Add> </ResourceTrickle.FoodRate> </Modifications> <AuraName>Corraling and Ranching</AuraName> <AuraDescription>Garrison Domestic Animals within the Corral to enable a slow trickle of Food.</AuraDescription> </Aura1> </Auras>The problem is I cannnot make the sheep garrison into the corral.The corral's garrison code looks like this: <GarrisonHolder> <Max>10</Max> <EjectHealth>0.1</EjectHealth> <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy> <List datatype="tokens">Animal</List> <BuffHeal>1</BuffHeal> <LoadingRange>4</LoadingRange> </GarrisonHolder>And all fauna animals (including sheep) have "Animal" as a class. So, the corral should be able to garrison the sheep inside it for me to test the aura, but I cannot make the sheep go into the corral. What could be the cause here? I see nothing in the fauna templates that says they cannot garrison into something. Quote Link to comment Share on other sites More sharing options...
niektb Posted November 28, 2014 Report Share Posted November 28, 2014 Can you garrison other units in the corral? (To narrow the problem) Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 28, 2014 Author Report Share Posted November 28, 2014 (edited) Can you garrison other units in the corral? (To narrow the problem)Good question.When I change the corral's garrison class list from "Animal" to "Unit" I can garrison other units inside, but still not the sheep.EDIT:When I change the aura to a radius instead of garrisonedunit, the aura works. But we want to be able to garrison the animal inside the corral. The game is not letting me do that. Edited November 28, 2014 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
niektb Posted November 28, 2014 Report Share Posted November 28, 2014 (edited) Just a random guess: What would happen if you would put the sheep template in the Units folder and change its class to 'Unit' (and removing Animal)?Edit: what do you call work? For every sheep the food trickle speed increases? Edited November 28, 2014 by niektb Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 28, 2014 Author Report Share Posted November 28, 2014 (edited) Just a random guess: What would happen if you would put the sheep template in the Units folder and change its class to 'Unit' (and removing Animal)?This is not a good solution. It should all be Class-based and should work just fine as it is. Also, the sheep already has the "Unit" class. lol. But just to try, I made a sheep in units/ and gave changed its civ from gaia to cart (the civ I am trying it on),and even that didn't work (so, the civ probably isn't the problem... probably, and its folder is not the problem). Edit: what do you call work? For every sheep the food trickle speed increases?Yes. When I change it to a ranged aura the nearby sheep start to give you a trickle of food. But we want it to be a garrisoned aura. I can't garrison a sheep inside the building regardless of what the aura is or even if there is no aura. And even if the code says I should be able to garrison a unit of 'Animal' class. Edited November 28, 2014 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
niektb Posted November 28, 2014 Report Share Posted November 28, 2014 It wasn't meant as solution, it was meant to discover the error. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 28, 2014 Author Report Share Posted November 28, 2014 (edited) It wasn't meant as solution, it was meant to discover the error.Yeah I know. I also tried removing the animal class from the sheep (didn't work). Removed the Domestic class (I couldn't move the sheep at all). I've tried all kinds of things.So, I abandoned trying to make it work with a sheep and gave the war elephant the trickle code and garrisoned a war elephant into the corral. Did not work. The Wiki claims that all the tech effects should be usable as auras. This does not seem to be the case with all kinds of auras or every effect.So, we have two issues:Sheep are not allowed to be garrisoned. The aura does not work with garrisoned units (but does if aura is changed to ranged). EDIT: It works (!) with garrisoned units, but only if I add a visible prop point. So, this aspect mostly works. So, now the issue is just #1. Cannot garrison Animal or Domestic class units into a Corral. Edited November 28, 2014 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
LordGood Posted November 28, 2014 Report Share Posted November 28, 2014 maybe add animal as a garrisonable troop in the corral building template? Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 28, 2014 Author Report Share Posted November 28, 2014 <GarrisonHolder> <Max>10</Max> <EjectHealth>0.1</EjectHealth> <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy> <List datatype="tokens">Animal</List> <BuffHeal>1</BuffHeal> <LoadingRange>4</LoadingRange> </GarrisonHolder>That is the <List datatype="tokens">Animal</List> line in the code. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 28, 2014 Author Report Share Posted November 28, 2014 (edited) I am guessing, if we use an aura, that a lot of the discussion and patches here would be out of date?http://trac.wildfiregames.com/ticket/1907Or would Mimo's new corral and corralsupply compontents in his latest patch be better? Edited November 28, 2014 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
mimo Posted November 28, 2014 Report Share Posted November 28, 2014 I had two patches fully functionnal, so you should find what you need there: - either using the garrison approach (corral.diff patch) - or using the corral and corralSupply component (corral-v4.diff patch) Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 28, 2014 Author Report Share Posted November 28, 2014 I had two patches fully functionnal, so you should find what you need there: - either using the garrison approach (corral.diff patch) - or using the corral and corralSupply component (corral-v4.diff patch)Looking at the UnitAI file in corral.diff and comparing to the current file, it looks like UnitAI has changed quite a bit in 19 months. But I think UnitAI is where the problem of Animal garrisoning happens. 1 Quote Link to comment Share on other sites More sharing options...
Radagast. Posted November 30, 2014 Report Share Posted November 30, 2014 Animal garrisoning is just the beginning of the problems that static 0AD will encounter. Have one with structures.Animal does have its own state in UnitAI. Haven't looked at the code, but if I remember correctly, then look for mimo's ANIMAL.* additions and add them.A hack could be to add the UnitAI component to your sheep. Always works but it's a hack and 0AD team will kill you (and me for proposing). Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 30, 2014 Author Report Share Posted November 30, 2014 (edited) This was a success by inserting Mimo's UnitAI code by hand. However, there is now weird behavior of the sheep "wandering" in place and their selection circles wandering around the map. lol,Aura and Animal garrisoning now work (see the extra food on the top left).UnitAI.zip Edited November 30, 2014 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
leper Posted November 30, 2014 Report Share Posted November 30, 2014 Looks similar to #2627. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 30, 2014 Author Report Share Posted November 30, 2014 Looks similar to #2627.Maybe similar. But the rings start out beneath the sheep, and then the rings wander away from the sheep as it is playing its walking animation (obviously stuck in place at the prop point). Quote Link to comment Share on other sites More sharing options...
mimo Posted November 30, 2014 Report Share Posted November 30, 2014 This was a success by inserting Mimo's UnitAI code by hand.I don't know if you already did something analoguous, but in my patch I also added <EjectHealth>0.7</EjectHealth> for the corral as corrals should not protect (too much) sheeps for enemy raids. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted November 30, 2014 Author Report Share Posted November 30, 2014 (edited) I don't know if you already did something analoguous, but in my patch I also added <EjectHealth>0.7</EjectHealth> for the corral as corrals should not protect (too much) sheeps for enemy raids.I actually saw what you did in your patch! Figured out why you did that and agreed. I lowered it to 0.5 in my mod. Would also make more sense too if the buildings caught fire when damaged, so the sheep would want to evacuate. lollAnother bad behavior: I cannot double-click and select all the sheep. This also happens with units propped on a Fortress or wall.EDIT:Okay, I tried in the sheep template to put roamdistance to 0 and this is what I get:ERROR: CXeromyces: Parse error: (null):0: Extra element FeedTimeMax in interleaveERROR: CXeromyces: Parse error: gaia/fauna_sheep:1: Element UnitAI failed to validate contentERROR: RelaxNGValidator: Validation failedERROR: Failed to validate entity template 'gaia/fauna_sheep'ERROR: Failed to load entity template 'gaia/fauna_sheep'So, I think the solution is to somehow flag the domestic animals to turn off roaming when garrisoned. I can't "hack" this behavior unfortunetly. Edited November 30, 2014 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted January 26, 2015 Author Report Share Posted January 26, 2015 Hi. Is there a way I can disable sheeps from walking around once they are garrusoned on a prop point? 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.