sinevil404 Posted December 15, 2025 Share Posted December 15, 2025 Recently I have been developing a mod for mechanical small animals, aiming to replace the farming module to reduce CPU load. When I was researching the Pacu's recipes, I found that the method "BasePacuConfig.SeedDiet()" — which is used to obtain seed recipes — has no actual effect. When I ran it in the mod code, the number of recipes obtained was 0, and I also did not find any other code related to Pacu's recipes. Analogous code used to obtain metal ore recipes in Hatch functions properly. My programming skills are rather limited, so the speculations above might be incorrect. Please don’t blame me. Link to comment https://forums.kleientertainment.com/forums/topic/169129-a-potentially-useless-piece-of-code-in-the-game-itself/ Share on other sites More sharing options...
Tigin Posted December 15, 2025 Share Posted December 15, 2025 This method is still in use (See BasePacuConfig.CreatePrefab and PacuConfig.CreatePacu). How are you verifying the number of recipes is 0? Link to comment https://forums.kleientertainment.com/forums/topic/169129-a-potentially-useless-piece-of-code-in-the-game-itself/#findComment-1845825 Share on other sites More sharing options...
sinevil404 Posted December 16, 2025 Author Share Posted December 16, 2025 8 hours ago, Tigin said: 该方法至今仍在使用(参见 BasePacuConfig.CreatePrefab 和 PacuConfig.CreatePacu)。你怎么确认食谱数量是0的? The above is the code to obtain the Pacu seed recipe in the mod code. The above is the code to obtain Hatch food recipes. The above is the log output. Can my guess be verified based on the above content? Link to comment https://forums.kleientertainment.com/forums/topic/169129-a-potentially-useless-piece-of-code-in-the-game-itself/#findComment-1845864 Share on other sites More sharing options...
Tigin Posted December 16, 2025 Share Posted December 16, 2025 This seems like an initialization order issue. The seed diet looks at the plantable seed prefabs which are loaded in entities, but you're logging during PostConfigureComplete which is when buildings are loaded (and buildings are loaded before entities) Link to comment https://forums.kleientertainment.com/forums/topic/169129-a-potentially-useless-piece-of-code-in-the-game-itself/#findComment-1845865 Share on other sites More sharing options...
sinevil404 Posted December 16, 2025 Author Share Posted December 16, 2025 29 minutes ago, Tigin said: 这看起来像是初始化顺序的问题。种子饮食会查看可种植的种子预制件,这些预制件已经加载到实体中,但你是在PostConfigureComplete期间记录的,那时建筑物是加载的(建筑物是在实体之前加载的) This question is too profound for me. I have manually added seed formulas one by one using a clumsy method. Thank you very much for your answer. Link to comment https://forums.kleientertainment.com/forums/topic/169129-a-potentially-useless-piece-of-code-in-the-game-itself/#findComment-1845871 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now