Author Topic: Sequence of events  (Read 3423 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Sequence of events
« on: March 14, 2008, 04:13:26 PM »
I feed my veggies by giving them 140 energy for each 1000 body. I charge all bots 0.135 per body per cycle. So, a veggie with 1000 body should end up with 5 energy points per cycle.

I have a suspicion that predators in my sim have access to all of the 140 energy points that veggies get in each cycle. Is that possible?  Basically I think that the following might happen:
1. Veggie gets 140 energy
2. Predator's shot is registered and some amount of energy (say 100) is set aside for the return shot (I have proportional return for shots).
3. Costs are applied and veggie looses 135 energy.

As a result the veggie is loosing 100+135 energy.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Sequence of events
« Reply #1 on: March 14, 2008, 04:32:02 PM »
Your correct.  Veggies are fed at the end of the cycle.  So, at the beginning of the next cycle, they have whatever you fed them.  First in the cycle, shots are processed, so nrg feeding shots can take all the nrg a bot at the beginnign of the cycle.  Then lots of other stuff occurs including acessing body upkeep costs.
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Sequence of events
« Reply #2 on: March 14, 2008, 04:45:02 PM »
Bah! That sucks... But at least now things make sense. I've been trying to raise the cost of body for non-veggies and I compensated veggies for that by giving them more energy. The numbers of predators actually went up as I increased the cost of body. This explains it - predators get fed more from each veggie and their bodies are too small for increased body cost to make a difference  
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sequence of events
« Reply #3 on: March 14, 2008, 09:34:25 PM »
IIRC there's no hard and fast reason for the relative ordering of when shots get processed and veggies get nrg.  Mostly the idea is that veggies getting nrg should be done during body management routines, which themselves get done after costs are charged, so that bots die correctly.  We could move the veggy feeding routines to sometime in the beginning of the cycle without any side effects, I think.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Sequence of events
« Reply #4 on: March 15, 2008, 12:19:12 PM »
Unless we partner it right up with body upkeep, it won't change anything.  Beginning of the cycle, end of the cycle... it won't matter while it's outside of UpdateBots().

I'd prefer not to change this...
Many beers....