V3.1 Patch:
V3 Base




Update
Now includes ColorMod and Bloom control entities for planetary environments. For example, Mars has a reddish tint to everything, while Mercury has excessive bloom. The effects can combine to create compelling environments if used properly(such as in Jinto's upcoming SolarSystem map!)
Also managed to thoroughly decouple SpaceBuild from Life Support, so there will be less need to update them both in tandem anymore. There is now a global registry function to add entities to the affected list, which can be seen operating in the Life Support server-side script.
added temperatures to planets and space. Every planet has a different temperature for direct sunlight and shade, the density of the atmosphere also affects how quickly your suit systems get depleted and how fast you get chilled or burned to death.
For temperature effects you'll need Life Support v1.8c
This is a concept gamemode inspired by the thread found here:
http://forums.facepunchstudios.com/s...d.php?t=286476
Build spaceships and land on distant worlds, perhaps building settlements or space stations. It comes with one demo map which includes all of the near-solar terrestrial planets: Mercury, Venus, Earth(and Moon), Mars(and moons.) Gravity only applies when standing on a planet, and the Moon has less than half normal gravity. Mercury is so close to the sun that you will receive burning damage if you do not find shade quickly. It is difficult to build due to the planet's instability causing frequent tremors. Venus has such a heavy atmosphere that you will be instantly crushed if you venture onto the surface without a Life Support System(Air Exchanger) to stabilize your atmospheric pressure. Both Earth and Mars have regular day and night cycles, though Earth's atmosphere is so thick that you cannot see anything in space during the daytime, while on Mars you can faintly see the outline of objects and other planets in the ruddy daytime atmospheric haze.
Using the Life Support mod will render space and all planets but our habitat Earth as air-free. You will need to bring your own air supply if you intend to leave Earth's atmosphere. The benefit of a Life Support System is that you will then be able to survive on Venus, which would otherwise be completely inaccessable..
The Life Support Mod can be found here:
http://forums.facepunchstudios.com/s...d.php?t=284353
Further installments are planned to include the Gas Giants, and an Astroid Belt, but they will have to be in separate maps to prevent Source from getting overwhelmed... At any rate, I'm also working on instructions on how to make your own SpaceBuild maps to take advantage of the multi-environmental system demonstrated by the map. In the meantime, enjoy the demo!
IMPORTANT
If you notice a lot of spam floating around in space, there is an administrator command that will remove all objects that are outside planetary domains. Make sure you tell everyone to land their contraptions on the nearest planet before issuing this command or you will accrue a dangerous amount of "Naughty" ratings!
say:
!freespace
Now on how to make maps for this gamemode:
Here is a Planet Devkit with skybox sample + generator, planet templates(takes the excruciating pain out of terrain subdivision!) and documentation:
Also, here is a planet-making tutorial by Slavik:
Planet Making Basics
Landscape
1: Create a Cylinder with 12 sides(anything you can accurately divide into 4-sided top faces), it's a good idea to make its diameter a power of 2.
2: use the Clipping Tool to slice it up from north to south, then from northwest to southeast, then from northeast to southwest. You should be left with 6 4-sided faces if you hit each corner on the dot(grid may need to go down to 1 unit!)
3: flatten the cylinder so it is 1 units tall
4: go into texture editing tool, ctrl+click all 6 top faces and all 6 bottom faces
5: create displacement maps from them
6: select only the bottom faces and create a bulge so you have room in the upper displacement for valleys
7: select only the top faces and create your landscape.
8:
cleanup set all displacement verticies at the very edge of your landscape to 0, same goes with the bottom displacement, this way it will fit into the atmosphere without poking out in places.
Atmosphere
1: make a sphere of the exact same diameter as your terrain, using the exact same number of sides as your terrain and centered at the equator.
2: tie it to a func_illusionary
3: disable shadows AND receiving shadows.
4: create a cylinder matching the landscape diameter and 128 units high, same number of sides, painted with the nodraw texture
5: move it outside your planet and copy it
6: use "paste special" with zero offset
7: reduce the horizontal diameter of the new cylinder by 32 units on each side
8: hit "Carve" and delete the smaller cylinder.
9: move the newly created ring back onto your planet so that you now have an invisible wall standing 128 units tall protecting players from jumping off the edge.
Environment
You'll need to place a "logic_case" entity at the exact center of your sphere, then give it the following case values:
Code:
Case01 = planet
Case02 = (the radius of your planet)
Case03 = (the gravity of your planet)
Case04 = (atmospheric pressure, 1 is equal to pressure at surface on Earth)
Case05 = (temperature in shade, Deg. Kelvin)
Case06 = (temperature in direct sunlight, Deg. Kelvin)
Case07 = (colormod ID string, optional)
Case08 = (bloom ID string, optional)
Case16 = (environmental flags)
These are the environmental flags:
1 = Habitat --breathable air within this radius
2 = Unstable --frequent tremors
4 = Sun Burn --sun will burn you if not sheltered
So for instance you have a planet with a 1024 radius(2048 units across total), with half normal gravity, breathable atmosphere at safe pressure and temperature but with a burning sun, your "logic_case" would look like this:
Code:
Case01 planet
Case02 1024
Case03 0.5
Case04 1
Case05 288
Case06 288
Case16 5
the Unstable flag requires a little extra setup, you need to create a system of env_shake and ambient_generic entities that are controlled by your logic_case, then make a case somewhere containing the word "shake", that case will be the trigger for your planetary tremors.
ColorMod is defined as follows:
Code:
Case01 = planet_color
Case02 = (Color Add R G B) ranges 0 to 1 for each
Case03 = (Color Multiply R G B) ranges 0 to 1 for each
Case04 = (Brightness) ranges -2 to 2
Case05 = (Contrast) ranges 0 to 10
Case06 = (Color) ranges 0 to 5
Case16 = (colormod ID string) the string you set in the planet logic_case
For example, Mars has these settings:
Case01 = planet_color
Case02 = 0.2 0 0
Case03 = 0 0 0
Case04 = -0.17
Case05 = 1.6
Case06 = 1.22
Case16 = marscolor
Bloom is defined as follows:
Code:
Case01 = planet_bloom
Case02 = (Color R G B) ranges 0 to 1 for each
Case03 = (Size X Y) ranges 0 to 50 for each
Case04 = (Passes) ranges 0 to 30
Case05 = (Darken) ranges 0 to 1
Case06 = (Multiply Amount) ranges 0 to 5
Case07 = (Color Multiplier) ranges 0 to 20
Case16 = (bloom ID string) the string you set in the planet logic_case
For example, Mercury has these settings:
Case01 = planet_bloom
Case02 = 1 1 1
Case03 = 9 9
Case04 = 1
Case05 = 0.335
Case06 = 4.253
Case07 = 2.081
Case16 = mercurybloom
To make day/night cycles I just applied some trickery in Hammer(no lua required!)
1: Create a "spike" primitive with the exact same number of sides as your sphere and landscape using the nodraw texture, make it above your landscape with base matching your sphere equator and top just barely protruding from the sphere by 32 units
2: copy it then "paste special" with no offset
3: shrink the copy along the horizontal axes by 32 units
4: bring the top vertex of the spike down by 32 units(leave the bottom alone)
5: hit Carve then delete the smaller spike(move your landscape and sphere out of the way first!)
6:
whatever you do, DO NOT MOVE the carved spike, Hammer will give rounding errors and it will degenerate!
7: tie it to a func_illusionary and paint the inside walls with that fake sky white texture.
8: edit the properties so that its render mode is "Additive"
9: set its "FX Amount" to any number below 255(for Earth I used 254, mars has 240.)
10: set its "FX Color" to any hue you desire.
11: create a logic_timer called "whatever_night" and give it at least 12 OnTrigger outputs in sequence separated by around 0.25 seconds. For each progressive output, decrease the "alpha" value of the sky until it reaches near zero(night sky visible)
12: create another logic_timer called "whatever_day" and give it 12 outputs with the reverse effect of night. Have this one Start Disabled.
13: Add an output to "whatever_night" that OnTrigger Enables "whatever_day" and disables "whatever_night"
14: Do the same in reverse for "whatever_day"
This is the tool I used to make the skybox:
http://www.garagegames.com/index.php...=view&qid=3707
Hope this helps!