Jump to content

Trying to make companion's weapon scale with level, help~


Recommended Posts

Hello, I am currently making a mod that makes companions have better accuracy and damage.

And then I want to make them scale with level.

Changing them with FO4EDIT, but I don't know how to make them scale yet.

Can any one help me?

Thanks very much!

 

Another question, changing melee weapon score multiplier doesn't seem to help for companions to switch to melee in close combat, any idea?

Dueling or flanking doesn't work for this either...

Edited by hydralisk_mk2
Link to comment
Share on other sites

Unless something changed with Fo4, you can't. Not unless you get 'tricksy'.

 

You could have a script replacing their default unlimited ammo peashooter with a newer better one periodically. You'd have to make those yourself though, those weapons don't have any mods, and thus any way to scale naturally, by default. Keep in mind that once something is 'created', for want of a better term, it won't refresh on it's own.

 

Or I think you could create a perk for the followers that just gives them a level based bonus damage. But you would want to limit it's effects to only their base weapon, otherwise the player might give them a half-decent weapon and they'd blast holes through everything in sight.

Link to comment
Share on other sites

For perks, there are couple of options. You can give one perk several Entries(Kellogg in vanilla game has this), each with own Conditions and those conditions can be based on level. Or you can make script that removes and adds perk based on level, you just need to figure when to do that, player sleep is okay I guess.

 

For example:

Mod weapon attack damage multiply value 1.10 and conditions GetLevel <= 20 && GetLevel > 10

Mod weapon attack damage multiply value 1.20 and conditions GetLevel <= 30 && GetLevel > 20

 

Make your companion level with player and run those conditions on Player. I believe script adding and removing is better, since you don't have to run conditions at all. Just remove perk(s) when player starts sleep, then add perk(s) based on level.

 

 

For switching melee vs ranged in combat: Give your companion combat style that has 10 melee multiplier and 4-5 ranged multiplier. If you want him to use even weak melee weapons, you can give even lower ranged multiplier, like 0.01 works too. The moment he can't hit with melee, he will change to ranged. If you give him 0.00 ranged multiplier he can't range at all, unless you manually equip him with ranged weapon. Manually pressing T on his trade screen will override those multipliers.

 

For that weapon switch to work at all, you need to open your companions inventory, UNEQUIP all his weapons (press t on them) and then let him be unarmed. Once combat starts, he will pick weapon depending on situation. If you manually equip him, he is locked to his current weapon unless he runs out of ammo or you restart game(not sure about that)(or unequip him manually).

 

 

Edit: There is propably nice 3rd way to do this too. I have not tried this but I don't see why it wouldn't work.

 

Make a new actor value. Call it CharLevel or something.

 

Then, have a script that sets the value. It can be done when player sleeps. Something like this:

int ilevel = Game.GetPlayer().GetLevel() ; or run it on companion

youCompanionActorProperty.SetValue(CharLevel, ilevel)

Then, make perk but do this:

 

Mod weapon attack damage multiply 1+ Actor value mult and run that on your new actor value. So for example you would be level 20 and it would scale it like:

1 + Actor Value 20 * 0.01 = 1.20 multiplier so 20% extra damage. You can tweak the multiplier how you want of course.

 

Actually, I'm gonna test that way now, will post later if it works as I want. You can give the actor value "maximum 100" if you don't want it to scale TOO much.

edit: Seems to work fine on player atleast. Tho, I gotta say I prefer adding/removing perks via script. This is bit messy atleast if playing with one actor value and multiple perk entries with different scaling... but it works.

Edited by vkz89q
Link to comment
Share on other sites

Thanks for reply.

 

I am still trying the scaling currently.

 

As for the combat style, it is pretty hard to make them really smart only by changing the multipliers.

But Hanconk is the only one that has 2 default combat styles.

How to make more combat styles for a companion and set different conditions to choose?

 

Thanks a lot!

Link to comment
Share on other sites

You can make terminal, that has different "buttons" to choose combat styles, in fragments like this:

YourActorProperty.SetCombatStyle(CombatStyleProperty)

Or.. you can try make different AI packages with different conditions and combat styles.. but it's bit hard to get it work right. I don't recommend this at all. Not with companions. Unless it doesn't use vanilla follower system at all.

 

But, changing multipliers works fine for me atleast.. my companion will melee when she can hit something, and when she can't, she takes out gun. Use Dueling and low Circle and Fallback multi in close range tab. Not sure if clean save is needed when editing combat style they already have active. You can test it actually, put ranged multi to 0.00 and they should not shoot at all. Unless you manually equip them with gun and press T.

 

If you want him to BLOCK melee hits a lot, put defensive multi to 1.00 also I like offensive multi to 1.00 too and group offensive multi 1.00.

 

Hancock melee is not actually used. It has 0 uses when I click "use info" in creation kit.

 

And yes, they are dumb as hell. They loose combat focus and targets very easily. 20 ghouls charging at them, they kill one and are like "oh it's over", lol.

 

Edit: Also, if they have really powerful gun, and really weak melee weapon, you need to put ranged multi REALLY low and melee multi all way to max.

Edited by vkz89q
Link to comment
Share on other sites

If the melee score is higher than ranged, then they tend to melee.

I just want them to shoot normally, and switch to melee when needed.

What I see most is they keep gun bashing, not shooting or using melee weapon. :sad:

And staggered to death :/

 

They don't even have retarget close melee target flag on by default.

 

What do circle, fallback and other multi do exactly?

 

edit: typo

Edited by hydralisk_mk2
Link to comment
Share on other sites

Circle mult = higher the value, more they circle around their melee target

Fallback mult = higher the value, more they run back and "dodge" their enemies

 

Those only work when melee weapon is out. If you put them too high, they spend more time circling and running back than fighting :D

 

Hmm, something does not sound right.. maybe you have much better bashing damage than melee damage? No idea whats the problem, I can get my companions to pull melee weapons pretty much always, just sliding the melee multiplier high. Have you tried making their weapons unequipped and let them choose themself? You might need clean save to test.

 

If you don't want them to stagger, you can give them perk that says: mod incoming stagger, set value 0.

Link to comment
Share on other sites

I gave Gait a custom shotgun, with no real weapon mod, so it's just pretty high DPS. Is bash damage listed as secondary damage? It is 4, the default value.

I tried to give her varies of melee weapons, and when I lowered her ranged multi A LOT, she will use "wounding extended reaper" in close range fight.

But everything else is considered too low to bother. I did not lock her weapon by the way.

 

The shotgun I gave her is not flagged as real "automatic", but the attack delay is pretty low.

Maybe there is something tricky about the score comparison.

Animation attack second doesn't seem to matter for both melee and ranged weapon.

Changing it doesn't change any rate of fire at all.

 

As for level scaling, I believe "More Smarter Companions Mod" (by Deathlock47) has weapon scaling for companion.

http://www.nexusmods.com/fallout4/mods/20613/?

I am checking his mod with editor right now. :smile:

Edited by hydralisk_mk2
Link to comment
Share on other sites

For perks, there are couple of options. You can give one perk several Entries(Kellogg in vanilla game has this), each with own Conditions and those conditions can be based on level. Or you can make script that removes and adds perk based on level, you just need to figure when to do that, player sleep is okay I guess.

 

For example:

Mod weapon attack damage multiply value 1.10 and conditions GetLevel <= 20 && GetLevel > 10

Mod weapon attack damage multiply value 1.20 and conditions GetLevel <= 30 && GetLevel > 20

 

Make your companion level with player and run those conditions on Player. I believe script adding and removing is better, since you don't have to run conditions at all. Just remove perk(s) when player starts sleep, then add perk(s) based on level.

 

Can't I just use set value instead of multiply value, so that I don't have to set multiple ranks of the perk?

Just set one constant effect and do not have to remove previous rank?

Link to comment
Share on other sites

What you mean? Can you give me example? Set value propably is not good for weapon damage. If you set value to 2, then the weapon most likely does 2 damage. Every weapon.

 

Take a look at the crDamageKellogg perk, it's 1 perk with 1 rank, it has 2 entries. Many player perks are done same way but with several ranks. For example, rifleman1 has condition "has perk: rifleman2 == 0", which means, rifleman1 stops working the moment player takes rifleman2.

Edited by vkz89q
Link to comment
Share on other sites

  • Recently Browsing   0 members

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