JohnnyHoob
Chieftain
- Joined
- Feb 26, 2023
- Messages
- 3
Hello,
I'm very new to modding and SQL in general, but I've been very interested in making some custom civs to play with friends. I've been looking through the site and found a template for new civilizations. I figured it would be easiest for me to understand what was happening by changing things slowly until it no longer works and working on that. I've been reading up on some guides about adding traits and leader abilities, but I'm having some trouble.
Currently, I'm trying to add a leader trait to my civ named "Well Fed" which will act similarly to the base game's Cleopatra ability. Her ability provides gold when other civs send a trade route, whereas I would like to provide 2 food to my civ (I also would like to add some domestic trade adjustments as well, but I'm taking it one step at a time.) Below is the current code I have:
INSERT INTO Types
(Type, Kind )
VALUES ('TRAIT_LEADER_LSF_WELL_FED', 'KIND_TRAIT');
INSERT INTO Traits
(TraitType, Name, Description )
VALUES ('TRAIT_LEADER_LSF_WELL_FED', 'LOC_TRAIT_LEADER_LSF_WELL_FED_NAME', 'LOC_TRAIT_LEADER_LSF_WELL_FED_DESCRIPTION' );
INSERT INTO LeaderTraits
(LeaderType, TraitType )
VALUES ('LEADER_LSF_WILLIAM_TAFT', 'TRAIT_LEADER_LSF_WELL_FED' );
INSERT INTO TraitModifiers
(TraitType, ModifierId, )
VALUES ('TRAIT_LEADER_LSF_WELL_FED', 'TRAIT_INCOMING_TRADE_GAIN_FOOD' );
INSERT INTO Modifiers
(ModifierId, ModifierType )
('TRAIT_INCOMING_TRADE_GAIN_FOOD' 'MODIFIER_PLAYER_CITIES_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS');
INSERT INTO ModifierArguments
(ModifierId, Name, Value )
VALUES ('TRAIT_INCOMING_TRADE_GAIN_FOOD', 'YieldType', 'YIELD_FOOD' ),
('TRAIT_INCOMING_TRADE_GAIN_FOOD', 'Amount', '2' );
I think I have a basic understanding of what is happening with this code. I'm adding my new trait, assigning it to my leader, and then defining what that trait actually does. I've taken the 'MODIFIER_PLAYER_CITIES_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS' from the Modifiers.xml file, and I've modeled my arguments from Cleo's ability in the Leader.xml by just changing my Yield Type to Yield Food.
I've tried to check the logs, but there's a lot of information and I'm not skilled at navigating them. Like I said, I'm very new to modding and SQL, so there may be a very simple thing I am missing.
Any help is appreciated!
Cheers
I'm very new to modding and SQL in general, but I've been very interested in making some custom civs to play with friends. I've been looking through the site and found a template for new civilizations. I figured it would be easiest for me to understand what was happening by changing things slowly until it no longer works and working on that. I've been reading up on some guides about adding traits and leader abilities, but I'm having some trouble.
Currently, I'm trying to add a leader trait to my civ named "Well Fed" which will act similarly to the base game's Cleopatra ability. Her ability provides gold when other civs send a trade route, whereas I would like to provide 2 food to my civ (I also would like to add some domestic trade adjustments as well, but I'm taking it one step at a time.) Below is the current code I have:
INSERT INTO Types
(Type, Kind )
VALUES ('TRAIT_LEADER_LSF_WELL_FED', 'KIND_TRAIT');
INSERT INTO Traits
(TraitType, Name, Description )
VALUES ('TRAIT_LEADER_LSF_WELL_FED', 'LOC_TRAIT_LEADER_LSF_WELL_FED_NAME', 'LOC_TRAIT_LEADER_LSF_WELL_FED_DESCRIPTION' );
INSERT INTO LeaderTraits
(LeaderType, TraitType )
VALUES ('LEADER_LSF_WILLIAM_TAFT', 'TRAIT_LEADER_LSF_WELL_FED' );
INSERT INTO TraitModifiers
(TraitType, ModifierId, )
VALUES ('TRAIT_LEADER_LSF_WELL_FED', 'TRAIT_INCOMING_TRADE_GAIN_FOOD' );
INSERT INTO Modifiers
(ModifierId, ModifierType )
('TRAIT_INCOMING_TRADE_GAIN_FOOD' 'MODIFIER_PLAYER_CITIES_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS');
INSERT INTO ModifierArguments
(ModifierId, Name, Value )
VALUES ('TRAIT_INCOMING_TRADE_GAIN_FOOD', 'YieldType', 'YIELD_FOOD' ),
('TRAIT_INCOMING_TRADE_GAIN_FOOD', 'Amount', '2' );
I think I have a basic understanding of what is happening with this code. I'm adding my new trait, assigning it to my leader, and then defining what that trait actually does. I've taken the 'MODIFIER_PLAYER_CITIES_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS' from the Modifiers.xml file, and I've modeled my arguments from Cleo's ability in the Leader.xml by just changing my Yield Type to Yield Food.
I've tried to check the logs, but there's a lot of information and I'm not skilled at navigating them. Like I said, I'm very new to modding and SQL, so there may be a very simple thing I am missing.
Any help is appreciated!
Cheers