Jump to content

Where can I find the scripts that calculate settlement defense rating?


Recommended Posts

Hi guys, I am looking for the scripts that calculate the defence rating for settlements but I can only seem to find scripts that use that value. Does anyone know where the value is calculated?

 

I plan on changing the defence value provided by guards to also increase by a small amount based on their equipment. The equation to calculate how much they provide is as follows.

If weapon dps >= 50
	Defence Rating = Defence Rating + 5
Else
	Defence Rating = Defence Rating + weapon dps / 10

If armour rating >= 50
	Defence Rating = Defence Rating + 5
Else
	Defence Rating = Defence Rating + armour rating / 10

This will be in addition to the 2 defence that is provided for each guard post they are assigned to.

 

Any help finding the script I am looking for will be appreciated. Thanks guys.

Edited by Guest
Link to comment
Share on other sites

There is a lot of attack and safety stuff in WorkshopScript and WorkshopParentScript though i think it would be a bad idea to change those scripts.

 

Alternatively you can create an object and assign two ActorValues:

Safety = 20

WorkshopResourceObject = 1

 

This would add 20 Safety-points to your settlement. If you modify the value, this should also modify the amount of safety added to the settlement.

Link to comment
Share on other sites

Thanks! I tried to make sense of what I was seeing in the Workshop and WorkshopParent scripts but it just gave me a headache lol.

 

When you say create an object do you mean a workshop placeable object such as turrets, chests, wardrobes, etc?

 

I'm still trying to get my head around the workshop system so that will give me an excuse to start messing around with placeables lol.

Link to comment
Share on other sites

 

When you say create an object do you mean a workshop placeable object such as turrets, chests, wardrobes, etc?

 

 

Yes, exactly. Every object which may have Actor-Values and scripts should be okay.

 

 

Thanks for all the help :)

 

Meant to reply earlier but I had to reinstall everything on my computer.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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