Indonesian new leaders

BeatriceBernardo

Chieftain
Joined
Apr 28, 2017
Messages
10
Hi, I want to make a mod for new leaders for Indonesian. I think I can make a new leader, but I don't think I can make the new ability, so I need someone to guide me. (I don't care about artwork)

I have 2 ideas, which one is easier?

Ki Hajar Dewantara

All improvements on coast and coastal tiles provide +1 science

Susi Pudjiastuti

All garrisoned naval unit in city centar and harbor provide +1 amenities, +1 production and does not pay maintenance.
 
Hey there! Your abilities aren't that complicated, and can be pretty easily done via Modifiers. The first one is pretty simple, just requires building out some requirements that the base game doesn't have:

Code:
   <TraitModifiers>
       <Row>
           <TraitType>TRAIT_INDONESIA_COASTAL_SCIENCE</TraitType>
           <ModifierId>MOD_INDONESIA_COASTAL_SCIENCE</ModifierId>
       </Row>
   </TraitModifiers>

   <Modifiers>
       <Row>
           <ModifierId>MOD_INDONESIA_COASTAL_SCIENCE</ModifierId>
           <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
           <SubjectRequirementSetId>REQUIREMENTS_INDONESIA_COASTAL_PLOT_IMPROVED</SubjectRequirementSetId>
       </Row>
   </Modifiers>

   <ModifierArguments>
       <Row>
           <ModifierId>MOD_INDONESIA_COASTAL_SCIENCE</ModifierId>
           <Name>YieldType</Name>
           <Value>YIELD_SCIENCE</Value>
       </Row>
       <Row>
           <ModifierId>MOD_INDONESIA_COASTAL_SCIENCE</ModifierId>
           <Name>Amount</Name>
           <Value>1</Value>
       </Row>
   </ModifierArguments>

   <RequirementSets>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_COASTAL_PLOT_IMPROVED</RequirementSetId>
           <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_COASTAL_TILES</RequirementSetId>
           <RequirementSetType>REQUIREMENTSET_TEST_ANY</RequirementSetType>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementSetType>REQUIREMENTSET_TEST_ANY</RequirementSetType>
       </Row>
   </RequirementSets>

   <RequirementSetRequirements>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_COASTAL_PLOT_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_COASTAL_TILES</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_COASTAL_PLOT_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_RESOURCE_IS_IMPROVED</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_COASTAL_TILES</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_IS_COAST</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_COASTAL_TILES</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_IS_ADJACENT_TO_COAST</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_FARM</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_FISHINGBOATS</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_PASTURE</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_CAMP</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_QUARRY</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_PLANTATION</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_MINE</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_PLOT_HAS_LUMBERMILL</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_FORT</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_AIRSTRIP</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_SEASIDE_RESORT</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_OIL_WELL</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_MISSILE_SILO</RequirementId>
       </Row>
       <Row>
           <RequirementSetId>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</RequirementSetId>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_OFFSHORE_OIL_RIG</RequirementId>
       </Row>
   </RequirementSetRequirements>

   <Requirements>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_COASTAL_TILES</RequirementId>
           <RequirementType>REQUIREMENT_REQUIREMENTSET_IS_MET</RequirementType>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_RESOURCE_IS_IMPROVED</RequirementId>
           <RequirementType>REQUIREMENT_REQUIREMENTSET_IS_MET</RequirementType>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_FORT</RequirementId>
           <RequirementType>REQUIREMENT_PLOT_IMPROVEMENT_TYPE_MATCHES</RequirementType>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_AIRSTRIP</RequirementId>
           <RequirementType>REQUIREMENT_PLOT_IMPROVEMENT_TYPE_MATCHES</RequirementType>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_SEASIDE_RESORT</RequirementId>
           <RequirementType>REQUIREMENT_PLOT_IMPROVEMENT_TYPE_MATCHES</RequirementType>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_OIL_WELL</RequirementId>
           <RequirementType>REQUIREMENT_PLOT_IMPROVEMENT_TYPE_MATCHES</RequirementType>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_MISSILE_SILO</RequirementId>
           <RequirementType>REQUIREMENT_PLOT_IMPROVEMENT_TYPE_MATCHES</RequirementType>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_OFFSHORE_OIL_RIG</RequirementId>
           <RequirementType>REQUIREMENT_PLOT_IMPROVEMENT_TYPE_MATCHES</RequirementType>
       </Row>
   </Requirements>

   <RequirementArguments>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_COASTAL_TILES</RequirementId>
           <Name>RequirementSetId</Name>
           <Value>REQUIREMENTS_INDONESIA_COASTAL_TILES</Value>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_RESOURCE_IS_IMPROVED</RequirementId>
           <Name>RequirementSetId</Name>
           <Value>REQUIREMENTS_INDONESIA_RESOURCE_IS_IMPROVED</Value>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_FORT</RequirementId>
           <Name>ImprovementType</Name>
           <Value>IMPROVEMENT_FORT</Value>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_AIRSTRIP</RequirementId>
           <Name>ImprovementType</Name>
           <Value>IMPROVEMENT_AIRSTRIP</Value>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_SEASIDE_RESORT</RequirementId>
           <Name>ImprovementType</Name>
           <Value>IMPROVEMENT_BEACH_RESORT</Value>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_OIL_WELL</RequirementId>
           <Name>ImprovementType</Name>
           <Value>IMPROVEMENT_OIL_WELL</Value>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_MISSILE_SILO</RequirementId>
           <Name>ImprovementType</Name>
           <Value>IMPROVEMENT_MISSILE_SILO</Value>
       </Row>
       <Row>
           <RequirementId>REQUIRES_INDONESIA_PLOT_HAS_OFFSHORE_OIL_RIG</RequirementId>
           <Name>ImprovementType</Name>
           <Value>IMPROVEMENT_OFFSHORE_OIL_RIG</Value>
       </Row>
   </RequirementArguments>


That should work pretty well, I think. Just be sure to change the TraitType entry to your trait, etc. I'm certain that ModifierType works as intended, I'm using it for one of my civs.

As for the second one, I don't have time right now to put that together, but there's also the problem of amenities being kinda finnicky via modifiers; there's no modifier for just granting amenities, it ties it to policies, or great people, or beliefs, so you'd have to be okay with just having your trait appear as, say, a policy or something. Then, you'd probably attach a modifier to city center and harbor districts that would attach a modifier to the city that would grant an amenity when the district is garrisoned. Definitely more complicated, but doable if you know how to build modifiers.

Feel free to use the above code wholesale and everything. But if you want to get into modding, you should try and piece together exactly why things are laid out as they are. I've essentially provided you with a snippet of code that would implement your trait, free of distractions, etc. If you just want to make this leader and that's it, this is pretty much all you need for his trait.
 
Wow, thanks a lot! So we are taking the XML, instead of the SQL pathways. As much as I'm happy to have the code done, I want to understand it as well.

Noob question, where to paste this code to?
 
Just FYI, SML and SQL are just about the same thing. They do the same things, and you can use either, or both, for database modding. I think SQL is just more powerful. As for understanding the code, there used to be a great tutorial on Modifiers, but the links I have are dead. Try some of the stickied posts in these forums, I'm sure it's still floating around somewhere.

And this code can go into any XML file, as long as that file gets added to the In-Game actions, etc. You can put it in the same file as the one you define your leader in. In fact, that's a pretty common practice. You just have to remember to change the TraitType to your leader's trait.
 
Thanks a lot!

Okay, so, let's get started.

1. Open SDK, open mod buddy
2. New mod from template (Starter- New Civilization and Leader)
3. Rename Jasper_Kitty -> KHD (Ki Hajar Dewantara)
4. Now I know there are things that I have to change from The Felines, to Indonesia, but what?
5. ...

Thanks though, I just feel really not smart...
 
Okay, so, looking through the forums, there's surprisingly little info available to get started in modding. This is the thread I was talking about :https://forums.civfanatics.com/thre...er-1-creating-and-attaching-modifiers.605835/
But as a mentioned, the link to his external site is dead right now. You may want to check up on it occasionally, see if it comes back up, because that really is the greatest resource for learning the modifiers system.

Then there's this one, which I just found, and is actually great, I say just having skimmed it, for getting custom graphics into your mod, and learning some of the back-end stuff, like adding files to the database, etc. If you had a decent grasp on the database tables and everything for your mod, then this would definitely be the next step: https://forums.civfanatics.com/thre...ation-icon-in-way-too-many-easy-steps.613169/

But none of that is really helpful to where you're at right now, huh? Actually, I have a template file for my projects. I'll take a couple minutes to package up what I have, and you can work from that. In fact, I'll do you one better, and crop out a bunch of stuff you won't need to just get started (that'll be the 'Small Template' folder). Just FYI, I set it up so that you can easily find+replace your leader and civ stuff into the files, makes it a great little template. You can just load up all the files in my templates, ctrl+f, press the drop down arrow on the side to open up the replace line, and search and replace with the relevant stuff. For reference, it's formatted so that the capitalization and stuff matters, so you would, for example, replace 'LLL' with 'THOMAS_JEFFERSON', 'lll' with 'ThomasJefferson', 'l_l_l' with 'Thomas_Jefferson', 'CCC' with 'AMERICA', 'UUU' with 'P51_MUSTANG', etc. I think in the trimmed down version you only have to worry about 'LLL' and 'lll'.

Now, there are a bunch of different files, and they're that way for a reason. Each has to be imported in a different way, which is something very important to get right, but I think the leader template has all that set up. Right click on the project in the solution explorer window and click 'Properties', then go to FrontEnd Actions and In-Game Actions, hopefully it's all set up in the template. If it is, you can just copy the code in my files to the existing files and not worry about it too much, or you can add them to your project in the same way as the template was. Lemme know if you need help on that.

Oh, and in the small template I already added the trait I made a few posts up, and added him as another leader for Indonesia. I'm honestly not sure what the game will run with/without, so you might just look over the entirety of the small template, and change whatever small things you want, like the colors, or you can copy/paste stuff from existing civs/leaders into your files, etc. You don't have to enter anything into the Rows in the Text files, but it'll sure help if you enter something, so you can see what text goes where, etc; again, not sure if not doing so will crash it, but you can get away with a lot of empty text fields just fine. Oh, and your leader will appear as Gitarja until you add custom graphics, or you can change the relevant fields yourself and make a different leader appear ;)

That should help you get started quite a bit. Of course, you don't know what most of those table or entries do, huh? You should take some time to try and figure out what those tables do, maybe look through the base game data Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data) and the expansion DLC (Indonesia: Steam\SteamApps\common\Sid Meier's Civilization VI\DLC\Indonesia_Khmer\Data). If you want to start learning SQL, maybe try translating what you have into SQL files instead once you get it loading into the game. Once you have a decent grasp on what you're doing, maybe try making a second leader, or even a new Civ, whatever the scope of your ambition is, the templates I gave you are everything you need to start. I'm sure I'll be back here once or twice, though, helping you get the templates up and running, haha.
 

Attachments

  • Civ and Leader Templates.zip
    14.2 KB · Views: 21
Top Bottom