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.

Custom Gravity Field

Discussion in 'Modding' started by AbeAlpha, Mar 18, 2019.

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

    Messages:
    18
    I do the mod ATA Stars: https://steamcommunity.com/sharedfiles/filedetails/?id=1557881032
    And I used the cloud layers to increase the visual size of the stars (more than x100). I would like to know if there is any option to increase the gravitational field in the same way since gravity does not act until it is inside and very close to the core
    I read in a 2016 post that <GravityFalloff> and <GravityFalloffPower> made the function within PlanetGeneratorDefinitions but to my regret it does not work. Have the attribute changed or is it simply not possible?
     
  2. plaYer2k Master Engineer

    Messages:
    3,160
    It still uses those options, and i just loaded one of my old "black hole mods" from 2016 :p

    Maybe you tried to place it in the wrong place?

    When writing your planet definition, so within
    Code:
      <PlanetGeneratorDefinitions>
    	<PlanetGeneratorDefinition>
    
    you can use
    Code:
    	  <GravityFalloffPower>2</GravityFalloffPower>
    	  <GravityFalloff>2</GravityFalloff>
    
    so that you get this structure
    Code:
    <?xml version="1.0"?>
    <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <PlanetGeneratorDefinitions>
    
    	<PlanetGeneratorDefinition>
    	  <Id>
    		<TypeId>PlanetGeneratorDefinition</TypeId>
    		<SubtypeId>Blackhole</SubtypeId>
    	  </Id>
    
    	  <GravityFalloffPower>2</GravityFalloffPower>
    	  <GravityFalloff>2</GravityFalloff>
    ...
    ...
    	</PlanetGeneratorDefinition>
      
      </PlanetGeneratorDefinitions>
    </Definitions>
    
    Edit:
    This post very likely still helps as it explains the gravity of planets, the functions behind etc a little.
    https://forum.keenswh.com/threads/is-there-any-guide-for-modding-planets.7373394/#post-1286883417

    I hope you get your planet done :)
     
    • Agree Agree x 1
  3. AbeAlpha Trainee Engineer

    Messages:
    18
    Thanks for the info, I enjoyed reading. I put the values in the right place, but the changes did not appear because I had to erase and re-paste the planet every time the values were changed
    Is working! now i go to get some fun with blackholes :D
    --- Automerge ---
    You think it's possible to make a script that suits gravity as the most far cloud layer size?
     
  4. Ronin1973 Master Engineer

    Messages:
    4,955

    Altering values after the world is created (first load) can be hit and miss depending on what the game will do when a variable's current attributes don't match what is in the world description. It's always best to save the world as a scenario and then alter the scenario settings and generate fresh.
     
    • Like Like x 1
Thread Status:
This last post in this thread was made more than 31 days old.