Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chicken Breeding Rework #2141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mehwaffle10
Copy link

Chicken breeding changes stemming from discussion on #1910. These have been tested on US captains for the past few weeks.

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

Description

  • Chickens no longer use a global variable for sound or egg laying, which led to chickens being unable to breed or make sounds if any chicken was making noise
  • Moved shared variables to ChickenCommon.as
  • Chickens now always breed even if there isn't a player nearby
  • Chickens and eggs now ignore other chickens/eggs that are held or in inventories when counting nearby chickens/eggs
  • Eggs now prevent hatched chickens from clipping into walls
  • Eggs will not hatch a chicken inside of a static blob
  • Eggs will not hatch a chicken in a 1-wide gap
  • Eggs now reset their hatch time when detached
  • Eggs no longer tick when held
  • Eggs now always hatch even if they can't spawn a chicken
  • Reduced egg hatch time to 20 seconds
  • Reduced chicken/egg search radius to 10 blocks
  • Chickens will not lay eggs if there are 3 other chickens/eggs nearby
  • Eggs will not spawn a chicken when hatching if there are 4 chickens nearby

Steps to Test or Reproduce

Chickens no longer use a global variable for sound or egg laying, which led to chickens being unable to breed or make sounds if any chicken was making noise

-Set up a chicken coop on one side of the map. Collide repeatedly with a different chicken ~20 blocks away (to make sure there is no overlap). Chickens in coop can still make Pluck sound and will continue to lay eggs.

Chickens now always breed even if there isn't a player nearby

  • Set up a chicken coop on one side of the map. Walk to other side of map. Chickens will still breed.

Chickens and eggs now ignore other chickens/eggs that are held or in inventories when counting nearby chickens/eggs

  • Place 3 chickens on the ground. Have a chicken/egg in your hand/inventory. Chickens will stay lay an egg. Continue with chicken/egg in hand/inventory. Egg will still hatch

Eggs now prevent hatched chickens from clipping into walls

  • Place an egg directly against the side of a block or static blob. The chicken will not clip into the wall when hatched
    image

Eggs will not hatch a chicken inside of a static blob

  • Place an egg in a door or platform. It will not spawn a chicken when it hatches

Eggs will not hatch a chicken in a 1-wide gap

  • Place an egg in a 1-wide gap. It will not spawn a chicken when it hatches
    image

Eggs now reset their hatch time when detached

  • Place an egg on the ground. Pick it up after 10 seconds. It will take ~20 seconds to hatch once dropped (delays occasionally due to tick timings. Egg only ticks every 4 seconds)

Eggs no longer tick when held

  • Hold an egg. It will never hatch

Eggs now always hatch even if they can't spawn a chicken

  • Place an egg in a 1-wide gap or in a coop with at least 4 chickens. It will not spawn a chicken when it hatches

Reduced egg hatch time to 20 seconds

  • Place an egg on the ground. It will hatch in ~20 seconds (repeat of delay note above)

Reduced chicken/egg search radius to 10 blocks

  • Create 2 chickens breeders at least 10 blocks apart, 1 that has 10 blocks between the chickens on the top and bottom and one that has 5. The former will continue to drop eggs while the latter will not once there are 2 chickens in the bottom (assuming you only put 2 chickens in the top)

Chickens will not lay eggs if there are 3 other chickens/eggs nearby

  • Place 4 chickens in a coop. They will not lay eggs
  • Place 2 chickens in a coop. They will lay 2 eggs total and no more

Eggs will not spawn a chicken when hatching if there are 4 chickens nearby

  • Place 4 chickens and an egg in a coop. Wait until the egg hatches. There will still only be 4 chickens in the coop

If you added new features and want to explain how to use them, do so here.

Chicken coop:

  • Will generate up to 4 chickens, but you need to keep 2 to continue production
    image

Simple chicken breeder set up:

  • 2 chickens in the top (optional 3rd for slightly faster production)
  • Can take all 4 chickens from the collection chamber
    image

Some useful information to include:

  • git branch used: chicken-breeding-rework
  • gamemode if relevant: N/A
  • specific objects or behaviours affected: chickens, eggs

Follow-Up Recommended Changes:

  • Prevent RegrowPlants.as from spawning chickens, flowers, and grain. Random full healing or chickens isn't great for competitive gameplay
  • Lower chicken health. Chicken shields against archers are stronger than they should be, considering 90% of the time it's an accident. Increased chicken health was also likely a band-aid fix to the next problem
  • Change chicken team on pick up and prevent dealing damage to friendly chickens. Prevents teammates from accidentally killing all of your chickens in the coop or when you are holding a chicken. I'd recommend some sort of indicator for team color, I have a rudimentary one that's supposed to be a leg tag. This is also an issue for a lot of team based objects (bombs, boulders, etc)
    image
  • Potentially rework chickens further. Chickens being more accessible in their current state will exacerbate the trampoline sky tower meta that dominants EU CTF currently. In my mod, I've made chickens have a strong horizontal movement decay to nerf chicken and trampoline combo, and chickens will die if you take any damage while holding them so you can be shot down. On the flip side, I've made their hover stronger and added a double jump mechanic for them to give them more uses. I've also made chickens directly purchasable from the quarters for 50 coins instead of eggs. This incentivizes actually creating a breeder while also reducing the wait time (buying an egg and waiting 50 seconds is a horribly slow payoff when half the time a teammate kills the chicken)

Chickens no longer use a global variable for sound or egg laying, which led to chickens being unable to breed or make sounds if any chicken was making noise. Moved shared variables in ChickenCommon.as. Chickens now always breed even if there isn't a player nearby. Chickens and eggs now ignore other chickens/eggs that are held or in inventories when counting nearby chickens/eggs. Eggs now prevent hatched chickens from clipping into walls and will not hatch a chicken in a 1-wide gap. Eggs now reset their hatch time when detached and no longer tick when held. Eggs now always hatch even if they can't spawn a chicken. Reduced egg hatch time to 20 seconds and chicken/egg search radius to 10 blocks. Chickens will not lay eggs if there are 3 other chickens/eggs nearby. Eggs will not spawn a chicken when hatching if there is 4 chickens nearby
@Vam-Jam Vam-Jam self-assigned this Oct 20, 2024
@Vam-Jam Vam-Jam added the change A change to an existing feature or mechanic label Oct 20, 2024
@Vam-Jam Vam-Jam added the CTF PR that is focused towards CTF label Nov 23, 2024
Copy link
Member

@Vam-Jam Vam-Jam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine and works fine from testing. Will mark as discussion for others to chime in.

My only suggestion is, its not clear without reading the PR as to what will allow an egg to hatch. It would make sense to have eggs rotate slightly (back and forth) when they are in a spot where the egg would make a chicken, so users have some sort of feedback as to whats good vs bad.

@Vam-Jam Vam-Jam added the discussion An controversial/debatable issue requiring discussion by the community before implementation label Nov 23, 2024
@Vam-Jam
Copy link
Member

Vam-Jam commented Nov 28, 2024

Another idea, but you could also take a look at including #1173

@mehwaffle10
Copy link
Author

I like the idea, it helps with the issue of wanting a chicken immediately while still buying eggs from the quarters instead of chickens directly (meaning no need to redo localizations). Can also make it rotate faster if incubated, only concerns are making sure it's responsive if the tick rate is limited and that eggs will have to do the space check more than once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change A change to an existing feature or mechanic CTF PR that is focused towards CTF discussion An controversial/debatable issue requiring discussion by the community before implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants