SturgeonFish Posted May 22, 2021 Report Share Posted May 22, 2021 I am working on a mod to add bloomeries made out of refractory bricks, and I've managed to get the recipes/drops working fine. all that's missing is getting the base to properly act like a normal bloomery. I have this at the start of my base block .JSON: "code": "betterbloomerybase", "class": "game:BlockBloomery", "entityClass": "game:Bloomery", And I've tried it without "game:" without luck. Are there any extra hoops I need to jump thru in order to inherit the bloomery class? I should also mention that my added blocks (base & chimney) follow a block-{direction}-{tier} scheme, I don't know if that's complicating things. 1 Link to comment Share on other sites More sharing options...
Spear and Fang Posted May 28, 2021 Report Share Posted May 28, 2021 On 5/21/2021 at 5:37 PM, SturgeonFish said: I am working on a mod to add bloomeries made out of refractory bricks, and I've managed to get the recipes/drops working fine. all that's missing is getting the base to properly act like a normal bloomery. I have this at the start of my base block .JSON: "code": "betterbloomerybase", "class": "game:BlockBloomery", "entityClass": "game:Bloomery", And I've tried it without "game:" without luck. Are there any extra hoops I need to jump thru in order to inherit the bloomery class? I should also mention that my added blocks (base & chimney) follow a block-{direction}-{tier} scheme, I don't know if that's complicating things. At a glance... You shouldn't need the game: in there, but looking at the BlockBloomery class I immediately came across this line: if (aboveBlock.Code.Path == "bloomerychimney") Which could be problematic for sure. It's expecting a block with the exact code path of "bloomerychimney". So the vanilla chimney. Anyways, you might have to make your own clones of the classes (BlockBloomery.cs and BEBloomery.cs) to make this work for you.https://github.com/search?q=org%3Aanegostudios+bloomery&type=code Link to comment Share on other sites More sharing options...
SturgeonFish Posted May 28, 2021 Author Report Share Posted May 28, 2021 Ok, I've gone and created clone classes for the base/block entity. I've switched everything over, including all references for the chimney. I'm not seeing any of my blocks show up or any recipes working now. Does anything here stand o ut as wrong? BetterBloomeries.cs Link to comment Share on other sites More sharing options...
Spear and Fang Posted May 29, 2021 Report Share Posted May 29, 2021 23 hours ago, SturgeonFish said: Ok, I've gone and created clone classes for the base/block entity. I've switched everything over, including all references for the chimney. I'm not seeing any of my blocks show up or any recipes working now. Does anything here stand o ut as wrong? BetterBloomeries.cs 26.44 kB · 1 download Sorry I’m only on my phone for a couple days so I’ll be brief. If you use the original vanilla classes and place a vanilla chimney on top of your new bloomery base, does it work? I’d verify that first before testing your new class(es). Then focus on what the server-main.txt log is complaining about to work the bugs out of the new class Link to comment Share on other sites More sharing options...
SturgeonFish Posted May 30, 2021 Author Report Share Posted May 30, 2021 All good, I appreciate the help. I had all recipes/drops/stacking working before adding the classes and making the mod a code mod. Now that I have switched and added these classes nothing is showing up, blocks or otherwise. I'm not seeing any errors in the logs either and I'm wondering if the classes are even being registered properly. Link to comment Share on other sites More sharing options...
Spear and Fang Posted May 31, 2021 Report Share Posted May 31, 2021 4 hours ago, SturgeonFish said: All good, I appreciate the help. I had all recipes/drops/stacking working before adding the classes and making the mod a code mod. Now that I have switched and added these classes nothing is showing up, blocks or otherwise. I'm not seeing any errors in the logs either and I'm wondering if the classes are even being registered properly. Your code is looking really good and nothing obvious stands out (other than a few minor things that likely need to be tidied up). Can you upload the entire mod so I can take it for a spin and maybe get a handle on what the problem is? PM it to me if you don't want to share it with the world. Link to comment Share on other sites More sharing options...
SturgeonFish Posted May 31, 2021 Author Report Share Posted May 31, 2021 I don't mind sharing what I've got. Heres everything: BetterBloomeries.7z Link to comment Share on other sites More sharing options...
Spear and Fang Posted June 1, 2021 Report Share Posted June 1, 2021 (edited) What did I change? More than I probably should have....sorry! Including some pretty irrelevant stuff at this point. I kept some notes: - added lang file (en.json) - added creative mode "Bloomeries" tab and assets to that tab (this just makes it easier to test in creative mode) - added -north to bbbase recipe output (and had to rework that output after rearranging variantgroups - see below) - removed game: prefix from some things, most notably behaviors - because it was throwing errors - rearranged variantgroups in betterbloomerybase and everything related to that (quite sure horizontalorientation has to be the last variant in order for that to work). It was certainly crashing the game prior to doing so. - not sure exactly what was preventing the code from working (needed to be in a src folder? class registrations not quite right? I don't know for sure) You'll see that I removed a bunch of code and tidied a bit up in order to simplifying troubleshooting and get things "functional" quickly. Obviously you've got a ways to go! With any luck you won't need a custom entity class for that base, but I didn't look at that code too closely. You *might* need a custom block class for the chimney in order to match tiers...maybe. Or just let players mix and match tiers when placing blocks, but prevent interaction with the base (in your existing base block class) if the chimney is the wrong tier...if you catch my meaning. FYI: When it's referencing .Code.Path in the c# code it's talking about the blocks json "code" (+ variants) i.e. "betterbloomerychimney-tier1" or "betterbloomerybase-tier1-north". BetterBloomeries2.7z Edited June 1, 2021 by Spear and Fang 1 Link to comment Share on other sites More sharing options...
SturgeonFish Posted June 1, 2021 Author Report Share Posted June 1, 2021 I see I had a bunch of stuff not set up right, and my project structure was off. This seems functional, all the recipes/drops/smelting and stacking are working. I like being able to mix and match tiers too. The only issue now is the textures not quite being applied right but I'll fumble around to fix that. I'll have to make proper tier textures too. Thanks a ton for the help, I'll get this polished up but I'm definitely crediting you once I put this up for release. 1 Link to comment Share on other sites More sharing options...
l33tmaan Posted June 1, 2021 Report Share Posted June 1, 2021 I've been doing a bit of mercenary texture work lately, if you need any assistance. 2 Link to comment Share on other sites More sharing options...
SturgeonFish Posted June 1, 2021 Author Report Share Posted June 1, 2021 I haven't used gimp in forever, I need to make 3 versions of 2 textures. Looking at tier 1, I can reuse the t1 refractory brick texture for the base, but I want to copy the tier speckling to the vanilla bloomery base and chimney textures. Is there an elegant way to copy the speckle pattern or do i need to pick the colors and try and make it convincing? Link to comment Share on other sites More sharing options...
l33tmaan Posted June 1, 2021 Report Share Posted June 1, 2021 You want those grey specks in the third image to be applied to the first 2 images, too? Photoshop's got a decent color range picker, let me see what I can do. Link to comment Share on other sites More sharing options...
SturgeonFish Posted June 1, 2021 Author Report Share Posted June 1, 2021 the grey and orange specks, yeah Link to comment Share on other sites More sharing options...
l33tmaan Posted June 1, 2021 Report Share Posted June 1, 2021 How's this? Link to comment Share on other sites More sharing options...
SturgeonFish Posted June 1, 2021 Author Report Share Posted June 1, 2021 Looks good, did you just scatter it manually? Link to comment Share on other sites More sharing options...
l33tmaan Posted June 1, 2021 Report Share Posted June 1, 2021 Nah, color selection and a bit of erasing. Easy stuff. Link to comment Share on other sites More sharing options...
SturgeonFish Posted June 1, 2021 Author Report Share Posted June 1, 2021 Tried my hand at it, I don't think I've ever done sprites before. Link to comment Share on other sites More sharing options...
l33tmaan Posted June 1, 2021 Report Share Posted June 1, 2021 Not bad, but you may want to soften up your specks a bit so they aren't so stark. Link to comment Share on other sites More sharing options...
SturgeonFish Posted June 1, 2021 Author Report Share Posted June 1, 2021 Figured out that copy/pasting brick sections looks much better 1 Link to comment Share on other sites More sharing options...
SturgeonFish Posted June 1, 2021 Author Report Share Posted June 1, 2021 https://mods.vintagestory.at/show/mod/732 It's working and up! Link to comment Share on other sites More sharing options...
Recommended Posts