Skip to content

Commit c4f66f0

Browse files
Merge pull request #14 from Cosmic-Mod/blockninja124-post-sky-update
Blockninja124 post sky update
2 parents 258a8e1 + a489a69 commit c4f66f0

File tree

6 files changed

+367
-10
lines changed

6 files changed

+367
-10
lines changed

_data/docs_menu.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
items:
33
- name: Getting started
44
link: /addonsupport/gettingstarted/
5+
- name: Cosmic data files
6+
link: /addonsupport/cosmicdata/
57
- name: Solar Systems
68
link: /addonsupport/solarsystems/
79
- name: Planets
@@ -10,6 +12,8 @@
1012
link: /addonsupport/dimensions/
1113
- name: Skyboxes
1214
link: /addonsupport/skyboxes/
15+
- name: Sky data
16+
link: /addonsupport/skydata/
1317
- name: Fancy JSON text
1418
link: /addonsupport/fancytext/
1519
- name: Contributing

addonsupport/cosmicdata.md

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
title: Cosmic data
3+
layout: page
4+
show_sidebar: false
5+
menubar: docs_menu
6+
---
7+
8+
Most parts of the datapack system all stem from the same files. JSON files in the cosmic data section of a datapack.
9+
10+
They are stored under the cosmic namespace, in the cosmic_data folder.
11+
12+
> data
13+
> > your_namespace
14+
> > > etc
15+
16+
> > cosmos
17+
> > > cosmic_data
18+
> > > > solar_system_1.json
19+
> > > >
20+
> > > > solar_system_2.json
21+
> > > >
22+
> > > > planet_1.json
23+
> > > >
24+
> > > > planet_2.json
25+
> > > >
26+
> > > > overworld.json
27+
> > > >
28+
> > > > other_dimension.json
29+
30+
While all of these files are simply a "cosmic dimension data" file, they are commonly in two forms.
31+
32+
Either used to [setup a space dimension](/addonsupport/solarsystems/), or used to [configure settings for a planet/dimension](/addonsupport/dimensions/).
33+
34+
They will always include an `"attached_dimention_id"`, specifying which dimension they control.
35+
36+
37+
| | Solar systems | Planets | Dimensions |
38+
|-----------------------------------------------|---------------|---------|------------|
39+
| [attached_dimension_id]() | ☑ | ☑ | ☑ |
40+
| [planet_data](/addonsupport/planets/) | ☑ | ☐ | ☐ |
41+
| [gui_data](/addonsupport/solarsystems/) | ☑ | ☐ | ☐ |
42+
| [skybox_data](/addonsupport/skyboxes/) | ☐ | ☑ | ☑ |
43+
| [dimensional_data](/addonsupport/dimensions/) | ☑ | ☑ | ☑ |
44+
45+
46+
{% capture example_solar %}
47+
```json
48+
{
49+
"planet_data": {
50+
//...
51+
},
52+
"attached_dimention_id": "cosmos:solar_sys_d",
53+
"local_id": "Solar Sys.",
54+
"skybox_data": {
55+
//...
56+
},
57+
"dimensional_data": {
58+
"dimension_type": "space",
59+
"weather": false,
60+
"clouds": false,
61+
"sky_objects": false,
62+
"gravity": 0,
63+
"air_resistance": 1
64+
},
65+
"gui_data": {
66+
"solar_sys": {
67+
"object_data": {
68+
//...
69+
},
70+
"travel_dimension": "cosmos:solar_sys_d",
71+
"origin_x": -24100,
72+
"origin_y": 1000,
73+
"origin_z": 5100,
74+
"unlocking_dimension": "none",
75+
"background": "solar_bg",
76+
"title": "Solar Sys.",
77+
"order": -4
78+
}
79+
}
80+
}
81+
```
82+
{% endcapture %} {% include spoiler.html name="Example solar system file" content=example_solar %}
83+
84+
{% capture example_planet %}
85+
```json
86+
{
87+
"attached_dimention_id": "cosmos:marslands",
88+
"skybox_data": {
89+
//...
90+
},
91+
"dimensional_data": {
92+
"dimension_type": "planet",
93+
"weather": false,
94+
"clouds": false,
95+
"sky_objects": false,
96+
"gravity": 38,
97+
"air_resistance": 0.98,
98+
"atmospheric_data": {
99+
"atmosphere_y": 560,
100+
"travel_to": "cosmos:solar_sys_d",
101+
"origin_x": -41000,
102+
"origin_y": 860,
103+
"origin_z": 18000,
104+
"overlay_texture_id": "mars_bar",
105+
"shipbit_y": 24,
106+
"ship_min_y": 120
107+
}
108+
},
109+
"sky_data": {
110+
"sun": {
111+
"type": "object",
112+
"phased": false,
113+
"object_yaw": 45,
114+
"object_pitch": 40,
115+
"object_roll": 35,
116+
"yaw": 0,
117+
"pitch": 0,
118+
"roll": 0,
119+
"yaw_speed": 0,
120+
"pitch_speed": 0,
121+
"roll_speed": 1,
122+
"scale": 0.1,
123+
"core_color": {
124+
"r": 255,
125+
"g": 255,
126+
"b": 255
127+
},
128+
"bloom_color": {
129+
"r": 64,
130+
"g": 16,
131+
"b": 8
132+
}
133+
},
134+
"earth": {
135+
"type": "object",
136+
"phased": false,
137+
"texture_id": "earth",
138+
"object_yaw": 40,
139+
"object_pitch": 30,
140+
"object_roll": 20,
141+
"yaw": 45,
142+
"pitch": 0,
143+
"roll": 180,
144+
"yaw_speed": 0.5,
145+
"pitch_speed": 0,
146+
"roll_speed": 1,
147+
"scale": 0.008
148+
},
149+
"saturn": {
150+
"type": "object",
151+
"phased": false,
152+
"texture_id": "saturn",
153+
"object_yaw": 45,
154+
"object_pitch": 40,
155+
"object_roll": 45,
156+
"yaw": 0,
157+
"pitch": 0,
158+
"roll": 180,
159+
"yaw_speed": 0,
160+
"pitch_speed": 0,
161+
"roll_speed": 1,
162+
"scale": 0.02,
163+
"ring_data": {
164+
"ring1": {
165+
"texture_id": "sat",
166+
"scale_radius": 0.04,
167+
"radius": 10
168+
}
169+
}
170+
}
171+
}
172+
}
173+
```
174+
{% endcapture %} {% include spoiler.html name="Example planet file" content=example_planet %}
175+
176+
{% capture example_dim %}
177+
```json
178+
{
179+
"attached_dimention_id": "minecraft:overworld",
180+
"skybox_data": {
181+
//...
182+
},
183+
"dimensional_data": {
184+
"dimension_type": "planet",
185+
"sky_objects": false,
186+
"atmospheric_data": {
187+
"atmosphere_y": 560,
188+
"travel_to": "cosmos:solar_sys_d",
189+
"origin_x": -24100,
190+
"origin_y": 1000,
191+
"origin_z": 5100,
192+
"overlay_texture_id": "earth_bar",
193+
"shipbit_y": 24,
194+
"ship_min_y": 120
195+
}
196+
},
197+
"sky_data": {
198+
//...
199+
}
200+
}
201+
```
202+
{% endcapture %} {% include spoiler.html name="Example dimension with custom sky (e.g. overworld)" content=example_dim %}

addonsupport/dimensions.md

Lines changed: 69 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,81 @@ show_sidebar: false
55
menubar: docs_menu
66
---
77

8-
Dimension data is commonly used in a [solar system file](/addonsupport/solarsystems/) to set the dimension settings. It will also be used to set the settings of a [planet](/addonsupport/planets)*
8+
Dimension data is commonly used in a [cosmic data file](/addonsupport/cosmicdata/) to set a dimensions settings. Its used in both solar system files and standalone planet dimension files.
99

1010
## Attributes:
1111

12-
`"dimension_type"`: string, can be space or planet*
12+
`"dimension_type"`: string, can be "space" or "planet"
1313

14-
`"weather"`: boolean, controls whether or not the the dimension will rain and snow
14+
`"sky_objects"`: boolean, if false it will disable vanilla stars, sun and moon for this dimension. If not included, will default to true.
1515

16-
`"clouds"`: boolean, controls whether or not the dimension will have clouds
16+
`"weather"`: boolean, controls whether or not the the dimension will have vanilla rain and snow. If not included, will default to true.
1717

18-
`"gravity"`: float or int, is the percentage of earths gravity the dimension will have. Can be 0.1 for 10% or 10 for 10%
18+
`"clouds"`: boolean, controls whether or not the dimension will have clouds. If not included, will default to true.
1919

20-
`"air_resistance"`: float, in the range of 0 to 1. Don’t let the name confuse you, 0 is maximum friction in the air and 1 is none. 1 will simulate space where when floating you have no control over your character, whereas 0 will prevent players from moving at all in the air
20+
`"gravity"`: float or int, is the percentage of earths gravity the dimension will have. Can be 0.1 for 10% or 10 for 10%. If not included, will default to 100 (vanilla overworld).
2121

22-
***
22+
`"air_resistance"`: float, in the range of 0 to 1. Don’t let the name confuse you, 0 is maximum friction in the air and 1 is none. 1 will simulate space where when floating you have no control over your character, whereas 0 will prevent players from moving at all in the air. If not included, will default to 0 (vanilla).
2323

24-
*planet dimensions have not been implemented yet
24+
`"fog_data"`: JSON object, optional. If not included, will default to vanilla. If included, must contain the following:
25+
26+
{% capture fog_data %}
27+
28+
`"color"`: JSON object, must contain a "r", "g" and "b" key, each giving an int between 0 and 255 to control the fog color
29+
30+
Example:
31+
```json
32+
"color": {
33+
"r": 255,
34+
"b": 255,
35+
"g": 255
36+
}
37+
```
38+
39+
`"level"`: float, controls the density of the fog. 0.1 is vanilla.
40+
41+
{% endcapture %} {% include spoiler.html name="Fog data" content=fog_data %}
42+
43+
`"weather_data"`: JSON object, optional. `"weather"` must be false for this setting to work. This setting will override vanilla rain/snow for custom particles, sounds etc. Must contain the following:
44+
45+
{% capture weather_data %}
46+
47+
`"condition"`: string, must be "rain", "snow" or "none". Controls when the custom weather will render.
48+
49+
`"texture_id"`: the name of the texture in assets/cosmos/... to be used for the particles
50+
51+
`"speed"`: float, the speed of the weather. Vanilla snow is 0.5, and vanilla rain is 2.
52+
53+
`"sound_generic"`: string, the sound played when the player is in an open area with this weather. Should be the name of a sound as shown with the /playsound command. (e.g. block.snow.fall)
54+
55+
`"sound_special"`: string, same as above, but will be player when the player is in an inclosed space instead. E.g. a house or a cave.
56+
57+
`"power"`: int, basically the volume of this weather. Recommended to be 1-5
58+
59+
`"hurt"`: boolean, controls whether the weather will hurt players. (E.g. acid rain)
60+
61+
`"damage"`: int, only needed if `"hurt"` is true. Controls the damage the weather does to the player. Each 1 is half a heart, so 5 would be 2 hearts and a half.
62+
63+
{% endcapture %} {% include spoiler.html name="Weather data" content=weather_data %}
64+
65+
`"atmospheric_data"`: JSON object, optional. If not included, will default to overworld. If included, must contain the following:
66+
67+
{% capture atmo_data %}
68+
69+
`"atmosphere_y"`: int, the Y level where players will be transported to space.
70+
71+
`"travel_to"`: string, the dimension players will be transported to on reaching the `"atmosphere_y"`. Usually the solar system dimension this planet is in. Should be in `namespace:dimension` form.
72+
73+
`"origin_x"`: int, the x position players will be sent to on entering this planet by default
74+
75+
`"origin_y"`: int, same as above but y position
76+
77+
`"origin_z"`: int, same as above but z position
78+
79+
`"overlay_texture_id"`: string, the name of a texture in assets/cosmos/... Will be used for the sidebar showing height progress when launching a rocket. MUST be 16x128
80+
81+
`"shipbit_y"`: int, the offset of pixels from the bottom of the overlay image that will be the lowest point the ship icon can reach.
82+
83+
`"ship_min_y"`: int, the y position at which the rocket icon will be at the lowest point, at `"shipbit_y"` on the overlay texture
84+
85+
{% endcapture %} {% include spoiler.html name="Atmospheric data" content=atmo_data %}

addonsupport/planets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,6 @@ flip_z
9696
{% endcapture %}
9797
{% include spoiler.html name="Ringed data" content=ringed_data %}
9898

99-
`attached_dimention_id`: string, todo: figure out
99+
`attached_dimension_id`: string, the dimension the planet will teleport you to
100100

101-
`skybox_data`: dictionary, contains the skybox?
101+
`skybox_data`: JSON object, see [skybox data](/addonsupport/skyboxes/)

addonsupport/skyboxes.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,24 @@ Skybox data is a JSON object, commonly used in [solar system data](/addonsupport
1717

1818
`"roll"`: int, roll of the skybox texture
1919

20+
`"alpha"`: int, from 0 to 255. Transparency of the skybox. Behind the skybox is simply sky fog. 0 is no skybox visible, 255 is no fog visible.
2021

22+
`"rotation_plane"`: string, can be either "yaw", "pitch" or "roll". Controls which axis the skybox will rotate around. (Optional)
23+
24+
`"fade"`: string, can be "day" or "night". Defines when the skybox will fade away. (Optional)
25+
26+
`"vanilla_sunlight"`: boolean, controls weather the sunlight color will be vanilla or not.
27+
28+
`"sunlight_color"`: JSON object, must be included if `"vanilla_sunlight"` is false. Must include the following:
29+
30+
{% capture light_data %}
31+
32+
"r": int, from 0 to 255. Controls the red in the sunlight color
33+
34+
"g": int, from 0 to 255. Controls the green in the sunlight color
35+
36+
"b": int, from 0 to 255. Controls the blue in the sunlight color
37+
38+
"alpha": int, from 0 to 255. Controls the transparency of the sunlight. Basically the brightness of the sunlight. 255 is full brightness, 0 is darkness.
39+
40+
{% endcapture %} {% include spoiler.html name="Sunlight color" content=light_data %}

0 commit comments

Comments
 (0)