kelsuis Posted April 22, 2016 Share Posted April 22, 2016 so we got an update with Maxwell and his journal that dropped on the floor and let us craft follower from it. I try to edit this to use in my own mod. Idea is to activate crafting follower on equip x item instead of drop it on the floor. I carefully follow what it need to create shadow follower so far, but stumble on this lines from waxwelljournal that I don't understand. inst:AddComponent("prototyper") inst.components.prototyper.onturnon = onturnon -- inst.components.prototyper.onturnoff = onturnoff -- } not sure what these three lines meaning, but it relate to fuction that mostly inst.components.prototyper.onactivate = onactivate -- start animation or make some sound inst.components.prototyper.trees = TUNING.PROTOTYPER_TREES.WAXWELLJOURNAL -- not sure what to with this looking into prototyper component doesn't help me much too. I know we create recipe in mod main and restrict it to tech needed to craft it, but how to do it in this case? also notice that I need to add some line into "OnEquip fucntion" to activate prototyper somehow, but which one. Link to comment https://forums.kleientertainment.com/forums/topic/66564-question-about-new-waxwelljournal/ Share on other sites More sharing options...
Muche Posted April 22, 2016 Share Posted April 22, 2016 I think the reason the journal has to be on the ground when using it is the way prototyper availability is done - components/builder:EvaluateTechTrees() gets the list of available prototypers by calling local ents = TheSim:FindEntities(pos.x, pos.y, pos.z, TUNING.RESEARCH_MACHINE_DIST, { "prototyper" }, self.exclude_tags) i.e. it looks for nearby entities. You could try changing inst.components.builder.*_bonus in OnEquip and OnUnequip functions. Link to comment https://forums.kleientertainment.com/forums/topic/66564-question-about-new-waxwelljournal/#findComment-754263 Share on other sites More sharing options...
kelsuis Posted April 22, 2016 Author Share Posted April 22, 2016 1 hour ago, Muche said: I think the reason the journal has to be on the ground when using it is the way prototyper availability is done - components/builder:EvaluateTechTrees() gets the list of available prototypers by calling local ents = TheSim:FindEntities(pos.x, pos.y, pos.z, TUNING.RESEARCH_MACHINE_DIST, { "prototyper" }, self.exclude_tags) i.e. it looks for nearby entities. You could try changing inst.components.builder.*_bonus in OnEquip and OnUnequip functions. Yes this definitely work for activate builder on equip. Thank you. Link to comment https://forums.kleientertainment.com/forums/topic/66564-question-about-new-waxwelljournal/#findComment-754298 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