tygct
Member
- Jun 6, 2017
- 155
- 822
I haven't shared any devlogs yet because what I've been doing isn't too big either.
Still working on integrating all components into the game, on top of that I have been sick in early April which has slowed down development a bit.
Integration checklist as for now (
done,
not done)
Evaluators (data transfer) module
Localization module
-- NEW: Added a Localization Manager
---- Merges all translation data (from base game and mods)
---- Scans and replaces recursively nested translations inside a translation (avoiding infinite loops)
---- Provides a list of language IDs for the language setting dinamically (english, spanish, spanish (latam), portuguese, etc...), allows modders to just create a translation file instead of creating a script to insert the language ID into the settings
---- Builds translation data automatically everytime the database is built/changed in any way (no need to restart the game)
Configuration module (FKA Settings module)
-- Integrated the configuration module into the global scope
---- Allows to set/get config values anywhere in the code
-- NEW: Game settings have been separated into individual files determined by their context
---- Instead of having a single JSON file, settings are now saved into individual JSON files determined by their context
---- Simplifies the JSON file, since mods also stores settings, it could get way too big and bothersome to maintain
-- NEW: Configuration menu JSON files
---- Allows to build the settings menu using JSON files
-- Simplified config creation
---- Moved the creation of the menu into JSON files
---- You can compare for yourselves checking these examples below:
-- NEW: Configuration value verification
---- Allows to verify a value when changing the configuration into another value
---- For example, the multiplier value can only go from 0.1 to 2.0 or the difficulty being 'easy', 'normal' or 'hard'
-- NEW: On setting change handler
---- Adds a handler to execute when the setting value changes
---- Example: The audio manager uses this to apply the volume to currently playing audio tracks
Console commands module
-- Integrated the console module into the global scope
---- Allows to create/call/alias commands anywhere in the code
-- Simplified console command creation
---- Example:
The configuration module is not finished because, in the attempt to simplify the creation of settings, I have moved the creation of settings menus into JSON files, so I need to parse it and build the menu with this data, also, I have created a new type of record for the configuration menus inside the mods system, so it will be detected automatically by the mod system, you won't need to register them manually through code, unfinished example of the game's configuration menu:
Config menus also supports localized strings as you can see in the display name attributes.
Here's a more completed example:
I fixed some bugs on the audio manager too, when changing the volume value it was not applied to audio tracks that were already playing.
Like I said, configuration values are now stored into specific config values, example:
Config/sana.json
Config/jane_doe_side_stories.json
Config/john_doe_my_first_mod.json
This not only simplifies maintaining configuration files but also makes it easier to share (or backup) a configuration file for one mod or several mods.
Also the configuration files persist even if you delete the mod and reinstall it, to save your settings in case you reinstall it.
Hopefully next devlog will be about the sex framework, thank you for y'all patience with this project tho lol
Still working on integrating all components into the game, on top of that I have been sick in early April which has slowed down development a bit.
Integration checklist as for now (
-- NEW: Added a Localization Manager
---- Merges all translation data (from base game and mods)
---- Scans and replaces recursively nested translations inside a translation (avoiding infinite loops)
---- Provides a list of language IDs for the language setting dinamically (english, spanish, spanish (latam), portuguese, etc...), allows modders to just create a translation file instead of creating a script to insert the language ID into the settings
---- Builds translation data automatically everytime the database is built/changed in any way (no need to restart the game)
-- Integrated the configuration module into the global scope
---- Allows to set/get config values anywhere in the code
-- NEW: Game settings have been separated into individual files determined by their context
---- Instead of having a single JSON file, settings are now saved into individual JSON files determined by their context
---- Simplifies the JSON file, since mods also stores settings, it could get way too big and bothersome to maintain
-- NEW: Configuration menu JSON files
---- Allows to build the settings menu using JSON files
-- Simplified config creation
---- Moved the creation of the menu into JSON files
---- You can compare for yourselves checking these examples below:
You don't have permission to view the spoiler content.
Log in or register now.
You don't have permission to view the spoiler content.
Log in or register now.
---- Allows to verify a value when changing the configuration into another value
---- For example, the multiplier value can only go from 0.1 to 2.0 or the difficulty being 'easy', 'normal' or 'hard'
-- NEW: On setting change handler
---- Adds a handler to execute when the setting value changes
---- Example: The audio manager uses this to apply the volume to currently playing audio tracks
-- Integrated the console module into the global scope
---- Allows to create/call/alias commands anywhere in the code
-- Simplified console command creation
---- Example:
Code:
console_create(
'help',
'Console Command Help',
"help [COMMAND_NAME]\nman [COMMAND_NAME]",
"Provides information about a command that matches the given argument\n" \
'In case no arguments are given it shows a list of all commands'
) do |args|
# Gets command name
name = args.shift
# Determines help behavior
if name.nil?
# Print list of all commands
console_write('Available commands: ')
Engine::Console.commands.each do |command|
console_write("#{command} - #{Engine::Console.command_header(command)}")
end
else
# A name was given, search info about the command
info = Engine::Console.command_info(name)
if info.empty?
console_write("Unknown command: \"#{name}\"")
else
info.each do |str|
console_write(str)
end
console_write('--------------------------')
end
end
end
# Creates an alias for help
console_alias('help', 'man')
JSON:
{
"menu_id": "sana",
"menu_display_name": "$MENU_CFG_GAME_NAME",
"menu_description": "$MENU_CFG_GAME_DESC",
"menu_pages": [
{
"page_display_name": "$MENU_CFG_GAME_GENERAL",
"page_description": "$MENU_CFG_GAME_GENERAL_DESC",
"page_entries": [
{
"entry_type": "list",
"entry_display_name": "$MENU_CFG_GAME_GENERAL_LANG",
"entry_description": "$MENU_CFG_GAME_GENERAL_LANG_DESC",
"entry_options": {
"list_dynamic": "Game::Localization.get_locales"
},
"entry_config_context": "sana",
"entry_config_name": "language"
}
]
},
{
"page_display_name": "$MENU_CFG_GAME_AUDIO",
"page_description": "$MENU_CFG_GAME_AUDIO_DESC",
"page_entries": []
},
{
"page_display_name": "$MENU_CFG_GAME_VISUAL",
"page_description": "$MENU_CFG_GAME_VISUAL_DESC",
"page_entries": []
},
{
"page_display_name": "$MENU_CFG_GAME_ADVANCED",
"page_description": "$MENU_CFG_GAME_ADVANCED_DESC",
"page_entries": []
}
]
}
Here's a more completed example:
JSON:
{
"menu_id": "jane_doe_side_stories_cfg_menu",
"menu_display_name": "Side Stories",
"menu_description": "Side Stories Mod Settings",
"menu_pages": [
{
"page_display_name": "General",
"page_description": "General Settings",
"page_entries": [
{
"entry_type": "section",
"entry_display_name": "Global Switch"
},
{
"entry_type": "switch",
"entry_display_name": "Status",
"entry_description": "Enables/Disables the mod",
"entry_config_context": "jane_doe_side_stories",
"entry_config_name": "status"
},
{
"entry_type": "space",
"entry_options": {
"space_lines": 2
}
},
{
"entry_type": "section",
"entry_display_name": "General"
},
{
"entry_type": "list",
"entry_display_name": "Difficulty",
"entry_description": "Sets the difficulty",
"entry_options": {
"list_fixed": {
"Easy": "easy",
"Normal": "normal",
"Hard": "hard"
}
},
"entry_config_context": "jane_doe_side_stories",
"entry_config_name": "difficulty"
},
{
"entry_type": "slider",
"entry_display_name": "Progression Multiplier",
"entry_description": "Sets the progression multiplier value",
"entry_options": {
"slider_min": 0.1,
"slider_max": 2.0,
"slider_step": 0.1
},
"entry_config_context": "jane_doe_side_stories",
"entry_config_name": "multiplier"
},
{
"entry_type": "input",
"entry_display_name": "Childhood Friend Name",
"entry_description": "Sets the NPC name",
"entry_options": {
"input_max_length": 10
},
"entry_config_context": "jane_doe_side_stories",
"entry_config_name": "childhood_friend"
}
]
},
{
"page_display_name": "Debug",
"page_description": "Debug Settings",
"page_entries": [
{
"entry_type": "section",
"entry_display_name": "Debug"
},
{
"entry_type": "slider",
"entry_display_name": "Debug Level",
"entry_description": "Sets the mod's debug level",
"entry_options": {
"slider_min": 0,
"slider_max": 2,
"slider_step": 1
},
"entry_config_context": "jane_doe_side_stories",
"entry_config_name": "log_level"
}
]
}
]
}
Like I said, configuration values are now stored into specific config values, example:
Config/sana.json
JSON:
{
"language": "english",
"master_volume": 0,
"bgm_volume": 100,
"bgs_volume": 100,
"me_volume": 100,
"se_volume": 100,
"sex_pleasure_tick": 2.5,
"sex_min_speed": 1,
"sex_max_speed": 10,
"sex_menu_status": true,
"sex_difficulty": "normal"
}
JSON:
{
"status": false,
"difficulty": "easy",
"childhood_friend": "Bob",
"multiplier": 1.0,
"log_level": 1
}
JSON:
{
"enabled": false,
"extra": false
}
Also the configuration files persist even if you delete the mod and reinstall it, to save your settings in case you reinstall it.
Hopefully next devlog will be about the sex framework, thank you for y'all patience with this project tho lol