IvanX Posted July 18, 2016 Share Posted July 18, 2016 (edited) Hello everyone! I'm trying to port a DS mod to DST, figured out how to solve a lot of different problems, but a lot more remain, and I don't know exactly how I should treat them. The mod's called Craft Pot, and what it does is basically I. Find all crock pot prefabs 1. Iterate all prefabs ingame (AddPrefabPostInitAny) 2. Find those that have stewer component II. Adding custom crock pot event handlers 3. Save the following original events: open, close, give item, take item, finish cooking 4. Change binded handlers for those events to custom ones (injecting modded code) + calling the original ones as the first line III. Processing current inventory content 5. Track down crock pot inventory content 6. Pass it down to mod components 7. Redrawing the crock pot food scroll And now the yet unsolved issues, that I could really use some help or a direction with: I. CrockPots only have stewer and container components on the mastersim side, so I've lost a way to track down crock pots on a client II. Even if i somehow managed to get crockpot prefabs, I don't see a way I could modify container/stewer components (locally) in order to pass custom event handlers (as they simply do not exist??) on the client. III. Client is drawing container, all of the local icons, does that mean there should be some sort of a dirty replica for container on a client somwhere? I'm a decent programmer, just point me in the right direction, or onto some other client mod that could help me find a solution to those problems. The way I see it, if it comes to the worst, I would have to rewrite crock pot prefabs adding dirty stewer, dirty container, and somehow sync raw data with the 'real' stewer/container on the server. Hope it doesn't go that far thou. Edited July 18, 2016 by IvanX Link to comment https://forums.kleientertainment.com/forums/topic/68931-problems-with-client-only-modding-craft-pot/ Share on other sites More sharing options...
IvanX Posted July 18, 2016 Author Share Posted July 18, 2016 A possible bind point for client happened to be container_replica component, at the very least i was able to bind open/close events. Not sure whether I can somehow manage to handle give item/take item, but Link to comment https://forums.kleientertainment.com/forums/topic/68931-problems-with-client-only-modding-craft-pot/#findComment-794444 Share on other sites More sharing options...
IvanX Posted July 19, 2016 Author Share Posted July 19, 2016 (edited) Managed to solve all the problems. container_replica provides original inst reference that has give item/take item. As for the 'finish cooking' event of the stewer, Guess it's inaccessible in anyway, at least I couldn't find how exactly stewer callback fires from server to the client. So I had to change it to button click on the container_replica. Now the new problem is: Error: Failed sharing mod data file. And I guess there's no way to solve that other than waiting for DST workshop to work again. Edited July 19, 2016 by IvanX Link to comment https://forums.kleientertainment.com/forums/topic/68931-problems-with-client-only-modding-craft-pot/#findComment-794861 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