Added actual hammer, water and tweaked level.
parent
62cf11e614
commit
404d057f9e
|
@ -14,3 +14,6 @@ export_presets.cfg
|
|||
data_*/
|
||||
mono_crash.*.json
|
||||
|
||||
# Asset source files we do not want to track
|
||||
assets/3rdparty/KayKit_Adventurers_1.0_EXTRA/Assets/fbx/
|
||||
*.blend1
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,51 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://b1i0pvq201284"
|
||||
path="res://.godot/imported/hammer.blend-dbf41d21661b912cf8b897dbcb727c34.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/custom/hammer.blend"
|
||||
dest_files=["res://.godot/imported/hammer.blend-dbf41d21661b912cf8b897dbcb727c34.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
Binary file not shown.
|
@ -0,0 +1,36 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://csiiypw22be7f"
|
||||
path="res://.godot/imported/hammer.glb-39cd9e44482fc8938b57eefaacd33ae1.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/custom/hammer.glb"
|
||||
dest_files=["res://.godot/imported/hammer.glb-39cd9e44482fc8938b57eefaacd33ae1.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
|
@ -0,0 +1,38 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cdx2xxn1u1evw"
|
||||
path.s3tc="res://.godot/imported/hammer_barbarian_texture.png-9dff92c0428466fdc34beac1d0a9c6a8.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "267533c91145eeae53d251a78b53814c"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/custom/hammer_barbarian_texture.png"
|
||||
dest_files=["res://.godot/imported/hammer_barbarian_texture.png-9dff92c0428466fdc34beac1d0a9c6a8.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://csgkhpgbctysg"
|
||||
path="res://.godot/imported/water_a.png-b91dfb272ad73776d2f9eb4a54649cbe.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/textures/water_a.png"
|
||||
dest_files=["res://.godot/imported/water_a.png-b91dfb272ad73776d2f9eb4a54649cbe.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dps0i8d3xcw4j"
|
||||
path="res://.godot/imported/water_b.png-391100e70de1935dde53c53744c1de27.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/textures/water_b.png"
|
||||
dest_files=["res://.godot/imported/water_b.png-391100e70de1935dde53c53744c1de27.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://psahbr51jdj6"
|
||||
path.s3tc="res://.godot/imported/water_c.png-760938cb03cabb489069f0b65800029b.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/textures/water_c.png"
|
||||
dest_files=["res://.godot/imported/water_c.png-760938cb03cabb489069f0b65800029b.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dscbd8iuo4jhs"
|
||||
path="res://.godot/imported/Hammer.png-6e8ad0ed2bf01911efef060f5517d999.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/tools/Hammer.png"
|
||||
dest_files=["res://.godot/imported/Hammer.png-6e8ad0ed2bf01911efef060f5517d999.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
|
@ -0,0 +1,5 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bimt3mc3d7th2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://csiiypw22be7f" path="res://assets/custom/hammer.glb" id="1_j5krs"]
|
||||
|
||||
[node name="hammer" instance=ExtResource("1_j5krs")]
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://cwerasgcfgx2p"]
|
||||
|
||||
[ext_resource type="Script" path="res://model/item.gd" id="1_l1bb7"]
|
||||
[ext_resource type="Texture2D" uid="uid://dscbd8iuo4jhs" path="res://assets/tools/Hammer.png" id="1_qwgnj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bimt3mc3d7th2" path="res://assets/tools/Hammer.tscn" id="2_pwblf"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_l1bb7")
|
||||
name = "Hammer"
|
||||
scene = ExtResource("2_pwblf")
|
||||
icon = ExtResource("1_qwgnj")
|
||||
max_stack_size = 1
|
||||
is_tool = true
|
||||
is_buildable = false
|
||||
tool_action = 1
|
|
@ -4,12 +4,12 @@ Chloe: Mist! Ohne meinen Hammer kann ich die Brücke nicht fertig bauen!
|
|||
Chloe: Hast Du meinen Hammer gesehen?
|
||||
|
||||
- Ja!
|
||||
if is_wrench_found == false:
|
||||
if is_hammer_found == false:
|
||||
Chloe: Du scheinst keinen Hammer zu haben. Oder weißt nicht was ein Hammer ist.
|
||||
else:av
|
||||
Chloe: Danke!
|
||||
|
||||
set is_wrench_delivered = true
|
||||
set is_hammer_delivered = true
|
||||
- Lieber nicht.
|
||||
Chloe: Schade!
|
||||
- Wo kann er denn sein?
|
||||
|
|
|
@ -92,7 +92,7 @@ func set_right_hand_item(item:Item) -> void:
|
|||
animation_tree.set("parameters/Interact/conditions/tool_action_slice", true)
|
||||
|
||||
func has_build_tool_active() -> bool:
|
||||
if current_tool and current_tool.name == "Pickaxe":
|
||||
if current_tool and current_tool.resource_path == "res://data/items/hammer.tres":
|
||||
return true
|
||||
|
||||
return false
|
||||
|
|
|
@ -32,7 +32,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.470516, 0)
|
|||
shape = SubResource("CapsuleShape3D_7kfad")
|
||||
|
||||
[node name="RightHandBone" type="BoneAttachment3D" parent="."]
|
||||
transform = Transform3D(-0.00015721, -0.0606496, 0.395375, 0.399999, -0.000666146, 5.67707e-05, 0.000649959, 0.395375, 0.0606499, -0.196425, 0.255346, 0.0425267)
|
||||
transform = Transform3D(-9.0716e-05, -0.060357, 0.39542, 0.399999, -0.000384705, 3.28702e-05, 0.000375464, 0.39542, 0.0603571, -0.196424, 0.255935, 0.0425928)
|
||||
bone_name = "Knife"
|
||||
bone_idx = 17
|
||||
use_external_skeleton = true
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
class_name QuestBuilderMissingTool
|
||||
extends Node
|
||||
|
||||
@export var is_wrench_found:bool = false
|
||||
@export var is_wrench_delivered:bool = false
|
||||
@export var is_hammer_found:bool = false
|
||||
@export var is_hammer_delivered:bool = false
|
||||
@export var is_bridge_built:bool = false
|
||||
@export var is_completed:bool = false
|
||||
|
||||
|
@ -24,22 +24,22 @@ func on_dialogue_ended(_dialog_resource: DialogueResource) -> void:
|
|||
if is_completed:
|
||||
return
|
||||
|
||||
if is_wrench_delivered and not is_bridge_built:
|
||||
if is_hammer_delivered and not is_bridge_built:
|
||||
print ("Will build bridge!")
|
||||
emit_signal("wrench_delivered")
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
if is_wrench_delivered:
|
||||
if is_hammer_delivered:
|
||||
is_bridge_built = true
|
||||
bridge.global_transform = _bridge_transform
|
||||
|
||||
if is_completed:
|
||||
return
|
||||
|
||||
var wrench_item:Item = load("res://data/items/wrench.tres")
|
||||
if _player.inventory.has_all([wrench_item]):
|
||||
is_wrench_found = true
|
||||
var hammer_item:Item = load("res://data/items/hammer.tres")
|
||||
if _player.inventory.has_all([hammer_item]):
|
||||
is_hammer_found = true
|
||||
|
||||
if is_bridge_built:
|
||||
is_completed = true
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,106 @@
|
|||
shader_type spatial;
|
||||
//render_mode specular_phong, cull_disabled;
|
||||
|
||||
uniform sampler2D DEPTH_TEXTURE : hint_depth_texture, filter_linear_mipmap;
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
uniform float speed: hint_range(-1, 1) = 0.0;
|
||||
|
||||
uniform sampler2D noise1;
|
||||
uniform sampler2D noise2;
|
||||
uniform sampler2D normalmap: hint_normal;
|
||||
|
||||
uniform vec4 color = vec4(0.0352941, 0.658824, 0.929412, 0.635294);
|
||||
uniform vec4 deep_water = vec4(0.14902, 0.329412, 0.501961, 1);
|
||||
|
||||
//depth-fade var
|
||||
uniform float beer_law_factor = 2.0;
|
||||
uniform float _distance = 0.0;
|
||||
|
||||
//foam var
|
||||
uniform vec4 edge_color = vec4(1);
|
||||
uniform float edge_scale = 0.25;
|
||||
uniform float near = 0.1;
|
||||
uniform float far = 100.f;
|
||||
|
||||
// wave var
|
||||
uniform vec2 wave_strength = vec2(0.5, 0.25);
|
||||
uniform vec2 wave_frequ = vec2(12.0, 12.0);
|
||||
uniform vec2 time_factor = vec2(1.0, 2.0);
|
||||
|
||||
float waves(vec2 pos, float time) {
|
||||
return (wave_strength.y * sin(pos.y * wave_frequ.y + time * time_factor.y)) + (wave_strength.x * sin(pos.x * wave_frequ.x + time * time_factor.x));
|
||||
}
|
||||
|
||||
void vertex() {
|
||||
VERTEX.y += waves(VERTEX.xy, TIME);
|
||||
}
|
||||
|
||||
float rim(float depth) {
|
||||
depth = 2.0f * depth - 1.0f;
|
||||
return near * far / (far + depth * (near - far));
|
||||
}
|
||||
|
||||
float calc_depth_fade(float depth, mat4 projection_matrix,
|
||||
vec4 fragcoord, float beer_factor, float __distance, vec3 vertex) {
|
||||
|
||||
float scene_depth = depth;
|
||||
|
||||
scene_depth = scene_depth * 2.0 - 1.0;
|
||||
scene_depth = projection_matrix[3][2] / (scene_depth + projection_matrix[2][2]);
|
||||
scene_depth = scene_depth + vertex.z; // z is negative
|
||||
|
||||
// application of beers law
|
||||
scene_depth = exp(-scene_depth * beer_factor);
|
||||
|
||||
float screen_depth = fragcoord.z;
|
||||
|
||||
float depth_fade = (scene_depth - screen_depth) / __distance;
|
||||
|
||||
depth_fade = clamp(depth_fade, 0.0, 1.0);
|
||||
|
||||
return depth_fade;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float time = TIME * speed;
|
||||
|
||||
vec3 n1 = texture(noise1, UV + time).rgb;
|
||||
vec3 n2 = texture(noise2, UV - time * 0.2).rgb;
|
||||
|
||||
vec2 uv_movement = UV * 4.0f;
|
||||
uv_movement += TIME * speed * 4.0f;
|
||||
|
||||
float sum = (n1.r + n2.r) - 1.0f;
|
||||
|
||||
float z_depth = rim(texture(DEPTH_TEXTURE, SCREEN_UV).x);
|
||||
float z_pos = rim(FRAGCOORD.z);
|
||||
float diff = z_depth - z_pos;
|
||||
|
||||
// depth-fade
|
||||
float z_depth_fade = calc_depth_fade(texture(DEPTH_TEXTURE, SCREEN_UV).x, PROJECTION_MATRIX, FRAGCOORD, beer_law_factor, _distance, VERTEX);
|
||||
float z_fade = rim(FRAGCOORD.z);
|
||||
float fade_diff = z_depth_fade - z_fade;
|
||||
|
||||
vec4 gradientcolor = mix(color, deep_water, z_depth_fade);
|
||||
|
||||
vec2 displacement = vec2(sum * 0.1);
|
||||
diff += displacement.x * 70.0f;
|
||||
|
||||
vec4 col = mix(edge_color, gradientcolor, step(edge_scale, diff));
|
||||
|
||||
vec4 alpha = texture(SCREEN_TEXTURE, SCREEN_UV + displacement);
|
||||
|
||||
|
||||
float fin = 0.0;
|
||||
if (sum > 0.0 && sum < 0.4) fin = 0.1;
|
||||
if (sum > 0.4 && sum < 0.8) fin = 0.0;
|
||||
if (sum > 0.8) fin = 1.0f;
|
||||
|
||||
// konvertier fin in vec3 um
|
||||
ALBEDO = vec3(fin) + mix(alpha.rgb, col.rgb, gradientcolor.a);
|
||||
|
||||
//NORMALMAP = texture(normalmap, uv_movement).rgb;
|
||||
|
||||
ROUGHNESS = 0.1;
|
||||
}
|
Loading…
Reference in New Issue