mirror of
https://github.com/FOSS-Supremacy/OpenLiberty.git
synced 2025-04-28 11:57:58 +03:00
4.5 KiB
4.5 KiB
Existing Project
-
Update the project’s main scene (if skipped during plugin install).
- Go to
Project > Project Settings… > General > Application > Run
. - Update
Main Scene
toMainMenu.tscn
.- Alternatively, any scene the inherits from it. One exists in the
examples/
folder.
- Alternatively, any scene the inherits from it. One exists in the
- Close the window.
- Go to
-
Update the project’s name in the main menu.
- Open
MainMenu.tscn
. - Select the
Title
node. - Update the
Text
to your project's title. - Select the
Subtitle
node. - Update the
Text
to a desired subtitle or empty. - Save the scene.
- Open
-
Link the main menu to the game scene.
- Open
MainMenu.tscn
. - Select the
MainMenu
node. - Update
Game Scene Path
to the path of the project's game scene. - Save the scene.
- Open
-
Add background music and sound effects to the UI.
-
Add
Music
andSFX
to the project's default audio busses.- Open the Audio bus editor.
- Click the button "Add Bus" twice (x2).
- Name the two new busses
Music
andSFX
. - Save the project.
-
Add background music to the Main Menu.
- Import the music asset into the project.
- Open
MainMenu.tscn
. - Select the
BackgroundMusicPlayer
node. - Assign the music asset to the
stream
property. - Save the scene.
-
Add sound effects to UI elements.
-
By scene.
- Open
MainMenu.tscn
andPauseMenu.tscn
. - Select the
UISoundController
node. - Add audio streams to the various UI node events.
- Save the scenes.
- Open
-
Project-wide.
- Open
ProjectUISoundController.tscn
. - Select the
UISoundController
node. - Add audio streams to the various UI node events.
- Save the scene.
- Open
-
-
-
Add readable names for input actions to the controls menu.
- Open
InputOptionsMenu.tscn
(orMasterOptionsMenu
, which contains an instance of the scene). - Select the
Controls
node. - Update the
Action Name Map
to show readable names for the project's input actions.- The keys are the project's input action names, while the values are the names shown in the controls menu.
- An example is provided. It can be updated or removed, either in the inspector for the node, or in the code of
InputOptionsMenu.gd
.
- Save the scene.
- Open
-
Add / remove configurable settings to / from menus.
- Open
MiniOptionsMenu.tscn
or[Audio|Visual|Input|Game]OptionsMenu.tscn
scenes to edit their options. - If an option is not desired, it can always be hidden, or removed entirely (sometimes with some additional work).
- If a new option is desired, it can be added without writing code.
- Find the node that contains the existing list of options. Usually, it's a
VBoxContainer
. - Add an
OptionControl.tscn
node as a child to the container.SliderOptionControl.tscn
orToggleOptionControl.tscn
can be used if those types match requirements. In that case, skip step 6.ListOptionControl.tscn
andVector2ListOptionControl.tscn
are also available, but more complicated. See theScreenResolution
example.
- Select the
OptionControl
node just added, to edit it in the inspector. - Add an
Option Name
. This prefills theKey
string. - Select an
Option Section
. This prefills theSection
string. - Add any kind of
Button
,Slider
,LineEdit
, orTextEdit
to theOptionControl
node. - Save the scene.
- Find the node that contains the existing list of options. Usually, it's a
- For options to have an effect outside of the menu, it will need to be referenced by its
key
andsection
fromConfig.gd
.Config.get_config(section, key, default_value)
- Validate the values being stored in your local
config.cfg
file.- Refer to Accessing Persistent User Data User to find Godot user data on your machine.
- Find the directory that matches your project's name.
config.cfg
should be in the top directory of the project.
- Open
-
Update the game credits / attribution.
- Update the example
ATTRIBUTION.md
with the project's credits. - Open
Credits.tscn
. - Check the
CreditsLabel
has updated with the text. - Save the scene.
- Update the example