Forged Alliance Forever Forged Alliance Forever Forums 2020-07-17T20:10:48+02:00 /feed.php?f=2&t=19585 2020-07-17T20:10:48+02:00 2020-07-17T20:10:48+02:00 /viewtopic.php?t=19585&p=185700#p185700 <![CDATA[Re: Trying to understand the LUA]]>
Thank you again for directing me.

Statistics: Posted by ConditionZero — 17 Jul 2020, 20:10


]]>
2020-07-17T20:03:42+02:00 2020-07-17T20:03:42+02:00 /viewtopic.php?t=19585&p=185699#p185699 <![CDATA[Re: Trying to understand the LUA]]> Statistics: Posted by ConditionZero — 17 Jul 2020, 20:03


]]>
2020-07-17T17:40:09+02:00 2020-07-17T17:40:09+02:00 /viewtopic.php?t=19585&p=185697#p185697 <![CDATA[Re: Trying to understand the LUA]]>
ConditionZero wrote:
Some attributes have "New" in front of them, some don't. Does this add to the existing value, or replace it?


They replace the original value.

NewDamageMod:

NewDamageMod is used in UAL0301_script.lua for the StabilitySuppressan:
https://github.com/FAForever/fa/blob/develop/units/UAL0301/UAL0301_script.lua#L136
https://github.com/FAForever/fa/blob/develop/units/UAL0301/UAL0301_script.lua#L141

and its used inside URL0301_script.lua for the FocusConvertor:
https://github.com/FAForever/fa/blob/develop/units/URL0301/URL0301_script.lua#L186
https://github.com/FAForever/fa/blob/develop/units/URL0301/URL0301_script.lua#L190


NewMaxRadius:

NewMaxRadius is used inside Blueprints.lua
https://github.com/FAForever/fa/blob/develop/lua/system/Blueprints.lua#L553

and in several other unit scripts:

UAL0001_script.lua
UAL0301_script.lua
UEL0001_script.lua
UEL0301_script.lua
URL0001_script.lua
URL0301_script.lua
XSL0001_script.lua
XSL0301_script.lua
Here is the unitfolder if you want to look at the unitcode:
https://github.com/FAForever/fa/tree/develop/units

Statistics: Posted by Uveso — 17 Jul 2020, 17:40


]]>
2020-07-17T10:05:21+02:00 2020-07-17T10:05:21+02:00 /viewtopic.php?t=19585&p=185681#p185681 <![CDATA[Re: Trying to understand the LUA]]> https://supcom.fandom.com/wiki/Blueprint .
The other ones you often will find specified in the script file of the unit (you have the _unit file which is the blueprint and the scriptfile. in the scripfile things like what a new upgrade does etc. are specified. there e.g. sth like NewDamageMod is used and from the way its used there you can see what it does (e.g. the new dmg mod could be added on old dmg or replace old dmg). if you dont find a scrip file in the unit folder that doesnt mean its not there, it means you have to go to the folder where fa is installed for you (steam I guess) and get the script file from there.

Statistics: Posted by Turinturambar — 17 Jul 2020, 10:05


]]>
2020-07-17T01:13:16+02:00 2020-07-17T01:13:16+02:00 /viewtopic.php?t=19585&p=185676#p185676 <![CDATA[Re: Trying to understand the LUA]]>
What you're looking at here is the data for an enhancement - some values are well understood, Energy, Mass and Time - and of course, the name of the Enhancement. The slot, on the unit, that must be available and open - and the bone, on the model, that the enhancement effect will be attached to while it is happening.

The others, NewDamageMod and NewMaxRadius, mean nothing on their own, but it's likely that the enhancement code is looking for these specific values. However, you cannot tell from here whether the values will add to, replace, or do anything at all - for that - you'll need to find the Enhancement code, which might be partially located in the units' script file, or the general enhancement functions located in the core code.

Statistics: Posted by Sprouto — 17 Jul 2020, 01:13


]]>
2020-07-17T01:03:39+02:00 2020-07-17T01:03:39+02:00 /viewtopic.php?t=19585&p=185675#p185675 <![CDATA[Trying to understand the LUA]]>
Example:
Code:
FocusConvertor = {
            BuildCostEnergy = 24000,
            BuildCostMass = 800,
            BuildTime = 3000,
            Icon = 'fc',
            Name = '<LOC enhancements_0093>Disintegrator Amplifier',
            NewDamageMod = 200,
            NewMaxRadius = 35,
            Slot = 'RCH',
            UpgradeUnitAmbientBones = {
                'URL0301',
            },

Statistics: Posted by ConditionZero — 17 Jul 2020, 01:03


]]>