Repository navigation
Mod Banners
CMF can display your mod as a banner on the pre-game lobby screen (shown for both singleplayer and multiplayer), with your mod's icon, name, and description.
Append a leaf on_action under the shared cmf_on_banner_registration hook that calls cmf_register_lobby_banner with your mod id:
# in_game/common/on_action/your_on_actions.txt
cmf_on_banner_registration = {
on_actions = {
your_mod_register_lobby_banner
}
}
your_mod_register_lobby_banner = {
effect = {
cmf_register_lobby_banner = { mod_id = your_mod }
}
}
cmf_register_lobby_banner also registers your mod for Mod Detection.
The icon and background are game concept textures keyed <mod_id>_banner_logo and <mod_id>_banner_background. Define them in in_game/common/game_concepts/:
# in_game/common/game_concepts/your_mod_banner.txt
your_mod_banner_logo = {
texture = "mods/your_mod_banner_logo"
shown_in_encyclopedia = no
}
your_mod_banner_background = {
texture = "mods/your_mod_banner_background"
shown_in_encyclopedia = no
}
shown_in_encyclopedia = no keeps the texture-only concept out of the Europedia's Game Concepts page, since it has no real name or description to show there.
The banner title and description come from <mod_id>_name and <mod_id>_desc. Each game concept texture also needs an empty concept localization key so the game's concept validator does not warn about them:
l_english:
your_mod_name: "Your Mod"
your_mod_desc: "What your mod does."
game_concept_your_mod_banner_logo: ""
game_concept_your_mod_banner_logo_desc: ""
game_concept_your_mod_banner_background: ""
game_concept_your_mod_banner_background_desc: ""