[SOLVED] Unique Projects

Neox969

Chieftain
Joined
May 7, 2021
Messages
19
Location
France
Hello everyone!

I am trying to create custom projects for two of my civs and I came unto a little pickle. The first project I am trying to make is linked to an unique building and appears in the list, but upon completion, I don't see any of the modifiers being applied.

At first, I wanted to make it sacrifice population, but I guess you can't use negative values with the "MODIFIER_PLAYER_CITIES_ADD_POPULATION" modifier so I got rid of it.

For the biggest problem for this project, I tried modifying the population yield in production but it doesn't seem to appear upon completion.

The second problem I have is that the project that is supposed to be only for one of my leader doesn't appear after building the required district.
I'm attaching the leader and unique project files, so if anyone can guess were I messed up, I'd appreciate it.

Thank you very much for your attention
 

Attachments

  • codesnip.zip
    3.3 KB · Views: 29
  • codesnip.zip
    3.3 KB · Views: 29
Last edited:
So no idea why, but the projects now properly appears.
Wouldn't be able to say how I fixed it, but here is the code for the projects:
Code:
-------------------------------
-- Types
-------------------------------

INSERT INTO    Types
        (Type,                                            Kind            )
VALUES    ('PROJECT_KFP_NEW_PRODUCT',                        'KIND_PROJECT'    ),
        
        ('PROJECT_TIME_TRAVELLING',                        'KIND_PROJECT'    );


-------------------------------
-- Projects
-------------------------------

INSERT INTO Projects
        (ProjectType,
        Name,                   
        ShortName,
        Description,
        Cost,
        CostProgressionModel,
        CostProgressionParam1,
        PrereqDistrict,
        RequiredBuilding,
        UnlocksFromEffect)
VALUES    ('PROJECT_KFP_NEW_PRODUCT',
        'LOC_PROJECT_KFP_NEW_PRODUCT_NAME',
        'LOC_PROJECT_KFP_NEW_PRODUCT_SHORT_NAME',
        'LOC_PROJECT_KFP_NEW_PRODUCT_DESCRIPTION',
        80,
        'COST_PROGRESSION_GAME_PROGRESS',
        1500,
        NULL,
        'BUILDING_KFP',
        1),

        ('PROJECT_TIME_TRAVELLING',
        'LOC_PROJECT_TIME_TRAVELLING_NAME',
        'LOC_PROJECT_TIME_TRAVELLING_SHORT_NAME',
        'LOC_PROJECT_TIME_TRAVELLING_DESCRIPTION',
        150,
        'COST_PROGRESSION_GAME_PROGRESS',
        1500,
        'DISTRICT_CAMPUS',
        NULL,
        1);

--------------------------------
-- ProjectCompletionModifier
--------------------------------

INSERT INTO ProjectCompletionModifiers
        (ProjectType,                    ModifierId)
VALUES    ('PROJECT_KFP_NEW_PRODUCT',        'PROJECT_COMPLETION_KFP_GAIN_PROD'),

        ('PROJECT_TIME_TRAVELLING',        'PROJECT_COMPLETION_FREE_TECH'),       
        ('PROJECT_TIME_TRAVELLING',        'PROJECT_COMPLETION_FREE_CIVIC');

----------------------------------
-- Modifiers
----------------------------------

INSERT INTO Modifiers   
        (ModifierId,                            ModifierType                                                )
VALUES    ('PROJECT_COMPLETION_KFP_GAIN_PROD',    'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_PER_POPULATION'    ),

        ('PROJECT_COMPLETION_FREE_TECH',        'MODIFIER_PLAYER_GRANT_RANDOM_TECHNOLOGY'                    ),
        ('PROJECT_COMPLETION_FREE_CIVIC',        'MODIFIER_PLAYER_GRANT_RANDOM_CIVIC'                        );

----------------------------------
-- ModifierArgument
----------------------------------
INSERT INTO ModifierArguments
        (ModifierId,                            Name,                        Value                )
VALUES    ('PROJECT_COMPLETION_KFP_GAIN_PROD',    'Amount',                    2                    ),
        ('PROJECT_COMPLETION_KFP_GAIN_PROD',    'YieldType',                'YIELD_PRODUCTION'    ),
        
        ('PROJECT_COMPLETION_FREE_TECH',        'Amount',                    1                    ),
        ('PROJECT_COMPLETION_FREE_CIVIC',        'Amount',                    1                    );
 
Top Bottom