Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Medieval Engineers Style Multiblock System in SE

Discussion in 'Released and WIP Mods' started by LordChicken, Jul 27, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. LordChicken Trainee Engineer

    Messages:
    53
    Greetings!

    Earlier this week while trying to resolve a tricky tight space in a ship I am working on I thought, man this would be easier if I had half sized blocks. I know there are a handful of half “armor” blocks on the workshop and actually have started a half block armor mod from way back that I have filled with random shapes that aren’t even anything more than just the basic shape and a plain recolorable texture. These have always been placeholders until I got around to trying to make these real armor.

    I recalled that mod, Mirco Blocks, from Tumbles from a few years ago and it occurred to me that perhaps what I should do is try to subdivide the large grid. Experiments attempting that over the course of a few days turned up to be not feasible. However, changing the grid size is.

    I resized all of the armor blocks in the Original Content directory in the Space Engineers SDK to half the size, copied and started modifying cubeblocks.sbc. I’ve doubled the size of some of the non-armor blocks along with the mount point to match. What I have are 2.5m³ blocks on a 1.25m³ grid. :D

    [​IMG]

    Now for the reason of this post. Globally changing the grid size of the large grid will cause issues for all blueprints and existing ships. So I have been trying to find a way to resolve that so this mod could be added and removed from worlds without absolutely destroying everything, because it will.

    I attempted to create armor blocks that were sized at 2 instead of 1 and that works for the cube block only. The slope, inverted corner, and corner all just stack on top of each other in cubes of 8 blocks.

    [​IMG]

    That will not work, but you can build the original blocks out of the newly resized ones and that got me thinking of how to try and build that into the game. I know Medieval Engineers has that prebuilt multiblock system for things like roofs and what not. Looking through the code for Medieval Engineers I found a file called MultiBlocks.sbc and the <SubtypeId> is linked in the CubeBlocks.sbc using the <MultiBlock> tag. I created a new block, named it test and created the necessary data and tested it hoping by chance since Medieval Engineers and Space Engineers use the VRAGE 2.0 engine. Of course this didn’t work, but I could spawn in the single version of the cube.

    I figure, using the multiblock for all of the standard armor blocks in the game would allow them to keep their original size and thus resolving that issue so it is not breaking ships and saves upon adding or removing. For clarity <SubtypeId>LargeBlockArmorBlock</SubtypeId> is the Light Armor Block. Making that SubtypeId the multiblock would then make it twice its size when the grid is halved. All of the now “half” sized blocks would get their own SubtypeId so not to interfere with the original blocks.

    [​IMG]

    I do not know where to go with this from here, hence this post. I am not as familiar with the source code as I’d like and if anyone has any suggestions or ideas on how to get something like this working that would be awesome! I know lots of people have wanted the ability to have blocks in blocks and what not. This isn’t exactly that but I think it will help since it will allow for higher resolution to ships.
     
  2. Oneill_420 Trainee Engineer

    Messages:
    1
    How's this coming along? Jw
     
Thread Status:
This last post in this thread was made more than 31 days old.