Stellaris

Stellaris

Mod Menu
 This topic has been pinned, so it's probably important
had  [developer] 23 Jul, 2017 @ 3:01pm
[Guide] Part 2: Make A Menu.
This topic is too broad to cover here, so I'll just explain how I made the menus for my mods. You can do a different implementation for your mod as you need (whatever is allowed by Stellaris).

Since this menu is just a regular event, all triggers and effects can be applied.

My menu from human fallen empires[github.com]

So what mean all what text?

First huge block is desc
You can just write text:

text = human_fallen_empires_menu.1.desc.0

You can display text, then some condition is met:
success_text = { text = human_fallen_empires_menu.1.desc.1.0 has_global_flag = human_fallen_empires_installed }
This text shown if mod installed (always if all works fine).

And you can display text, if condition not met:
fail_text = { text = human_fallen_empires_menu.1.desc.2.1 any_country = { has_country_flag = human_fallen_empires_egypt } }
This text shown if fallen empire from mod not exists (failed to spawn or die during the game).


Next huge block is options.

These options can preform a lot of functions: set flags, spawn ships/systems, modifiers, or simply give information in event descriptions about something in your mod.
You can read on wiki[www.stellariswiki.com]

So what my options does?
every_country = { limit = { has_country_flag = human_fallen_empires_marked_as_human species = { not = { is_same_species = event_target:human_fallen_empires_human_species } } } species = { set_species_identity = event_target:human_fallen_empires_human_species } }
This option will look for any country which is marked as a human empire by my mod (by using a country flag) but is not currently recognized as a "human species". If it finds such an empire, it will then add that empire to the list of human species, so this empire will not be identified as "alien" to other human empires.

After the option has preformed whatever task it is meant to do, this will return the player to the Mod Menu event:
country_event = { id = human_fallen_empires_menu.1 }

Next option just set hidden flag to player "i mod and i think he is human"
set_country_flag = human_fallen_empires_marked_as_human country_event = { id = human_fallen_empires_menu.1 }

Next two options disable mod's feature for people who don't like it:
First re enable pirates (allow to spawn)

remove_global_flag = human_fallen_empires_disable_pirate

Second set global flag (used for trigger in respawn events) and kill all pirate countries.

set_global_flag = human_fallen_empires_disable_pirate every_country = { limit = { is_country_type = human_fallen_empires_pirate } every_owned_planet = { change_pc = pc_asteroid } destroy_country = yes }

As homework you guys can look at menu for count stars, planets and other stuff.[github.com]
Last edited by had; 26 Jul, 2017 @ 9:23am
< >
Showing 1-4 of 4 comments
Piston 23 Jul, 2017 @ 10:08pm 
Is there a way I can like, favorite this so i can revisit it??
had  [developer] 24 Jul, 2017 @ 2:16am 
Favorit mod itself or in browser.
Crusader Vanguard 24 Jul, 2017 @ 2:46pm 
Originally posted by Launch Codes:
Is there a way I can like, favorite this so i can revisit it??

You could also save the url link to a notepad or something.
Belisarius 30 Jul, 2017 @ 6:48pm 
is there any way you can change the hot key from q
< >
Showing 1-4 of 4 comments
Per page: 1530 50