feat: starvation balance rework and Ghibli wind-stroke visuals

- Reduce hunger rate to 0.125/tick (~25/day) for ~6-7 day death timeline
- Slow energy drain: idle 0.125, travel 0.5, work 0.5, complete 0.0625/tick
- Use exact binary fractions for all rates to preserve float precision in save/load
- Starving/critically-hungry NPCs always override sleep to seek food first
- Extend starvation death threshold from 20 to 600 ticks (~3 days of starvation)
- Add calligraphy-style wind stroke particles (WindStrokes scene + shader)
- Two wind stroke emitters in valley and ridge for Ghibli atmosphere
- Rework terrain macro-variation colors for vibrant warm-green palette
- Enhance environment: stronger glow/bloom, higher saturation, warmer sky/fog/ambient
This commit is contained in:
2026-07-08 18:44:03 +02:00
parent 6008b1023e
commit 7aa5c1c979
6 changed files with 116 additions and 31 deletions
+28 -23
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=39 format=3]
[gd_scene load_steps=40 format=3]
[ext_resource type="Terrain3DAssets" path="res://terrain/jajce/assets.tres" id="1_assets"]
[ext_resource type="PackedScene" path="res://world/resource_nodes/ResourceNode.tscn" id="2_resource"]
@@ -16,17 +16,18 @@
[ext_resource type="PackedScene" path="res://world/storage/StorageNode.tscn" id="14_storage"]
[ext_resource type="Script" path="res://world/activity/ActivitySite.gd" id="15_activity"]
[ext_resource type="NavigationMesh" path="res://world/jajce/JajceNavigationMesh.tres" id="16_nav"]
[ext_resource type="PackedScene" path="res://world/jajce/WindStrokes.tscn" id="19_windstrokes"]
[sub_resource type="Terrain3DMaterial" id="Terrain3DMaterial_jajce"]
_shader_parameters = {
"auto_base_texture": 1,
"auto_overlay_texture": 0,
"auto_slope": 0.72,
"blend_sharpness": 0.82,
"auto_slope": 0.68,
"blend_sharpness": 0.78,
"enable_macro_variation": true,
"macro_variation1": Color(0.9, 0.94, 0.82, 1),
"macro_variation2": Color(0.76, 0.81, 0.7, 1),
"macro_variation_slope": 0.38
"macro_variation1": Color(0.84, 0.92, 0.55, 1),
"macro_variation2": Color(0.62, 0.78, 0.48, 1),
"macro_variation_slope": 0.42
}
world_background = 0
auto_shader = true
@@ -96,10 +97,10 @@ material = SubResource("Material_site_canvas")
size = Vector3(2.9, 0.08, 1.4)
[sub_resource type="ProceduralSkyMaterial" id="SkyMaterial_jajce"]
sky_top_color = Color(0.23, 0.43, 0.62, 1)
sky_horizon_color = Color(0.82, 0.68, 0.5, 1)
ground_bottom_color = Color(0.12, 0.17, 0.12, 1)
ground_horizon_color = Color(0.62, 0.55, 0.42, 1)
sky_top_color = Color(0.28, 0.52, 0.72, 1)
sky_horizon_color = Color(0.88, 0.74, 0.52, 1)
ground_bottom_color = Color(0.18, 0.24, 0.14, 1)
ground_horizon_color = Color(0.68, 0.6, 0.44, 1)
sun_angle_max = 18.0
[sub_resource type="Sky" id="Sky_jajce"]
@@ -110,18 +111,18 @@ background_mode = 2
sky = SubResource("Sky_jajce")
background_energy_multiplier = 0.9
ambient_light_source = 3
ambient_light_color = Color(0.91, 0.85, 0.72, 1)
ambient_light_energy = 0.7
ambient_light_color = Color(0.95, 0.9, 0.76, 1)
ambient_light_energy = 0.75
reflected_light_source = 2
tonemap_mode = 2
glow_enabled = true
glow_normalized = true
glow_intensity = 0.34
glow_strength = 0.75
glow_bloom = 0.08
glow_intensity = 0.5
glow_strength = 0.9
glow_bloom = 0.12
fog_enabled = true
fog_light_color = Color(0.82, 0.78, 0.66, 1)
fog_light_energy = 0.72
fog_light_color = Color(0.88, 0.84, 0.7, 1)
fog_light_energy = 0.78
fog_density = 0.002
fog_height = -2.0
fog_height_density = 0.08
@@ -129,15 +130,15 @@ fog_aerial_perspective = 0.35
fog_sky_affect = 0.28
volumetric_fog_enabled = true
volumetric_fog_density = 0.006
volumetric_fog_albedo = Color(0.9, 0.84, 0.72, 1)
volumetric_fog_emission = Color(0.08, 0.065, 0.04, 1)
volumetric_fog_emission_energy = 0.18
volumetric_fog_albedo = Color(0.94, 0.88, 0.75, 1)
volumetric_fog_emission = Color(0.1, 0.07, 0.04, 1)
volumetric_fog_emission_energy = 0.22
volumetric_fog_length = 96.0
volumetric_fog_detail_spread = 1.6
adjustment_enabled = true
adjustment_brightness = 1.04
adjustment_contrast = 1.03
adjustment_saturation = 1.1
adjustment_brightness = 1.08
adjustment_contrast = 1.04
adjustment_saturation = 1.25
[sub_resource type="StandardMaterial3D" id="Material_guard"]
albedo_color = Color(0.55, 0.45, 0.35, 1)
@@ -601,6 +602,10 @@ light_energy = 1.45
shadow_enabled = true
directional_shadow_max_distance = 180.0
[node name="WindStrokes_Valley" parent="." instance=ExtResource("19_windstrokes")]
[node name="WindStrokes_Ridge" parent="." instance=ExtResource("19_windstrokes")]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_greybox")
+39
View File
@@ -0,0 +1,39 @@
[gd_scene load_steps=5 format=3]
[ext_resource type="Shader" path="res://world/jajce/materials/wind_stroke.gdshader" id="1_shader"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_stroke"]
shader = ExtResource("1_shader")
[sub_resource type="QuadMesh" id="Mesh_stroke"]
material = SubResource("ShaderMaterial_stroke")
size = Vector2(1.8, 0.18)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_wind"]
lifetime_randomness = 0.5
spread = 160.0
gravity = Vector3(0, 0.15, 0)
initial_velocity_min = 0.6
initial_velocity_max = 2.5
angular_velocity_min = -0.6
angular_velocity_max = 0.6
radial_accel_min = -0.2
radial_accel_max = 0.2
tangential_accel_min = -0.3
tangential_accel_max = 0.3
scale_min = 0.5
scale_max = 1.5
color = Color(1, 1, 1, 0.5)
emission_shape = 1
emission_box_extents = Vector3(35.0, 10.0, 35.0)
[node name="WindStrokes" type="GPUParticles3D"]
emitting = true
amount = 18
lifetime = 4.0
one_shot = false
preprocess = 2.0
speed_scale = 1.0
local_coords = false
process_material = SubResource("ParticleProcessMaterial_wind")
draw_pass_1 = SubResource("Mesh_stroke")
@@ -0,0 +1,14 @@
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_disabled, unshaded;
uniform float softness : hint_range(0.0, 1.0) = 0.45;
uniform vec3 tint : source_color = vec3(0.95, 0.93, 0.88);
void fragment() {
float edge_dist = abs(UV.y - 0.5) * 2.0;
float alpha = 1.0 - smoothstep(0.0, 1.0, edge_dist);
alpha *= smoothstep(0.0, 0.2, UV.x) * smoothstep(0.0, 0.2, 1.0 - UV.x);
alpha *= softness * 0.35;
ALBEDO = tint;
ALPHA = alpha;
}