The_Great_Sephiroth Posted July 31, 2023 Share Posted July 31, 2023 I'm trying something that a user of my mods requested, adding a second row to the dew collectors. Apparently I am using the XML incorrectly. <set xpath="/windows/window[@name='windowDewCollector']/rect[@name='content']/grid[@name='queue']/rows/@value">2</set> Not sure how to modify the "rows" value after accessing the named grid. Yes, I know it's simple, but it's late and I am tired. Forgive me! Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted July 31, 2023 Author Share Posted July 31, 2023 Okay, it's something else. I am setting it correctly now but not getting a second row. I also modified the window height value and even doubled it, but no second row. Are dew collectors in C# instead of XML and thus cannot be modded much? <set xpath="/windows/window[@name='windowDewCollector']/rect[@name='content']/grid[@name='queue']/@rows">2</set> Link to comment Share on other sites More sharing options...
doughphunghus Posted August 4, 2023 Share Posted August 4, 2023 (edited) @khzmusik has a "Rain Collector" mod here with documentation on changing the number of slots, so I think this will work? https://gitlab.com/karlgiesing/7d2d-a21-modlets/-/tree/main/khzmusik_Rain_Collector?ref_type=heads See: "Changing the number of "slots"" in the README Also: On nexusmods? I think I saw a ?90? slot Dew collector someone made, so there is another example mod that changes the slot counts. Edited August 4, 2023 by doughphunghus (see edit history) Link to comment Share on other sites More sharing options...
khzmusik Posted August 4, 2023 Share Posted August 4, 2023 @doughphunghus and @The_Great_Sephiroth It does require C#. In vanilla, the size of the dew collector container is fixed in C# to be constant values. My mod includes Harmony patches that will read from the dew collector block's "<properties>" tags and set them accordingly. It also has to be set in the XML because they have to match, and there's no way to do that (easily) with Harmony patches. Feel free to use my mod for that. You can just comment out or remove the properties that deal with the weather. (But maybe wait a bit, because I'm actually working on an update as we speak. It won't change anything about the size of the container, but it should make the weather calculations more accurate.) 1 Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted August 4, 2023 Author Share Posted August 4, 2023 18 hours ago, khzmusik said: @doughphunghus and @The_Great_Sephiroth It does require C#. In vanilla, the size of the dew collector container is fixed in C# to be constant values. My mod includes Harmony patches that will read from the dew collector block's "<properties>" tags and set them accordingly. It also has to be set in the XML because they have to match, and there's no way to do that (easily) with Harmony patches. Feel free to use my mod for that. You can just comment out or remove the properties that deal with the weather. (But maybe wait a bit, because I'm actually working on an update as we speak. It won't change anything about the size of the container, but it should make the weather calculations more accurate.) Thank you, but isn't Harmony the big "hook" program for Unity Engine that allows one to use C# libraries? I am trying to keep this in XML format because I believe if you use Harmony you have to disable EAC and I am not sure about VAC. I wouldn't want to be the cause of a user being banned because he or she forgot to play without EAC. If I am mistaken, please feel free to enlighten me! I've been wrong before! Link to comment Share on other sites More sharing options...
khzmusik Posted August 4, 2023 Share Posted August 4, 2023 (edited) 2 hours ago, The_Great_Sephiroth said: Thank you, but isn't Harmony the big "hook" program for Unity Engine that allows one to use C# libraries? I am trying to keep this in XML format because I believe if you use Harmony you have to disable EAC and I am not sure about VAC. I wouldn't want to be the cause of a user being banned because he or she forgot to play without EAC. If I am mistaken, please feel free to enlighten me! I've been wrong before! Harmony works with any compiled C# executable, it's not specific to Unity. But otherwise you're correct. Like all C# mods, it requires EAC to be disabled, and for the mod to be installed on clients and servers. But as I said, there's no way to do it otherwise. The amount of slots is hard-coded in the vanilla game's compiled executable. EDIT: Just in case you're curious, it's set in the constructor (this is the game's code, not mine): public TileEntityDewCollector(Chunk _chunk) : base(_chunk) { this.containerSize = new Vector2i(3, 1); } (And even if it was not C# code, it would need to be installed on the server anyway, so it's unlikely a user would get booted.) Edited August 4, 2023 by khzmusik (see edit history) Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted August 5, 2023 Author Share Posted August 5, 2023 I'm a C++ guy. I've never liked languages that place a billion libraries between the kernel and my app. I do know and have used C# in another Unity game, but I feel at home in the Unreal Engine since I can do C++ like I used to in the Quake 2 and Half-Life era. So what about VAC? VAC doesn't mind Harmony hooking into Unity games? Link to comment 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