Variable via division? within same statement

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

Omelie

Corporal
35 Badges
May 17, 2016
35
5
  • Crusader Kings II
  • Pillars of Eternity
  • A Game of Dwarves
  • Sword of the Stars II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Necroids
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Prison Architect
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Stellaris: Megacorp
  • BATTLETECH: Flashpoint
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines
  • Warlock: Master of the Arcane
Is there a way I can assign icon_scale to a variable which I create in the same statement from the result of size divided by 25? I haven't seen any scripting doing the same thing that I can understand. Any help muchly appreciated in the effort to create more visually appealing galaxies.



Code:
# Basic 1

basic_init_01 = {
    class = "rl_standard_stars"
  
    usage = misc_system_init
    usage_odds = 20

    planet = {
        count = 1
        class = star
        orbit_distance = 0
        orbit_angle = 1
        size = { min = @star_size_min max = @star_size_max }
        has_ring = no
[INDENT]icon_scale = size/25[/INDENT]
    }
 

Attachments

  • 20160519202332_1.jpg
    20160519202332_1.jpg
    358,4 KB · Views: 2

Omelie

Corporal
35 Badges
May 17, 2016
35
5
  • Crusader Kings II
  • Pillars of Eternity
  • A Game of Dwarves
  • Sword of the Stars II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Necroids
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Prison Architect
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Stellaris: Megacorp
  • BATTLETECH: Flashpoint
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines
  • Warlock: Master of the Arcane
The below code seems to do something like what I want it to but the planets aren't spawning in these systems now. Can someone please explain how the MODIFER statement works? Does it have an initial value? Is there more code that it needs to 'close' a modifier statement and is that why the planets are not spawning in them now?



Code:
# Black Holes
special_init_01 = {
    class = "rl_standard_stars"
    name = "Test"
    usage = misc_system_init
    max_instances = 20
    usage_odds = 80

    planet = {
        count = 1
        class = star
        orbit_distance = 0
        orbit_angle = 1           
        modifier = {
            size = 100
            planet = {
                is_planet_class = pc_b_star
                }
            }
        modifier = {
            size = 75
            planet = {
                is_planet_class = pc_a_star
                }
            }
        modifier = {
            size = 45
            planet = {
                is_planet_class = pc_f_star
                }
            }
        modifier = {
            size = 37.5
            planet = {
                is_planet_class = pc_g_star
                }
            }
        modifier = {
            size = 30
            planet = {
                is_planet_class = pc_k_star
                }
            }       
        modifier = {
            size = 20
            planet = {
                is_planet_class = pc_m_star
                }
            }
        has_ring = no
        }
   
    change_orbit = { min = 10 max = 55 }
   
    planet = {
        count = { min = 2 max = 10 }
        orbit_distance = { min = 10 max = 45 }
        orbit_angle = { min = 90 max = 270 }
       
        change_orbit = @base_moon_distance
       
        moon = {
            count = { min = 0 max = 5 }
            orbit_angle = { min = 90 max = 270 }
            orbit_distance = { min = @moon_min_distance max = @moon_max_distance }
        }
    }
}
 

Omelie

Corporal
35 Badges
May 17, 2016
35
5
  • Crusader Kings II
  • Pillars of Eternity
  • A Game of Dwarves
  • Sword of the Stars II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Necroids
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Prison Architect
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Stellaris: Megacorp
  • BATTLETECH: Flashpoint
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines
  • Warlock: Master of the Arcane
Well, I figured out the star size issue... Can't believe I didn't see it. Also no 100% sure why they put sizes on any of the normal spawning it's only needed on special systems if you want particular sized planets! -_-

Issue now is I want to set the first planets spawn circle outside of the stars and I'm having issues with getting the right code... It'd help if someone could explain the modifier statement.

Code:
# Black Holes
special_init_01 = {
    class = "rl_standard_stars"
    name = "Test"
    usage = misc_system_init
    max_instances = 20
    usage_odds = 80
   
    planet = {
        class = star
        orbit_distance = 0
    }
   

        modifier = {
            orbit_distance = 110
            planet = {
                is_planet_class = pc_b_star
                }
            }