Stellaris

Stellaris

Plentiful Traditions 4.x
University of Wisdom is deleting itself on month end
As in title, the building is now deleting itself the month after construction.

Empire: Custom
Machine Intelligence
Driven Assimilator

The building code calls it be to deleted if ANY of these conditions are true:
is_regular_empire = no
has_modifier = [special colony] (Penal, Slave, Resort)

I've enlisted ChatGPT to vibe-code the problem away. It would appear after debugging the 'destroy_trigger' is getting fired each month as it makes no exceptions for Hives, Wilderness or Machine Empires.
You would expect that any 'player' empire would default to having the 'Regular Empire' flag but it appears this isn't the case. When tested, my empire only has the 'Machine Empire' flag and nothing else (Poss: Regular, Hive, Machine, Wilderness, Fallen)

If this is expected behaviour then leave as is and consider changing the 'Potential' so it doesn't show for invalid empires.

For now, I'm going to assume that you DO expect the building to work for all non-wilderness player empire types and adjust the destroy_trigger to make an exception for Machine and Hive Empires by the following change:

destroy_trigger = {
exists = owner
OR = {
has_modifier = resort_colony
has_modifier = slave_colony
has_modifier = penal_colony
AND = {
owner = { is_regular_empire = no }
NOT = { owner = { is_machine_empire = yes } }
NOT = { owner = { is_hive_empire = yes } }
}
}
}