Advertisement
Guest User

Character

a guest
Dec 13th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. class Character_Mod extends X2DownloadableContentInfo;
  2. //class 'FileNameHere' extends X2DownloadableContentInfo;
  3.  
  4.  
  5. static event OnPostTemplatesCreated()
  6. {
  7. local X2CharacterTemplateManager CharacterTemplateManager;
  8. local X2CharacterTemplate Template;
  9. local X2DataTemplate DifficultyTemplate;
  10. local array<X2DataTemplate> DifficultyTemplates;
  11. local LootReference Loot;
  12.  
  13.  
  14.  
  15. CharacterTemplateManager = class'X2CharacterTemplateManager'.static.GetCharacterTemplateManager();
  16.  
  17. //Find All Data Templates for each Difficulty that match the Template name of AdvTrooperM1
  18. CharacterTemplateManager.FindDataTemplateAllDifficulties('AdvTrooperM1',DifficultyTemplates);
  19.  
  20. //For each Variation of Difficulty Make these changes to the Data Template
  21. foreach DifficultyTemplates(DifficultyTemplate)
  22. {
  23.  
  24. //Load each Data Template as a Character Template
  25. Template = X2CharacterTemplate(DifficultyTemplate);
  26. if(Template != none) //If it exists make changes
  27. {
  28.  
  29.  
  30. //strPawnArchetypes is an array so adding new ones won't replace the old so we set the length to 0 to delete original values
  31. Template.strPawnArchetypes.Length = 0;
  32.  
  33. //Add new Archetypes - These are my custom archetypes created in XCOM 2 Editor
  34. Template.strPawnArchetypes.AddItem("Spectrum_Enemy.Captain.ARC_GameUnit_AdvCaptainTech_M");
  35. Template.strPawnArchetypes.AddItem("Spectrum_Enemy.Captain.ARC_GameUnit_AdvCaptainTech_F");
  36.  
  37. }
  38. }
  39.  
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement