TUXDB - LINUX GAMING AGGREGATE
by NuSuey
NEWSFEED
▪️ GAMES
▪️ STEAM DECK ▪️ DEALS ▪️ CROWDFUNDING ▪️ COMMUNITY
tuxdb.com logo
Support tuxDB on Patreon
Currently supported by 8 awesome people!

🌟 Special thanks to our amazing supporters:


✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Arch Toasty][Benedikt][David Martínez Martí]


Stellaris Dev Diary #182 : The Perils of Scripting and How to Avoid Them

"Hi everyone! I am Caligula, one of Stellaris Content Designers, which means that I do a variety of tasks based around narrative writing and scripting - scripting being our term for doing things that is somewhat similar to programming, but without changing the source code. In other words, I do what modders do (though I have the significant advantage of also being able to peek into the source code and change it around when needed). Every Content Designer has their niche, and mine is that when a particularly complicated system needs to be scripted in (or, more frequently, is giving some sort of trouble - the War in Heaven still gives me nightmares...), I step into the breach. Now, we have a lot of exciting stuff to show off in the weeks and months to come, but for today, inspired by some questions that were asked after the last dev diary, Im going to be writing about the technical side of scripting for modders and aspiring modders, specifically with an eye on what can cause performance problems and how to avoid making bad scripts. The Stellaris scripting language is a very powerful tool, and a lot can be done with it, but first of all, a note of caution: just because something is possible, does not mean it should be done. I cant really stress this enough, because (and I speak from experience here) this attitude will almost certainly end up causing both performance issues and unreadable scripts that you will not be able to disentangle six months later when you realise some part of it is broken. Though it should be borne in mind that doing something in code is, by definition, faster: in code, you can check a single function and be done with it, but if you want it to be accessible through script, theres a fair few necessary functions it has to go through before you get to checking your function (turning the line of script into a code command, checking whether its used in the right scope, etc etc) - hence why some things are hardcoded, and also why hacky solutions to problems can end up being quite bad. So, the first question to consider is, should I really be doing this? But who am I kidding, Im speaking to modders here, so of course you will do it :D So without further ado...

What causes performance issues?


Every time you run a check or execute an effect, this will take a very tiny amount of your computers processing power. With a few exceptions that should be used sparingly (Ill get to those later), this is totally fine and is needed to do anything at all. It is when the check is repeated often, over lots of objects, that problems happen. In practice, this usually means pops are the cause, though running something across all planets in the galaxy is also a pretty bad idea. As a first step, when possible, it is a good idea to control when your script is run. The best way to do this is by setting where events are fired and using on_actions (or firing events from decisions and the like) wherever possible, instead of mean time to happen or, even worse, just setting an event to try and fire every day. If a degree of randomness is needed, one could also fire a hidden event via, say, a yearly pulse and then firing the actual event you want with a random delay (for an example, check out event action.220). " If you wanna read the full post, have a read here!


[ 2020-09-03 09:39:36 CET ] [ Original post ]



Stellaris
Paradox Development Studio
  • Developer

  • Paradox Interactive
  • Publisher

  • 2016-05-09
  • Release

  • Strategy Simulation Singleplayer Multiplayer
  • Tags

  • GameBillet

     8.91 /

     

     
    Game News Posts 537  
    🎹🖱️Keyboard + Mouse
  • Controls

  • Very Positive

    (119848 reviews)


  • Review Score

  • https://www.stellaris.com/
  • Website

  • https://store.steampowered.com/app/281990 
  • Steam Store

  • The Game includes VR Support



    Linux [153.28 M]

  • Public Linux depots

  • Stellaris: Infinite Frontiers eBook
    Stellaris: Plantoids Species Pack
    Stellaris: Leviathans Story Pack
    Stellaris: Utopia
    Stellaris: Nova Edition Upgrade Pack
    Stellaris: Galaxy Edition Upgrade Pack
    Stellaris: Anniversary Portraits
    Stellaris: Synthetic Dawn
    Stellaris: Apocalypse
    Stellaris: Humanoids Species Pack
    Stellaris: Distant Stars Story Pack
    Stellaris: MegaCorp
    Stellaris: Ancient Relics Story Pack
    Stellaris: Lithoids Species Pack
    Stellaris: Federations
    Stellaris: Necroids Species Pack
    Stellaris: Nemesis
    Stellaris: Aquatics Species Pack
    Stellaris: Overlord
    Stellaris: Toxoids Species Pack
    Stellaris: First Contact Story Pack
    Stellaris: Galactic Paragons
    Stellaris: Astral Planes
    Stellaris: Expansion Subscription
    Stellaris: The Machine Age
    Stellaris: Cosmic Storms
    Stellaris: Grand Archive
    Stellaris: Rick the Cube Species Portrait
    Stellaris: Season 08 - Expansion Pass
  • Available DLCs

  • Explore a vast galaxy full of wonder! Paradox Development Studio, makers of the Crusader Kings and Europa Universalis series presents Stellaris, an evolution of the grand strategy genre with space exploration at its core.

    Featuring deep strategic gameplay, a rich and enormously diverse selection of alien races and emergent storytelling, Stellaris has engaging challenging gameplay that rewards interstellar exploration as you traverse, discover, interact and learn more about the multitude of species you will encounter during your travels.

    Etch your name across the cosmos by forging a galactic empire; colonizing remote planets and integrating alien civilizations. Will you expand through war alone or walk the path of diplomacy to achieve your goals?

    Main Feature
    • Deep & Varied Exploration.
    • Enormous procedural galaxies, containing thousands of planets.
    • Explore Anomalies with your heroic Scientist leaders.
    • Infinitely varied races through customization and procedural generation.
    • Advanced Diplomacy system worthy of a Grand Strategy Game.
    • Ship Designer based on a vast array of technologies.
    • Stunning space visuals.
    MINIMAL SETUP
    • OS: Ubuntu 20.04 x64
    • Processor: Intel iCore i3-530 or AMD FX-6350Memory: 4 GB RAM
    • Memory: 4 GB RAM
    • Graphics: Nvidia GeForce GTX 460 or AMD ATI Radeon HD 5870 (1GB VRAM). or AMD Radeon RX Vega 11 or Intel HD Graphics 4600Network: Broadband Internet connection
    • Storage: 12 GB available space
    RECOMMENDED SETUP
    • OS: Ubuntu 20.04 x64
    • Processor: Intel iCore i5-3570K or AMD Ryzen 5 2400GMemory: 4 GB RAM
    • Memory: 4 GB RAM
    • Graphics: Nvidia GeForce GTX 560 Ti (1GB VRAM) or AMD Radeon R7 370 (2 GB VRAM)Network: Broadband Internet connection
    • Storage: 12 GB available space
    GAMEBILLET

    [ 5951 ]

    14.99$ (32%)
    16.99$ (15%)
    18.39$ (8%)
    6.66$ (78%)
    8.25$ (17%)
    5.72$ (62%)
    9.77$ (51%)
    9.19$ (8%)
    16.79$ (16%)
    2.31$ (85%)
    4.22$ (15%)
    1.63$ (18%)
    12.59$ (16%)
    7.00$ (65%)
    4.19$ (16%)
    7.50$ (70%)
    7.62$ (15%)
    10.17$ (15%)
    4.12$ (17%)
    20.00$ (50%)
    42.34$ (15%)
    13.59$ (15%)
    24.78$ (17%)
    1.77$ (91%)
    4.79$ (78%)
    24.59$ (18%)
    0.89$ (70%)
    8.39$ (16%)
    16.57$ (17%)
    4.44$ (56%)
    GAMERSGATE

    [ 3154 ]

    0.53$ (92%)
    3.75$ (81%)
    2.63$ (62%)
    3.38$ (77%)
    9.4$ (53%)
    1.84$ (74%)
    0.75$ (92%)
    2.55$ (87%)
    4.12$ (59%)
    2.55$ (83%)
    0.75$ (92%)
    0.85$ (83%)
    0.68$ (86%)
    0.53$ (92%)
    0.38$ (92%)
    1.31$ (81%)
    5.25$ (74%)
    1.14$ (91%)
    5.2$ (71%)
    1.84$ (74%)
    4.5$ (77%)
    9.99$ (50%)
    1.31$ (81%)
    2.25$ (85%)
    1.13$ (77%)
    7.5$ (85%)
    0.23$ (92%)
    14.99$ (50%)
    0.64$ (87%)
    1.13$ (92%)

    FANATICAL BUNDLES

    Time left:

    2 days, 8 hours, 18 minutes


    Time left:

    25 days, 8 hours, 18 minutes


    Time left:

    7 days, 8 hours, 18 minutes


    Time left:

    38 days, 8 hours, 18 minutes


    Time left:

    44 days, 8 hours, 18 minutes


    HUMBLE BUNDLES

    Time left:

    5 days, 2 hours, 18 minutes


    Time left:

    5 days, 2 hours, 18 minutes


    Time left:

    14 days, 2 hours, 18 minutes


    Time left:

    21 days, 2 hours, 18 minutes

    by buying games/dlcs from affiliate links you are supporting tuxDB
    🔴 LIVE