Stellaris - [v3.3.4 (67b9)] AI bio-reactors self-destruct because they create a food expense

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

SirBlackAxe

General
16 Badges
Aug 13, 2021
1.763
4.139
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
Description
[v3.3.4 (67b9)] AI bio-reactors self-destruct because they create a food expense

Game Version
Libra v3.3.4 (67b9)

What version do you use?
Steam

What expansions do you have installed?
Synthetic Dawn, Utopia, Leviathans Story Pack, Apocalypse, Megacorp, Distant Stars, Ancient Relics, Lithoids, Federations, Nemesis, Aquatics

Do you have mods enabled?
No

Please explain your issue is in as much detail as possible.
When an AI empire gets a bio-reactor, at the beginning of the next month the building's own upkeep gives them a food resource expense. This causes the country_uses_food scripted trigger to return true, which causes the bio-reactor's potential block to return false, which causes the bio-reactor to be destroyed.

from buidings/03_resource_buildings.txt:
Code:
building_bio_reactor = {
	base_buildtime = 240

	category = resource

	potential = {
		exists = owner
		owner = {
			OR = {
				is_machine_empire = yes
				is_mechanical_empire = yes
				is_lithoid_empire = yes
			}
			OR = {
				owner = { is_ai = no }
				owner = { country_uses_food = no }
			}
		}
	}

from scripted_triggers/00_scripted_triggers_buildings_ai.txt:
Code:
country_uses_food = {
	resource_expenses_compare = {
		resource = food
		value > 0
	}
}

Steps to reproduce the issue.
Noticed logic issue while browsing code. Haven't caught it happening in-game though.

Upload Attachment
File(s) attached
 

Attachments

  • 03_resource_buildings.txt
    22,6 KB · Views: 0