This commit is contained in:
minjaesong
2024-02-07 01:32:54 +09:00
parent a143887375
commit 866b8fed83
18 changed files with 91 additions and 27 deletions

View File

@@ -52,7 +52,9 @@ id;classname;tags
# gemstones
#144; gems
144;net.torvald.terrarum.modulebasegame.gameitems.GemQuartz;SMELTABLE,SIO2
145;net.torvald.terrarum.modulebasegame.gameitems.GemAmethyst;SMELTABLE,SIO2
146;net.torvald.terrarum.modulebasegame.gameitems.ItemRockSalt;
# tree seeds by tree species
160;net.torvald.terrarum.modulebasegame.gameitems.ItemSeedOak;SEEDLING
1 id classname tags
52 160 146 net.torvald.terrarum.modulebasegame.gameitems.ItemSeedOak net.torvald.terrarum.modulebasegame.gameitems.ItemRockSalt SEEDLING
53 161 # tree seeds by tree species
54 162 160 net.torvald.terrarum.modulebasegame.gameitems.ItemSeedBirch net.torvald.terrarum.modulebasegame.gameitems.ItemSeedOak SEEDLING
55 163 161 net.torvald.terrarum.modulebasegame.gameitems.ItemSeedRosewood net.torvald.terrarum.modulebasegame.gameitems.ItemSeedEbony SEEDLING
56 162 net.torvald.terrarum.modulebasegame.gameitems.ItemSeedBirch SEEDLING
57 163 net.torvald.terrarum.modulebasegame.gameitems.ItemSeedRosewood SEEDLING
58 # tree logs
59 168 net.torvald.terrarum.modulebasegame.gameitems.ItemLogsOak COMBUSTIBLE,SMELTABLE
60 169 net.torvald.terrarum.modulebasegame.gameitems.ItemLogsEbony COMBUSTIBLE,SMELTABLE

Binary file not shown.

View File

@@ -13,6 +13,7 @@
"ITEM_GEM_TOPAZ": "Raw Topaz",
"ITEM_GEM_DIAMOND": "Raw Diamond",
"ITEM_GEM_AMETHYST": "Raw Amethyst",
"ITEM_GEM_QUARTZ": "Raw Quartz",
"ITEM_HATCHET_COPPER": "Copper Axe",
"ITEM_HATCHET_IRON": "Iron Axe",
"ITEM_HATCHET_STEEL": "Steel Axe",

View File

@@ -13,6 +13,7 @@
"ITEM_GEM_TOPAZ": "황옥석",
"ITEM_GEM_DIAMOND": "금강석",
"ITEM_GEM_AMETHYST": "자수정석",
"ITEM_GEM_AMETHYST": "석영석",
"ITEM_HATCHET_COPPER": "구리 도끼",
"ITEM_HATCHET_IRON": "철 도끼",
"ITEM_HATCHET_STEEL": "강철 도끼",

BIN
assets/mods/basegame/ores/256.tga LFS Normal file

Binary file not shown.

BIN
assets/mods/basegame/ores/257.tga LFS Normal file

Binary file not shown.

BIN
assets/mods/basegame/ores/258.tga LFS Normal file

Binary file not shown.

View File

@@ -7,14 +7,16 @@
"6";"item@basegame:133";"GOLD,NATURAL_GOLD"
"7";"item@basegame:134";"SILVER,NATURAL_SILVER"
"8";"item@basegame:135";"LEAD,GALENA"
# "8";"item@basegame:136";"GEM,RUBY"
# "9";"item@basegame:137";"GEM,EMERALD"
#"10";"item@basegame:138";"GEM,SAPPHIRE"
#"11";"item@basegame:139";"GEM,TOPAZ"
#"12";"item@basegame:140";"GEM,DIAMOND"
#"13";"item@basegame:141";"GEM,SIO2,AMETHYST"
#"14";"item@basegame:142";"GEM,SIO2,QUARTZ"
#"16";"item@basegame:143";"TITANIUM,RUTILE"
#"9";"item@basegame:143";"TITANIUM,RUTILE"
#"256";"macro@BASETILE";"GRASS"
#"257";"macro@BASETILE";"MOSS"
"256";"item@basegame:146";"SALT"
"257";"item@basegame:145";"GEM,SIO2,AMETHYST"
"258";"item@basegame:144";"GEM,SIO2,QUARTZ"
#"259";"item@basegame:136";"GEM,RUBY"
#"260";"item@basegame:137";"GEM,EMERALD"
#"261";"item@basegame:138";"GEM,SAPPHIRE"
#"262";"item@basegame:139";"GEM,TOPAZ"
#"263";"item@basegame:140";"GEM,DIAMOND"
#"512";"macro@BASETILE";"GRASS"
#"513";"macro@BASETILE";"MOSS"
Can't render this file because it contains an unexpected character in line 10 and column 3.

View File

@@ -8,6 +8,10 @@
"7";"0.013";"0.300";"0.476";"1.0";"a16x16";"natural silver"
"8";"0.017";"0.020";"0.511";"1.0";"a16x16";"lead (galena)"
"256";"0.010";"-0.366";"0.528";"2.4";"a16x8";"rocksalt"
"257";"0.007";"0.100";"0.494";"1.0";"a16x8";"amethyst"
"258";"0.019";"0.015";"0.509";"1.0";"a16x8";"quartz"
################################################################################
# id: ore ID to spawn, the ID must exist on the ores.csv
1 id freq power scale ratio tiling comment
8 7 0.013 0.300 0.476 1.0 a16x16 natural silver
9 8 0.017 0.020 0.511 1.0 a16x16 lead (galena)
10 ################################################################################ 256 0.010 -0.366 0.528 2.4 a16x8 rocksalt
11 257 0.007 0.100 0.494 1.0 a16x8 amethyst
12 258 0.019 0.015 0.509 1.0 a16x8 quartz
13 ################################################################################
14 # id: ore ID to spawn, the ID must exist on the ores.csv
15 # id: ore ID to spawn, the ID must exist on the ores.csv #
16 # # freq: frequency value used to set up noise generator. Larger = ore veins are closer together
17 # freq: frequency value used to set up noise generator. Larger = ore veins are closer together # power: power value (as in: randomNumber ^ power) used to set up the noise generator. Larger = veins are larger as you go deeper. 0.01 almost negates this effect

View File

@@ -121,7 +121,7 @@ open class FancyWorldReadLoadScreen(screenToBeLoaded: IngameInstance, private va
class FancyWorldgenLoadScreen(screenToBeLoaded: IngameInstance, private val worldwidth: Int, private val worldheight: Int) : FancyWorldReadLoadScreen(screenToBeLoaded, worldwidth, worldheight, {}) {
private val chunks = (worldwidth / CHUNK_W) * 8
private val chunks = (worldwidth / CHUNK_W) * 9
override fun getProgress(): Double {
return progress.get().toDouble() / chunks * previewWidth

View File

@@ -34,6 +34,9 @@ internal object ExportMap : ConsoleCommand {
"ores@basegame:6" to Cvec(0xffcc00ff.toInt()),
"ores@basegame:7" to Cvec(0xd5d9f9ff.toInt()),
"ores@basegame:8" to Cvec(0xff9300ff.toInt()),
"ores@basegame:256" to Cvec(0xff00ffff.toInt()),
"ores@basegame:257" to Cvec(0xee77ffff.toInt()),
"ores@basegame:258" to Cvec(0xffffffff.toInt()),
)
private val WALL_OVERLAY = Cvec(0.35f, 0.35f, 0.35f, 1f)

View File

@@ -153,6 +153,23 @@ class OreLead(originalID: ItemID) : OreItemBase(originalID, true) {
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(8,6)
}
class GemQuartz(originalID: ItemID) : OreItemBase(originalID, true) {
override var originalName = "ITEM_GEM_QUARTZ"
override var smeltingProduct: ItemID? = "item@basegame:149"
override val itemImage: TextureRegion
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(13,6)
}
class GemAmethyst(originalID: ItemID) : OreItemBase(originalID, true) {
override var originalName = "ITEM_GEM_AMETHYST"
override val itemImage: TextureRegion
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(14,6)
}
class ItemRockSalt(originalID: ItemID) : OreItemBase(originalID, true) {
override var originalName = "ITEM_ROCK_SALT"
override val itemImage: TextureRegion
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(10,6)
}
class ItemCoalCoke(originalID: ItemID) : OreItemBase(originalID) {
override var originalName = "ITEM_COAL_COKE"

View File

@@ -62,6 +62,15 @@ class OregenAutotiling(world: GameWorld, isFinal: Boolean, seed: Long, val tilin
BlocksDrawer.connectLut16[autotiled] or mult.shl(4)
}
"a16x8" -> {
// get placement (tile connection) info
val mult = getHashCoord(x, y, 8)
val autotiled = getNearbyOres8(x, y).foldIndexed(0) { index, acc, placement ->
acc or (placement.item == ore).toInt(index)
}
BlocksDrawer.connectLut16[autotiled] or mult.shl(4)
}
"a16x16" -> {
// get placement (tile connection) info
val mult = getHashCoord(x, y, 16)

View File

@@ -146,7 +146,7 @@ object Worldgen {
val start = (0.00342f * world.height - 3.22f).floorToInt().coerceAtLeast(1)
// this value has to extend up, otherwise the player may spawn into the chopped-off mountaintop
// this value has to extend down into the rock layer, otherwise, if the bottom of the bottom chunk is dirt, they will turn into grasses
return start - 1 to start + 6
return start - 1 to start + 7
}
private val rockScoreMin = 40

View File

@@ -332,17 +332,20 @@ internal object TerragenTest : NoiseMaker {
Block.STONE_MARBLE to Color(0.8f, 0.8f, 0.8f, 1f)
)
private val COPPER_ORE = 0x00e9c8ff
private val IRON_ORE = 0xff7e74ff.toInt()
private val COAL_ORE = 0x383314ff.toInt()
private val ZINC_ORE = 0xefde76ff.toInt()
private val TIN_ORE = 0xcd8b62ff.toInt()
private val GOLD_ORE = 0xffcc00ff.toInt()
private val SILVER_ORE = 0xd5d9f9ff.toInt()
private val LEAD_ORE = 0xff9300ff.toInt()
private val COPPER_ORE = 0//x00e9c8ff.toInt()
private val IRON_ORE = 0//xff7e74ff.toInt()
private val COAL_ORE = 0//x383314ff.toInt()
private val ZINC_ORE = 0//xefde76ff.toInt()
private val TIN_ORE = 0//xcd8b62ff.toInt()
private val GOLD_ORE = 0//xffcc00ff.toInt()
private val SILVER_ORE = 0//xd5d9f9ff.toInt()
private val LEAD_ORE = 0//xff9300ff.toInt()
private val QUARTZ = 0//x55ff33ff.toInt()
private val AMETHYST = 0//xee77ffff.toInt()
private val ROCKSALT = 0xff00ffff.toInt()
private val oreCols = listOf(
COPPER_ORE, IRON_ORE, COAL_ORE, ZINC_ORE, TIN_ORE, GOLD_ORE, SILVER_ORE, LEAD_ORE
COPPER_ORE, IRON_ORE, COAL_ORE, ZINC_ORE, TIN_ORE, GOLD_ORE, SILVER_ORE, LEAD_ORE, ROCKSALT, QUARTZ, AMETHYST
)
private val terragenYscaling = (NOISEBOX_HEIGHT / 2400.0).pow(0.75)
@@ -353,7 +356,7 @@ internal object TerragenTest : NoiseMaker {
val cave = if (noiseValue[1] < 0.5) 0 else 1
val ore = (noiseValue.subList(2, noiseValue.size)).zip(oreCols).firstNotNullOfOrNull { (n, colour) -> if (n > 0.5) colour else null }
val isMarble = noiseValue[10] > 0.5
val isMarble = false // noiseValue[13] > 0.5
val wallBlock = if (isMarble) Block.STONE_MARBLE else groundDepthBlock[terr]
val terrBlock = if (cave == 0) Block.AIR else if (isMarble) Block.STONE_MARBLE else wallBlock
@@ -687,6 +690,9 @@ internal object TerragenTest : NoiseMaker {
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:6", 0.009, 0.300, 0.474, 1.0)),
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:7", 0.013, 0.300, 0.476, 1.0)),
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:8", 0.017, 0.020, 0.511, 1.0)),
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:256", 0.010, -0.366, 0.528, 2.4)),
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:257", 0.007, 0.100, 0.494, 1.0)),
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:258", 0.019, 0.015, 0.509, 1.0)),
Joise(generateRockLayer(groundScalingCached, seed, params, (0..7).map {
thicknesses[it] + marblerng.nextTriangularBal() * 0.006 to (2.6 * terragenYscaling) + it * 0.18 + marblerng.nextTriangularBal() * 0.09

View File

@@ -367,6 +367,11 @@ class CreateTileAtlas {
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X4)
drawToAtlantes(tilesPixmap, tilesGlowPixmap, tilesEmissivePixmap, RenderTag.MASK_16X4)
}
// predefined by the image dimension: 256x128
else if (tilesPixmap.width == TILE_SIZE * 16 && tilesPixmap.height == TILE_SIZE * 8) {
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X8)
drawToAtlantes(tilesPixmap, tilesGlowPixmap, tilesEmissivePixmap, RenderTag.MASK_16X8)
}
// predefined by the image dimension: 256x256
else if (tilesPixmap.width == TILE_SIZE * 16 && tilesPixmap.height == TILE_SIZE * 16) {
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X16)
@@ -511,7 +516,8 @@ class CreateTileAtlas {
const val MASK_TORCH = 3
const val MASK_PLATFORM = 4
const val MASK_16X4 = 5
const val MASK_16X16 = 6
const val MASK_16X8 = 6
const val MASK_16X16 = 7
fun maskTypeToTileCount(maskType: Int) = when (maskType) {
MASK_NA -> 1
@@ -520,6 +526,7 @@ class CreateTileAtlas {
MASK_TORCH -> 4
MASK_PLATFORM -> 8
MASK_16X4 -> 64
MASK_16X8 -> 128
MASK_16X16 -> 256
else -> throw IllegalArgumentException("Unknown maskType: $maskType")
}

Binary file not shown.