Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
rebalance ores
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Feb 28, 2024
1 parent cfa36dc commit 953ff2d
Show file tree
Hide file tree
Showing 20 changed files with 117 additions and 27 deletions.
8 changes: 4 additions & 4 deletions doodads/ores/aether.doodad → doodads/ores/aether_1.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/aether_deposit.proto

[generating]
count = 5
count = 0
priority = 15

[requirements]
radius = 40
radius = 60
buildable = true

[starting]
distance = 600, 600
count = 0, 0
distance = 500, 600
count = 1, 1

[preview]
height = 100
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/crystals_deposit.proto

[generating]
count = 5
count = 0
priority = 14

[requirements]
radius = 40
radius = 60
buildable = true

[starting]
distance = 400, 500
distance = 300, 400
count = 1, 1

[preview]
Expand Down
18 changes: 18 additions & 0 deletions doodads/ores/crystals_2.doodad
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[doodad]
package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/crystals_deposit.proto

[generating]
count = 3
priority = 14

[requirements]
radius = 60
buildable = true

[starting]
distance = 500, 600
count = 0, 1

[preview]
height = 100
8 changes: 4 additions & 4 deletions doodads/ores/metal.doodad → doodads/ores/metal_1.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/metal_deposit.proto

[generating]
count = 20
count = 0
priority = 10

[requirements]
radius = 40
radius = 60
buildable = true

[starting]
distance = 150, 250
count = 2, 2
distance = 100, 200
count = 1, 1

[preview]
height = 50
18 changes: 18 additions & 0 deletions doodads/ores/metal_2.doodad
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[doodad]
package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/metal_deposit.proto

[generating]
count = 0
priority = 10

[requirements]
radius = 60
buildable = true

[starting]
distance = 200, 300
count = 1, 1

[preview]
height = 50
18 changes: 18 additions & 0 deletions doodads/ores/metal_3.doodad
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[doodad]
package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/metal_deposit.proto

[generating]
count = 0
priority = 10

[requirements]
radius = 60
buildable = true

[starting]
distance = 400, 500
count = 0, 1

[preview]
height = 50
18 changes: 18 additions & 0 deletions doodads/ores/metal_4.doodad
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[doodad]
package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/metal_deposit.proto

[generating]
count = 10
priority = 10

[requirements]
radius = 60
buildable = true

[starting]
distance = 500, 600
count = 0, 1

[preview]
height = 50
4 changes: 2 additions & 2 deletions doodads/ores/oil.doodad → doodads/ores/oil_1.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/oil_deposit.proto

[generating]
count = 10
count = 0
priority = 12

[requirements]
radius = 40
radius = 60
buildable = true

[starting]
Expand Down
18 changes: 18 additions & 0 deletions doodads/ores/oil_2.doodad
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[doodad]
package = unnatural/base/ores/ores.pack
prototype = unnatural/base/ores/oil_deposit.proto

[generating]
count = 3
priority = 12

[requirements]
radius = 60
buildable = true

[starting]
distance = 500, 600
count = 0, 1

[preview]
height = 100
2 changes: 1 addition & 1 deletion doodads/vegetation/plant_1.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/plant_1.proto

[generating]
chance = 0.005
chance = 0.01

[requirements]
radius = 10
Expand Down
2 changes: 1 addition & 1 deletion doodads/vegetation/plant_2.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/plant_2.proto

[generating]
chance = 0.003
chance = 0.002

[requirements]
radius = 10
Expand Down
2 changes: 1 addition & 1 deletion doodads/vegetation/plant_3.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/plant_3.proto

[generating]
chance = 0.002
chance = 0.001

[requirements]
radius = 10
Expand Down
2 changes: 1 addition & 1 deletion doodads/vegetation/plant_4.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/plant_4.proto

[generating]
chance = 0.003
chance = 0.001

[requirements]
radius = 10
Expand Down
2 changes: 1 addition & 1 deletion doodads/vegetation/plant_5.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/plant_5.proto

[generating]
chance = 0.003
chance = 0.002

[requirements]
radius = 10
Expand Down
2 changes: 1 addition & 1 deletion doodads/vegetation/tree_1.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/tree_1.proto

[generating]
chance = 0.005
chance = 0.003

[requirements]
radius = 30
Expand Down
2 changes: 1 addition & 1 deletion doodads/vegetation/tree_2.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/tree_2.proto

[generating]
chance = 0.002
chance = 0.001

[requirements]
radius = 30
Expand Down
4 changes: 2 additions & 2 deletions doodads/vegetation/tree_3.doodad
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package = unnatural/doodads/vegetation/vegetation.pack
prototype = unnatural/doodads/vegetation/tree_3.proto

[generating]
chance = 0.002
chance = 0.001

[requirements]
radius = 30
temperature = 13, 30
temperature = 13, 40
precipitation = 20, 300
elevation = 20, 150
slope = 0, 20
Expand Down
4 changes: 2 additions & 2 deletions sources/doodads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ namespace unnatural
std::sort(doodadsDefinitions.begin(), doodadsDefinitions.end(),
[](const DoodadDefinition &a, const DoodadDefinition &b)
{
const auto aa = std::tuple(-a.priority, a.maxCount, a.chance);
const auto bb = std::tuple(-b.priority, b.maxCount, a.chance);
const auto aa = std::tuple(-a.priority, a.maxCount, a.chance, a.startsDistance[0]);
const auto bb = std::tuple(-b.priority, b.maxCount, b.chance, b.startsDistance[0]);
return aa < bb;
});
for (DoodadDefinition &doodad : doodadsDefinitions)
Expand Down
4 changes: 2 additions & 2 deletions sources/meshGeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace unnatural
cfg.iterations = iterations;
cfg.minEdgeLength = 0.15 * tileSize;
cfg.maxEdgeLength = 3 * tileSize;
cfg.approximateError = 0.015 * tileSize;
cfg.approximateError = 0.01 * tileSize;
Holder<Mesh> m = mesh->copy();
meshSimplify(+m, cfg);

Expand Down Expand Up @@ -160,7 +160,7 @@ namespace unnatural
cfg.iterations = iterations;
cfg.minEdgeLength = 0.15 * tileSize;
cfg.maxEdgeLength = 5 * tileSize;
cfg.approximateError = 0.015 * tileSize;
cfg.approximateError = 0.01 * tileSize;
Holder<Mesh> m = mesh->copy();
meshSimplify(+m, cfg);

Expand Down

0 comments on commit 953ff2d

Please sign in to comment.