B Tutorial Presentation Modifying hardcoded menues via module.ini & game_variables.txt

Users who are viewing this thread

With this tutorial I will try to expand (and thus am collecting and integrating) other existing tutorials covering this topic. Module.ini and game_variables.txt both contain a lot of variables with which modders can customise the main menues and loading screens quite a lot. Beginners at modding tend to not see them since they can't be found inside the module system but within the mods own module folder. For every menu counts what Swyter is noting​
Swyter said:
They are hardcoded, meaning that you can only override them with your own but you cannot change their 'instanced' position, where are they used and... name.
Search for interface.brf and core_*.brf in CommonRes. If you copy them to your Module's Resource folder the game will use those instead of the common ones.
I will concentrate on the multiplayer menues since I work with them myself and haven't looked into the singleplayer ones so far. For them it should be the same concept of working through game_variables.txt though. Once you have figured out to which menu the section is dedicated (reading the names helps a lot :iamamoron:), you can simply make tests there by yourself. So there is a lot to discover for some of you. You do not need any coding skills, you should just be able to read, understand and use the informations given here.​
Background textures
There are two loading screens, the main one when loading the game and a lesser one when you are switching from the main menu to the tutorial, singleplayer or multiplayer, or loading a savegame. That one is quite simple, you only need to replace the respective texture file (watch out to use a texture in dds-format), so loadscreen (main one) or loadscreen2 (lesser one). That is the easy way, Swyter is arguing here for creating new UI-meshes instead of tweaking the model which is something for more experienced modders I think but worth to look into.​

Hints
The lesser loading screen contains a field with hints for the gameplay. While this screen is most times already gone when joining the multiplayer, it will stay a while there while loading a savegame and gives modders a good opportunity to provide helpful mod-specific hints for the players.​
For this you first need to go to .../Mount&Blade Warband/languages and copy paste the language folder into your new created module. The language folder within your module has priority at loading.​
rubik said:
Yes, if there are two hints.csv, one is in the game's languages folder, and another is in the mod's languages folder. The game engine will call the hints.csv in the mod's languages folder prioritily.



So you should now have a pathfile like Warband/Modules/YourModuleName/languages/en/hints.csv in your module which (some might have guessed it :iamamoron:) contains the hints. Just use notepad to open the file. You see then twelve game hints which you can then edit as you want them. You can rename "Hint" to "Quote" or "Verse" or whatever in ..\languages\en\ui.csv by editing "ui_hint|Hint" to "ui_hint|Quote" etc.​
The count of hints can be changed in module.ini. Inside there you can find num_hints = 12 and then just edit the number.​

But wait, there is more to be edited: The loading screen text beneath the loading bar. You will find in ui.csv the following strings (thanks to Maroon here):​
  • ui_loading_module_info_file|Loading Module Info File...
  • ui_processing_ini_file|Processing INI File...
  • ui_loading_music|Loading Music...
  • ui_loading_data|Loading Data...
  • ui_loading_setting_data|Loading Setting Data...
  • ui_loading_textures|Loading Textures...
  • ui_finished|Finished.
It doesn't make a lot of sense to edit this parts but you can be creative (Maroon gave in the modding discord 'ui_loading_textures|Loading Textures...|Draining Tears from Players...|Abusing Server Funding...' as an example :lol:). More important: The colour of the loading screen texts can be edited by adding​
Code:
#starting window[/JUSTIFY][/JUSTIFY][/JUSTIFY]
[JUSTIFY][JUSTIFY][JUSTIFY]starting_window_progress_text_color = 0xFF001030
to your game_variables (at a suitable place of course), so the text colour fits to your new loading screen. William the Bear found it in VC, credit for finding that out goes therefore to him.​
Here it is basically the same game as for the loading screen textures. Replace either warrider_logo or add your own mesh (the mesh name needs to be identical). The interesting part is the positioning of the logo so it fits better. Cesilia already covers the logo positioning in her little tutorial but only for the main menu. Open again game_variables.txt and search for #game loading. You should find following​
Code:
#game loading
loading_game_logo_position_x = 0.52
loading_game_logo_position_y = 0.6
loading_game_logo_size_x = 0.45
loading_game_logo_size_y = 0.12
The position can then be adjusted as wanted. For the positioning at the main menu look for initial_game_logo. It's inside the section for the main (initial) menu which will be covered in a later step. You find there again​
Code:
initial_game_logo_position_x = 0.045
initial_game_logo_position_y = 0.54
initial_game_logo_size_x = 0.2
initial_game_logo_size_y = 0.07
Adjust it as wanted. The same game will then go on after looking up options_game_logo (option menu appearing in singleplayer and multiplayer) and #starting (first screen) (starting game logo) and #escape window whereat the last two are only appearing in singleplayer.​
I only want to link here to Efe's tutorial for a custom intro, replacing the short video sequence while loading the game with an own one which can take up to 30 seconds. It's interesting but at the same time not wanted by me. Only for some of you it might be interesting ^^​
For the background texture, it's again the same procedure as noted above, the texture name is called main_menu_nord. That's however not the only thing which can be edited there as you can imagine ^^​
Some mods are not needing every button field in the start menu. Compared to the existing tutorials like the one from Kryptea removing the options not needed has become far easier meanwhile. Instead of resizing and moving around them you now only need to set them to 1 if wanted and to 0 if not by editing (adding if not already existent) the respective lines in module.ini which are​
  • has_tutorial = 1
  • has_single_player = 0 (removes both, the 'New Game' and the 'Load Savegame' option)
  • has_multiplayer = 1
The fields Quick Battle, Options, Credits and Exit would need to be removed manually in the traditional way by resizing and repositioning them. I see no reason though for removing them: You should still honor the original developers of the game and keep the credits there, you can simply add new lines for yourself and your team at the end. Players should be able to access Options already in the start menu, some settings cannot be edited while in multiplayer. And of course, the player should be able to leave the game :iamamoron:
Of course you can rename the fields here by editing the respective string in the ui.csv again. Look out there for​
Code:
ui_start_tutorial|Play Tutorial
ui_start_a_new_game|Start a New Game
ui_restore_a_saved_game|Restore a Saved Game
ui_custom_battle|Quick Battle
ui_exit_to_windows|Exit to Windows
ui_credits|Credits
For example, I renamed 'Tutorial' to 'Sneaking around' which leads to a menu with directions to a tutorial (:iamamoron:), a faction and troop preview and a easy accessible scene menu for players who want to create and bring in new scenes. In such way you could give Tutorial, Start a new game, Quick Battle and Credits (heresy :mad:) new purposes.​
Now you only might only want to repositionate, resize the button and/or the text and recolour the texts. Look in game_variables.txt for #main menu (initial). You find there then a long list:​
initial_tutorial_button_position_x = 0.05
initial_tutorial_button_position_y = 0.48
initial_tutorial_button_size_x = 0.185
initial_tutorial_button_size_y = 0.031
initial_tutorial_button_text_size_x = 0.022
initial_tutorial_button_text_size_y = 0.030
initial_tutorial_button_text_flags = 0x10
initial_tutorial_button_text_color = 0xFF110000
initial_tutorial_button_highlight_text_color = 0xFFFFDD00

initial_start_new_game_button_position_x = 0.05
initial_start_new_game_button_position_y = 0.44
initial_start_new_game_button_size_x = 0.185
initial_start_new_game_button_size_y = 0.031
initial_start_new_game_button_text_size_x = 0.022
initial_start_new_game_button_text_size_y = 0.030
initial_start_new_game_button_text_flags = 0x10
initial_start_new_game_button_text_color = 0xFF110000
initial_start_new_game_button_highlight_text_color = 0xFFFFDD00

initial_resume_game_button_position_x = 0.05
initial_resume_game_button_position_y = 0.40
initial_resume_game_button_size_x = 0.185
initial_resume_game_button_size_y = 0.031
initial_resume_game_button_text_size_x = 0.022
initial_resume_game_button_text_size_y = 0.030
initial_resume_game_button_text_flags = 0x10
initial_resume_game_button_text_color = 0xFF110000
initial_resume_game_button_highlight_text_color = 0xFFFFDD00

initial_multiplayer_button_position_x = 0.05
initial_multiplayer_button_position_y = 0.36
initial_multiplayer_button_size_x = 0.185
initial_multiplayer_button_size_y = 0.031
initial_multiplayer_button_text_size_x = 0.022
initial_multiplayer_button_text_size_y = 0.030
initial_multiplayer_button_text_flags = 0x10
initial_multiplayer_button_text_color = 0xFF110000
initial_multiplayer_button_highlight_text_color = 0xFFFFDD00

initial_custom_battle_button_position_x = 0.05
initial_custom_battle_button_position_y = 0.32
initial_custom_battle_button_size_x = 0.185
initial_custom_battle_button_size_y = 0.031
initial_custom_battle_button_text_size_x = 0.022
initial_custom_battle_button_text_size_y = 0.030
initial_custom_battle_button_text_flags = 0x10
initial_custom_battle_button_text_color = 0xFF110000
initial_custom_battle_button_highlight_text_color = 0xFFFFDD00

initial_options_button_position_x = 0.05
initial_options_button_position_y = 0.28
initial_options_button_size_x = 0.185
initial_options_button_size_y = 0.031
initial_options_button_text_size_x = 0.022
initial_options_button_text_size_y = 0.030
initial_options_button_text_flags = 0x10
initial_options_button_text_color = 0xFF110000
initial_options_button_highlight_text_color = 0xFFFFDD00

initial_credits_button_position_x = 0.05
initial_credits_button_position_y = 0.24
initial_credits_button_size_x = 0.185
initial_credits_button_size_y = 0.031
initial_credits_button_text_size_x = 0.022
initial_credits_button_text_size_y = 0.030
initial_credits_button_text_flags = 0x10
initial_credits_button_text_color = 0xFF110000
initial_credits_button_highlight_text_color = 0xFFFFDD00

initial_quit_button_position_x = 0.05
initial_quit_button_position_y = 0.20
initial_quit_button_size_x = 0.185
initial_quit_button_size_y = 0.025
initial_quit_button_text_size_x = 0.022
initial_quit_button_text_size_y = 0.030
initial_quit_button_text_flags = 0x10
initial_quit_button_text_color = 0xFF110000
initial_quit_button_highlight_text_color = 0xFFFFDD00

initial_game_logo_position_x = 0.045
initial_game_logo_position_y = 0.54
initial_game_logo_size_x = 0.2
initial_game_logo_size_y = 0.07

initial_version_info_position_x = 0.18
initial_version_info_position_y = 0.525
initial_version_info_text_size_x = 0.016
initial_version_info_text_size_y = 0.016
initial_version_info_text_flags = 0x200
initial_version_info_text_color = 0xFF110000

initial_module_version_info_position_x = 0.029
initial_module_version_info_position_y = 0.475
initial_module_version_info_size_x = 0.15
initial_module_version_info_size_y = 0.03
initial_module_version_info_text_size_x = 0.014
initial_module_version_info_text_size_y = 0.014
initial_module_version_info_text_flags = 0x8
initial_module_version_info_text_color = 0xFF110000
For the fields most of it should be pretty much intuitive. The button size determines the area around the text which can get clicked upon, in old tutorials it was always set to zero to remove these fields. highlight_text_color is highlighting the text (:iamamoron:) when the mouse is hovering above it. I am only not sure about the effect of text_flags, maybe someone else will bring light into this. initial_game_logo was already discussed above, initial_version_info offers you the display of the mod version the player is currently playing. In module.ini you can edit/add the following lines for this:​
module_version = 0 #can be used for multiplayer and single player (saved game) module versioning
compatible_savegame_module_version = 0 #can be used for single player (saved game) module versioning
compatible_module_version = 0 #can be used for multiplayer module versioning
compatible_multiplayer_version_no = 1170 not sure about the difference to the one before
#the last two are older and not used anymore, still wanted to list them here.
works_with_version_min = 1000 #deprecated, use module_version and compatible_savegame_module_version instead
works_with_version_max = 1011 #deprecated, use module_version and compatible_savegame_module_version instead
The hidden button feature
Original I wanted to keep this for me until I have released my mod but that can still take a while. The only new thing which I am now contributing to the Forge here is probably the hidden button feature which I have discovered. And by discovered I mean I stumbled across something useful while being too stupid to replace a simple colour code :party:
I wanted to give a button such colour that it fades into the background and can only be seen if the mouse is hovering above it. After applying the first colour code which seemed to fit, I was surprised about how good my result was ingame since the effect was exactly what I wanted: I couldn't see my button without the mouse hovering above it. However, since my background has different light greyshades I got suspicious since I should have been able to see at least some frames of the text. And then I saw my misstake which brought me a better result and the trick is simply done by cutting of the colour code with a # like this​
initial_custom_battle_button_text_color = 0x#FF110000
So no big magic but a big potential for some here maybe. And now the renaming of the tutorial button to 'Sneak around' might get more clear since I want to hide this section until it is finished while being able to access it quickly myself. Something like this can be reworked to contain an Easteregg, be creative here ^^​
Keeping it short and simple: Same game as above, only look for #Profile_window
profile_text_choose_profile_position_x = 0.162
profile_text_choose_profile_position_y = 0.72
profile_text_choose_profile_size_x = 0.168
profile_text_choose_profile_size_y = 0.04
profile_text_choose_profile_text_size_x = 0.024
profile_text_choose_profile_text_size_y = 0.024
profile_text_choose_profile_text_flags = 0x10
profile_text_choose_profile_text_color = 0xFF000000

profile_text_multiplayer_position_x = 0.663
profile_text_multiplayer_position_y = 0.72
profile_text_multiplayer_size_x = 0.168
profile_text_multiplayer_size_y = 0.04
profile_text_multiplayer_text_size_x = 0.024
profile_text_multiplayer_text_size_y = 0.024
profile_text_multiplayer_text_flags = 0x10
profile_text_multiplayer_text_color = 0xFF000000

profile_profiles_combo_position_x = 0.14
profile_profiles_combo_position_y = 0.63
profile_profiles_combo_text_size_x = 0.02
profile_profiles_combo_text_size_y = 0.02

profile_exit_button_position_x = 0.708
profile_exit_button_position_y = 0.06
profile_exit_button_text_flags = 0x200
profile_exit_button_text_size_x = 0.04
profile_exit_button_text_size_y = 0.04
profile_exit_button_highlight_text_color = 0xFFFFDD00

profile_host_button_position_x = 0.55
profile_host_button_position_y = 0.42
profile_host_button_size_x = 0.4
profile_host_button_size_y = 0.04
profile_host_button_text_size_x = 0.04
profile_host_button_text_size_y = 0.04
profile_host_button_text_flags = 0x10
profile_host_button_highlight_text_color = 0xFFFFDD00

profile_join_button_position_x = 0.55
profile_join_button_position_y = 0.35
profile_join_button_size_x = 0.4
profile_join_button_size_y = 0.04
profile_join_button_text_size_x = 0.04
profile_join_button_text_size_y = 0.04
profile_join_button_text_flags = 0x10
profile_join_button_highlight_text_color = 0xFFFFDD00

profile_delete_button_position_x = 0.188
profile_delete_button_position_y = 0.07
profile_delete_button_text_size_x = 0.02
profile_delete_button_text_size_y = 0.02
profile_delete_button_highlight_text_color = 0xFFAA3300

profile_create_button_position_x = 0.12
profile_create_button_position_y = 0.58
profile_create_button_text_size_x = 0.02
profile_create_button_text_size_y = 0.02
profile_create_button_highlight_text_color = 0xFF227700

profile_edit_button_position_x = 0.257
profile_edit_button_position_y = 0.58
profile_edit_button_text_size_x = 0.02
profile_edit_button_text_size_y = 0.02
profile_edit_button_highlight_text_color = 0xFFAA3300

profile_character_image_position_x = 0.09
profile_character_image_position_y = 0.1
You have now additionally to the text fields some buttons to repositionate/resize but again, it's very intuitive. Take care, the character shadow is done by a snippet which is somehow not grouped together with the others and dwells at the bottom of the file (thanks to Borridian here):​
profile_character_shadow_position_x = 0.075
profile_character_shadow_position_y = 0.085
profile_character_shadow_size_x = 0.32
profile_character_shadow_size_y = 0.13
This one here affects the menu in which you can select the server which you want to join. Again, it's very simple to make edits here. It is however questionable if changes are a good thing here since this menu is one of the most well known to players at the multiplayer and shouldn't irritate them too much. Look out for #Multiplayer_client_window, all server_filter passages are also affecting this menu.​
This is the only part which still needs testing from my side. These variables should affect only the user interface while being in battle, at a few I am however not sure about the exact purpose. I will add some notes there when I have played around with them ^^​
game_ui_container_position_x = 0.81
game_ui_container_position_y = 0.008
game_ui_container_size_x = 0.19
game_ui_container_size_y = 0.1
game_ui_player_position_x = 0.014369
game_ui_player_position_y = 0.047
game_ui_player_size_x = 0.171068
game_ui_player_size_y = 0.05
game_ui_horse_position_x = 0.014369
game_ui_horse_position_y = 0
game_ui_horse_size_x = 0.171068
game_ui_horse_size_y = 0.05
game_ui_player_health_position_x = 0.051
game_ui_player_health_position_y = 0.0595
game_ui_player_health_size_x = 0.120
game_ui_player_health_size_y = 0.006
game_ui_horse_health_position_x = 0.053
game_ui_horse_health_position_y = 0.0125
game_ui_horse_health_size_x = 0.120
game_ui_horse_health_size_y = 0.006
game_ui_ammo_status_position_x = 0.135
game_ui_ammo_status_position_y = 0.11
game_ui_shield_status_position_x = 0.08
game_ui_shield_status_position_y = 0.105
game_ui_gold_position_x = 0.913
game_ui_gold_position_y = 0.660
game_ui_gold_text_size_x = 0.024
game_ui_gold_text_size_y = 0.024
game_ui_gold_text_color = 0xFFDDDD66
game_ui_gold_text_flags = 0
game_ui_gold_size_x = 0.08
game_ui_gold_size_y = 0.04
game_ui_ammo_position_x = 0.135
game_ui_ammo_position_y = 0.10
game_ui_ammo_text_size_x = 0.024
game_ui_ammo_text_size_y = 0.024
game_ui_ammo_size_x = 0.05
game_ui_ammo_size_y = 0.04
game_ui_ammo_text_flags = 0
game_ui_orders_container_position_x = 0.0
game_ui_orders_container_position_y = 0.4
game_ui_orders_container_size_x = 0.45
game_ui_orders_container_size_y = 0.2
tactical_game_ui_gold_mesh_position_x = 0.88
tactical_game_ui_gold_mesh_position_y = 0.652
tactical_game_ui_gold_mesh_size_x = 0.0375
tactical_game_ui_gold_mesh_size_y = 0.0285
tactical_game_ui_notification_position_x = 0.2
tactical_game_ui_notification_position_y = 0.6
tactical_game_ui_notification_size_x = 0.6
tactical_game_ui_notification_size_y = 0.5
tactical_game_ui_notification_text_size_x = 0.04
tactical_game_ui_notification_text_size_y = 0.04
tactical_game_ui_notification_text_flags = 0x00000010
tactical_game_ui_notification_text_color = 0xFFFFFFFF
tactical_game_ui_watching_position_x = 0.25
tactical_game_ui_watching_position_y = 0.02
tactical_game_ui_watching_size_x = 0.5
tactical_game_ui_watching_size_y = 0.5
tactical_game_ui_watching_text_size_x = 0.03
tactical_game_ui_watching_text_size_y = 0.03
tactical_game_ui_watching_text_flags = 0x00000010
tactical_game_ui_watching_text_color = 0xFFFFFFFF
Regarding some of the hardcoded singleplayer menues, you can watch out in game_variables for #Character_window_variables or #Inventory_window to give two examples. The basics are working the same way as explained above. I want to point to the OSP from Leonion who works/worked on a screen which replaces the hardcoded trade screen. If this sounds interesting for you, have a look at his trade screen replacer.​

Credit for this tutorial goes to the modders who wrote the other tutorials as well as to Borridian, Maroon, Swyter and William, and dstn|Sionfel|SupaNinjaMan for the updated module.ini in his new bare bone module system. I could work on another tutorial about module.ini stuff if some interest is given :fruity:

If someone finds an error or better informations at some point, leave a note. Same goes for spelling errors :razz:
 
Last edited:
I have a few variables that don't appear in native's 'game_variables.txt' file. They all refer to the color of the text shown in the inventory.
The variables 'inv_t_armor_base_text_color' and 'inv_t_total_cost_text_color' are the only ones in the file that refer to the color change of the inventory text. I only added 'name_variable_text_color', and apparently, they are contemplated in the hardcode of the game:

Code:
#Inventory_window

inv_t_gold1_position_x = 0.726
inv_t_gold1_position_y = 0.043
inv_t_gold1_size_x = 0.21
inv_t_gold1_size_y = 0.04
inv_t_gold1_text_size_x = 0.023
inv_t_gold1_text_size_y = 0.023
inv_t_gold1_text_flags = 0x10
# inv_t_gold1_text_color = 0xFFDDDDDD #new

inv_t_gold2_position_x = 0.065
inv_t_gold2_position_y = 0.043
inv_t_gold2_size_x = 0.21
inv_t_gold2_size_y = 0.04
inv_t_gold2_text_size_x = 0.023
inv_t_gold2_text_size_y = 0.023
inv_t_gold2_text_flags = 0x10
# inv_t_gold2_text_color = 0xFFDDDDDD #new

inv_t_name1_position_x = 0.748
inv_t_name1_position_y = 0.709
inv_t_name1_text_size_x = 0.017
inv_t_name1_text_size_y = 0.017
inv_t_name1_size_x = 0.18
inv_t_name1_size_y = 0.04
inv_t_name1_text_flags = 0x10
# inv_t_name1_text_color = 0xFFDDDDDD #new

inv_t_name2_position_x = 0.075
inv_t_name2_position_y = 0.709
inv_t_name2_text_size_x = 0.017
inv_t_name2_text_size_y = 0.017
inv_t_name2_size_x = 0.18
inv_t_name2_size_y = 0.04
inv_t_name2_text_flags = 0x10
# inv_t_name2_text_color = 0xFFDDDDDD #new


inv_t_armor_base2_position_x = 0.17
inv_t_armor_base2_position_y = 0.18
inv_t_armor_base2_size_x = 0.125
inv_t_armor_base2_size_y = 0.022
inv_t_armor_base2_text_size_x = 0.017
inv_t_armor_base2_text_size_y = 0.017
inv_t_armor_base2_text_flags = 0x10
# inv_t_armor_base2_text_color = 0xFFDDDDDD #new
Personally I think they forgot to add them  :party:
 
Khamukkamu said:
Great job making this! Thanks a lot
Thanks for working at the great mod TLD! The menues there are very inspiring to test stuff by ownself ^^
Dj_FRedy said:
I have a few variables that don't appear in native's 'game_variables.txt' file. They all refer to the color of the text shown in the inventory.
The variables 'inv_t_armor_base_text_color' and 'inv_t_total_cost_text_color' are the only ones in the file that refer to the color change of the inventory text. I only added 'name_variable_text_color', and apparently, they are contemplated in the hardcode of the game:

Code:
#Inventory_window

inv_t_gold1_position_x = 0.726
inv_t_gold1_position_y = 0.043
inv_t_gold1_size_x = 0.21
inv_t_gold1_size_y = 0.04
inv_t_gold1_text_size_x = 0.023
inv_t_gold1_text_size_y = 0.023
inv_t_gold1_text_flags = 0x10
# inv_t_gold1_text_color = 0xFFDDDDDD #new

inv_t_gold2_position_x = 0.065
inv_t_gold2_position_y = 0.043
inv_t_gold2_size_x = 0.21
inv_t_gold2_size_y = 0.04
inv_t_gold2_text_size_x = 0.023
inv_t_gold2_text_size_y = 0.023
inv_t_gold2_text_flags = 0x10
# inv_t_gold2_text_color = 0xFFDDDDDD #new

inv_t_name1_position_x = 0.748
inv_t_name1_position_y = 0.709
inv_t_name1_text_size_x = 0.017
inv_t_name1_text_size_y = 0.017
inv_t_name1_size_x = 0.18
inv_t_name1_size_y = 0.04
inv_t_name1_text_flags = 0x10
# inv_t_name1_text_color = 0xFFDDDDDD #new

inv_t_name2_position_x = 0.075
inv_t_name2_position_y = 0.709
inv_t_name2_text_size_x = 0.017
inv_t_name2_text_size_y = 0.017
inv_t_name2_size_x = 0.18
inv_t_name2_size_y = 0.04
inv_t_name2_text_flags = 0x10
# inv_t_name2_text_color = 0xFFDDDDDD #new


inv_t_armor_base2_position_x = 0.17
inv_t_armor_base2_position_y = 0.18
inv_t_armor_base2_size_x = 0.125
inv_t_armor_base2_size_y = 0.022
inv_t_armor_base2_text_size_x = 0.017
inv_t_armor_base2_text_size_y = 0.017
inv_t_armor_base2_text_flags = 0x10
# inv_t_armor_base2_text_color = 0xFFDDDDDD #new
Personally I think they forgot to add them  :party:
This is interesting too. I don't think that all lines are in every module folder, it might depend on the base, so if Native, WFAS, VC or NW has been chosen. Might be the same as with the module.ini which has everywhere some own lines.
 
I know I'm a little late to the party, but you can also change the background mesh in module_meshes.py by modifying

("main_menu_background", 0, "MESH_NAME_IN_BRF", 0, 0, 0, 0, 0, 0, 1, 1, 1),

Not as easy as changing a texture name, but maybe a little cleaner.
 
Adding mouse over effects to Main Menu Options


Since the addition of the presentation "game_start" we've been able add mesh overlays to the main menu and achieve very fun effects (like the disappearing discord QR code in the video), but by combining meshes Earendil's invisible options trick we can achieve way more interesting main menus and fun onHover effects. Here's an example:

Python:
("game_start", 0, 0,
    [(ti_on_presentation_load,[
 
    (presentation_set_duration, 999999),
    (set_fixed_point_multiplier, 1000),  
 
    (create_mesh_overlay, "$g_ui_start_custom_battle", "mesh_ui_menu_custom_battle"),
    (position_set_y, pos1, 125),
    (position_set_x, pos1, 850),
    (overlay_set_position, "$g_ui_start_custom_battle", pos1),
    (position_set_y, pos1, 150),
    (position_set_x, pos1, 150),
    (overlay_set_size, "$g_ui_start_custom_battle", pos1),
 
    (create_mesh_overlay, "$g_ui_start_start", "mesh_ui_menu_start"),
    (position_set_y, pos1, 125),
    (position_set_x, pos1, 375),
    (overlay_set_position, "$g_ui_start_start", pos1),
    (position_set_y, pos1, 150),
    (position_set_x, pos1, 150),
    (overlay_set_size, "$g_ui_start_start", pos1),
 
    (create_mesh_overlay, "$g_ui_start_config", "mesh_ui_menu_config"),
    (position_set_y, pos1, 125),
    (position_set_x, pos1, 610),
    (overlay_set_position, "$g_ui_start_config", pos1),
    (position_set_y, pos1, 150),
    (position_set_x, pos1, 150),
    (overlay_set_size, "$g_ui_start_config", pos1),
 
    (create_mesh_overlay, "$g_ui_start_exit", "mesh_ui_menu_exit"),
    (position_set_y, pos1, 25),
    (position_set_x, pos1, 500),
    (overlay_set_position, "$g_ui_start_exit", pos1),
    (position_set_y, pos1, 150),
    (position_set_x, pos1, 150),
    (overlay_set_size, "$g_ui_start_exit", pos1),
 
    (create_mesh_overlay, "$g_ui_start_load", "mesh_ui_menu_load"),
    (position_set_y, pos1, 125),
    (position_set_x, pos1, 130),
    (overlay_set_position, "$g_ui_start_load", pos1),
    (position_set_y, pos1, 150),
    (position_set_x, pos1, 150),
    (overlay_set_size, "$g_ui_start_load", pos1),
 
 
    ]),
    (ti_on_presentation_mouse_enter_leave,[
        (set_fixed_point_multiplier, 1000),
        (store_trigger_param_1, ":object"),
        (store_trigger_param_2, ":enter"),
        (try_begin),
            (this_or_next|eq, ":object", "$g_ui_start_custom_battle"),
            (this_or_next|eq, ":object", "$g_ui_start_start"),
            (this_or_next|eq, ":object", "$g_ui_start_config"),
            (this_or_next|eq, ":object", "$g_ui_start_exit"),
            (eq, ":object", "$g_ui_start_load"),
       
            (try_begin),
                (eq, ":enter", 1),
                (overlay_set_material, ":object", "@menu_options_u"), # Material with the unselected texture, White Text
            (else_try),
                (eq, ":enter", 0),
                (overlay_set_material, ":object", "@menu_options_s"), # Material with the selected texture, Black Text and Glow
            (try_end),
        (try_end),
    ])
]),


You can see that by placing a mesh over the location of the invisible option then changing the material using ti_on_presentation_mouse_enter_leave, you can do a lot more than just the color swaps featured in Native without losing the functionality of the menu option. You could do small caps, different fonts, glitched text, a button that lights up, pictures of your cats screaming, whatever you can think of.
 
Last edited:
"game_start"
Thanks for this mini-guide, it will be helpful for some people. Most people do not even know about it; I saw it first in The Deluge that it was possible to make custom menu, then CWE took it to another level (its OSP is good for learning how it works). From myself, I would like to add that Custom Battle presentation is a nice placeholder for any presentation of choice and it can be used as an extra thing, be it an infographic or a battle plugin. Also, more importantly, I must add that the location of custom menu item buttons must correspond to their size and location in game_variables.txt (they are in main_menu section). Cheers!
 
Back
Top Bottom