Jump to content

[Feature] Garrison Domestic Animals into the Corral to get a <ResourceTrickle> of Food


Recommended Posts

https://code.wildfiregames.com/D4380

 

Those who would like to test gameplay patches for potential inclusion of the game, and whose interests veer toward balance, can test out the above patch for the animal food trickle feature. Please, first read the entire discussion at that link before adding your two cents (your questions may already by answered).

 

SUMMARY

  • This adds a 1 food/4 seconds trickle for Sheep, Goats, and Pigs and a 1 food/2 seconds trickle for Cattle when they are garrisoned into a Corral. This is accomplished with an aura at the Corral.
  • The exact trickle amount can be debated.
  • This patch also cleans up Cattle templates a little by moving some duplicate code to the parent template.

TEST PLAN

  1. Apply the patch
  2. Open Atlas scenario editor
  3. Place a Corral and some animals (Cattle, Sheep, Goats, and/or Pigs), all Player 1
  4. Run a simulation
  5. Garrison the animals into the Corral
  6. Confirm the food count continuously goes up for each animal garrisoned
  7. Ungarrison the animals and verify that the food increase stops
  8. Agree with the feature
  9. Debate endlessly the exact food trickle rate
Edited by wowgetoffyourcellphone
  • Like 4
Link to comment
Share on other sites

I found a line of code in template_structure.xml in the template folder:

 

 <GarrisonRegenRate>5.0</GarrisonRegenRate>

 

In the phase_town_generic.json file (and of course city phase tech and the special ones for athens) in the technology folder there are lines

    "modifications": [
        { "value": "Capturable/GarrisonRegenRate", "add": 7, "affects": "Structure" }

 

I am not sure what this lines do exactly, but I think it means any garrisoned object (e.g. unit or cattle) makes it tougher to capture structures.

Capturing an structure in phase 3 that has 8 units inside is very difficult, so it would have balance implications.

Link to comment
Share on other sites

I made a mod, where I added this to the corral template

 <GarrisonHolder>
    <Max>8</Max>
    <EjectHealth>0.5</EjectHealth>
    <EjectClassesOnDestroy datatype="tokens">Animal</EjectClassesOnDestroy>
    <List datatype="tokens">Animal</List>
    <BuffHeal>1</BuffHeal>
    <LoadingRange>4</LoadingRange>
  </GarrisonHolder>

So I launced the mod, build some corrals and recruited goats for my army. Out of dedication, I deleted my CC and looked if garrisoned corrals lost loyalty, which they didn't do.

1 hour ago, Stan&#x60; said:

You can change that value only for corrals, by specifying a new value in the template.

I am not a dev, but isn't that bad code? In A27, people can marry cattle and take them into their houses (or I am aiming for that). Then the cattle can still guard the house. I think the better solution would be to specify which objects grant GarrisonRegenRate when garrisoned.

Link to comment
Share on other sites

6 minutes ago, LetswaveaBook said:

I am not a dev, but isn't that bad code? In A27, people can marry cattle and take them into their houses (or I am aiming for that). Then the cattle can still guard the house. I think the better solution would be to specify which objects grant GarrisonRegenRate when garrisoned.

You can restrict what buildings cattle can go in. But yeah ideally you could define on the building what bonus it gets and on the unit whether it gives the bonus. But that's not implemented. Probably not too hard.

Link to comment
Share on other sites

56 minutes ago, Stan&#x60; said:

You can restrict what buildings cattle can go in. But yeah ideally you could define on the building what bonus it gets and on the unit whether it gives the bonus. But that's not implemented.

Then I think it is acceptable to go for code that isn't clean code. But maybe there will be someone that bothers enough to create the tools to do it with some clean code.

 

Btw: The reason that people need to be able to marry cattle is such that you can train minotaurs and such.

  • Haha 1
Link to comment
Share on other sites

Only Corrals allow animals to garrison, so the "sheep garrison into a house making it uncapturable" scenario is moot. 

Thank you for testing! Simply removing the garrison regen for corrals seems like a simple and elegant solution to me, since only animals can garrison inside. Respectfully, I don't think it's ugly at all. It simply and effectively solves the issue without any kind of far reaching component changes. I think extending or changing the Capturable component or adding new components for capturing is beyond this particular diff. :) 

Edited by wowgetoffyourcellphone
  • Like 4
Link to comment
Share on other sites

Is this diff all there is to how I see ranching and corralling* working? Of course not, but it gets the concept rolling and in itself is a fine addition. 

 

*I would actually like to see Sheep/Goats/Pigs/Cattle scattered around the map as Gaia units that scouts can capture. This is similar to AOE games. The difference is, with this patch you have the choice of slaughtering this free captured food immediately or corralling them for a trickle of long-term food (like a relic). We don't have AOE-style animal capturing yet, so the next best thing is the animal training aspect of the Corral and then giving the player the choice of slaughtering or corralling. 

  • Like 1
Link to comment
Share on other sites

14 hours ago, LetswaveaBook said:

I think the better solution would be to specify which objects grant GarrisonRegenRate when garrisoned.

I was thinking more about letting the units be responsible for how much they contribute to the GarrisonRegenRate.

Spoiler
  • unit with capture attack of 1.2 / s
  • sheep without capture attack
  • structure with a GarrisonRegenRate of 2

Without that garrison, the structure regens at its normal rate, x.
When the unit garrisons, it regens with x + 2 * 1.2.
When a sheep garrisons, it still regens with x + 2 * 1.2

The values are subject to change, obviously.

 

  • Like 2
Link to comment
Share on other sites

4 hours ago, Freagarach said:

I was thinking more about letting the units be responsible for how much they contribute to the GarrisonRegenRate.

That seems to be the better option to me. If someone would find the time for creating the patch, it would be great.

Since I am not the person to add that to the game, I am neither the person to judge how it should be done and other solutions are also welcome.

Link to comment
Share on other sites

58 minutes ago, LetswaveaBook said:

That seems to be the better option to me. If someone would find the time for creating the patch, it would be great.

Since I am not the person to add that to the game, I am neither the person to judge how it should be done and other solutions are also welcome.

Does it actually matter? I can’t recall a single instance when someone purposely captured a corral. Make the patch if you want, but I think you can afford to be lazy here 

  • Haha 1
Link to comment
Share on other sites

50 minutes ago, chrstgtr said:

Does it actually matter? I can’t recall a single instance when someone purposely captured a corral.

Right now, people generally won't purposely capture corrals.

However when the opponent relies on garrisoned corrals for their economy, the corresponding counterplay could be to capture the corrals. So that option needs to be there.

Link to comment
Share on other sites

30 minutes ago, LetswaveaBook said:

Right now, people generally won't purposely capture corrals.

However when the opponent relies on garrisoned corrals for their economy, the corresponding counterplay could be to capture the corrals. So that option needs to be there.

I’m unconvinced, but it’s your time to spend. 

Link to comment
Share on other sites

14 hours ago, Freagarach said:

I was thinking more about letting the units be responsible for how much they contribute to the GarrisonRegenRate.

Despite some disagreements above, this would actually be more dynamic method, because then you'd be able to have certain units give 0 regen when garrisoned. For instance, Women or Siege Engines. 

  • Like 1
Link to comment
Share on other sites

I saw that towers have a line of:

    <GarrisonArrowClasses>Infantry</GarrisonArrowClasses>

Initially I was thinking about something like a <GarrisonRegenClasses>

 

The topic deserves some continuation and if the ideal solution can not be obtained, then the solution of @wowgetoffyourcellphone is good enough. (another solution would be to give cattle an aura that sets the GarrisonRegenRate to 0, as the GarrisonRegenRate of the corral also improves upon phasing up)

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
7 hours ago, LetswaveaBook said:

@wowgetoffyourcellphone We can disagree about the details. But his idea is to good to not be part of A26 IMHO. Also fattening of animals would be nice, if it would not be tedious for the player to manage. Has any progress been made to incorporate it with A26?

I assumed the fattening would be a different diff, as it would affect a bunch of things. Train time for the animals, for example, would be shorter, since you now have to wait for the animal to fatten to max amount. 

But the garrisoning/trickle feature seems stable enough for now. :) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...