local xml_content = ModTextFileGetContent(EntityGetFilename(GetUpdatedEntityID()))
local rank = tonumber(xml_content:match('food_chain_rank%s*=%s*"(%-?%d*%.?%d+)"')) or 10
ComponentSetValue2(EntityGetFirstComponent(GetUpdatedEntityID(), "GenomeDataComponent"), "food_chain_rank", rank)
ComponentSetValue2(EntityGetFirstComponent(GetUpdatedEntityID(), "GenomeDataComponent"), "is_predator", true)

local job = xml_content:match('preferred_job%s*=%s*"(%-?%d*%.?%d+)"') or "JobDefault"
ComponentSetValue2(EntityGetFirstComponent(GetUpdatedEntityID(), "AnimalAIComponent"), "preferred_job", job)