• 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.

C4st1gator

Captain
48 Badges
Nov 16, 2014
328
183
  • Crusader Kings II: Charlemagne
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Magicka
  • Stellaris
  • Stellaris: Distant Stars
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Green Cities
  • Age of Wonders: Shadow Magic
  • Stellaris: Nemesis
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Crusader Kings II: Conclave
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Cities: Skylines
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Magicka 2
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
Greetings, fellow star travellers. A thing I found odd in Stellaris is, that we don't have an alternative means of zooming in or out.
This is inconvenient for those, who rely on a trackpad, so I thought of the typical solution Paradox employs in the other games: A set of two buttons set on the main user interface, through which you can trigger a zoom in/zoom out action.

That is pretty neat, but the explanation on the Wiki for interface modding is unclear in some aspects, particularly the magic words to refer to zoom-in and zoom-out events.

From what I understand I'd need to add two files to SteamLibrary/steamapps/common/Stellaris/interface/ or rather the mod folder, which replicates Stellaris's file structure and adds them where appropriate. These can be called zoom.gfx and zoom.gui.

The GUI file may look something like this:
Code:
buttonType = {
                name = "camera_zoom_out"
                quadTextureSprite = "GFX_topbar_date_minus"
                position = { x= 128 y = 1024  }
                clicksound = interface
                oversound = no_sound
            }

            buttonType = {
                name = "camera_zoom_in"
                quadTextureSprite = "GFX_topbar_date_plus"
                position = { x= 96 y = 1024 }
                clicksound = interface
                oversound = no_sound
            }

Since the GFX file is about sprites and visuals, I may even be able to get by with the GUI file at first. I can even add a shortcut in the GUI file for easy zooming using the keyboard.
As for GFX, I only want a ’+' or '-' on the button itself, which I already found in Stellaris/gfx/interface/buttons/ as GFX_topbar_date_plus.dds and GFX_topbar_date_minus.dds respectively. If I'm feeling particularly daring, I can maybe add a tooltip, that explains their purpose. That shouldn't be too hard. A localisation string placeholder can be filled with life over in the localization folder using YML.

Back on the button front, I still need to find a way to make a UI element do something. Specifically find the appropriate action.
I'm pointed towards Stellaris/common/button_effects folder for scriptable buttons of the effectButtonType, which is nice, but I'm positive, that the intended effect already exists and I only need a reference to a hardcoded action. This can be done using the buttonType as opposed to the effectButtonType, which would be preferable, since I don't have to mess with the common folder, altering the checksum.

The game files have been less than forthcoming, or I'm missing something obvious, so I'm asking the modding community.
How does a Stellaris developer make a button do its magic?
 
Greetings, fellow star travellers. A thing I found odd in Stellaris is, that we don't have an alternative means of zooming in or out.
This is inconvenient for those, who rely on a trackpad, so I thought of the typical solution Paradox employs in the other games: A set of two buttons set on the main user interface, through which you can trigger a zoom in/zoom out action.

That is pretty neat, but the explanation on the Wiki for interface modding is unclear in some aspects, particularly the magic words to refer to zoom-in and zoom-out events.

From what I understand I'd need to add two files to SteamLibrary/steamapps/common/Stellaris/interface/ or rather the mod folder, which replicates Stellaris's file structure and adds them where appropriate. These can be called zoom.gfx and zoom.gui.

The GUI file may look something like this:
Code:
buttonType = {
                name = "camera_zoom_out"
                quadTextureSprite = "GFX_topbar_date_minus"
                position = { x= 128 y = 1024  }
                clicksound = interface
                oversound = no_sound
            }

            buttonType = {
                name = "camera_zoom_in"
                quadTextureSprite = "GFX_topbar_date_plus"
                position = { x= 96 y = 1024 }
                clicksound = interface
                oversound = no_sound
            }

Since the GFX file is about sprites and visuals, I may even be able to get by with the GUI file at first. I can even add a shortcut in the GUI file for easy zooming using the keyboard.
As for GFX, I only want a ’+' or '-' on the button itself, which I already found in Stellaris/gfx/interface/buttons/ as GFX_topbar_date_plus.dds and GFX_topbar_date_minus.dds respectively. If I'm feeling particularly daring, I can maybe add a tooltip, that explains their purpose. That shouldn't be too hard. A localisation string placeholder can be filled with life over in the localization folder using YML.

Back on the button front, I still need to find a way to make a UI element do something. Specifically find the appropriate action.
I'm pointed towards Stellaris/common/button_effects folder for scriptable buttons of the effectButtonType, which is nice, but I'm positive, that the intended effect already exists and I only need a reference to a hardcoded action. This can be done using the buttonType as opposed to the effectButtonType, which would be preferable, since I don't have to mess with the common folder, altering the checksum.

The game files have been less than forthcoming, or I'm missing something obvious, so I'm asking the modding community.
How does a Stellaris developer make a button do its magic?
For eu4 ( another Paradox game) I know in game buttons are hard coded. I think you can add the button picture but it will not do anything. I suspect it is the same for other paradox games like stellaris. At the same time I think there is a mod on steam relating to a mod menu so maybe something is possible with the menu??? Hopefully someone else can give provide more information.