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.

Mod BlockVariants not working in Survival, working in Creative.

Discussion in 'Modding' started by Cerbrus, Dec 31, 2017.

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

    Messages:
    7
    Hey guys!

    I'm working on fixing some compatibility issues with a mod I'd like to use, that hasn't been maintained for a while:
    "HGY | Balustrade".

    I've managed to get the mod working on Creative mode.
    The 5 added blocks function properly, including the "BlockVariants" under them.

    However, when I change the world to Survival mode, I can no longer select different block variants by scrolling.
    (This still works for "vanilla" items like the wooden floor)

    The compatibility fixes I've applied are:

    New definitions:

    Code:
    <Definition>
      <Id>
    	<TypeId>CubeBlock</TypeId>
    	<SubtypeId>HGY_SB_BaseSlopeLarge</SubtypeId>
      </Id>
    To:
    Code:
    <Definition xsi:type="MyObjectBuilder_CubeBlockDefinition">
      <Id Type="CubeBlock" Subtype="HGY_SB_BaseSlopeLarge" />
    Subtype renames:

    Code:
    <Component Subtype="LargeStone" Count="2" />
    To:
    Code:
    <Component Type="InventoryItem" Subtype="StoneLarge" Count="2" />
    The exact same "BlockVariant" issue happens with "Yurand's Scaffolding Blocks", if you'd like to reproduce it yourself. I've also got my fix for the "Balustrade" mod (so far) available on wetransfer (Link expires in 7 days. Got a better file upload site?).

    Can anyone tell me what to change to make, to make these mods work on survival?
    I'd very much like to have these mods alive and kicking for 0.6+ again :D
     
    Last edited: Dec 31, 2017
  2. Nejispo Trainee Engineer

    Messages:
    31
    Check, if there are not:
    <AvailableInSurvival>false</AvailableInSurvival>
     
  3. Cerbrus Trainee Engineer

    Messages:
    7
    Nope, that doesn't seem to be the issue:

    Code:
    <Category xsi:type="MyObjectBuilder_GuiBlockCategoryDefinition">		
    	<Id Type="GuiBlockCategoryDefinition" Subtype="" />
    	<DisplayName>HGY | Balustrade</DisplayName>
    	<Name>HGY_Balustrade</Name>
    	<AvailableInSurvival>true</AvailableInSurvival>
    	<SearchBlocks>true</SearchBlocks>
    	<Public>true</Public>
    	<ItemIds>
    		<string>HGY_SB_BaseSlopeLarge</string>
    		<string>HGY_SB_BaseLinearLarge</string>
    		<string>HGY_SB_TopSlopeLarge</string>
    		<string>HGY_SB_TopLinearLarge</string>
    		<string>HGY_SB_FloorLinearLarge</string>
    	</ItemIds>
    </Category>
    
    
    None of the other files have a mention of "AvailableInSurvival" in them, and the default value should be "true".
     
  4. Nejispo Trainee Engineer

    Messages:
    31
    Yes, in default is "true".
    I have never seen used GuiBlockCategoryDefinition command.
    Use only "BlockVariants" for scrolling items and it should work.

    Code:
    <Definition xsi:type="MyObjectBuilder_CubeBlockDefinition">
    	  <Id Type="CubeBlock" Subtype="WoodenBattlementStraight_Top_Open_Large" />
    	  <DisplayName>Open Hoarding Wall With Tile Roof</DisplayName>
    	  <Public>true</Public>
    	  <Icon>Textures\GUI\Icons\GalleryStraight_Open.dds</Icon>
    	  <CubeSize>Large</CubeSize>
    	 .
    	 .
    	 .	
    	 <BlockVariants>
    		<BlockVariant>
    			<TypeId>CubeBlock</TypeId>
    			<SubtypeId>WoodenBattlementCornerIn_Top_Open_Large</SubtypeId>
    		 </BlockVariant>
    		 <BlockVariant>
    			<TypeId>CubeBlock</TypeId>
    			<SubtypeId>WoodenBattlementCornerOut_Top_Open_Large</SubtypeId>
    		 </BlockVariant>
    	  </BlockVariants>
    	</Definition>
    
     
  5. Köbi 2 Apprentice Engineer

    Messages:
    147
    All Blocks (including Blockvariants) get blocked in survival by default. To unlock them you will have to make the needed research thingy. Add this to your sbc. :

    <Definition xsi:type="ResearchDefinition" Merge="Append">
    <Id Type="ResearchDefinition" Subtype="Tutorial" />
    <Entry Type="CubeBlock" Subtype="HGY_SB_BaseSlopeLarge" />
    <Entry Type="CubeBlock" Subtype="HGY_SB_BaseLinearLarge" />
    <Entry Type="CubeBlock" Subtype="HGY_SB_TopSlopeLarge" />
    <Entry Type="CubeBlock" Subtype="HGY_SB_TopLinearLarge" />
    <Entry Type="CubeBlock" Subtype="HGY_SB_FloorLinearLarge" />
    </Definition>

    They will get unlocked with the Tutorial now. You can append them to any research subtype you like.
     
  6. Nejispo Trainee Engineer

    Messages:
    31
    @Köbi 2

    this is not true.

    The "ResearchDefinition" cause the blocation of blocks mentioned in it.
    In default are usable without any research.
     
  7. Köbi 2 Apprentice Engineer

    Messages:
    147
    Yeah sorry, propably only the block-variants need research unlocking. I dont think this change was intentionally. Also make only the main-block <GuiVisible>true</GuiVisible> and the others false. So only that one showes in the G-menu.
     
  8. Nejispo Trainee Engineer

    Messages:
    31
    Yes, before version 0.6 you could add in to research only the main block and all scrolled was unlocked with them.

    Now you must add in to research all blocks including scrolled.
    But when you dont add any information about research, all blocks will by in survival unlocked.

    I recommend add the blocks in to existing research, as Köbi 2 wrote before. Not "Tutorial" but for example "CivilianStoneWalls".
     
  9. Cerbrus Trainee Engineer

    Messages:
    7
    That was it! I just needed to specify research for all BlockVariants! That fixed the mod :D

    I've placed them under "CivilianStoneWalls", which seems to be the proper location.

    Now the only remaining issue is that their final build stage isn't rendered (It's not updating the model when it's 100% built), but I can probably figure that one out.
    --- Automerge ---
    Done!

    I've just released a 0.6+ version of the Balustrade mod, available here: http://steamcommunity.com/sharedfiles/filedetails/?id=1261234255
     
    Last edited: Jan 7, 2018
Thread Status:
This last post in this thread was made more than 31 days old.