[R&F] How to add a historic moment for a custom building?

Ma2ge

Chieftain
Joined
Feb 15, 2017
Messages
59
Hello to all,

my current project includes a custom building every player gets automatically built in his/her capital via lua as soon as a specific amount of settlers have been trained. This works very good.

Unfortunatelly I have not been successful to trigger a historic moment for this. So far I have tried to include a KIND_MOMENT into the Types table as well as an entry into the Moments table. Guessing, that is not enough even if moment art from another moment is used.

I'm clueless right now how to do it even if I take a look at other mods. I really hope someone can give me a hint into the right direction.

Thanks in advance
Magge
 
Last edited:
What's the actual code? You may also need to have an entry in MomentIllustrations, among other tables.
 
Still not working. And sorry, of course here are the sql statements:

Code:
INSERT INTO Types (Type, Kind) VALUES
('MOMENT_LPT_BUILD_HOUSEOFETERNALUNION', 'KIND_MOMENT');

INSERT INTO Buildings (BuildingType, Name, Description, MaxPlayerInstances, Capital, PrereqDistrict, Cost, EnabledByReligion, InternalOnly) VALUES
('BUILDING_LPT_HOUSEOFETERNALUNION', 'LOC_LPT_BUILDING_HOUSEOFETERNALUNITY_NAME', 'LOC_LPT_BUILDING_HOUSEOFETERNALUNITY_DESCRIPTION', 1, 0, 'DISTRICT_CITY_CENTER', 1, 0, 1);

INSERT INTO Moments (MomentType, Name, Description, InstanceDescription, InterestLevel, BackgroundTexture, IconTexture, EraScore, ObsoleteEra) VALUES
('MOMENT_LPT_BUILD_HOUSEOFETERNALUNION','LOC_MOMENT_LPT_BUILD_HOUSEOFETERNALUNION','LOC_MOMENT_LPT_BUILD_HOUSEOFETERNALUNION_DESCRIPTION','LOC_MOMENT_LPT_BUILD_HOUSEOFETERNALUNION_INSTANCE_DESCRIPTION', 3, null,   'MOMENT_ILLUSTRATION_UNIQUE_BUILDING', 2, null);

INSERT INTO MomentIllustrations (MomentIllustrationType, MomentDataType, GameDataType, Texture) VALUES
('MOMENT_ILLUSTRATION_UNIQUE_BUILDING', 'MOMENT_DATA_BUILDING', 'BUILDING_LPT_HOUSEOFETERNALUNION', 'Moment_Infrastructure_Germany.dds');


Moment_Infrastructure_Germany.dds is just a placeholder of course.
 
Back
Top Bottom