Shuma22 Posted October 19, 2016 Share Posted October 19, 2016 I'm working on an Alien mod at the moment and i really have no idea what i'm doing, but i think most things are working properly. However there is this redscreen error that pops up whenever it's the alien's turn. http://puu.sh/rOkys/55ef805739.jpg I believe it might have something to do with the AI, like i mentioned before i have no idea what i'm doing, what i tried to do is to look at the AI.ini from another mod that adds Aliens(in this case Farkyrie's Advent Sniper and the Long War Alien Pack) and then using that copy pasted what i believe to be the appropriate files from the Advent trooper, this is my XcomAI.ini : [XComGame.X2AIBTBehaviorTree] +Behaviors=(BehaviorName="AdventScoutRoot", NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=AdvTrooper_RedAlert, Child[3]=GenericAlertHandler) +Behaviors=(BehaviorName=AdventScout_RedAlert, NodeType=Sequence, Child[0]=IsRedAlert, Child[1]=AdvTrooper_RedAbilitySelector) +Behaviors=(BehaviorName=AdventScout_RedAbilitySelector, NodeType=Selector, Child[0]=MimicBeaconBehavior, Child[1]=AdventRedFirstAction, Child[2]=AdventRedLastAction) +Behaviors=(BehaviorName=AdventScoutRedFirstAction, NodeType=Sequence, Child[0]=NotLastActionPoint, Child[1]=AdventRedFirstActionSelector) +Behaviors=(BehaviorName=AdventScoutRedFirstActionSelector, NodeType=Selector, \\ Child[0]=DoIfFlankedMove, \\ Child[1]=SelectMove_JobOrAggressive, \\ Child[2]=TryMoveThenGrenade, \\ Child[3]=TryShootOrReloadOrOverwatch, \\ Child[4]=HuntEnemyWithCover) \\ +Behaviors=(BehaviorName=AdventScoutRedLastAction, NodeType=Sequence, Child[0]=IsLastActionPoint, Child[1]=AdventRedLastActionSelector) +Behaviors=(BehaviorName=AdventScoutRedLastActionSelector, NodeType=Selector, \\ Child[0]=TryGrenade, \\ Child[1]=TryShootOrReloadOrOverwatch, \\ Child[2]=HuntEnemyWithCover, \\ Child[3]=SelectMove_JobOrAggressive) \\ The aliens seem to move around and act just like the Advent Troopers so maybe the redscreen error doesn't mean anything, but i just want to make sure, any ideas? Link to comment Share on other sites More sharing options...
woodlandcoyote Posted October 19, 2016 Share Posted October 19, 2016 (edited) +Behaviors=(BehaviorName="AdventScoutRoot", NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=AdvTrooper_RedAlert, Child[3]=GenericAlertHandler) Child 2 is going to a regular advent trooper script..I assume you would want it linking with the adventscout_redalert no? Actually on second glace..... Almost none of the lines are linking together.... You have alot of them just going to advent trooper and not the scout. Edited October 19, 2016 by woodlandcoyote Link to comment Share on other sites More sharing options...
robojumper Posted October 19, 2016 Share Posted October 19, 2016 It should be +Behaviors=(BehaviorName="AdventScout::CharacterRoot", NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=AdventScout_RedAlert, Child[3]=GenericAlertHandler) assuming your CharacterGroupName is AdventScout. Link to comment Share on other sites More sharing options...
Shuma22 Posted October 20, 2016 Author Share Posted October 20, 2016 (edited) Derr i'm an idiot, i fixed the linking thing(i think). But the red screen is still there, and when i try to change this part +Behaviors=(BehaviorName="AdventScoutRoot" To +Behaviors=(BehaviorName="AdventScout::CharacterRoot" The solution fails building, doesn't give me an error, it just gives me the generic windows error saying Xcom2 has stopped working, modbuddy doesn't crash or anything. http://puu.sh/rOYXi/6e0ad57fa9.png Afterwards the only thing that changes is that it says build failed on the output box. But i'm not sure if that's right, the AI files i have here for the Long War Alien pack and the Advent Sniper just have it was [unitName]Root, instead of having it like the vanilla aliens. Here's part of the Advent Sniper AI file as an example: +Behaviors=(BehaviorName=AdventSniperRoot, NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=AdventSniper_RedAlert, Child[3]=GenericAlertHandler) And one from the Muton Centurion +Behaviors=(BehaviorName="MutonM2_LWRoot", NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=MutonM2_LWRedAlert, Child[3]=GenericAlertHandler) In any case this is the AI.ini i have now: [XComGame.X2AIBTBehaviorTree] +Behaviors=(BehaviorName="AdventScoutRoot", NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=AdventScout_RedAlert, Child[3]=GenericAlertHandler) +Behaviors=(BehaviorName=AdventScout_RedAlert, NodeType=Sequence, Child[0]=IsRedAlert, Child[1]=AdventScout_RedAbilitySelector) +Behaviors=(BehaviorName=AdventScout_RedAbilitySelector, NodeType=Selector, Child[0]=MimicBeaconBehavior, Child[1]=AdventScoutRedFirstAction, Child[2]=AdventScoutRedLastAction) +Behaviors=(BehaviorName=AdventScoutRedFirstAction, NodeType=Sequence, Child[0]=NotLastActionPoint, Child[1]=AdventScoutRedFirstActionSelector) +Behaviors=(BehaviorName=AdventScoutRedFirstActionSelector, NodeType=Selector, \\ Child[0]=DoIfFlankedMove, \\ Child[1]=SelectMove_JobOrAggressive, \\ Child[2]=TryMoveThenGrenade, \\ Child[3]=TryShootOrReloadOrOverwatch, \\ Child[4]=HuntEnemyWithCover) \\ +Behaviors=(BehaviorName=AdventScoutRedLastAction, NodeType=Sequence, Child[0]=IsLastActionPoint, Child[1]=AdventScoutRedLastActionSelector) +Behaviors=(BehaviorName=AdventScoutRedLastActionSelector, NodeType=Selector, \\ Child[0]=TryGrenade, \\ Child[1]=TryShootOrReloadOrOverwatch, \\ Child[2]=HuntEnemyWithCover, \\ Child[3]=SelectMove_JobOrAggressive) \\ Edit: Actually since i have no idea what i'm doing, i'll post my AdventScout.uc here too in case there's something wrong with it that i didn't see: class X2Character_AdventScout extends X2Character config(AdventScout_Data); static function array<X2DataTemplate> CreateTemplates() { local array<X2DataTemplate> Templates; Templates.AddItem(CreateTemplate_AdventScout()); return Templates; } static function X2CharacterTemplate CreateTemplate_AdventScout() { local X2CharacterTemplate CharTemplate; local LootReference Loot; `CREATE_X2CHARACTER_TEMPLATE(CharTemplate, 'AdventScout'); CharTemplate.CharacterGroupName = 'AdventScout'; //CharTemplate.DefaultLoadout='AdvTrooperM1_Loadout'; CharTemplate.DefaultLoadout='AdventScout_Loadout'; CharTemplate.BehaviorClass=class'XGAIBehavior'; CharTemplate.strPawnArchetypes.AddItem("AdventScout.Archetype.ARC_GameUnit_AdvScoutM1_M"); //Archetype Full Name XComAlienPawn'AdventScout.Archetype.ARC_GameUnit_AdvScoutM1_M' //CharTemplate.strPawnArchetypes.AddItem("GameUnit_AdvTrooper.ARC_GameUnit_AdvTrooperM1_F"); // Auto-Loot Loot.ForceLevel = 0; Loot.LootTableName = 'AdvTrooperM1_BaseLoot'; CharTemplate.Loot.LootReferences.AddItem(Loot); // Timed Loot Loot.ForceLevel = 0; Loot.LootTableName = 'AdvTrooperM1_TimedLoot'; CharTemplate.TimedLoot.LootReferences.AddItem(Loot); Loot.LootTableName = 'AdvTrooperM1_VultureLoot'; CharTemplate.VultureLoot.LootReferences.AddItem(Loot); CharTemplate.strMatineePackages.AddItem("CIN_Advent"); CharTemplate.RevealMatineePrefix = "CIN_Advent_Trooper"; CharTemplate.GetRevealMatineePrefixFn = GetAdventMatineePrefix; CharTemplate.UnitSize = 1; // Traversal Rules CharTemplate.bCanUse_eTraversal_Normal = true; CharTemplate.bCanUse_eTraversal_ClimbOver = true; CharTemplate.bCanUse_eTraversal_ClimbOnto = true; CharTemplate.bCanUse_eTraversal_ClimbLadder = true; CharTemplate.bCanUse_eTraversal_DropDown = true; CharTemplate.bCanUse_eTraversal_Grapple = false; CharTemplate.bCanUse_eTraversal_Landing = true; CharTemplate.bCanUse_eTraversal_BreakWindow = true; CharTemplate.bCanUse_eTraversal_KickDoor = true; CharTemplate.bCanUse_eTraversal_JumpUp = false; CharTemplate.bCanUse_eTraversal_WallClimb = false; CharTemplate.bCanUse_eTraversal_BreakWall = false; CharTemplate.bAppearanceDefinesPawn = false; CharTemplate.bSetGenderAlways = false; CharTemplate.bCanTakeCover = true; CharTemplate.bIsAlien = false; CharTemplate.bIsAdvent = true; CharTemplate.bIsCivilian = false; CharTemplate.bIsPsionic = false; CharTemplate.bIsRobotic = false; CharTemplate.bIsSoldier = false; CharTemplate.bCanBeTerrorist = false; CharTemplate.bCanBeCriticallyWounded = false; CharTemplate.bIsAfraidOfFire = true; //CharTemplate.SightedNarrativeMoments.AddItem(XComNarrativeMoment'X2NarrativeMoments.TACTICAL.AlienSitings.T_Central_AlienSightings_AdvTrooperM1'); CharTemplate.AddTemplateAvailablility(CharTemplate.BITFIELD_GAMEAREA_Multiplayer); // Allow in MP! CharTemplate.MPPointValue = CharTemplate.XpKillscore * 10; CharTemplate.strHackIconImage = "UILibrary_Common.TargetIcons.Hack_captain_icon"; CharTemplate.strTargetIconImage = class'UIUtilities_Image'.const.TargetIcon_Advent; return CharTemplate; } simulated function string GetAdventMatineePrefix(XComGameState_Unit UnitState) { if(UnitState.kAppearance.iGender == eGender_Male) { return UnitState.GetMyTemplate().RevealMatineePrefix $ "_Male"; } else { return UnitState.GetMyTemplate().RevealMatineePrefix $ "_Female"; } } Edited October 20, 2016 by Shuma22 Link to comment Share on other sites More sharing options...
Shuma22 Posted October 20, 2016 Author Share Posted October 20, 2016 (edited) Well i kinda fixed it, but broke something else instead, i added this line to my character template: CharTemplate.strBehaviorTree = "AdventScoutRoot"; And that got rid of the redscreen error, unfortunately now when the alien turn happens, my aliens just stand around after they run for cover, they don't move, they don't shoot, they just sit there. So maybe now it's just a problem with the AI, i guess? Edit: I changed my AI.ini file because i figured maybe those grenade nodes were the culcript, but the AI still doesn't do anything. [XComGame.X2AIBTBehaviorTree] +Behaviors=(BehaviorName="AdventScoutRoot", NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=AdventScout_RedAlert, Child[3]=GenericAlertHandler) +Behaviors=(BehaviorName=AdventScout_RedAlert, NodeType=Sequence, Child[0]=IsRedAlert, Child[1]=AdventScout_RedAbilitySelector) +Behaviors=(BehaviorName=AdventScout_RedAbilitySelector, NodeType=Selector, Child[0]=MimicBeaconBehavior, Child[1]=AdventScoutRedFirstAction, Child[2]=AdventScoutRedLastAction) +Behaviors=(BehaviorName=AdventScoutRedFirstAction, NodeType=Sequence, Child[0]=NotLastActionPoint, Child[1]=AdventScoutRedFirstActionSelector) +Behaviors=(BehaviorName=AdventScoutRedFirstActionSelector, NodeType=Selector, \\ Child[0]=DoIfFlankedMove, \\ Child[1]=SelectMove_JobOrAggressive, \\ ;Child[2]=TryMoveThenGrenade, \\ Child[2]=TryShootOrReloadOrOverwatch, \\ Child[3]=HuntEnemyWithCover) \\ +Behaviors=(BehaviorName=AdventScoutRedLastAction, NodeType=Sequence, Child[0]=IsLastActionPoint, Child[1]=AdventScoutRedLastActionSelector) +Behaviors=(BehaviorName=AdventScoutRedLastActionSelector, NodeType=Selector, \\ ;Child[0]=TryGrenade, \\ Child[0]=TryShootOrReloadOrOverwatch, \\ Child[1]=HuntEnemyWithCover, \\ Child[2]=SelectMove_JobOrAggressive) \\ That's what it looks like now. Edit: Well i fixed it now, i must have messed something up when i tried to copy how it was formatted in those mods, because this time i just copy pasted the trooper lines again and just renamed the things in the things. [XComGame.X2AIBTBehaviorTree] +Behaviors=(BehaviorName="AdventScoutRoot", NodeType=Selector, Child[0]=TryJob, Child[1]=GenericGreenMovement, Child[2]=AdventScout_RedAlert, Child[3]=GenericAlertHandler) +Behaviors=(BehaviorName=AdventScout_RedAlert, NodeType=Sequence, Child[0]=IsRedAlert, Child[1]=AdventScout_RedAbilitySelector) +Behaviors=(BehaviorName=AdventScout_RedAbilitySelector, NodeType=Selector, Child[0]=MimicBeaconBehavior, Child[1]=AdventScoutRedFirstAction, Child[2]=AdventScoutRedLastAction) +Behaviors=(BehaviorName=AdventScoutRedFirstAction, NodeType=Sequence, Child[0]=NotLastActionPoint, Child[1]=AdventScoutRedFirstActionSelector) +Behaviors=(BehaviorName=AdventScoutRedFirstActionSelector, NodeType=Selector, Child[0]=DoIfFlankedMove, Child[1]=SelectMove_JobOrAggressive, Child[2]=TryMoveThenGrenade, Child[3]=TryShootOrReloadOrOverwatch, Child[4]=HuntEnemyWithCover) +Behaviors=(BehaviorName=AdventScoutRedLastAction, NodeType=Sequence, Child[0]=IsLastActionPoint, Child[1]=AdventScoutRedLastActionSelector) +Behaviors=(BehaviorName=AdventScoutRedLastActionSelector, NodeType=Selector, Child[0]=TryGrenade, Child[1]=TryShootOrReloadOrOverwatch, Child[2]=HuntEnemyWithCover, Child[3]=SelectMove_JobOrAggressive) And now it works. Edited October 20, 2016 by Shuma22 Link to comment Share on other sites More sharing options...
Shuma22 Posted October 20, 2016 Author Share Posted October 20, 2016 Well i have a new problem now, i had everything working nicely and i decided to fix some asset issues before moving on, so i re-rigged some pieces here and there, saved my packages, put them in, built the solution and so on. And now when i test it out. http://puu.sh/rPx8r/b57dd26043.jpg They run in place, then that redscreen error pops up and they instantly teleport to where they were going, and then they shoot or overwatch or do whatever it is that they would normally do. I don't understand what could be causing this, the animations, physics and everything also seem to be working just fine. Link to comment Share on other sites More sharing options...
woodlandcoyote Posted October 21, 2016 Share Posted October 21, 2016 Is this only when under ai control? Have you tried moving them yourself and being in control?This would narrow down if it is indeed an ai issue or a animation problem. Link to comment Share on other sites More sharing options...
Shuma22 Posted October 21, 2016 Author Share Posted October 21, 2016 Yeah it does, i fixed it. I tracked down the problem to the main advent scout model by replacing first the AI with the one from the normal trooper, then replacing the weapon with the normal advent rifle, then removing the physics assets from the model, so that left only the model. Then i realized that when i reimported to the model after fixing some issues, i kept and imported the "advent stun lancer group"(When you import an Xcom2 model to your 3d modeling tool of choice, at least in 3dsmax's case, they come in a group, and it's a bad idea to keep this group object thing around), so i just removed that, reimported the model, saved the package and so on and now everything is working just nicely. Link to comment Share on other sites More sharing options...
Recommended Posts