1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

How do you enable planets throught source code?

Discussion in 'Source Code' started by Napoleocool, Jul 11, 2015.

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

    Napoleocool Trainee Engineer

    Messages:
    20
    I saw this video, and the guy enabled planets through source code. I don't care how bugged it is. I just wanna see them :3
     
  2. Shikashi

    Shikashi Trainee Engineer

    Messages:
    99
    Maybe I can give it a try.
    I'm not a professional C# programmer, but my knowledge in it should do the thing
     
  3. Knsgf

    Knsgf Junior Engineer

    Messages:
    538
    1. Open Sources\Sandbox.Game\Engine\Utils\MyFakes.cs and set the following constants to true:
    • public static bool ENABLE_SPAWN_MENU_PROCEDURAL_ASTEROIDS = true;
    • public static bool ENABLE_GRID_CLIPBOARD_CHANGE_TO_DYNAMIC = true;
    • public static bool ENABLE_PLANETS = true;
    • public static bool ENABLE_PLANETS_JETPACK_LIMIT = true;
    2. Compile the "Release" version of the game,
    3. Start SE and create a new world from "Asteroids" scenario.
    4. After the world finishes loading, bring up asteroid spawn menu by pressing Shift+F10. You'll see a new drop-down box that allows you to choose among "Predefined Asteroids", "Procedural Asteroids" or "Planets". Select "Planets".
    5. A new, light blue menu with a slider in it will appear. Use the slider to select desired planet diameter. Keep in mind that the game will accept the diameter only from the following ranges:
    • 8-10 km, which will spawn a moon,
    • 30-50 km, which will create a normal-sized planet.
    6. Generate or modify the seed number, then click "Spawn Asteroid" button. Assuming that diameter has a valid value, a new planet will spawn relatively nearby.
     
  4. Shikashi

    Shikashi Trainee Engineer

    Messages:
    99
    The compiling part doesnt work for me :D
     
  5. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
  6. ~|CoS|~ [Delta] martejj

    ~|CoS|~ [Delta] martejj Trainee Engineer

    Messages:
    2
    For me, I have forked and downloaded the most recent repo from their github repo and if i set the tag "DataFromSources" true in the user.props file it will allow for planets to generate on the normal asteroids scenarios (don't try the premade planet scenarios as they will not work). I have made some observations, you will need a jump drive or some other method to get there quickly (they are very obvious, you can see them from thousands of k's away) and they cause a weird graphical glitch where they are rendered in front of the ship that you are in(you will see when you play).
     
  7. Ihana_Mies

    Ihana_Mies Trainee Engineer

    Messages:
    74
    Newest github repo has working planets. No need to alter the code at all. Just after compiling you can enable spawning them from New Game --> World Settings --> Enable planets
     
  8. Vingo The Friendly Bear

    Vingo The Friendly Bear Trainee Engineer

    Messages:
    54
    Any way to get atmosphere effects in DX 9?
     
  9. joemorin73

    joemorin73 Junior Engineer

    Messages:
    949
    I believe they are still working on the Atmosphere for DX9. It's still a WIP as the atmosphere does not contain oxygen and there is no vegetation. The do look interesting, but that's all for now. Hopefully, more will come.
     
  10. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    Weird, I thought that dialog appeared to me because of the hardcoded parameter I had to change in previous builds, but now it seems to ignore the parameter. I'm guessing that release might be closer than we think.


    Actually, atmospheres are fully working. There's vegetation (what you get in ME) and oxygen. DX9 may still have the rendering problem, but they are definitely working, though they look like if there was a "full moon" night (sun up and illuminating things, but sky is dark and stars bright). In DX11 they work pretty good though.

    Cheers
     
  11. joemorin73

    joemorin73 Junior Engineer

    Messages:
    949
    I tried a day or two ago. I found a planet that is supposed to be O2, but it was showing O2 present in the status. Nor vegetation. I'll have to look again.
     
  12. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    Bear in mind that certain planets may have the look of habitability (especially the clear blue atmosphere), but then they have no oxygen nor vegetation. It's a random characteristic.
    In fact, I had to travel to several planets (thank bliss for the Jump Drives) in my tests before finding a habitable one.

    Cheers
     
  13. joemorin73

    joemorin73 Junior Engineer

    Messages:
    949
    I guess I'll have to travel more. I'm still concerned about the lack of ores on a planet.
     
  14. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    They are there. However, they are both layered and instanced based on probabilities, like for example, gold should be a more scarce resource than iron, at least from what I've seen in the code, I haven't tested it (32bits makes everything a pain to do). That would make for some nice panoramas of mining facilities both on the surface and underground.

    Cheers
     
  15. joemorin73

    joemorin73 Junior Engineer

    Messages:
    949
    How deep are they buried. I've tried to use Azimuth's 5KM Ore detector, but it went out of memory trying to enumerate all the ores.
     
  16. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    I don't know, but it's quite possible that's also randomized.
    In fact Silver, Gold, Platinum and Uranium all have a minimal probability of 0% (EDIT: and a maximum of only 5%) (meaning they could be absent), while Iron, Sillicon and Ice have a 40% and 50% maximum probability.

    Cheers
     
    Last edited: Jul 13, 2015
  17. Scorpion00021

    Scorpion00021 Senior Engineer

    Messages:
    1,411
    The materials are indeed buried, though I'm not sure how deep. There is a minimum depth attribute for materials, but it is randomized.
     
  18. Thedevistator

    Thedevistator Senior Engineer

    Messages:
    1,942
    I was playing around with it for a bit, but has anyone found out where to enable the tree models and textures? Right now I'm only getting feilds full of error boxes.
     
  19. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    IIRC, no need to enable anything, just copy the assets from ME (models, materials, and XML data definitions). I've had grass and trees enabled with no problems.

    Cheers
     
  20. grifter

    grifter Trainee Engineer

    Messages:
    43
    Hi Guys

    i was having a look at the plaints last night and each time i load a new world to start looking i get (Not Enough Memory to Add new object)
    now i am gessing this is due to it ruining in 32 bit as my memory is only getting to 5g out of 16g
    this is making it a little hard to find the planets with the yellow bus
    i have looked around and know memory leeks are likely on the source code just asking if you know of sum thing i can do to help
     
  21. Thedevistator

    Thedevistator Senior Engineer

    Messages:
    1,942
    Restart the game when that bug occurs.
     
  22. joemorin73

    joemorin73 Junior Engineer

    Messages:
    949
    Are you running it with any mods?

    A few of them will tax the memory with planets
     
  23. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    Don't bother. The problem is unfixable by any means short of compiling in 64bit which we can't do.
    Limited building and blueprint usage is possible when far from planets and asteroids, but that is a trick that makes the game open to crashing later on.
    The 32bit compilation is only good for testing and debugging custom features, anything outside of that (like playtesting planets) is too restricted by memory architecture to even bother.

    Cheers
     
  24. Thedevistator

    Thedevistator Senior Engineer

    Messages:
    1,942
    I've been playing fine with planets using 32bit. The reason why it runs out of memory so often isn't you actually hitting the limit, its a glitch. I made 2 small outposts and working on one larger base and I'm still fine.
     
  25. SwiftyTech

    SwiftyTech Trainee Engineer

    Messages:
    3
    hi i was just wondering if you could maybe give a more detailed instructions on moving the textures from ME to SE for the plannets please i dont know what needs to be moved exactly any help greatly appreciated thanks
     
  26. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    But is there any way around the glitch? Some unofficial fix perhaps?
     
  27. Thedevistator

    Thedevistator Senior Engineer

    Messages:
    1,942
    Havent looked into a fix but I have found a work around. If you restart the game (maybe you might only need to restart world) it will fix itself for a bit. That's so far the best workaround I've found.
     
    • Like Like x 1
  28. SwiftyTech

    SwiftyTech Trainee Engineer

    Messages:
    3
    hi i was just wondering if you could maybe give a more detailed instructions on moving the textures from ME to SE for the plannets please i dont know what needs to be moved exactly any help greatly appreciated thanks
     
  29. grifter

    grifter Trainee Engineer

    Messages:
    43
    Thanks guy's
    I was using the restarting trick and it helps if you don't start with a planet close to the start
     
  30. Lynnux

    Lynnux Junior Engineer

    Messages:
    881
    In 1.091 you can create a new world with planets, no need for tricks/workarounds. But I recommend to run the 64bit version of SE since the 32 bit version was out of memory fast.
     
Thread Status:
This last post in this thread was made more than 31 days old.