Add data-driven fish selection and catch showcase
This commit is contained in:
parent
ae2f724fe2
commit
bd2768b676
39 changed files with 1226 additions and 58 deletions
|
|
@ -1,10 +0,0 @@
|
|||
[gd_resource type="Resource" load_steps=3 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"]
|
||||
[ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_fish_data")
|
||||
id = &"bluegill"
|
||||
display_name = "Bluegill"
|
||||
catch_profile = ExtResource("2_profile")
|
||||
10
fish/default_availability.tres
Normal file
10
fish/default_availability.tres
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[gd_resource type="Resource" load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_availability.gd" id="1_availability"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_availability")
|
||||
allow_day = true
|
||||
allow_night = true
|
||||
preferred_bait_tags = Array[StringName]([&"worm"])
|
||||
preferred_bait_weight_multiplier = 1.35
|
||||
63
fish/fish_availability.gd
Normal file
63
fish/fish_availability.gd
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
class_name FishAvailability
|
||||
extends Resource
|
||||
|
||||
const FishingContextType = preload("res://fishing/fishing_context.gd")
|
||||
|
||||
@export var allowed_location_tags: Array[StringName] = []
|
||||
@export var required_event_tags: Array[StringName] = []
|
||||
@export var forbidden_event_tags: Array[StringName] = []
|
||||
@export var allow_day: bool = true
|
||||
@export var allow_night: bool = true
|
||||
@export var require_rain: bool = false
|
||||
@export var forbid_rain: bool = false
|
||||
@export var required_bait_tags: Array[StringName] = []
|
||||
@export var preferred_bait_tags: Array[StringName] = []
|
||||
@export_range(0.01, 10.0, 0.01) var preferred_bait_weight_multiplier: float = 1.25
|
||||
|
||||
|
||||
func is_available(context: FishingContextType) -> bool:
|
||||
if context == null or (require_rain and forbid_rain):
|
||||
return false
|
||||
if context.is_night and not allow_night:
|
||||
return false
|
||||
if not context.is_night and not allow_day:
|
||||
return false
|
||||
if require_rain and not context.is_raining:
|
||||
return false
|
||||
if forbid_rain and context.is_raining:
|
||||
return false
|
||||
if (
|
||||
not allowed_location_tags.is_empty()
|
||||
and not _has_any_match(allowed_location_tags, context.location_tags)
|
||||
):
|
||||
return false
|
||||
for required_tag: StringName in required_event_tags:
|
||||
if required_tag not in context.active_event_tags:
|
||||
return false
|
||||
for forbidden_tag: StringName in forbidden_event_tags:
|
||||
if forbidden_tag in context.active_event_tags:
|
||||
return false
|
||||
if (
|
||||
not required_bait_tags.is_empty()
|
||||
and not _has_any_match(required_bait_tags, context.active_bait_tags)
|
||||
):
|
||||
return false
|
||||
return true
|
||||
|
||||
|
||||
func get_bait_weight_multiplier(context: FishingContextType) -> float:
|
||||
if context == null:
|
||||
return 1.0
|
||||
if _has_any_match(preferred_bait_tags, context.active_bait_tags):
|
||||
return maxf(preferred_bait_weight_multiplier, 0.01)
|
||||
return 1.0
|
||||
|
||||
|
||||
func _has_any_match(
|
||||
required_tags: Array[StringName],
|
||||
active_tags: Array[StringName],
|
||||
) -> bool:
|
||||
for tag: StringName in required_tags:
|
||||
if tag in active_tags:
|
||||
return true
|
||||
return false
|
||||
1
fish/fish_availability.gd.uid
Normal file
1
fish/fish_availability.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bs7cqi88csolc
|
||||
20
fish/fish_catch.gd
Normal file
20
fish/fish_catch.gd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class_name FishCatch
|
||||
extends Resource
|
||||
|
||||
const FishDataType = preload("res://fish/fish_data.gd")
|
||||
|
||||
@export var fish: FishDataType
|
||||
@export var fish_id: StringName
|
||||
@export var weight_lb: float = 0.0
|
||||
@export var display_scale: float = 1.0
|
||||
|
||||
|
||||
func is_valid() -> bool:
|
||||
return (
|
||||
fish != null
|
||||
and not fish_id.is_empty()
|
||||
and fish.id == fish_id
|
||||
and weight_lb >= fish.get_minimum_weight()
|
||||
and weight_lb <= fish.get_maximum_weight()
|
||||
and display_scale > 0.0
|
||||
)
|
||||
1
fish/fish_catch.gd.uid
Normal file
1
fish/fish_catch.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dnocndoiq3lg4
|
||||
|
|
@ -4,8 +4,69 @@ extends Resource
|
|||
const CatchDifficultyProfileType = preload(
|
||||
"res://fishing/catch_difficulty_profile.gd"
|
||||
)
|
||||
const FishAvailabilityType = preload("res://fish/fish_availability.gd")
|
||||
|
||||
enum Rarity {
|
||||
COMMON,
|
||||
UNCOMMON,
|
||||
RARE,
|
||||
EPIC,
|
||||
LEGENDARY,
|
||||
}
|
||||
|
||||
@export var id: StringName
|
||||
@export var display_name: String
|
||||
@export var icon: Texture2D
|
||||
@export var rarity: Rarity = Rarity.COMMON
|
||||
@export_range(0.0, 1000.0, 0.01) var base_catch_weight: float = 1.0
|
||||
@export var catch_profile: CatchDifficultyProfileType
|
||||
@export var availability: FishAvailabilityType
|
||||
@export_range(0.01, 1000.0, 0.01) var weight_min_lb: float = 0.5
|
||||
@export_range(0.01, 1000.0, 0.01) var weight_max_lb: float = 1.0
|
||||
@export_range(0.01, 20.0, 0.01) var display_scale_min: float = 0.8
|
||||
@export_range(0.01, 20.0, 0.01) var display_scale_max: float = 1.2
|
||||
@export_range(0.01, 10.0, 0.01) var display_scale_curve: float = 1.0
|
||||
@export var display_texture: Texture2D
|
||||
|
||||
|
||||
func is_selectable() -> bool:
|
||||
return (
|
||||
not id.is_empty()
|
||||
and base_catch_weight > 0.0
|
||||
and catch_profile != null
|
||||
and weight_min_lb > 0.0
|
||||
and weight_max_lb >= weight_min_lb
|
||||
and display_scale_min > 0.0
|
||||
and display_scale_max >= display_scale_min
|
||||
and display_scale_curve > 0.0
|
||||
)
|
||||
|
||||
|
||||
func get_minimum_weight() -> float:
|
||||
return maxf(weight_min_lb, 0.01)
|
||||
|
||||
|
||||
func get_maximum_weight() -> float:
|
||||
return maxf(weight_max_lb, get_minimum_weight())
|
||||
|
||||
|
||||
func get_display_scale_for_weight(weight_lb: float) -> float:
|
||||
var minimum_weight: float = get_minimum_weight()
|
||||
var maximum_weight: float = get_maximum_weight()
|
||||
var normalized_weight: float = 0.0
|
||||
if maximum_weight > minimum_weight:
|
||||
normalized_weight = inverse_lerp(
|
||||
minimum_weight,
|
||||
maximum_weight,
|
||||
weight_lb
|
||||
)
|
||||
normalized_weight = pow(
|
||||
clampf(normalized_weight, 0.0, 1.0),
|
||||
maxf(display_scale_curve, 0.01)
|
||||
)
|
||||
var minimum_scale: float = maxf(display_scale_min, 0.01)
|
||||
var maximum_scale: float = maxf(display_scale_max, minimum_scale)
|
||||
return lerpf(minimum_scale, maximum_scale, normalized_weight)
|
||||
|
||||
|
||||
func get_rarity_name() -> String:
|
||||
return Rarity.keys()[rarity].capitalize()
|
||||
|
|
|
|||
6
fish/fish_pool.gd
Normal file
6
fish/fish_pool.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class_name FishPool
|
||||
extends Resource
|
||||
|
||||
const FishDataType = preload("res://fish/fish_data.gd")
|
||||
|
||||
@export var candidates: Array[FishDataType] = []
|
||||
1
fish/fish_pool.gd.uid
Normal file
1
fish/fish_pool.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://qg6pu6l216ei
|
||||
78
fish/fish_selector.gd
Normal file
78
fish/fish_selector.gd
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
class_name FishSelector
|
||||
extends RefCounted
|
||||
|
||||
const CollectionLogType = preload("res://collection/collection_log.gd")
|
||||
const FishCatchType = preload("res://fish/fish_catch.gd")
|
||||
const FishDataType = preload("res://fish/fish_data.gd")
|
||||
const FishPoolType = preload("res://fish/fish_pool.gd")
|
||||
const FishingContextType = preload("res://fishing/fishing_context.gd")
|
||||
|
||||
var undiscovered_weight_multiplier: float = 1.5
|
||||
var use_deterministic_test_seed: bool = false
|
||||
var deterministic_test_seed: int = 24680
|
||||
var selection_seed: int = 0
|
||||
|
||||
var _rng := RandomNumberGenerator.new()
|
||||
|
||||
|
||||
func begin_roll() -> void:
|
||||
if use_deterministic_test_seed:
|
||||
selection_seed = deterministic_test_seed
|
||||
_rng.seed = deterministic_test_seed
|
||||
else:
|
||||
_rng.randomize()
|
||||
selection_seed = _rng.seed
|
||||
|
||||
|
||||
func select_fish(
|
||||
pool: FishPoolType,
|
||||
context: FishingContextType,
|
||||
collection_log: CollectionLogType,
|
||||
) -> FishDataType:
|
||||
if pool == null or context == null or collection_log == null:
|
||||
return null
|
||||
|
||||
var eligible_fish: Array[FishDataType] = []
|
||||
var weights: Array[float] = []
|
||||
var total_weight: float = 0.0
|
||||
for fish: FishDataType in pool.candidates:
|
||||
if fish == null or not fish.is_selectable():
|
||||
continue
|
||||
if fish.availability != null and not fish.availability.is_available(context):
|
||||
continue
|
||||
var final_weight: float = fish.base_catch_weight
|
||||
if fish.availability != null:
|
||||
final_weight *= fish.availability.get_bait_weight_multiplier(context)
|
||||
if not collection_log.has_discovered(fish.id):
|
||||
final_weight *= maxf(undiscovered_weight_multiplier, 0.0)
|
||||
if final_weight <= 0.0:
|
||||
continue
|
||||
eligible_fish.append(fish)
|
||||
weights.append(final_weight)
|
||||
total_weight += final_weight
|
||||
|
||||
if eligible_fish.is_empty() or total_weight <= 0.0:
|
||||
return null
|
||||
var roll: float = _rng.randf() * total_weight
|
||||
var accumulated_weight: float = 0.0
|
||||
for index: int in range(eligible_fish.size()):
|
||||
accumulated_weight += weights[index]
|
||||
if roll <= accumulated_weight:
|
||||
return eligible_fish[index]
|
||||
return eligible_fish.back()
|
||||
|
||||
|
||||
func create_catch(fish: FishDataType) -> FishCatchType:
|
||||
if fish == null or not fish.is_selectable():
|
||||
return null
|
||||
var caught_fish := FishCatchType.new()
|
||||
caught_fish.fish = fish
|
||||
caught_fish.fish_id = fish.id
|
||||
caught_fish.weight_lb = _rng.randf_range(
|
||||
fish.get_minimum_weight(),
|
||||
fish.get_maximum_weight()
|
||||
)
|
||||
caught_fish.display_scale = fish.get_display_scale_for_weight(
|
||||
caught_fish.weight_lb
|
||||
)
|
||||
return caught_fish
|
||||
1
fish/fish_selector.gd.uid
Normal file
1
fish/fish_selector.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://csooreckpm0hh
|
||||
10
fish/pools/test_water_pool.tres
Normal file
10
fish/pools/test_water_pool.tres
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[gd_resource type="Resource" load_steps=5 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"]
|
||||
[ext_resource type="Resource" path="res://fish/species/bluegill/bluegill.tres" id="2_bluegill"]
|
||||
[ext_resource type="Resource" path="res://fish/species/bass/bass.tres" id="3_bass"]
|
||||
[ext_resource type="Resource" path="res://fish/species/carp/carp.tres" id="4_carp"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_pool")
|
||||
candidates = [ExtResource("2_bluegill"), ExtResource("3_bass"), ExtResource("4_carp")]
|
||||
6
fish/species/bass/bass.svg
Normal file
6
fish/species/bass/bass.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="64" viewBox="0 0 128 64">
|
||||
<path fill="#39713b" d="M30 32 8 12v40l22-20Z"/>
|
||||
<ellipse cx="72" cy="32" rx="46" ry="24" fill="#73a94d"/>
|
||||
<path fill="#2f6237" d="M35 29c24-8 48-7 74 1-27 2-51 5-74 1Z"/>
|
||||
<circle cx="104" cy="26" r="3" fill="#142518"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 321 B |
43
fish/species/bass/bass.svg.import
Normal file
43
fish/species/bass/bass.svg.import
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2510mmpn6cos"
|
||||
path="res://.godot/imported/bass.svg-61a5b49cdcc6e48a0677d179d664071b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://fish/species/bass/bass.svg"
|
||||
dest_files=["res://.godot/imported/bass.svg-61a5b49cdcc6e48a0677d179d664071b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
28
fish/species/bass/bass.tres
Normal file
28
fish/species/bass/bass.tres
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
[gd_resource type="Resource" load_steps=5 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"]
|
||||
[ext_resource type="Resource" path="res://fishing/bass_catch_profile.tres" id="2_profile"]
|
||||
[ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability_script"]
|
||||
[ext_resource type="Texture2D" path="res://fish/species/bass/bass.svg" id="4_texture"]
|
||||
|
||||
[sub_resource type="Resource" id="BassAvailability"]
|
||||
script = ExtResource("3_availability_script")
|
||||
allow_day = true
|
||||
allow_night = true
|
||||
preferred_bait_tags = Array[StringName]([&"worm", &"minnow"])
|
||||
preferred_bait_weight_multiplier = 1.4
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_fish_data")
|
||||
id = &"bass"
|
||||
display_name = "Bass"
|
||||
rarity = 1
|
||||
base_catch_weight = 4.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
availability = SubResource("BassAvailability")
|
||||
weight_min_lb = 1.5
|
||||
weight_max_lb = 8.0
|
||||
display_scale_min = 0.9
|
||||
display_scale_max = 1.5
|
||||
display_scale_curve = 0.9
|
||||
display_texture = ExtResource("4_texture")
|
||||
6
fish/species/bluegill/bluegill.svg
Normal file
6
fish/species/bluegill/bluegill.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="64" viewBox="0 0 128 64">
|
||||
<path fill="#197da8" d="M30 32 8 12v40l22-20Z"/>
|
||||
<ellipse cx="72" cy="32" rx="46" ry="24" fill="#35bddd"/>
|
||||
<path fill="#177595" d="M45 18c16-8 38-8 56 2-20-3-38 0-56 8Z"/>
|
||||
<circle cx="104" cy="26" r="3" fill="#102533"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 321 B |
43
fish/species/bluegill/bluegill.svg.import
Normal file
43
fish/species/bluegill/bluegill.svg.import
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dye6e87xuabvm"
|
||||
path="res://.godot/imported/bluegill.svg-e8296ec8dd9d840b3ba713e441cd7e1e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://fish/species/bluegill/bluegill.svg"
|
||||
dest_files=["res://.godot/imported/bluegill.svg-e8296ec8dd9d840b3ba713e441cd7e1e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
21
fish/species/bluegill/bluegill.tres
Normal file
21
fish/species/bluegill/bluegill.tres
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[gd_resource type="Resource" load_steps=5 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"]
|
||||
[ext_resource type="Resource" path="res://fishing/common_catch_profile.tres" id="2_profile"]
|
||||
[ext_resource type="Resource" path="res://fish/default_availability.tres" id="3_availability"]
|
||||
[ext_resource type="Texture2D" path="res://fish/species/bluegill/bluegill.svg" id="4_texture"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_fish_data")
|
||||
id = &"bluegill"
|
||||
display_name = "Bluegill"
|
||||
rarity = 0
|
||||
base_catch_weight = 10.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
availability = ExtResource("3_availability")
|
||||
weight_min_lb = 0.3
|
||||
weight_max_lb = 2.0
|
||||
display_scale_min = 0.7
|
||||
display_scale_max = 1.1
|
||||
display_scale_curve = 1.0
|
||||
display_texture = ExtResource("4_texture")
|
||||
6
fish/species/carp/carp.svg
Normal file
6
fish/species/carp/carp.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="64" viewBox="0 0 128 64">
|
||||
<path fill="#9b5f20" d="M30 32 8 12v40l22-20Z"/>
|
||||
<ellipse cx="72" cy="32" rx="46" ry="24" fill="#d89b38"/>
|
||||
<path fill="#b47728" d="M39 39c20 7 44 7 67-1-21 1-43-2-67-8Z"/>
|
||||
<circle cx="104" cy="26" r="3" fill="#30200f"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 321 B |
43
fish/species/carp/carp.svg.import
Normal file
43
fish/species/carp/carp.svg.import
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cv0egn63xwn3c"
|
||||
path="res://.godot/imported/carp.svg-0d5425bc65e17d4f31a20a81115b2a99.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://fish/species/carp/carp.svg"
|
||||
dest_files=["res://.godot/imported/carp.svg-0d5425bc65e17d4f31a20a81115b2a99.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
28
fish/species/carp/carp.tres
Normal file
28
fish/species/carp/carp.tres
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
[gd_resource type="Resource" load_steps=5 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_data.gd" id="1_fish_data"]
|
||||
[ext_resource type="Resource" path="res://fishing/carp_catch_profile.tres" id="2_profile"]
|
||||
[ext_resource type="Script" path="res://fish/fish_availability.gd" id="3_availability_script"]
|
||||
[ext_resource type="Texture2D" path="res://fish/species/carp/carp.svg" id="4_texture"]
|
||||
|
||||
[sub_resource type="Resource" id="CarpAvailability"]
|
||||
script = ExtResource("3_availability_script")
|
||||
allow_day = true
|
||||
allow_night = true
|
||||
preferred_bait_tags = Array[StringName]([&"corn", &"bread"])
|
||||
preferred_bait_weight_multiplier = 1.5
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_fish_data")
|
||||
id = &"carp"
|
||||
display_name = "Carp"
|
||||
rarity = 2
|
||||
base_catch_weight = 1.5
|
||||
catch_profile = ExtResource("2_profile")
|
||||
availability = SubResource("CarpAvailability")
|
||||
weight_min_lb = 3.0
|
||||
weight_max_lb = 18.0
|
||||
display_scale_min = 1.0
|
||||
display_scale_max = 1.8
|
||||
display_scale_curve = 0.85
|
||||
display_texture = ExtResource("4_texture")
|
||||
Loading…
Add table
Add a link
Reference in a new issue