Forged Alliance Forever Forged Alliance Forever Forums 2017-04-12T22:34:21+02:00 /feed.php?f=41&t=14363 2017-04-12T21:43:35+02:00 2017-04-12T21:43:35+02:00 /viewtopic.php?t=14363&p=146769#p146769 <![CDATA[Re: Mod Help/Resources]]> Statistics: Posted by Resin_Smoker — 12 Apr 2017, 21:43


]]>
2017-04-12T22:34:21+02:00 2017-04-12T21:13:10+02:00 /viewtopic.php?t=14363&p=146768#p146768 <![CDATA[Re: Mod Help/Resources]]>
OR you can open the mesh file with a text editor. Usually the first phrase shown is the master bone. This bone is often referred via LUA strings as bone "0". Normal for units such as the UEF COMMANDER it should be UEF001 (if i recall correctly), thus matching the master bone with the units designation for simplicity sake. However, this could be named anything the mesh designer wants so looking it up can be a big help.

Note: All weapon muzzles / barrels are mesh bones. Even if its just the master bone being used.

Statistics: Posted by Resin_Smoker — 12 Apr 2017, 21:13


]]>
2017-04-12T19:29:02+02:00 2017-04-12T19:29:02+02:00 /viewtopic.php?t=14363&p=146760#p146760 <![CDATA[Re: Mod Help/Resources]]> Statistics: Posted by Killzone — 12 Apr 2017, 19:29


]]>
2017-04-12T18:38:01+02:00 2017-04-12T18:38:01+02:00 /viewtopic.php?t=14363&p=146758#p146758 <![CDATA[Re: Mod Help/Resources]]> Statistics: Posted by Resin_Smoker — 12 Apr 2017, 18:38


]]>
2017-04-12T18:32:39+02:00 2017-04-12T18:32:39+02:00 /viewtopic.php?t=14363&p=146757#p146757 <![CDATA[Re: Mod Help/Resources]]>
The "Typeclass" needs to be unique, otherwise it could overwrite a pre-exsisting unit. (MAC001 sounds familiar)

What do you show in your error log? (While running the game in windowed mode, press F9 to open the log window. Look for red or orange text anytime you spawn your unit or interface with it in some way)

Odds are that of the unit isnt working as planed, you may have a type-o or other such error.

The script shown defines the LUA script for the unit as an Air Entity. The blueprint should also reflect this.

The weapon name in the script should match the weapon "label" in the blueprint or it will not fire.

Statistics: Posted by Resin_Smoker — 12 Apr 2017, 18:32


]]>
2017-04-12T17:21:37+02:00 2017-04-12T17:21:37+02:00 /viewtopic.php?t=14363&p=146753#p146753 <![CDATA[Re: Mod Help/Resources]]>
Here's my script code, if it'll help:
Spoiler: show
Code:
local TAirUnit = import('/lua/terranunits.lua').TAirUnit
local TIFStrategicMissileWeapon = import('/lua/terranweapons.lua').TIFStrategicMissileWeapon

MAC0001 = Class(TAirUnit) {
    Weapons = {
        NukeMissiles = Class(TIFStrategicMissileWeapon) {},
    },
}
TypeClass = MAC0001


*EDIT: The weapon audio plays fine, but no nuke is produced. All-in-all very strange :\

Statistics: Posted by Killzone — 12 Apr 2017, 17:21


]]>
2017-04-12T09:06:03+02:00 2017-04-12T09:06:03+02:00 /viewtopic.php?t=14363&p=146741#p146741 <![CDATA[Re: Mod Help/Resources]]>
BuildRate = 'n', <How fast this unit build other units & ammo (This assumes that the ammo has a cost defined within it's BP)>

Also the bounds you have set is massive and could use reducing by a factor of 10. I suspect that your SkirtSizeX/Z of "10" is whats wrong. Try using a value of "1" and then adjusting this as you go to see what fits the mesh better.

Statistics: Posted by Resin_Smoker — 12 Apr 2017, 09:06


]]>
2017-04-12T02:57:10+02:00 2017-04-12T02:57:10+02:00 /viewtopic.php?t=14363&p=146737#p146737 <![CDATA[Re: Mod Help/Resources]]>

Spoiler: show
Image


Spoiler: show
Image

Statistics: Posted by Killzone — 12 Apr 2017, 02:57


]]>
2017-04-12T01:31:19+02:00 2017-04-12T01:31:19+02:00 /viewtopic.php?t=14363&p=146732#p146732 <![CDATA[Re: Mod Help/Resources]]>
Its possible that a land unit could target and fire on your satellite. Better to use Layer Air or Orbit and then make the satellite non-targetable. Oh and dont forget that land units may have to path around a ground units that's technically held up in the air...

Edit: Second though "Land" should work so long as the unit script says it's an Air Unit, it will behave like one. Just make sure you dont mix air / land unit properties otherwise you'll see some really strange things in game. Case in point, I set a fighter elevation to 1 and made it really fast. This produced the effect where the fighter would impact the ground, bouncing off the dirt every time the elevation changed.

Statistics: Posted by Resin_Smoker — 12 Apr 2017, 01:31


]]>
2017-04-12T01:28:12+02:00 2017-04-12T01:28:12+02:00 /viewtopic.php?t=14363&p=146731#p146731 <![CDATA[Re: Mod Help/Resources]]>
Code:
        CommandCaps = {
            RULEUCC_Attack = true,
            RULEUCC_CallTransport = false,
            RULEUCC_Capture = false,
            RULEUCC_Guard = true,
            RULEUCC_Move = true,
            RULEUCC_Nuke = false,
            RULEUCC_Patrol = true,
            RULEUCC_Pause = true,
            RULEUCC_Reclaim = false,
            RULEUCC_Repair = false,
            RULEUCC_RetaliateToggle = true,
            RULEUCC_SiloBuildNuke = true,
            RULEUCC_Stop = true,
            RULEUCC_Transport = false,
        },



Try " RULEUCC_Nuke = true, "

This should add the nuke button to the units UI.

As it's a manual fire weapon the below could be set to false...
" RULEUCC_Attack = false, "

Statistics: Posted by Resin_Smoker — 12 Apr 2017, 01:28


]]>
2017-04-12T01:14:46+02:00 2017-04-12T01:14:46+02:00 /viewtopic.php?t=14363&p=146730#p146730 <![CDATA[Re: Mod Help/Resources]]>
Code:
    Footprint = {
        MaxSlope = 0.25,
        SizeX = 1,
        SizeZ = 1,
    },


Footprint is the "required" o-grid area a unit needs to be built, this can be different then the units actual size / hitbox. Keep in mind that there are "standard" footprint sizes already defined. Choosing one footprint over another can add effects as predefined by the games lua script. (Yes this can be modded too)

Code:
    Physics = {
        BankingSlope = 0,
        BuildOnLayerCaps = {
            LAYER_Air = false,
            LAYER_Land = true,
            LAYER_Orbit = false,
            LAYER_Seabed = false,
            LAYER_Sub = false,
            LAYER_Water = false,
        },
        Elevation = 75,
        FuelRechargeRate = 150,
        FuelUseTime = 0,
        MaxAcceleration = 1,
        MaxSpeed = 10,
        MaxSteerForce = 100,
        MeshExtentsX = 5.75,
        MeshExtentsY = 4.5,
        MeshExtentsZ = 8,
        MinSpeedPercent = 0.85,
        MotionType = 'RULEUMT_Air',
        SkirtOffsetX = -1.5,
        SkirtOffsetZ = -1.5,
        SkirtSizeX = 10,
        SkirtSizeZ = 10,
        TurnRadius = 100,
        TurnRate = 20,
    },


BuildOnLayerCaps = which layer the unit can be built on (water / air / land ect.)

Elevation = how high above the ground the unit will be while in play. Your setting of 75 means that whatever is built is basically floating in the air, despite being built on the ground. (this isn't flying, just stuck in space) Normally this is used to offset a unit above the ground when it is uneven to prevent clipping issues. Typically small values are used to fine to the appearance of a unit or to give the illusion that a unit is hovering.

MeshExtentsX/Y/Z = the boundaries of the unit in question (x,y,z). Be aware this isn't the units Hitbox but rather just defining the mesh area. Beyond that, I'm not aware of this having an ingame purpose. It's possible that a script can be written to use the Mesh size and unit scaling to auto setup hitboxes / selection-size ect. However this all assumes that custom meshes all use the same "scale" when developing their models.

SkirtOffsetX/Y = The offset of the decal from the meshes center bone of the unit in question.

SkirtSizeX/Y/Z = the decal size that's placed under a unit, if any. (buildings have this)

SelectionSizeX/Y = The area above a unit that a mouse cursor must be over for the selection reticle to be shown.

SelectionThickness = Thickness of the selection reticle.

SizeX/Y/Z = Units hitbox. This can be either a Box or a Sphere. Keep in mind that the Sphere has only one value, its radius.

CollisionOffsetX/Y/Z = Offsets a units hitbox, which is normally centered over it's main mesh bone.

CollisionShape = Sphere / Box shape for hitbox. Changing a units scaling requires that its hitbox / selection box be rescaled as well.

Note: Unit hitboxes can be set and manipulated via scripts or via console commands for testing.

Killzone, can you provide pic's of the unit in game so i can advise?

Resin

Statistics: Posted by Resin_Smoker — 12 Apr 2017, 01:14


]]>
2017-04-11T17:14:02+02:00 2017-04-11T17:14:02+02:00 /viewtopic.php?t=14363&p=146700#p146700 <![CDATA[Re: Mod Help/Resources]]> Statistics: Posted by Resin_Smoker — 11 Apr 2017, 17:14


]]>
2017-04-11T16:26:21+02:00 2017-04-11T16:26:21+02:00 /viewtopic.php?t=14363&p=146697#p146697 <![CDATA[Re: Mod Help/Resources]]>
Here's the code, if anyone is willing to look through it lol :
Spoiler: show
Code:
UnitBlueprint {
    Air = {
        BankFactor = 0,
        BankForward = false,
        CanFly = true,
        HoverOverAttack = true,
        KLift = 1,
        KLiftDamping = 10,
        KMove = 1,
        KMoveDamping = 10,
        KTurn = 1,
        KTurnDamping = 10,
        LiftFactor = 10,
        MaxAirspeed = 6,
        StartTurnDistance = 50,
    },
    Audio = {
        AirUnitWaterImpact = Sound {
            Bank = 'Explosions',
            Cue = 'Expl_Water_Lrg_01',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        AmbientMove = Sound {
            Bank = 'XEA',
            Cue = 'XEA0002_Move_Loop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        Destroyed = Sound {
            Bank = 'UEADestroy',
            Cue = 'UEA_Destroy_Med',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        Killed = Sound {
            Bank = 'UEADestroy',
            Cue = 'UEA_Destroy_Air_Killed',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StartMove = Sound {
            Bank = 'XEA',
            Cue = 'XEA0002_Move_Start',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StopMove = Sound {
            Bank = 'XEA',
            Cue = 'XEA0002_Move_Stop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        Thruster = Sound {
            Bank = 'XEA',
            Cue = 'XEA0002_Move_Thruster',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        UISelection = Sound {
            Bank = 'Interface',
            Cue = 'UEF_Select_Air',
            LodCutoff = 'UnitMove_LodCutoff',
        },
    },
    Buffs = {
        Regen = {
            Level1 = 10,
            Level2 = 20,
            Level3 = 30,
            Level4 = 40,
            Level5 = 50,
        },
    },
    BuildIconSortPriority = 110,
    Categories = {
        'PRODUCTSC1',
        'SELECTABLE',
        'UNTARGETABLE',
        'BUILTBYTIER3COMMANDER',
        'BUILTBYTIER3ENGINEER',
        'UEF',
        'MOBILE',
        'AIR',
        'HIGHALTAIR',
        'STRATEGIC',
        'NUKE',
        'SILO',
        'EXPERIMENTAL',
        'NEEDMOBILEBUILD',
        'VISIBLETORECON',
        'RECLAIMABLE',
        'DRAGBUILD',
        'SHOWATTACKRETICLE',
        'OVERLAYRADAR',
        'OVERLAYSONAR',
        'OVERLAYMISC',
        'SORTSTRATEGIC',
    },
    CollisionOffsetY = -0.65,
    Defense = {
        AirThreatLevel = 0,
        ArmorType = 'Normal',
        EconomyThreatLevel = 0,
        Health = 100,
        MaxHealth = 100,
        RegenRate = 0,
        SubThreatLevel = 0,
        SurfaceThreatLevel = 0,
    },
    Description = '<LOC mac0001_desc>Experimental Satelite',
    Display = {
        Mesh = {
            IconFadeInZoom = 130,
            LODs = {
                {
                    LODCutoff = 500,
                    ShaderName = 'AeonCZAR',
                },
                {
                    LODCutoff = 1500,
                    ShaderName = 'Aeon',
                },
            },
        },
        PlaceholderMeshName = 'UXB0000',
        SpawnRandomRotation = true,
        UniformScale = 0.05,
    },
    Economy = {
        BuildCostEnergy = 1,
        BuildCostMass = 1,
        BuildRate = 1,
        BuildTime = 1,
    },
    Footprint = {
        MaxSlope = 0.25,
        SizeX = 1,
        SizeZ = 1,
    },
    General = {
        Category = 'Strategic',
        Classification = 'RULEUC_Weapon',
        CommandCaps = {
            RULEUCC_Attack = true,
            RULEUCC_CallTransport = false,
            RULEUCC_Capture = false,
            RULEUCC_Guard = true,
            RULEUCC_Move = true,
            RULEUCC_Nuke = false,
            RULEUCC_Patrol = true,
            RULEUCC_Pause = true,
            RULEUCC_Reclaim = false,
            RULEUCC_Repair = false,
            RULEUCC_RetaliateToggle = true,
            RULEUCC_SiloBuildNuke = true,
            RULEUCC_Stop = true,
            RULEUCC_Transport = false,
        },
        FactionName = 'Uef',
        Icon = 'air',
        SelectionPriority = 5,
        TechLevel = 'RULEUTL_Secret',
        UnitName = '<LOC MAC0001_name>Orbital MAC',
        UnitWeight = 1,
    },
    Intel = {
        RadarRadius = 30,
        SonarRadius = 30,
        VisionRadius = 20,
    },
    Interface = {
        HelpText = '<LOC MAC0001_help>Experimental Satellite',
    },
    LifeBarHeight = 0.075,
    LifeBarOffset = 1.2,
    LifeBarSize = 2,
    Physics = {
        BankingSlope = 0,
        BuildOnLayerCaps = {
            LAYER_Air = false,
            LAYER_Land = true,
            LAYER_Orbit = false,
            LAYER_Seabed = false,
            LAYER_Sub = false,
            LAYER_Water = false,
        },
        Elevation = 75,
        FuelRechargeRate = 150,
        FuelUseTime = 0,
        MaxAcceleration = 1,
        MaxSpeed = 10,
        MaxSteerForce = 100,
        MeshExtentsX = 5.75,
        MeshExtentsY = 4.5,
        MeshExtentsZ = 8,
        MinSpeedPercent = 0.85,
        MotionType = 'RULEUMT_Air',
        SkirtOffsetX = -1.5,
        SkirtOffsetZ = -1.5,
        SkirtSizeX = 10,
        SkirtSizeZ = 10,
        TurnRadius = 100,
        TurnRate = 20,
    },
    SelectionSizeX = 2,
    SelectionSizeZ = 0.8,
    SelectionThickness = 0.36,
    SizeX = 2,
    SizeY = 2,
    SizeZ = 2,
    StrategicIconName = 'icon_experimental_generic',
    StrategicIconSortPriority = 55,
    Veteran = {
        Level1 = 40,
        Level2 = 80,
        Level3 = 120,
        Level4 = 160,
        Level5 = 200,
    },
    Weapon = {
        {
            AboveWaterTargetsOnly = true,
            Audio = {
                Fire = Sound {
                    Bank = 'URLWeapon',
                    Cue = 'URB2305_Missile_Cruise',
                    LodCutoff = 'Weapon_LodCutoff',
                },
            },
            BallisticArc = 'RULEUBA_None',
            CollideFriendly = false,
            CountedProjectile = true,
            Damage = 0,
            DamageFriendly = true,
            DamageType = 'Normal',
            DisplayName = 'Nuclear Warhead',
            FireTargetLayerCapsTable = {
               Air = 'Land|Water|Seabed',
                Land = 'Land|Water|Seabed',
                Seabed = 'Land|Water|Seabed',
                Sub = 'Land|Water|Seabed',
                Water = 'Land|Water|Seabed',
            },
            FiringTolerance = 1,
            ForceSingleFire = true,
            InitialProjectileStorage = 3,
            Label = 'NukeMissiles',
            ManualFire = 1,
            MaxProjectileStorage = 3,
            MaxRadius = 3,
            MuzzleChargeDelay = 5,
            MuzzleSalvoDelay = 0,
            MuzzleSalvoSize = 1,
            MuzzleVelocity = 10,
            NukeInnerRingDamage = 70000,
            NukeInnerRingRadius = 10,
            NukeInnerRingTicks = 24,
            NukeInnerRingTotalTime = 0,
            NukeOuterRingDamage = 0,
            NukeOuterRingRadius = 10,
            NukeOuterRingTicks = 20,
            NukeOuterRingTotalTime = 0,
            NukeWeapon = true,
            ProjectileId = '/projectiles/TIFMissileNuke01/TIFMissileNuke01_proj.bp',
            ProjectilesPerOnFire = 1,
            RackBones = {
                {
                    MuzzleBones = {
                        'Turret_Muzzle',
                    },
                    RackBone = 'Turret_Barrel',
                },
            },
            RackFireTogether = false,
            RackRecoilDistance = 0,
            RackReloadTimeout = 10,
            RackSalvoChargeTime = 3,
            RackSalvoReloadTime = 3,
            RackSalvoSize = 1,
            RackSlavedToTurret = false,
            RangeCategory = 'UWRC_DirectFire',
            RateOfFire = 1,
            SlavedToBody = true,
            SlavedToBodyArcRange = 5,
            TargetCheckInterval = 0.5,
            TargetRestrictDisallow = 'UNTARGETABLE',
            TurretBoneMuzzle = 'Turret_Muzzle',
            TurretBonePitch = 'Turret_Muzzle',
            TurretBoneYaw = 'Turret_Muzzle',
            TurretDualManipulators = false,
            TurretPitch = 0,
            TurretPitchRange = 180,
            TurretPitchSpeed = 360,
            TurretYaw = 0,
            TurretYawRange = 180,
            TurretYawSpeed = 360,
            Turreted = true,
            WeaponCategory = 'Indirect Fire',
            WeaponRepackTimeout = 10,
            WeaponUnpacks = false,
        },
        {
            AboveWaterTargetsOnly = true,
            Damage = 3000,
            DamageFriendly = true,
            DamageRadius = 2,
            DamageType = 'Normal',
            DisplayName = 'Air Crash',
            DummyWeapon = true,
            Label = 'DeathImpact',
            WeaponCategory = 'Death',
        },
    },
    Wreckage = {
        Blueprint = '/props/DefaultWreckage/DefaultWreckage_prop.bp',
        EnergyMult = 0,
        HealthMult = 0.9,
        MassMult = 0.9,
        ReclaimTimeMultiplier = 1,
        WreckageLayers = {
            Air = false,
            Land = true,
            Seabed = false,
            Sub = false,
            Water = false,
        },
    },
}

Statistics: Posted by Killzone — 11 Apr 2017, 16:26


]]>
2017-04-11T09:49:14+02:00 2017-04-11T09:49:14+02:00 /viewtopic.php?t=14363&p=146679#p146679 <![CDATA[Re: Mod Help/Resources]]> - a unit that does it already
- a mod that does it already
- search the vanilla code for it
- search the FAF override code for it

Somewhere I made a list of the available functions... that is handy. Doesnt give you any idea how to use them. So I got windows to searchindex all of the source code and I'd text-search through it. What also helped was to delete everything that wasn't LUA (speeds up search).

Not pretty

Statistics: Posted by nine2 — 11 Apr 2017, 09:49


]]>
2017-04-11T07:43:26+02:00 2017-04-11T07:43:26+02:00 /viewtopic.php?t=14363&p=146675#p146675 <![CDATA[Re: Mod Help/Resources]]>
Code:
BuildableCategory = {
            'BUILTBYCOMMANDER AEON',
            'BUILTBYTIER2COMMANDER AEON',
            'BUILTBYTIER3COMMANDER AEON',
        },

then it's using restrictions for upgrades...

So as long as you have these 2 categories it should be buildable.

For the Class you might want to check this file https://github.com/FAForever/fa/blob/develop/lua/system/class.lua not all files are on git since we didn't modify them all, so for some you will need to go to your game installation.

Statistics: Posted by speed2 — 11 Apr 2017, 07:43


]]>