notfound404 Posted January 15, 2022 Share Posted January 15, 2022 hi ! I have just started a mod, following the unofficial guide and managed to create an "hello world" mod. But now i don't know how to implement what i want to do. I am trying to modify the critter sensor (logiccrittercountsensor) to be able to select critter's type to count, like what you do with the critter drop-off (creaturedeliverypoint). However, i'am completely lost, and I have difficulties finding a way to do what i want. Could someone indicate me what file/methods I should look and modify ? Link to comment Share on other sites More sharing options...
pether Posted January 16, 2022 Share Posted January 16, 2022 spunds like you will need to make your own GUI, I hate that part so I won't be helpful there But I suggest making it with little steps - start with making sensor that only detects eg. Hatches and when that works try to make Hatches a variable you can control. For more help, I'd suggest visiting modding discord, there are people who will know how to make the GUI once everything else in your mod works Link to comment Share on other sites More sharing options...
RomenH Posted January 17, 2022 Share Posted January 17, 2022 The critter drop-off uses the `TreeFilterable` component with an `acceptedTags` list that has all of the tags for critters. When a building has the `TreeFilterable` component, the side screen will automatically show up and allow you to pick from that list of tags. So I think that's a good start. You do not need to make your own UI if you can make that list of checkboxes work for your sensor idea. Link to comment Share on other sites More sharing options...
notfound404 Posted April 8, 2022 Author Share Posted April 8, 2022 Thanks for the help ! I had a lot of things going on, so I just started working on this stuff. Thanks to your advice i managed to get an almost working prototype using TreeFilterable. However I encountered some difficulties : I'dd like my sensor to have CritterSensorSideScreen (SideScreenContent). So i copied it, modifying targetSensor. How can i add it to my sensor's sidescreen ? It looks like PLib.UI should have the things I need, but i don't know how it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.