Crusader Kings III

Crusader Kings III

Divine Intervention Cheat Menu
Lost Nomad 27 Nov, 2024 @ 4:40am
Code queries
Wouldn't it have been better to use every_player in on_game_start_after_lobby instead of the much heavier every_living_character limited to non AI?


Also are you sure this is right?
DI_open_cheat_menu = { interface_priority = 300 category = interaction_category_cheat_menu desc = DI_cheat_menu_desc common_interaction = yes auto_accept = yes use_diplomatic_range = no ignores_pending_interaction_block = yes is_shown = { scope:actor = { is_ai = no NOT = { any_owned_story = { story_type = DI_misc_variables_story has_variable = DI_cheat_menu } } } } on_send = { scope:actor = { random_owned_story = { limit = { story_type = DI_misc_variables_story } set_variable = DI_cheat_menu } } } }
You gate is_shown with the player not having the story then use the story they don't have in on_send?
< >
Showing 1-2 of 2 comments
Lithane  [developer] 5 May @ 8:09am 
Originally posted by Lost Nomad:
Wouldn't it have been better to use every_player in on_game_start_after_lobby instead of the much heavier every_living_character limited to non AI?


Also are you sure this is right?
You gate is_shown with the player not having the story then use the story they don't have in on_send?

Sorry, I missed that you made this.
For your first question, my understanding is that there should not be a significant difference between the two methods.

For your second question, you are misunderstanding what is happening. I'm not checking if the story exists, I'm checking if the variable is true. The check of the story_type is more of a filter to only check that story_type, which will always exists on the player character.
Last edited by Lithane; 5 May @ 8:12am
Oh I see what you're saying.

So the story will always exist for the player but the story won't always have the variable DI_cheat_menu, yeah I misunderstood that.
< >
Showing 1-2 of 2 comments
Per page: 1530 50