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.

Infinite Range Antennae

Discussion in 'Modding' started by Concave, Nov 9, 2019 at 10:01.

  1. Concave Trainee Engineer

    Messages:
    97
    Is there a parameter for range that can be set to a high number in CubeBlocks_Communiations?
     
  2. Digi Senior Engineer

    Messages:
    2,383
    There is a MaxBroadcastRadius tag for radio antenna, it's a float so it can go insanely high numbers, up to 340282300000000000000000000000000000000 (thing with float/double is that they lose precision the higher you go, hence why it's got nice round zeroes after a while, because it can't store any data there anymore, it just stores how many zeroes it has).
     
  3. Concave Trainee Engineer

    Messages:
    97

    I made a file LongAnten.sbc and added the MaxBroadcastRadius to the bottom of the code:

    Code:
    <Definition xsi:type="MyObjectBuilder_RadioAntennaDefinition">
    	  <Id>
    		<TypeId> RadTen </TypeId>
    		<SubtypeId>LargeBlockRadioAntenna</SubtypeId>
    	  </Id>
    	  <DisplayName>DisplayName_Block_Antenna</DisplayName>
    	  <Icon>Textures\GUI\Icons\Cubes\antenna.dds</Icon>
    	  <Description>Description_RadioAntenna</Description>
    	  <CubeSize>Large</CubeSize>
    	  <BlockTopology>TriangleMesh</BlockTopology>
    	  <Size x="1" y="6" z="2" />
    	  <ModelOffset x="0" y="0" z="0" />
    	  <Model>Models\Cubes\Large\antenna.mwm</Model>
    	  <Components>
    		<Component Subtype="SteelPlate" Count="60" />
    		<Component Subtype="LargeTube" Count="40" />
    		<Component Subtype="SmallTube" Count="60" />
    		<Component Subtype="Construction" Count="30" />
    		<Component Subtype="Computer" Count="8" />
    		<Component Subtype="RadioCommunication" Count="40" />
    		<Component Subtype="SteelPlate" Count="20" />
    	  </Components>
    	  <CriticalComponent Subtype="RadioCommunication" Index="0" />
    	  <MountPoints>
    		<MountPoint Side="Bottom" ExclusionMask="1" PropertiesMask="2" StartX="0" StartY="0" EndX="1" EndY="2" />
    	  </MountPoints>
    	  <BuildProgressModels>
    		<Model BuildPercentUpperBound="0.33" File="Models\Cubes\Large\AntennaConstruction_1.mwm" />
    		<Model BuildPercentUpperBound="0.66" File="Models\Cubes\Large\AntennaConstruction_2.mwm" />
    		<Model BuildPercentUpperBound="1.00" File="Models\Cubes\Large\AntennaConstruction_3.mwm" />
    	  </BuildProgressModels>
    	  <BlockPairName>Antenna</BlockPairName>
    	  <EdgeType>Light</EdgeType>
    	  <ResourceSinkGroup>Utility</ResourceSinkGroup>
    	  <BuildTimeSeconds>40</BuildTimeSeconds>
    	  <MirroringY>Z</MirroringY>
    	  <MirroringZ>Y</MirroringZ>
    	  <DamageEffectName>Damage_Electrical_Damaged_Antenna</DamageEffectName>
    	  <DamagedSound>ParticleElectrical</DamagedSound>
    	  <DestroyEffect>BlockDestroyedExplosion_Large</DestroyEffect>
    	  <DestroySound>WepSmallWarheadExpl</DestroySound>
    	  <PCU>100</PCU>
    	  <IsAirTight>false</IsAirTight>	
    	  <MaxBroadcastRadius >340282300000000000000000 </MaxBroadcastRadius >
    	</Definition>

    But it is not loading on the mod page when I try to apply it to an existing save file.
     
  4. Digi Senior Engineer

    Messages:
    2,383
    What's with the space after the tag?
    And is that the entire file? You're missing start and end tags for the definition list type, see the begining of any cubeblocks SBC.

    But regardless, the mods window ingame doesn't check the contents, it only lists folders, so you don't have it placed in the correct folder...
    %appdata%/SpaceEngineers/Mods is still the folder for local mods, the other one you mentioned in your other topic is only for downloaded mods (and they were always there actually, the game copied them to the appdata one but it doesn't do that anymore).
     
  5. Concave Trainee Engineer

    Messages:
    97
    I've fixed the typos and put the folder in the correct file and it is now showing up in the client's mod list menu, but the new Antenna part is still not showing up.

    I had the same mod working a couple years ago, but I was able to debug easier because there was an in-game log file that offered some clues. Alt+F11 reveals a similar log file, but even after intentionally adding typos in the mods Data file, I'm not seeing any loading errors.


    The modding environment seems to have changed since I was actively working on it, and many modding help search hits are outdated. Perhaps over time through my trial and error I can offer updated solutions to bring others up to speed.
     
  6. Digi Senior Engineer

    Messages:
    2,383
    Oh and you can't make up TypeIds, you must use existing radio antenna type, but if you want to add a new block the SubtypeId needs to be unique.

    Tags that don't exist won't cause errors, you'll need to cause an XML error if you wanna test if it gets loaded, like add this anywhere without the end tag ofc: <!--

    And is your file in: %appdata%/SpaceEngineers/Mods/<YourMod>/Data/<FIle>.sbc ?

    Also post the updated sbc.