Code center > Bugs and fixes
Energy keeps entering
Testlund:
Ok, so what is happening now must be that energy is going more to the body of the bots instead. I'm not sure how energy transfer to body works, so it might be as you say. But in any case it has changed from how it worked before. Before nrg was filling up to 32000 (how much got into body I don't know) and total energy stopped at 42 miljon. Then it started to drop slowly when bots got more DNA wich whould start to increase some costs. I'm just wondering if Eric might have changed something here, so the energy works a little different. If it's not a bug than it's all cool.
Testlund:
There MUST be something wrong here! I did a little experiment. I started with 10 veggies and 10 bots with nrg set to start at 32000. I set the veg nrg/body distribution to 0 and started a new sim. What happend was that the veggies bodies got raised to 32000, the same as their energy. Total energy stopped at 3940000. The veggies grown 4-5 times bigger than the bots. I entered the gui again the check the slider for body/nrg distribution and it had gone back to 10. But even though it jumps back to 10 it still behaves like it was set to maximum. So the only way to stop veggies from consuming all energy into their body is to set the sun to go down when nrg reaches a certain level.
I don't know what good this function with 'vegs nrg/body distritiution' is for anyway. What effect is this supposed to have other than making the veggies grow larger?
Numsgil:
The vegs nrg/body distribution slider changes the way veggies are given nrg. If it goes to body, then they'll get bigger and have more body. This will change the amount of energy they get if you have veggy feeding method set to "per kilobody" or the quadratic one.
I'm not sure, but I think if a veg maxes out either nrg or body, the nrg it receives gets sent to the other one.
EricL:
--- Quote from: Numsgil ---I'm not sure, but I think if a veg maxes out either nrg or body, the nrg it receives gets sent to the other one.
--- End quote ---
A quick glance at the code says no. There are some lines that look to be hold overs from past iterations which do calculate the remaining nrg and body left over when a bot hits 32000, as if to spread it somewhere else, but alas, nothing is done with it. The nrg and body each veg receives per cycle is independent of what other vegs receive.
--- Quote from: Numsgil ---I might have had excess nrg get piped to body though, I don't remember.
--- End quote ---
Nope. nrg and body are independent. If one fills up, the other keeps growing at the same rate.
EricL:
--- Quote from: Testlund ---There MUST be something wrong here!
--- End quote ---
Found it. The nrg/body slider code was attached to the click event, not the change event. The value was getting set when you clicked, not the final slider position. This is why your vegs are still growing their bods and why the slider postition isn't remembered.
Fixed in 2.42.7.
PS. Testlund, take a look at the Field menu on the main window.... Shhhhhhh. It's not finished yet.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version