Total War: WARHAMMER II

Total War: WARHAMMER II

Community Modding Framework
 This topic has been pinned, so it's probably important
How to Use: Community Modding Framework for Rites
Hey, I am not Crynsos but I recently helped design an addition to the Community Modding Framework (CMF) that enables modders to create rite packs for WH1 races. This post will explain how to do that.

Step by Step Instructions

  1. Create your rituals in rituals tables and create any necessary payloads, effects, costs and other things that may be associated with them.
  2. Register your script with Crynsos and have it added to the Community Modding Framework.
  3. Create a script file, like normal, that sets your ID flag to true and use the necessary command to white-list rites for your faction (see below).
  4. Add whatever scripting is necessary for your mod (unlock conditions have to be scripted if you don't want your rites active from turn 1!) and publish your mod.
  5. Post in the compatible mods discussion to tell Crynsos that your mod can be added to the compatible mods list!


What to put in your script:


The basic explanation behind this is that turning on rites for any WH1 race turns them on for all WH1 races. This means that we use scripts to prevent graphical bugs from occuring on factions that don't have any rites assigned to them.


What this means for you is that you need to tell the CMF script that you are assigning rites to a given subculture or faction. The command to do this is

rite_list_init("valid_key", "active");


examples of this that work are:

rite_list_init("wh_main_dwf_dwarfs", "active"); rite_list_init("wh_main_sc_dwf_dwarfs", "active");

The valid_key may be any subculture or faction key . Culture keys will not work.


Some FAQ:

Do I need to disable the factions am I not using?
No. Doing this will make your mod incompatible with another mod that does use those factions. Only set what you are using to active.

I am enabling rites for a specific subculture, but I want to disable them for a certain faction.
How do I do this?


rite_list_init("wh_main_sc_dwf_dwarfs", "active"); rite_list_init("wh_main_dwf_dwarfs", "disabled");

For the above code, does the order matter?
No. The command you are using adds the factions to a list which is then read once all mods are loaded. You can put the commands in any order.

How can I lock and unlock rites?
You have two choices. Either A. you can let all rites be unlocked from the start and balance them around that or B. you can write your own script and use listeners to unlock rites.
The relevant command is
cm:set_ritual_unlocked(cqi, rite, false);

where CQI is the CQI of any faction, rite is the rite key and the boolean is whether to lock or unlock the rite.



I don't want the AI using my rites! Should I disable them through the script?

No. The script only impacts human players

If you don't want the AI using your custom rites, there are settings in the tables to prevent that.


Who made this?
This update to the scripting framework was made by me and vandy, with Crynsos obviously implementing it and providing technical support on occasion.
Check out all of our mods at:
My Workshop Page
Vandy's Workshop
And of course the author of this mod, Crynsos.



If you need to ask anything about this, I would try joining the C&C modding sub (link on the main page of this mod) and pinging me @DrunkFlamingo. Adding me on steam is an unreliable way to get my attention and Crynsos, while capable, is a very busy man :)

Last edited by DrunkFlamingo; Feb 12, 2018 @ 6:40pm