植物调研
zombieJ opened this issue · comments
二货爱吃白萝卜 commented
蔬菜定义 prefabs/farm_plant_defs.lua
蔬菜如果定义 data_only
会让生成内核代码跳过生成蔬菜对应植物的过程。
蔬菜 prefabs/veggies.lua
创造相关物品:
- name.."_seeds":种子
- name.."_oversized":巨大化蔬菜
- name.."_oversized_waxed":巨大化打蜡蔬菜
- name.."_oversized_rotten":巨大化腐烂蔬菜
- name.."_dried":晒干的蔬菜(目前看只有 海带)
- name:蔬菜
- name.."_cooked":烹饪过的蔬菜
作物 prefabs/farm_plants.lua
每个蔬菜都会对应一个作物:
读取 prefabs/farm_plant_defs.lua
蔬菜列表,动态生成对应的蔬菜:
- plant_def.prefab - "farm_plant_"..veggie:蔬菜作物
称重器 prefabs/trophyscale_oversizedveggies.lua
替换巨大化作物,应该暂时不用管。
植物截图 plantregistrydata.lua
看起来是截图用的,应该也用不到。
思路
注入 prefabs/farm_plant_defs.lua
添加相关作物信息,然后自制 prefabs/veggies.lua
注册对应的蔬菜。
杂项
- 植物模板:https://forums.kleientertainment.com/forums/topic/126286-template-adding-farm-plants-to-the-game/
AddSimPostInit
看起来是世界注册完毕后做的事情farm_soil_debris
:农场土地碎片,会给其他植物压力- 替换贴图相关解释:https://forums.kleientertainment.com/forums/topic/66039-solvedwhat-does-the-parameters-in-function-overridesymbol-mean/
- 面向数字对应:https://forums.kleientertainment.com/forums/topic/60193-custom-headtorso-pieces/?tab=comments#comment-695992
- AnimateState Show / Hide 原理:https://forums.kleientertainment.com/forums/topic/47818-how-to-compile-for-animstatehide/?tab=comments#comment-594109
二货爱吃白萝卜 commented
二货爱吃白萝卜 commented
二货爱吃白萝卜 commented
二货爱吃白萝卜 commented