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

HildoY

Corporal
37 Badges
Apr 30, 2021
49
27
  • Cities: Skylines Industries
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Mass Transit
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Cities: Skylines - Snowfall
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Magicka 2
  • Cities: Skylines - After Dark
  • Europa Universalis IV
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris - Path to Destruction bundle
In my mod, there's a test event that gives 100+ techs. When I use the event from command, it freezes the game for 10 seconds. I counted all on_tech_increased tech in my mod and there are around 50 techs triggering the events. Is there any fast way to refactor the on_tech_increased event list? Or another algorithem?
The origin approach was just ignore the performance and put all things in the on_tech_increased trigger.
I also tried to add a controller event to catch all the 50ish techs and used if-else statement to call the exact events. This approach looks ugly though and idk the correct way to use switch trigger.