Door Kickers 2

Door Kickers 2

Door Kickers 2 Workshop
Unlimited gameplay via our in-game mission editor and extensive game moddability.
Adding Doctrines to Old Units
I am trying to add the basic ranger doctrine to an old unit mod. I don't believe the original author is updating the mod anymore, nor am I looking to release it myself, I just want to make it work on my end so the squad can have a basic doctrine. In game they work just fine but don't have doctrine access.

I have updated the unit file and added the gui doctrine file to mirror other new mods but when I go into the game the doctrine tree area continues to be grey. That being said the battle honours upgrades seem to be working so I'm not sure what else I am missing.

Is there another file that needs to be edited? Or am I missing a code path in one of the files? Any help is appreciated.
< >
Showing 1-11 of 11 comments
CaoLex 1 Feb 17 @ 6:02pm 
Probably gui/doctirne.xml
Tier3 Feb 17 @ 6:13pm 
I see something in the doctrine.xml that says:

Game code adds this item as a child to #DoctrineTree_Parent
The name must be #UnitName_Doctrine

Is there another file that has this doctrine tree parent file that I'm missing? The gui file in the mod folder looks the same as one of my downloaded unit mods that currently employs the vanilla ranger doctrine as well.
CaoLex 1 Feb 17 @ 6:51pm 
File itself (in UI) should be named
<whatever you use as whole unit name>_doctine.xml

Adding item as a child refer to which connect to which. Child connect to parent.
For example, you have sexygirs_unit.xml with unit name being SexyGirls then it's doctrine file should also be named sexygirls_doctrine.xml .
All the nodes that are you planning to use should be written here.
Before closing tag </Unit> (NOT </Units>)
In structure like
<Doctrine doctrinePointsPerSquadLevel="2"> <Node name="SexyGirls_PolearmDancing"> <Node name="SexyGirls_PrivateDance" minSquadLevel="2"> </Doctrine>

Effect of the nodes itself should be written in _doctine_nodes.xml UNLESS you are using existing nodes then you should check their names in the game files (doctrine_nodes.xml) and don't touch this file at all.
_doctrines.xml is user strictly user interface. Either start from just line, check how it's looks and add more little by little by using logic and mathemathic (and I really hope you know HTML) or use this file from some other mod and just change names and nodes. Thought keep in mind that if they use any kind of static images that aren't default game files, then you also need to copy them too (texture folder) OR enable that mod first.

Adding item as a child refer to which connect to which. Child connect to parent (and inherit attibutes and values for anything that isn't rewritten by itself or rewritten later by the child with the same name) The file without prefix (simple doctine.xml and such) are default game files which always load first.
Last edited by CaoLex; Feb 17 @ 6:53pm
Tier3 Feb 17 @ 8:30pm 
Thanks for the help so far, I've copied the name_doctrine file from the British Army Platoon mod and then changed the unit name on line one to that of my unit I'm trying to fix and added all of the doctrine lines to the name_unit file but I still can't even see the doctrine tree in-game. I don't see any other files in any of my other unit mods that seem to have to do with doctrines. Is there a file or specific line of code that enables the tree itself to be seen by a mod? Everything I'm looking at currently seems to suggest it should work but it doesn't want to show up in game...
CaoLex 1 Feb 18 @ 1:25am 
My esoteric power is too weak to know for sure what you did.
If you are using BAF mod as referece (342453084 and note that this one uses suffix intead of prefix for file names) then you need to copy _unit.xml file inside "units" folder from the mod you are changing or change it inside the mod you are trying to add doctrine (in any way, it's should be insde "units" folder too) for where you need to copy and paste below </Ranks>
<Doctrine doctrinePointsPerSquadLevel="2"> <!-- handguns --> <Node name="Handguns_ShortRangeDrills"> <Node name="Handguns_ControlledPairs" numLevels="2"/> <Node name="Handguns_PrecisionShooting"/> </Node> <Node name="Handguns_MediumRangeDrills" numLevels="2"/> <Node name="Handguns_ReloadDrills"/> <Node name="Handguns_TransitionDrills"/> <Node name="Handguns_SuppressorUse"/> <!-- rifles --> <Node name="Rifles_ShortRangeDrills"> <Node name="Rifles_RoomClearingDrills" numLevels="2"/> <Node name="Rifles_CloseRangeBurst" numLevels="2"/> </Node> <Node name="Rifles_ReloadDrills"/> <Node name="Rifles_MediumRangeDrills"> <Node name="Rifles_MediumRangeBurst" numLevels="4"/> <Node name="Rifles_SurgicalShooting" numLevels="2"> <Node name="Rifles_ObscuredTargets" numLevels="2"/> </Node> </Node> <Node name="Rifles_BarricadeShooting"/> <Node name="Rifles_LongRangeDrills" numLevels="2"/> <!-- support --> <Node name="Support_AssaultSAWs" numLevels="2"/> <Node name="Support_AssaultMarksmen" numLevels="2"/> <Node name="Support_ImprovedSuppression"/> <Node name="Support_Melee"/> <Node name="Support_LanguageBasics"/> <Node name="Support_ThrowablesTraining"/> <Node name="Support_SelfFirstAid"/> <!-- elite --> <Node name="Elite_ExtraConditioning" minSquadLevel="14"/> <Node name="Elite_AdvancedLanguage" minSquadLevel="14"/> <Node name="Elite_AdvancedShooting" minSquadLevel="14"/> <Node name="Elite_AdvancedCombatives" minSquadLevel="14"/> <Node name="Elite_ExplosiveBreaching" minSquadLevel="14"/> <!-- Node name="Elite_AssaultPlanning" minSquadLevel="14"/ --> <Node name="Elite_ViolenceOfAction" minSquadLevel="14"/> </Doctrine>
which is reference to default Ranger doctrine nodes.
Then you need to copy doctrine_baf.xml from GUI and change it's name to <whatever unit name the mod you are trying to add doctrine for using>_doctrine.xml, copy stuff from doctrine_baf.xml inside and change on of the lines on top
<Item name="#UKArmyInfantryPlatoon_DoctrineTree" align="i" hidden="true">
into
<Item name="#CHANGE-HERE_DoctrineTree" align="i" hidden="true">
where CHANGE-HERE is whatever the name the squad using in _unit.xml file.

And you need to restart the game if you are changing anything because game onle reads that files on start.
Tier3 Feb 18 @ 6:28am 
So that's exactly what I have done so far but I'm still getting a gray screen for the doctrines. The mod I am trying to update is the crisis troop scorch mod on nexus for reference if that helps. Is there any other file that the game needs in order to show the doctrine buttons on screen? I am wondering if they are in fact linked but for some reason not generating on the screen? Appreciate you sticking with me on this so far.
CaoLex 1 Feb 18 @ 7:16am 
That mod looks straight up outdated. There is way more issues than adding doctine.
It's have dependency mod that add two units which up to date. You probably have better chance at recreating the unit while pulling resources from there and this old mod.
Last edited by CaoLex; Feb 18 @ 7:18am
Tier3 Feb 18 @ 8:02am 
Yeah its pretty far out of date but I love BPRE and I don't know if anyone with actual skill is putting another mod together with how long ago the originals were made lol. The dependent Tier One mod was mostly for weapon stats but I fixed that by changing the stats to a vanilla variant, added the trooper upgrades to the characters and changed the armour values to match up with the current vanilla values. Pretty much everything about this mod is working currently except for the doctrine tree.

I feel like it just has to be that I'm missing some specific line of code that needs to be edited... I can see that they are earning the standard 2 doctrine points per level (currently 10 @ lvl5) but when I click on the doctrine button it shows a gray screen and randomly shows 32 points in the top right corner. I'm wondering if there's a line that links to the visual tree set? I assumed the gui file was what made the visual representation of the tree but maybe I'm missing a step...
Tier3 Feb 18 @ 8:12am 
The game does seem to know it was built for an old version of the game since it warns me when I activate the mod... Do you happen to know how it knows that? I wonder if the problem is in there.
CaoLex 1 Feb 18 @ 8:19am 
Again, I repeat that you should check _doctrine.xml in gui folder. Since it seems you don't draw interface for doctrines.

And the version is taken from the mod.info file, the release one is 100, the version in the file is 15 I think. So if you will change it there then message will dissapear.
Last edited by CaoLex; Feb 18 @ 8:20am
Tier3 Mar 15 @ 9:18am 
For anyone in the same boat, I did finally figure it out. I was saving the new files as .txt instead of .xml by default so the code was right but the file type was not. Simple mistake that caused weeks of headaches.
< >
Showing 1-11 of 11 comments
Per page: 1530 50