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

Autolykos

First Lieutenant
71 Badges
Oct 21, 2010
206
8
  • Arsenal of Democracy
  • Sword of the Stars
  • Magicka
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • A Game of Dwarves
  • Darkest Hour
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Victoria 2
  • War of the Roses
  • 500k Club
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Death or Dishonor
  • Mount & Blade: With Fire and Sword
  • Pillars of Eternity
  • Prison Architect
  • Europa Universalis IV: Common Sense
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Surviving Mars
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH: Season pass
  • Cities: Skylines - Parklife Pre-Order
  • Teleglitch: Die More Edition
  • BATTLETECH: Flashpoint
  • Surviving Mars: First Colony Edition
  • Europa Universalis III Complete
  • Hearts of Iron IV: Expansion Pass
  • BATTLETECH: Heavy Metal
  • Cities: Skylines - Campus
  • Europa Universalis III Complete
  • Surviving Mars: First Colony Edition
  • BATTLETECH - Digital Deluxe Edition
  • For the Motherland
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Semper Fi
Hi!
I'm currently working on a mod "five minutes in the future" revolving around the end of our oil resources and the mayhem ensuing from this.
Do you know of any elegant way to simulate resource depletion via events (or any other method)?
My problems so far are:
- "resource_mod" works only for ministers, not in events
- "add_prov_resource" is only local and only works on currently controlled provinces (tested this). This requires me to literally write thousands of events (one for every nation for every change to a province). I could write a script to build those events, but it still would be clunky, slow the game down, and allow the exploit of losing the province to rebels once the event rolls around (rebels can't have events, right?).
 
Random events maybe(but I'm not sure they can target a random province).
Thanks, I haven't thought of this - it might actually work. I could make a random event chain for each province and let them check if this province is currently controlled before firing (so the event itself can target a specific province that actually has oil). I'd rather have a little more control about when exactly the provinces run dry, but this is at least a good backup plan.
I thought of offmap production before, but I know of no easy way to check how much oil a country is currently producing to make sure it only hits the ones that are actually producing oil (and goes away if they lose the oil provinces).