iqoniq Posted November 9, 2020 Share Posted November 9, 2020 I'm working on a mod, and I'm trying to get two NPCs fighting. The whole thing is scripted (no quests or scenes), so it basically calls the fighters, they do battle, despawn on death and the winner is announced. The scripts seem to work fine, they spawn and they fight fine, but there's always one victor (the enemy) and the player's NPC gets absolutely battered pretty quickly. The NPCs are both copies of legendary wolves (glowing for the player, rabid for the enemy) and I've set their stats as the same in the actor window so I'm not sure what I'm doing wrong. Is there anyway I can get the outcome to be fairly random that doesn't involve me weighting the fight with buffs or stats before it even starts? It's probably a noob mistake I'm making, but I'm still learning so please be nice. Thanks in advance. Link to comment Share on other sites More sharing options...
SKKmods Posted November 9, 2020 Share Posted November 9, 2020 If both actors are truely and totally identical, to apply some "managed" randomness I would suggest using damage in, or out, or both multiplying perk based on randomised actor values. Look at perks that use EntryPoint ModWeaponAttackDamage and ModIncomingWeaponDamage and use the function MultiplyActorValueMult. Resources involved; PerkForFriend, PerkForHostileActorValue PerkForFriendDamageIn, PerkForFriendDamageOut, PerkForHostileDamageIn , PerkForHostileDamageOutScript to Generate and assign Utility.RandomFloat(0.9, 1.1) to the actor values for say +/- 10% jitter. Link to comment Share on other sites More sharing options...
Recommended Posts