Gorgod Posted November 24, 2010 Share Posted November 24, 2010 I'm looking to create a modification that can make everyone hostile. However, I have no clue how to do this. I've found a "make hostile" script, but for me, it didn't work. I've created basic mods in the past, such as turning NPCs into merchants, but nothing to this extent. I think I could go into KOTOR Tool and change everyone's "faction" to hostile, but even if I could do that, it would take forever. Is there a quick way to make a mod such as this? Tutorials, and even better, pre-made mods are welcome. Link to comment Share on other sites More sharing options...
DarthStoney Posted November 24, 2010 Share Posted November 24, 2010 There are a couple of ways to do this, if everyone in the room has individual "tags" this would be the way to do it void main() { object oMan1= GetObjectByTag("NPC1", 0); object oMan2 = GetObjectByTag("NPC2", 0); object oMan3 = GetObjectByTag("NPC3", 0); ChangeToStandardFaction(oMan1, STANDARD_FACTION_HOSTILE_1); ChangeToStandardFaction(oMan2, STANDARD_FACTION_HOSTILE_1); ChangeToStandardFaction(oMan3, STANDARD_FACTION_HOSTILE_1); } or if more then one have the same "tag" you can do this void main() { int int1; int int2 = 25; int1 = 0; while ((int1 <= int2)) { { object oThugCommon = GetObjectByTag("ThugCommon", int1); object oThug1 = GetObjectByTag("Thug1", int1); if (GetIsObjectValid(oThugCommon)) { AssignCommand(oThugCommon, ClearAllActions()); ChangeToStandardFaction(oThugCommon, 1); } if (GetIsObjectValid(oThug1)) { AssignCommand(oThug1, ClearAllActions()); ChangeToStandardFaction(oThug1, 1); } } (int1++); } } Link to comment Share on other sites More sharing options...
Gorgod Posted November 24, 2010 Author Share Posted November 24, 2010 There are a couple of ways to do this, if everyone in the room has individual "tags" this would be the way to do it void main() { object oMan1= GetObjectByTag("NPC1", 0); object oMan2 = GetObjectByTag("NPC2", 0); object oMan3 = GetObjectByTag("NPC3", 0); ChangeToStandardFaction(oMan1, STANDARD_FACTION_HOSTILE_1); ChangeToStandardFaction(oMan2, STANDARD_FACTION_HOSTILE_1); ChangeToStandardFaction(oMan3, STANDARD_FACTION_HOSTILE_1); } or if more then one have the same "tag" you can do this void main() { int int1; int int2 = 25; int1 = 0; while ((int1 <= int2)) { { object oThugCommon = GetObjectByTag("ThugCommon", int1); object oThug1 = GetObjectByTag("Thug1", int1); if (GetIsObjectValid(oThugCommon)) { AssignCommand(oThugCommon, ClearAllActions()); ChangeToStandardFaction(oThugCommon, 1); } if (GetIsObjectValid(oThug1)) { AssignCommand(oThug1, ClearAllActions()); ChangeToStandardFaction(oThug1, 1); } } (int1++); } } On the first code, would I have to make an "object oMan" for each individual NPC? Link to comment Share on other sites More sharing options...
DarthStoney Posted November 24, 2010 Share Posted November 24, 2010 On the first code, would I have to make an "object oMan" for each individual NPC? Yes, if each NPC has a different "tag" then you'll need to add a line for each one. Also the "oMan" can be any name you want. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.