Milo Christiansen Posted March 14, 2018 Report Share Posted March 14, 2018 (edited) Ever wish that bricks were more realistic? This mod is for you! Enjoy bricks with seamless transitions and proper gray mortar! Each time you place a brick block, it checks all adjacent blocks looking for other types of bricks, and overlays a transition texture as needed. For example, in the next picture the two red brick blocks were placed first, then the fire brick block placed between them. As you can see the firebrick gained the proper transitions for red brick! If one of the red bricks were to be removed and a blue brick placed, the blue brick would gain the red transitions needed to match the ones on the yellow brick. This allows you to add a bit of color to your walls (and makes the mod simpler to program :P). To install, simply place the zip in your VS "Mods" directory. Download from the Mod Hub Edited March 13, 2021 by Milo Christiansen Added new version 5 Link to comment Share on other sites More sharing options...
eagleyes005 Posted March 14, 2018 Report Share Posted March 14, 2018 WOW This NEED to be introduced in the server and in the oficial game! Nice work friend! 1 Link to comment Share on other sites More sharing options...
MarcAFK Posted March 14, 2018 Report Share Posted March 14, 2018 Kudos for putting in the work to make this a reality, my halfassed version of this was fine for me but having hardcoded transition bricks on every block looked bad on many occasions. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 18, 2018 Author Report Share Posted March 18, 2018 Uploaded a new version for 1.5.2 Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 20, 2018 Author Report Share Posted March 20, 2018 Ok, the last version had an "issue", this one actually works in survival mode. Link to comment Share on other sites More sharing options...
DanaCraluminum Posted March 13, 2021 Report Share Posted March 13, 2021 What a good mod we have lost Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 13, 2021 Author Report Share Posted March 13, 2021 (edited) The code for this is pretty simple, it is unlikely that any of the core code is broken in any major way. If it doesn't work getting it working again is probably a matter of renaming a function or two. The zip file actually includes the source code (the block behavior is shipped as an uncompiled class that the game will then compile on the fly). Edited March 13, 2021 by Milo Christiansen Link to comment Share on other sites More sharing options...
DanaCraluminum Posted March 13, 2021 Report Share Posted March 13, 2021 29 minutes ago, Milo Christiansen said: The code for this is pretty simple, it is unlikely that any of the core code is broken in any major way. If it doesn't work getting it working again is probably a matter of renaming a function or two. The zip file actually includes the source code (the block behavior is shipped as an uncompiled class that the game will then compile on the fly). 13.3.2021 16:39:46 [Warning] [brickinthewall] Failed parsing version string '1.2' at index 3: Expected PATCH version, found end of string (best guess: 1.2.0) 13.3.2021 16:39:46 [Error] [brickinthewall] Compiler errors during compilation: 13.3.2021 16:39:46 [Error] [brickinthewall] src\BrickTransitionBehavior.cs(17): The type or namespace name 'ModBase' could not be found (are you missing a using directive or an assembly reference?) [CS0246] 13.3.2021 16:39:46 [Error] [brickinthewall] An exception was thrown when trying to load assembly: System.Exception: Could not compile from source files due to errors at Vintagestory.Common.ModCompilationContext.CompileFromFiles(ModContainer mod, IEnumerable`1 paths) at Vintagestory.Common.ModContainer.LoadAssembly(ModCompilationContext compilationContext, ModAssemblyLoader loader) 13.3.2021 16:39:46 [Warning] One or more source code mods failed to compile. Info to modders: In case you cannot find the problem, be aware that the game engine currently can only compile C# code until version 5.0. Any language features from C#6.0 or above will result in compile errors. Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 13, 2021 Author Report Share Posted March 13, 2021 It looks like it was never updated when the name of the mod base class changed. I'll take a look at the code when I go in to work and should have a working version this afternoon. 3 Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 13, 2021 Author Report Share Posted March 13, 2021 I added a new version that corrects for the mod base class rename and the world rotation change that happened at some point. 2 Link to comment Share on other sites More sharing options...
Cjleeh Posted March 14, 2021 Report Share Posted March 14, 2021 4 hours ago, Milo Christiansen said: I added a new version that corrects for the mod base class rename and the world rotation change that happened at some point. Thankyou so much Milo! 1 Link to comment Share on other sites More sharing options...
QPTech Posted March 17, 2021 Report Share Posted March 17, 2021 Just a technical question - are you actually modifying the texures or uvs at runtime, or just using manuall created variants for the various transitions? Either way it's very cool! Link to comment Share on other sites More sharing options...
Milo Christiansen Posted March 17, 2021 Author Report Share Posted March 17, 2021 (edited) I'm making use of the game's block variant system combined with the texture overlay system. Each side is a layer of three textures. The "main" texture, and two overlay transition textures. All of this is standard block definition functionality, leading the code to define all this to be quite short and simple. However, internally this produces one "block" per variation which leads to (quite) a few thousand blocks. The vast number of consumed internal block IDs is probably why this was never implemented in the base game. (note that I'm assuming Tyron never changed the way blocks are handled internally, it could work a bit differently now) It could be done without consuming so many block slots, but that would require a block entity per brick block which is less than ideal in some ways. It probably wouldn't actually be a performance issue, but eh... Making the blocks take on the proper type when placed is trivial, I simply use a block behavior that checks the surroundings when placed and changes the block into the correct variant. Edited March 17, 2021 by Milo Christiansen Link to comment Share on other sites More sharing options...
QPTech Posted March 17, 2021 Report Share Posted March 17, 2021 Ah sounds like the same issues i ran into then (thought i'd try to make a mod where you can make autobordered blocks) Link to comment Share on other sites More sharing options...
Kiava Posted April 19, 2021 Report Share Posted April 19, 2021 21:46:39 [Server Error] [brickinthewall] Compiler errors during compilation: 21:46:39 [Server Error] [brickinthewall] src\BrickTransitionBehavior.cs(71): 'BrickTransitionBehavior.BrickTransitionBehavior.GetDrops(Vintagestory.API.Common.IWorldAccessor, Vintagestory.API.MathTools.BlockPos, Vintagestory.API.Common.IPlayer, float, ref Vintagestory.API.Common.EnumHandling)': no suitable method found to override [CS0115] 21:46:39 [Server Error] [brickinthewall] An exception was thrown when trying to load assembly: System.Exception: Could not compile from source files due to errors at Vintagestory.Common.ModCompilationContext.CompileFromFiles(ModContainer mod, IEnumerable`1 paths) at Vintagestory.Common.ModContainer.LoadAssembly(ModCompilationContext compilationContext, ModAssemblyLoader loader) please update the mod Link to comment Share on other sites More sharing options...
Milo Christiansen Posted April 19, 2021 Author Report Share Posted April 19, 2021 Uploaded a version that works with the latest 1.14 Link to comment Share on other sites More sharing options...
Recommended Posts