Blueprint question.. RoF, DoTT.

Everything about mods can be found here.

Moderator: Morax

Blueprint question.. RoF, DoTT.

Postby Zsombi » 19 Nov 2017, 14:32

Rate of Fire, how is that used? The wiki states that it is made up of 2 values but in the files there is only one.

DoTT, the wiki states that it's value is measured in ticks, so how much is that in 'everyday' time measurements? Is 1 tick 1 sec. or is it 0,1 sec.? For ex. how long would 2.5 mean? or 0.5? in simple numbers that is a half, but in sec. or mil.sec. a half is not 0.5 but 0.30 .

Thanks.
Zsombi
Avatar-of-War
 
Posts: 73
Joined: 20 Feb 2013, 16:04
Location: Romania
Has liked: 4 times
Been liked: 3 times
FAF User Name: Zsombi

Re: Blueprint question.. RoF, DoTT.

Postby speed2 » 19 Nov 2017, 14:58

1s = 10 ticks
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Blueprint question.. RoF, DoTT.

Postby Zsombi » 20 Nov 2017, 16:32

speed2 wrote:1s = 10 ticks

Thanks.

What about RateOfFire?

This is the Wiki page on the subject. However whichever unit .bp i look at there is only one value associated with that property. Why is that, and where is it used outside perhaps displayed description text?

Spoiler: show
I even looked at FAF-ized bp files but those are not much better than the vanilla files when it comes to code description comments. The game is quite old, the faf team & contributors have achieved quite a lot, yet there is still no proper guide.. the documentation on the wiki I linked to above is rudimentary at best.
Zsombi
Avatar-of-War
 
Posts: 73
Joined: 20 Feb 2013, 16:04
Location: Romania
Has liked: 4 times
Been liked: 3 times
FAF User Name: Zsombi

Re: Blueprint question.. RoF, DoTT.

Postby Franck83 » 20 Nov 2017, 18:19

The subject is more complex than it seems.

RoF is easy to understand for beams weapons. Just one value to change. In modding, editing unit bp or using Weapon:ChangeRateOfFire(MyNewValue) will be ok.

But for some kind of weapons (missiles, bombs...) you can have reload timers. Doubling Rof will not be always effective. Sometimes, you can be in desync with reload timers.
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

Re: Blueprint question.. RoF, DoTT.

Postby Zsombi » 20 Nov 2017, 19:09

Franck83 wrote:The subject is more complex than it seems. ...


Let's take an example. Back Ops ACU UEF flamer weapon:
code snippet

Code: Select all
    Damage = 1,
    DoTPulses = 15,
    DoTTime = 2.5,
    RateOfFire = 10,


Does this mean that the projectile's 1 damage value will be applied 15 times in a span of time measured in 2.5 ticks ( 0,25 sec. ? ) ... times 10?

Again, going by the wiki, RoT is calculated value yet, it is not since we have to give it... :?
I still don't understand. :oops: There are several other time-defining parameters already .. so what is it's use, the logic in it's function, if it's a calculated value why do we have to define it why isn't it actually calculated internally, when I define it what other values do I have to take into account and which one why, so on.
Zsombi
Avatar-of-War
 
Posts: 73
Joined: 20 Feb 2013, 16:04
Location: Romania
Has liked: 4 times
Been liked: 3 times
FAF User Name: Zsombi

Re: Blueprint question.. RoF, DoTT.

Postby Franck83 » 20 Nov 2017, 19:34

If i understand well :

Dot = Damage over Time.
DotTime is the dot duration (must be in seconds since 2.5 ticks has no sense, must be integer values).
DotPulses is the number of pulses in DotTime.

DoTPulses = 15 pulses of 1 damage during 2.5s.

RateofFire = 10 means that each second 10 x (15 pulses of 1 damages during 2.5s are applied).

So DPS is increasing overtime to reach maximum effect.

Second 1 = 150 pulses of 1 damage
Second 2 = 300 pulses of 1 damages are active
Second 2.5 = 375 pulses of 1 damages are active (peak dps)
Second 3 = 375 pulses actives (some of the first one are out of timer after 2.5s)....

This seems to simulate well a flamer weapon.
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

Re: Blueprint question.. RoF, DoTT.

Postby Franck83 » 20 Nov 2017, 19:45

Zsombi wrote:Again, going by the wiki, RoT is calculated value yet, it is not since we have to give it... :?


Rot is not always a calculated value. You can set it in most weapons types (you need to adjust or sync reload timers too on some). But it depends of the weapon itself.

You can change it in units blueprints, or by using some methods (Weapon:ChangeRateOfFire(MyNewValue) or by Applying a Buff).

I currently making a mod that changes Rof of weapons in real time (by switching between stances (Normal -> offensive) or by upgrading the weapons). And it works.

Why do you care about Rof ?
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

Re: Blueprint question.. RoF, DoTT.

Postby Zsombi » 23 Nov 2017, 00:02

Once I had some unit / faction ideas but I just don't have "the modding gene" so they stayed just that. Eventually I became interested in how stuff works internally so I started going through some of the unit files and trying to understand the mechanics.
Zsombi
Avatar-of-War
 
Posts: 73
Joined: 20 Feb 2013, 16:04
Location: Romania
Has liked: 4 times
Been liked: 3 times
FAF User Name: Zsombi

Re: Blueprint question.. RoF, DoTT.

Postby Uveso » 23 Nov 2017, 05:33

Hello Zsombi,

looks like you are really interested in this.

That's why i want so share a smal mod from my private collection to show how dps etc. are calculated.
The mod wil also add some additional informations to the Tooltip: (enable "Display more Unit Stats")

SmartTip.png
SmartTip.png (283.54 KiB) Viewed 2781 times

You will se 3 different DPS stats for every weapon. (It's my debug mod for dps calculation)

Damage: Are the calculations from the game. This needs the option "Display more Unit Stats" enabled!
Hussar: These numbers are based on the unitmanger "UnitsAnalyzer.lua.GetWeaponSpecs()"
Uveso: My own calculations about dps ^^

(Why 3 ????; Well, we need at least 1 helper variable added to some units to make a accurate dps calculation of all weapons. - But that's another story)

And on the last line you can see the unitID and the corresponding mod name for the unit.

You can find the dps calculations in one file:
Code: Select all
\Mods\SmartUnitTooltip\hook\lua\ui\game\unitviewDetail.lua

There you can see how the tooltip is hooked into the game and the different dps calculation functions for each weapongroup.
(Starting line 305 "function GetWeaponDPS(bp,weapon)")

You can use everything from the mod if you do me a favor.
If you find a better calculation or a bug, please tell me/us :)

Greetings, Uveso.
Attachments
SmartUnitTooltip-v2.1.zip
(21.57 KiB) Downloaded 102 times
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest