Uploaded game files

This commit is contained in:
JamnedZ 2022-11-18 00:52:05 +07:00
parent 459da513f6
commit f71e7e39a0
1543 changed files with 50503 additions and 0 deletions

View file

@ -0,0 +1,50 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/ResourcePickers/Files/FilePicker.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Audio/EventPart_AudioFilePicker.gd" type="Script" id=2]
[ext_resource path="res://addons/dialogic/Editor/Events/styles/SimpleButtonHover.tres" type="StyleBox" id=3]
[ext_resource path="res://addons/dialogic/Editor/Events/styles/SimpleButtonNormal.tres" type="StyleBox" id=4]
[sub_resource type="StyleBoxEmpty" id=3]
[sub_resource type="Image" id=4]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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ioFilePicker" type="HBoxContainer"]
margin_right = 181.0
margin_bottom = 22.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="FilePicker" parent="." instance=ExtResource( 1 )]
margin_top = 0.0
margin_right = 162.0
margin_bottom = 22.0
Mode = "Audio"
[node name="ButtonPreviewPlay" type="Button" parent="."]
margin_left = 166.0
margin_right = 188.0
margin_bottom = 22.0
size_flags_vertical = 4
custom_styles/hover = ExtResource( 3 )
custom_styles/pressed = ExtResource( 3 )
custom_styles/focus = SubResource( 3 )
custom_styles/normal = ExtResource( 4 )
icon = SubResource( 2 )
[node name="AudioPreview" type="AudioStreamPlayer" parent="."]

View file

@ -0,0 +1,151 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Audio/EventPart_AudioPicker.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Editor/Events/styles/SectionPanel.tres" type="StyleBox" id=2]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Audio/AudioFilePicker.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/dialogic/Editor/Events/styles/InputFieldsStyle.tres" type="Theme" id=4]
[node name="AudioPicker" type="PanelContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = -718.0
margin_bottom = -580.0
theme = ExtResource( 4 )
custom_styles/panel = ExtResource( 2 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
event_name = "AudioEvent"
[node name="VBox" type="VBoxContainer" parent="."]
margin_left = 6.0
margin_top = 5.0
margin_right = 300.0
margin_bottom = 66.0
[node name="AudioFilePicker" parent="VBox" instance=ExtResource( 3 )]
visible = false
margin_right = 294.0
[node name="adv_settings" type="HBoxContainer" parent="VBox"]
margin_right = 294.0
margin_bottom = 61.0
custom_constants/separation = 8
[node name="AudioVolume" type="PanelContainer" parent="VBox/adv_settings"]
margin_right = 88.0
margin_bottom = 61.0
custom_styles/panel = ExtResource( 2 )
[node name="VBox" type="VBoxContainer" parent="VBox/adv_settings/AudioVolume"]
margin_left = 6.0
margin_top = 5.0
margin_right = 82.0
margin_bottom = 57.0
[node name="Label" type="Label" parent="VBox/adv_settings/AudioVolume/VBox"]
margin_right = 76.0
margin_bottom = 14.0
text = "Volume:"
[node name="Volume" type="SpinBox" parent="VBox/adv_settings/AudioVolume/VBox"]
margin_top = 18.0
margin_right = 76.0
margin_bottom = 52.0
min_value = -80.0
max_value = 24.0
step = 0.01
suffix = "dB"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AudioBus" type="PanelContainer" parent="VBox/adv_settings"]
margin_left = 96.0
margin_right = 181.0
margin_bottom = 61.0
custom_styles/panel = ExtResource( 2 )
[node name="VBox" type="VBoxContainer" parent="VBox/adv_settings/AudioBus"]
margin_left = 6.0
margin_top = 5.0
margin_right = 79.0
margin_bottom = 57.0
[node name="Label" type="Label" parent="VBox/adv_settings/AudioBus/VBox"]
margin_right = 73.0
margin_bottom = 14.0
text = "AudioBus:"
[node name="BusSelector" type="OptionButton" parent="VBox/adv_settings/AudioBus/VBox"]
margin_top = 18.0
margin_right = 73.0
margin_bottom = 38.0
size_flags_vertical = 5
text = "Master"
items = [ "Master", null, false, 0, null ]
selected = 0
[node name="AudioRegion" type="PanelContainer" parent="VBox/adv_settings"]
visible = false
margin_left = 187.0
margin_right = 419.0
margin_bottom = 51.0
custom_styles/panel = ExtResource( 2 )
[node name="VBox" type="VBoxContainer" parent="VBox/adv_settings/AudioRegion"]
margin_left = 6.0
margin_top = 5.0
margin_right = 226.0
margin_bottom = 47.0
[node name="Label" type="Label" parent="VBox/adv_settings/AudioRegion/VBox"]
margin_right = 220.0
margin_bottom = 14.0
text = "Audio-region:"
[node name="HBox" type="HBoxContainer" parent="VBox/adv_settings/AudioRegion/VBox"]
margin_top = 18.0
margin_right = 220.0
margin_bottom = 42.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="StartAtLabel" type="Label" parent="VBox/adv_settings/AudioRegion/VBox/HBox"]
margin_top = 5.0
margin_right = 33.0
margin_bottom = 19.0
text = "Start:"
[node name="StartAt" type="SpinBox" parent="VBox/adv_settings/AudioRegion/VBox/HBox"]
margin_left = 37.0
margin_right = 111.0
margin_bottom = 24.0
hint_tooltip = "Leave both at 0 to use the whole file."
max_value = 9999.0
step = 0.1
suffix = "sec"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="StopAtLabel" type="Label" parent="VBox/adv_settings/AudioRegion/VBox/HBox"]
margin_left = 115.0
margin_top = 5.0
margin_right = 142.0
margin_bottom = 19.0
text = "End:"
[node name="StopAt" type="SpinBox" parent="VBox/adv_settings/AudioRegion/VBox/HBox"]
margin_left = 146.0
margin_right = 220.0
margin_bottom = 24.0
hint_tooltip = "Leave both at 0 to use the whole file."
max_value = 9999.0
step = 0.1
suffix = "sec"
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -0,0 +1,43 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Audio/EventPart_AudioPickerComplex.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Audio/AudioPicker.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/dialogic/Editor/Events/styles/InputFieldsStyle.tres" type="Theme" id=3]
[node name="AudioPickerComplex" type="VBoxContainer"]
margin_right = 40.0
margin_bottom = 40.0
theme = ExtResource( 3 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBox" type="VBoxContainer" parent="."]
margin_right = 193.0
margin_bottom = 108.0
[node name="Fade" type="HBoxContainer" parent="VBox"]
margin_right = 193.0
margin_bottom = 34.0
[node name="FadeLengthLabel" type="Label" parent="VBox/Fade"]
margin_top = 10.0
margin_right = 87.0
margin_bottom = 24.0
text = " Fade-length:"
[node name="FadeLength" type="SpinBox" parent="VBox/Fade"]
margin_left = 91.0
margin_right = 167.0
margin_bottom = 34.0
step = 0.01
suffix = "s"
[node name="AudioPicker" parent="VBox" instance=ExtResource( 2 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 38.0
margin_right = 193.0
margin_bottom = 108.0
event_name = "Background Music"

View file

@ -0,0 +1,59 @@
tool
extends "res://addons/dialogic/Editor/Events/Parts/EventPart.gd"
# has an event_data variable that stores the current data!!!
## node references
onready var file_picker = $FilePicker
onready var preview_button = $ButtonPreviewPlay
onready var audio_preview = $AudioPreview
# used to connect the signals
func _ready():
file_picker.connect("data_changed", self, "_on_FilePicker_data_changed")
preview_button.connect("pressed", self, "_on_PreviewButton_pressed")
audio_preview.connect("finished", self, '_on_AudioPreview_finished')
preview_button.icon = get_icon("Play", "EditorIcons")
# called by the event block
func load_data(data:Dictionary):
# First set the event_data
.load_data(data)
# Now update the ui nodes to display the data.
file_picker.load_data(event_data)
preview_button.visible = !event_data['file'].empty()
# has to return the wanted preview, only useful for body parts
func get_preview():
return ''
func _on_FilePicker_data_changed(data):
event_data = data
preview_button.visible = !event_data['file'].empty()
# informs the parent about the changes!
data_changed()
func _on_PreviewButton_pressed():
if audio_preview.is_playing():
audio_preview.stop()
else:
audio_preview.stream = load(event_data['file'])
audio_preview.bus = event_data['audio_bus']
audio_preview.volume_db = event_data.get('volume', 0)
if event_data.has('start_time'):
audio_preview.play(event_data['start_time'])
else:
audio_preview.play()
preview_button.icon = get_icon("Stop", "EditorIcons")
func _on_AudioPreview_finished():
preview_button.icon = get_icon("Play", "EditorIcons")
func _process(_delta):
#Will automatically stop playing when reaching stop_time
if(audio_preview.playing && event_data.has('stop_time') && audio_preview.get_playback_position() >= event_data['stop_time']):
audio_preview.stop()

View file

@ -0,0 +1,96 @@
tool
extends "res://addons/dialogic/Editor/Events/Parts/EventPart.gd"
# has an event_data variable that stores the current data!!!
signal audio_loaded
export (String) var event_name = "Audio Event"
## node references
onready var file_picker := $VBox/AudioFilePicker
onready var volume_input := $VBox/adv_settings/AudioVolume/VBox/Volume
onready var region_group := $VBox/adv_settings/AudioRegion
onready var start_at_input := $VBox/adv_settings/AudioRegion/VBox/HBox/StartAt
onready var stop_at_input := $VBox/adv_settings/AudioRegion/VBox/HBox/StopAt
onready var bus_selector := $VBox/adv_settings/AudioBus/VBox/BusSelector
# used to connect the signals
func _ready():
# signals
file_picker.connect("data_changed", self, '_on_FilePicker_data_changed')
bus_selector.connect("item_selected", self, "_on_BusSelector_item_selected")
volume_input.connect("value_changed", self, "_on_Volume_value_changed")
start_at_input.connect("value_changed", self, "_on_StartAt_value_changed")
stop_at_input.connect("value_changed", self, "_on_StopAt_value_changed")
# AudioBusPicker update
AudioServer.connect("bus_layout_changed", self, "update_bus_selector")
update_bus_selector()
# file picker is here only used for text voice
file_picker.hide()
# called by the event block
func load_data(data:Dictionary):
# First set the event_data
.load_data(data)
file_picker.load_data(data)
# Now update the ui nodes to display the data.
if data.has('audio_bus'):
for idx in range(bus_selector.get_item_count()):
if bus_selector.get_item_text(idx) == data['audio_bus']:
bus_selector.select(idx)
if data.has('volume'):
volume_input.value = data['volume']
if data.has('start_time'):
start_at_input.value = data["start_time"]
if data.has('stop_time'):
stop_at_input.value = data["stop_time"]
if not data.has("event_id"):
file_picker.show()
region_group.show()
# TODO 2.0 delete this mess
if event_data.has('audio'): event_data['audio'] = 'play'
if event_data.has('background-music'): event_data['background-music'] = 'play'
func get_preview():
return ''
func update_bus_selector():
if bus_selector != null:
var previous_selected_bus_name = bus_selector.get_item_text(max(0, bus_selector.selected))
bus_selector.clear()
for i in range(AudioServer.bus_count):
var bus_name = AudioServer.get_bus_name(i)
bus_selector.add_item(bus_name)
if previous_selected_bus_name == bus_name:
bus_selector.select(i)
func _on_FilePicker_data_changed(data):
event_data['file'] = data['file']
data_changed()
func _on_BusSelector_item_selected(index):
event_data['audio_bus'] = bus_selector.get_item_text(index)
data_changed()
func _on_Volume_value_changed(value):
event_data['volume'] = value
data_changed()
func _on_StopAt_value_changed(value):
event_data['stop_time'] = value
data_changed()
func _on_StartAt_value_changed(value):
event_data['start_time'] = value
data_changed()

View file

@ -0,0 +1,42 @@
tool
extends "res://addons/dialogic/Editor/Events/Parts/EventPart.gd"
# has an event_data variable that stores the current data!!!
## node references
onready var audio_picker = $VBox/AudioPicker
onready var fade_length_input = $VBox/Fade/FadeLength
# used to connect the signals
func _ready():
audio_picker.connect("data_changed", self, "_on_AudioPicker_data_changed")
fade_length_input.connect("value_changed", self, "_on_FadeLength_value_changed")
# called by the event block
func load_data(data:Dictionary):
# First set the event_data
.load_data(data)
# Now update the ui nodes to display the data.
audio_picker.editor_reference = editor_reference
audio_picker.load_data(event_data)
fade_length_input.value = event_data['fade_length']
# has to return the wanted preview, only useful for body parts
func get_preview():
return audio_picker.get_preview()
func _on_AudioPicker_data_changed(data):
event_data = data
# informs the parent about the changes!
data_changed()
func _on_FadeLength_value_changed(value):
event_data['fade_length'] = value
audio_picker.load_data(event_data)
# informs the parent about the changes!
data_changed()

View file

@ -0,0 +1,95 @@
tool
extends "res://addons/dialogic/Editor/Events/Parts/EventPart.gd"
export(PackedScene) var audio_picker
#onready var voices_container = $List/VoicesList
#onready var label_container = $List/Label
var audio_lines = 1 # how many lines does the text event has
func load_data(data):
.load_data(data)
update_data()
func repopulate() -> void:
for child in $List.get_children():
child.queue_free()
var settings = DialogicResources.get_settings_config()
#recraete audio pickers
for i in range(audio_lines):
var label = Label.new()
label.text = "Line "+str(i+1)+":"
label.size_flags_vertical = 0
$List.add_child(label)
var a_picker = audio_picker.instance()
a_picker.editor_reference = editor_reference
a_picker.event_name = "voice line"
a_picker.connect("data_changed", self, "_on_audio_picker_audio_loaded", [i])
$List.add_child(a_picker)
#loaded data
if event_data.has('voice_data'):
var voice_data = event_data['voice_data']
if voice_data.has(str(i)):
var _d = voice_data[str(i)]
if _d.has('file'):
a_picker.load_data(_d)
continue
a_picker.load_data({'file':'', 'audio_bus':settings.get_value("dialog", "text_event_audio_default_bus", "Master")})
func _on_text_changed(text:String) -> void:
# This is called when the text has changed
# Are we adding new text events per new line ?
var settings_file = DialogicResources.get_settings_config()
if not (settings_file.get_value("dialog", "new_lines", true)):
$Label.text = "Audio Picker:"
return
var prev_lines = audio_lines
$Label.text = "Audio Pickers:"
audio_lines = max(1, len(text.split('\n')))
if prev_lines != audio_lines:
repopulate()
#Since the nodes are now in a grid sharing indicies with lables, index must
#be multiplied by 2, then added an offset of 1 to get the requested node
func _get_audio_picker(index:int):
var data = $List.get_child(index * 2 + 1)
return data
func _on_audio_picker_audio_loaded(data,index:int) -> void:
# update the data
if not event_data.has('voice_data'):
event_data['voice_data'] = {}
event_data['voice_data'][str(index)] = data
#load the data
load_data(event_data)
# informs the parent about the data change
data_changed()
func update_data():
if not event_data.has('voice_data'):
return
var keys = event_data['voice_data'].keys()
# This subroutine was already a hack before I got to it, so don't blame me.
# divide by two, again becouse the two merged nodes.
# reused _get_audio_picker wherein we multiply by two again :D
# - KvaGram
for i in range($List.get_child_count() / 2):
if keys.has(str(i)):
var data = event_data['voice_data'][str(i)]
#voices_container.get_child(i).load_data(data)
_get_audio_picker(i).load_data(data)

View file

@ -0,0 +1,24 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Audio/EventPart_VoiceEditor.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Editor/Events/Parts/Audio/AudioPicker.tscn" type="PackedScene" id=2]
[node name="VoiceEditor" type="VBoxContainer"]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
audio_picker = ExtResource( 2 )
[node name="Label" type="Label" parent="."]
margin_right = 86.0
margin_bottom = 14.0
text = "Voice Picker :"
[node name="List" type="GridContainer" parent="."]
margin_top = 18.0
margin_right = 86.0
margin_bottom = 18.0
columns = 2