Jump to content

NPC vs NPC Combat - What am I doing wrong?


iqoniq

Recommended Posts

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

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, PerkForHostile

ActorValue PerkForFriendDamageIn, PerkForFriendDamageOut, PerkForHostileDamageIn , PerkForHostileDamageOut

Script 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...