The burrow I've been using for testing still had a GEN50 Shaman doing all its defense and a GEN54 carrying the offense teams as well on max difficulty. It still works really well.
I took a look at the game files. It looks like food gains do inherit. The relevant functions are function useItem()
in 食糧庫関数.ks
. Two sets of parameters for each Goblin are modified by using an item, .var and .varInh[0]. The second one is relevant when you then go to the function MakeNewGoblin()
in 肉床関数.ks
.
That function is an absolute mess but it does, very conclusively, use the .varInh from the goblin parent and there are comments on each line of code relating to it. First it will get the parent's item use stats. It then initialises the baby goblin's item use stats as 0s. The baby's .varInh then gets modified with the parent's. This is stored separately from the attribute gains you receive from the female parent.
There is also the answer to your question about species selection.
var rd = intrandom(0, 299);
var totalProb = 0;
var gobi;
for(gobi = 0;gobi <= UNT_GBL_ROAD - UNT_GBL_NORMAL;gobi++){
totalProb += tf.birthGoblinType[f.game.goblin[parentGoblinNo].unitID][gobi];
if(totalProb > rd){
break;
}
}
goblinData.unitID = gobi + UNT_GBL_NORMAL;
goblinData.name = tf.unitData[goblinData.unitID].name;
It's a bit of a mess to understand, but there is a table of variables in データ.ks
called tf.birthGoblinType
.
tf.birthGoblinType = [];
tf.birthGoblinType[UNT_GBL_NORMAL] = [275, 10, 5, 4, 3, 3];
tf.birthGoblinType[UNT_GBL_HOB] = [268, 20, 5, 3, 2, 2];
tf.birthGoblinType[UNT_GBL_SHERMAN] = [258, 15, 20, 3, 2, 2];
tf.birthGoblinType[UNT_GBL_CHAMPION] = [251, 15, 10, 20, 2, 2];
tf.birthGoblinType[UNT_GBL_PALADIN] = [253, 15, 10, 5, 15, 2];
tf.birthGoblinType[UNT_GBL_ROAD] = [257, 15, 10, 5, 3, 10];
To make that human readable, each goblin species is determined by a random number between 0 and 299. Depending on the parent's type, it uses one of those arrays to set a target value and increments. The way it increments is a value, 'gobi' that starts at 0. Lists in this programming language have positions, starting at 0. So, if the parent is a shaman, it will use that type's list [258, 15, 20, 3, 2, 2]
and check if the random number is small than the 0 position's value, in this case 258. If that's true, it exits, and the value gobi is set to 0. To determine the species of goblin, it adds the value of gobi (in this case 0), to the position value of a normal goblin (also 0), to get 0, which is the initial position on the unit list, a normal goblin.
If the random number is larger than 258, gobi will be incremented to 1. totalProb has been retained from the last round, so is 258, and now we add the 1 position's value, 15, to that. If 273 is larger than the random number, gobi is set to 1, adding to 0, and you get a hobgoblin. And so on.
By looking at those values, breeding is quite complicated. Champions get the best chance of a non-normal goblin, but a worse chance of paladins and chiefs than a normal goblin (by 2 and 1 in 300).
Also makes me realise that the seedbed's value I thought determined that is entirely unrelated in the end.
Turns out mating was way more complicated than my initial investigation. For determining broodsize, the game uses this function:
var num = intrandom(tf.charaData[heroineID].seedling - tf.charaData[heroineID].seedlingWidth, tf.charaData[heroineID].seedling + tf.charaData[heroineID].seedlingWidth);
for(var i = 0;i < num;i++){
makeNewGoblin(heroineID, goblinNo);
So the GoblinBurrowValues.pdf is only half correct.
To make that human readable, let's use Anvil as an example. In データ.ks
you can find her breeding values, "seedling"=>6*2, "seedlingWidth"=>1,
. So her seedling value is 12. To determine her brood size, the game takes her seedling value, 12, minus her width value, 1 to determine the minimum brood size, 11, and plus her width value, so 13. The final value will be one of those three, and will make that many new goblins. I'll update the sheet, though I guess it's a bit late for release.