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

MrRaoul

Private
71 Badges
Nov 29, 2012
19
3
  • Crusader Kings II: Charlemagne
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Pillars of Eternity
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cradle of Civilization
  • Cities: Skylines - Green Cities
  • Age of Wonders III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Federations
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Apocalypse
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
Hi,
I'm trying to add a scrollbar to the portraits screen on race creation,
I've allready donr it for cities and ships but they was configured differently.
So, the actual code is a gridBoxType and I need to include it i a containerWindowType but it ctd.
Here is the original code:
Code:
gridBoxType = {
            name = "portraits"
            position = { x = 175 y = 50 }
            size = { width = 845 height = 265 }
            background = {
                name = "background"
                spriteType = "GFX_tiles_frame"
            }
            slotSize = { width = 93 height = 130 }
            max_slots_horizontal = 9
            format = UPPER_LEFT
        }

Here is what I'm trying to do:
Code:
containerWindowType = {
    name = "grid_window"
    position = { x = 175 y = 50 }
    size = { width = 845 height = 265 }
    orientation = upper_left
    moveable = no
    verticalScrollBar = "right_vertical_slider"
    margin = { top = 2 bottom = 2 }

    background = {
        name = "background"
        spriteType = "GFX_tiles_frame"
    }
    gridBoxType = {
        name = "portraits"
        position = { x = 0 y = 0 }
        size = { width = 845 height = 265 }
        slotSize = { width = 93 height = 130 }
        max_slots_horizontal = 9
        format = UPPER_LEFT
    }
}

Any idea why it doesn't work?
I am somehow breaking the "portraits" grid by including it in a container,
if so where can I find the code for this?

PS: all this is done in customize_species_editors.gui
 
I think each "containerWindowType" needs a "smoothListboxType" in wich it will be created multiple times. It's more like the slots of a "gridBoxType".
I don't think we can switch between the two because
  1. How are the actual portraits linked to the "gridBoxType"?
  2. How are "containerWindowType" elements linked to their "smoothListboxType"?
 
Yeah,
I think you've got it, my code somehow broke the "portait" link, the only problem is that I've got no idea as to where those are linked.
As for containerWindowType not necessary as far as I can tell, the ships and cities interfaces are set like that, just missing the backgroung and slider.
 
I looked at it and the ships in ship_designer.gui have also a "smoothListBoxType"
Code:
        smoothListBoxType = {
            name = "list"
            position = { x = 12 y = 53 }
            size = { x = 840 y = 550 }
            scrollbartype = "standardlistbox_slider"
        }
 
Ah, sorry, I'm actually worjing on customize_species_editors.gui and was speaking of race creation UI, I'll join my modded file wich work fine if you want to take a look.
In ships and in cities sections you can see my modded code as above.
As far as I can tell there is no obvious "smoothListBoxType" in this file linked to the container.
 

Attachments

  • customize_species_editors.zip
    6,8 KB · Views: 2
I tested a bit and it looks like it crashes if you
  1. rename "portraits"
  2. change the type of "portraits" (even to smoothListboxType)
  3. mantle the "portraits" inside an additional container
You can without problems
  1. move "portraits" around in its current container (even change position with the "categories")
  2. move "species_portrait_entry" around in its current container (wich effectively means the whole file)
I searched the whole Stellaris folder for "species_portrait_category_entry" and only the entry here shows up. So it looks like there is a hardcoded link between container items and their parents, which includes the type of the parent (smoothListboxType or gridBoxType). I don't see a way for us to mod this.

Could one of the officials say something about this.

PS: There is a container element for each grid/list which defines their items. Usually they come directly after the window element, which includes their linked grid/list and in the same order as the grids/lists in that window.
 
Last edited:
Sadly it doesn't help because the grid there is already nested inside the expandedWindow which can have (there it already has) a scrollbar. In our case the grid hasn't such a parent and because of the way the hardcoded links work we can't add one without crashing the game.