Add "DistressFlatReduction" column to VP CityEventChoices table?

TheOneHitPupper

Chieftain
Joined
Jun 15, 2017
Messages
98
Hello, I'm trying to make a mod incorporating more Events into the Vox Populi mod, specifically using the Unhappiness system to make events more realistic.

An example is a bank robbery CityEvent that when the CityEventChoices is picked, the city produces -1 Unhappiness from Distress. I see that the CityEventChoices table does not have a column for DistressFlatReduction like the Buildings, Policies, and Projects tables do. I've added
ALTER TABLE CityEventChoices ADD COLUMN 'DistressFlatReduction' INTEGER DEFAULT 0;
which produces no errors, but does not seem to actually add the column when I view the table in SQLite.

Is there an easy way to alter the CityEventChoices table to incorporate that column as it already exists elsewhere in the VP framework? Or do I have to write code in LUA to get it to work?

Moderator Action: Moved to VP subforum. - Recursive
 
Last edited by a moderator:
Hello, I'm trying to make a mod incorporating more Events into the Vox Populi mod, specifically using the Unhappiness system to make events more realistic.

An example is a bank robbery CityEvent that when the CityEventChoices is picked, the city produces -1 Unhappiness from Distress. I see that the CityEventChoices table does not have a column for DistressFlatReduction like the Buildings, Policies, and Projects tables do. I've added

which produces no errors, but does not seem to actually add the column when I view the table in SQLite.

Is there an easy way to alter the CityEventChoices table to incorporate that column as it already exists elsewhere in the VP framework? Or do I have to write code in LUA to get it to work?
Wow, an event modder! Never seen one of you guys before. Would prefer if you posted it within the subforum, but

since the DLL does not support DistressFlatReduction column changes (at the moment), you would have to go with granting a dummy building that reduces Distress flatly by 1 unfortunately. :(
 
Last edited:
@Recursive Can you move this thread to the CP subforum, please? I think it's more proper to put it there.
Hello, I'm trying to make a mod incorporating more Events into the Vox Populi mod, specifically using the Unhappiness system to make events more realistic.

An example is a bank robbery CityEvent that when the CityEventChoices is picked, the city produces -1 Unhappiness from Distress. I see that the CityEventChoices table does not have a column for DistressFlatReduction like the Buildings, Policies, and Projects tables do. I've added

which produces no errors, but does not seem to actually add the column when I view the table in SQLite.

Is there an easy way to alter the CityEventChoices table to incorporate that column as it already exists elsewhere in the VP framework? Or do I have to write code in LUA to get it to work?
There is no flat unhappiness reduction from CityEventChoices, only a median reduction.
If you want to do this, I probably suggest making an event choice that gives a building instead so the building is the one which reduces the flat unhappiness.
 
Top Bottom