Imperator Development Diary - 15th of April

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Nicolas-

Nc-Rm
32 Badges
Oct 24, 2015
746
1.677
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Nemesis
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Necroids
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Rome: Vae Victis
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV
  • Stellaris: Synthetic Dawn
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Rome Gold
@blackninja9939

I have seen bits of the new GUI editor in the stream today, which looks very promising.

But I'm wondering, can Scripted GUI be referenced in that in-game GUI editor? Also what are the possible scopes for Scripted GUI? In HOI4 it's selected country and selected state.

I see in your example that there is a character scope. Are there other scopes for Scripted GUIs?
 

blackninja9939

Experienced Programmer - Crusader Kings 3
Paradox Staff
78 Badges
Aug 28, 2013
2.401
7.847
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
@blackninja9939

I have seen bits of the new GUI editor in the stream today, which looks very promising.

But I'm wondering, can Scripted GUI be referenced in that in-game GUI editor? Also what are the possible scopes for Scripted GUI? In HOI4 it's selected country and selected state.

I see in your example that there is a character scope. Are there other scopes for Scripted GUIs?
Don't think they are referenceable in the gui editor, good thing for me to look into.

Any scope can be used in the gui editor, as long as you can get it out of wherever you are in the data system when you add the button or there is a global promote to get what you need.
 

Iratur

Recruit
34 Badges
Apr 30, 2019
1
0
  • Stellaris: Megacorp
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • Prison Architect
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
Is there a way to trigger an event on a specific date? Or some workaround to make it trigger close to that date?

EDIT:
I did find a way to do this but it doesn't strike me as a very solid way of doing things. I registered my event in the monthly_country_pulse together with a delay to make it appear at the correct day of the month. Furthermore, the event itself has a current_date check and fire_only_once set to yes. That seems to work for me so far but I still assume there is a better way?
 
Last edited:

GOOD_ORLOV

Recruit
May 2, 2019
2
0
How to create a window like macro_builder ?
I'm exhausted.

I do not want to cut buttons with different effects.
I want to create the whole window with a bunch of buttons (like a macro_builder ), with scrolls and check boxes, but I was able to create all the gui codes.
That's just there is no scroll and check boxes, there are a lot of blocks BUTTON

button = {
position = { 6 105 } #57
texture = "gfx/interface/buttons/cheat_dds/button_macro_builder_cheat.dds"
onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
tooltip = "MACRO_CHEAT"
gfxtype = buttongfx
}

window = {
gfxtype = windowgfx
name = "cheat_menu"
parentanchor = top|left
size = { 472 608 }
position = { -5 130 }
widgetanchor = top|left
#using = editor_window
movable = no

widget = {
#position = { 100 0 }
#name = "background"
#size = { 100% 100% }

name = "background"
using = small_window_type
size = { 100% 100% }
alwaystransparent = yes
}

icon = {
texture = "gfx/interface/tiles/small_window_title_header_corners.dds"
spriteType = Corneredtiled
size = { 100% 51 }
spriteborder = { 16 0 }
shaderfile = "gfx/FX/pdxgui_default.shader"
}

icon = {
position = { 10 7 }
texture = "[MacroBuilderView.GetActivePage.GetIconTexture]"
size = { 36 36 }
}

icon = {
texture = "gfx/interface/tiles/marble_divider_vertical.dds"
parentanchor = top|right
spriteType = Corneredtiled
position = { -62 47 }
size = { 9 553 }
spriteborder = { 19 16 }
}

textbox = {
size = { 380 26 }
position = { 52 10 }
using = MarbleButtonFontL
text = "МЕНЮ"
}

square_close_button = {
name = "close_button"
position = { -4 4 }
parentanchor = top|right
shortcut = "close_window"
onclick = "[ExecuteConsoleCommand('GUI.ClearWidgets')]"
tooltip = "CLOSE"
}

dynamicgridbox = {
name = "tab_buttons"
parentanchor = top|right
position = { -14 52 }

datamodel = "[MacroBuilderView.GetPages]"

item = {
widget = {
parentanchor = top|right
size = { 48 48 }

sort_button = {
tooltip = "[MacroBuilderPage.GetTooltip]"
size = { 48 50 }
onclick = "[MacroBuilderPage.OnActivate]"
down = "[MacroBuilderPage.IsActive]"

icon = {
position = { 5 4 }
size = { 40 40 }
texture = "[MacroBuilderPage.GetIconTexture]"
}
}
}
}
}

#button_standard_white_marble_s

button = {
position = { 409 55 }

using = MarbleButtonFontS
texture = "gfx/interface/buttons/button_macro_builder.dds"


tooltip = "1"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu')]"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
forcedown = "[ExecuteConsoleCommand('GUI.ClearWidgets')]"

gfxtype = buttongfx
}

button = {
position = { 409 105 }

using = MarbleButtonFontS
texture = "gfx/interface/buttons/button_macro_builder.dds"

#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
#enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu_2')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}

button = {
position = { 409 155 }

using = MarbleButtonFontS
texture = "gfx\interface\buttons\cheat_dds\assimilate_pops_cheat.dds"

#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
#enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu_3')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}











button_standard_white_marble_s = {
position = { 15 550 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[ToolDialogButton.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 500 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[CharacterItem.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 450 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[BattleResultMessageParticipant.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 400 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[SelectProvinceItem.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 350 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[PreferredUnitItem.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 300 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[SetupEntry.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 250 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[OutlinerItem.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 200 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[WarsOverviewWar.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 150 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[PopupMenuItem.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 100 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[DiploIcon.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}

button_standard_white_marble_s = {
position = { 15 50 }
size = { 380 38 } #234 38
using = MarbleButtonFontS
text = "Кнопка 1"
tooltip = "1"
onclick = "[EconomicPolicyGlue.OnClick]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
}



}















window = {
gfxtype = windowgfx
name = "cheat_menu_2"
parentanchor = top|left
size = { 472 608 }
position = { -5 130 }
widgetanchor = top|left
#using = editor_window
movable = no

widget = {
#position = { 100 0 }
#name = "background"
#size = { 100% 100% }

name = "background"
using = small_window_type
size = { 100% 100% }
alwaystransparent = yes
}

icon = {
texture = "gfx/interface/tiles/small_window_title_header_corners.dds"
spriteType = Corneredtiled
size = { 100% 51 }
spriteborder = { 16 0 }
shaderfile = "gfx/FX/pdxgui_default.shader"
}

icon = {
position = { 10 7 }
texture = "[MacroBuilderView.GetActivePage.GetIconTexture]"
size = { 36 36 }
}

icon = {
texture = "gfx/interface/tiles/marble_divider_vertical.dds"
parentanchor = top|right
spriteType = Corneredtiled
position = { -62 47 }
size = { 9 553 }
spriteborder = { 19 16 }
}

textbox = {
size = { 380 26 }
position = { 52 10 }
using = MarbleButtonFontL
text = "МЕНЮ_2"
}

square_close_button = {
name = "close_button"
position = { -4 4 }
parentanchor = top|right
shortcut = "close_window"
onclick = "[ExecuteConsoleCommand('GUI.ClearWidgets')]"
tooltip = "CLOSE"
}


button = {
position = { 409 55 }

using = MarbleButtonFontS
texture = "gfx/interface/buttons/button_macro_builder.dds"
#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}

button = {
position = { 409 105 }

using = MarbleButtonFontS
texture = "gfx/interface/buttons/button_macro_builder.dds"

#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
#enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu_2')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}

button = {
position = { 409 155 }

using = MarbleButtonFontS
texture = "gfx\interface\buttons\cheat_dds\assimilate_pops_cheat.dds"

#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
#enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu_3')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}


button_standard_white_marble_s = {
position = { 40 150 }
size = { 234 38 }
using = MarbleButtonFontS
text = "[MacroBuilderProvinceBuildable.GetName]"
tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"
onclick = "[MacroBuilderProvinceBuildable.OnClick]"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"

}

}











window = {
gfxtype = windowgfx
name = "cheat_menu_3"
parentanchor = top|left
size = { 472 608 }
position = { -5 130 }
widgetanchor = top|left
#using = editor_window
movable = no

widget = {
#position = { 100 0 }
#name = "background"
#size = { 100% 100% }

name = "background"
using = small_window_type
size = { 100% 100% }
alwaystransparent = yes
}

icon = {
texture = "gfx/interface/tiles/small_window_title_header_corners.dds"
spriteType = Corneredtiled
size = { 100% 51 }
spriteborder = { 16 0 }
shaderfile = "gfx/FX/pdxgui_default.shader"
}

icon = {
position = { 10 7 }
texture = "[MacroBuilderView.GetActivePage.GetIconTexture]"
size = { 36 36 }
}

icon = {
texture = "gfx/interface/tiles/marble_divider_vertical.dds"
parentanchor = top|right
spriteType = Corneredtiled
position = { -62 47 }
size = { 9 553 }
spriteborder = { 19 16 }
}

textbox = {
size = { 380 26 }
position = { 52 10 }
using = MarbleButtonFontL
text = "МЕНЮ_3"
}

square_close_button = {
name = "close_button"
position = { -4 4 }
parentanchor = top|right
shortcut = "close_window"
onclick = "[ExecuteConsoleCommand('GUI.ClearWidgets')]"
tooltip = "CLOSE"
}


button = {
position = { 409 55 }

using = MarbleButtonFontS
texture = "gfx/interface/buttons/button_macro_builder.dds"
#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}

button = {
position = { 409 105 }

using = MarbleButtonFontS
texture = "gfx/interface/buttons/button_macro_builder.dds"

#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
#enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu_2')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}

button = {
position = { 409 155 }

using = MarbleButtonFontS
texture = "gfx\interface\buttons\cheat_dds\assimilate_pops_cheat.dds"

#tooltip = "[MacroBuilderProvinceBuildable.GetTooltip]"
#enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"

onclick = "[ExecuteConsoleCommand('gui.createwidget gui/cheat_menu.gui cheat_menu_3')]"

clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"

#visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
gfxtype = buttongfx
}





button_standard_white_marble_s = {
position = { 40 180 }
size = { 234 38 }
using = MarbleButtonFontS
text = "[MacroBuilderProvinceBuildable.GetName]"
enabled = "[MacroBuilderProvinceBuildable.IsEnabled]"
onclick = "[MacroBuilderProvinceBuildable.OnClick]"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_sub_tab"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_mouse_over"
visible = "[Not(MacroBuilderProvinceBuildable.IsSelected)]"
tooltip = "Подсказка"
}
}