Forged Alliance Forever Forged Alliance Forever Forums 2020-04-28T22:57:58+02:00 /feed.php?f=41&t=19145 2020-04-28T22:57:58+02:00 2020-04-28T22:57:58+02:00 /viewtopic.php?t=19145&p=183658#p183658 <![CDATA[Re: Custom Aerial unit Not Firing]]>

Statistics: Posted by DDDX — 28 Apr 2020, 22:57


]]>
2020-04-28T15:47:14+02:00 2020-04-28T15:47:14+02:00 /viewtopic.php?t=19145&p=183646#p183646 <![CDATA[Re: Custom Aerial unit Not Firing]]> Statistics: Posted by LJ_Pynn — 28 Apr 2020, 15:47


]]>
2020-04-28T12:38:32+02:00 2020-04-28T12:38:32+02:00 /viewtopic.php?t=19145&p=183638#p183638 <![CDATA[Re: Custom Aerial unit Not Firing]]> Well the unit has 2 muzzles, right? And no delay specified between them.


MuzzleSalvoDelay = 0, --this needs to be in.

Also, the script file lacked some brackets and I increased the slavedToBody and the pitch/yaw values because without them the unit would not shoot unless facing straight forward.

Statistics: Posted by DDDX — 28 Apr 2020, 12:38


]]>
2020-04-28T00:20:29+02:00 2020-04-28T00:20:29+02:00 /viewtopic.php?t=19145&p=183635#p183635 <![CDATA[Re: Custom Aerial unit Not Firing]]>
download the files and try it yourself :D

I already changed some stuff, replaced the weapon compleatly (its was former a tank weapon) and changed every value.
I don't get it why this weapon is not firing.
If you rename the sound inside the weapo to "fire" then you can hear the weapon but you dont see any projectiles.

Really Strage. i bet i am just dump, but you could take a look and fix it ? :D

Statistics: Posted by Uveso — 28 Apr 2020, 00:20


]]>
2020-04-27T14:59:53+02:00 2020-04-27T14:59:53+02:00 /viewtopic.php?t=19145&p=183628#p183628 <![CDATA[Re: Custom Aerial unit Not Firing]]>
That means you have to come very near the land target, then fire at an angle that is much larger than your 20. Increase pitch to 60, see what happens ;)

Statistics: Posted by DDDX — 27 Apr 2020, 14:59


]]>
2020-04-26T23:40:47+02:00 2020-04-26T23:40:47+02:00 /viewtopic.php?t=19145&p=183619#p183619 <![CDATA[Re: Custom Aerial unit Not Firing]]>
https://drive.google.com/file/d/1WBNvyJ ... sp=sharing

And here's the entirety of the unit .bp itself, if that's more simple:

Code:
UnitBlueprint {
    AI = {
        BeaconName = 'GEB5102',
    },
    Air = {
        AutoLandTime = 1,
        BankFactor = 3,
        BankForward = false,
        BreakOffDistance = 18,
        BreakOffIfNearNewTarget = true,
        BreakOffTrigger = 20,
        CanFly = true,
        CombatTurnSpeed = 0.7,
        EngageDistance = 50,
        KLift = 3,
        KLiftDamping = 2.5,
        KMove = 1,
        KMoveDamping = 2,
        KRoll = 2,
        KRollDamping = 2,
        KTurn = 0.7,
        KTurnDamping = 1,
        LiftFactor = 7,
        MaxAirspeed = 10,
        MinAirspeed = 10, 
        StartTurnDistance = 5,
        TightTurnMultiplier = 0,
        TurnSpeed = 0.9,
        Winged = true,
    },
    Audio = {
        AirUnitWaterImpact = Sound {
            Bank = 'Explosions',
            Cue = 'Expl_Water_Lrg_01',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        AmbientMove = Sound {
            Bank = 'UEA',
            Cue = 'UEA0203_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',
        },
        Landing = Sound {
            Bank = 'UEA',
            Cue = 'UEA0203_Move_Land',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        Refueling = Sound {
            Bank = 'UEA',
            Cue = 'UEA_Repair_Refuel',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StartMove = Sound {
            Bank = 'UEA',
            Cue = 'UEA0203_Move_Start',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        StopMove = Sound {
            Bank = 'UEA',
            Cue = 'UEA0203_Move_Stop',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        Thruster = Sound {
            Bank = 'UEA',
            Cue = 'UEA0203_Thruster',
            LodCutoff = 'UnitMove_LodCutoff',
        },
        UISelection = Sound {
            Bank = 'Interface',
            Cue = 'UEF_Select_Air',
            LodCutoff = 'UnitMove_LodCutoff',
        },
    },
    AverageDensity = 1,
    Buffs = {
        Regen = {
            Level1 = 2,
            Level2 = 4,
            Level3 = 6,
            Level4 = 8,
            Level5 = 10,
        },
    },
    BuildIconSortPriority = 30,
    Categories = {
        'PRODUCTSC1',
        'SELECTABLE',
        'BUILTBYTIER1FACTORY',
      'BUILTBYTIER2FACTORY',
        'BUILTBYTIER3FACTORY',
        'UEF',
      'EMPIRE',
        'MOBILE',
        'AIR',
        'TECH1',
        'GROUNDATTACK',
      'DIRECTFIRE',
        'VISIBLETORECON',
        'RECLAIMABLE',
        'OVERLAYDIRECTFIRE',
    },
    CollisionOffsetZ = 0.3,
    Defense = {
        AirThreatLevel = 0,
        ArmorType = 'Light',
        EconomyThreatLevel = 0,
        Health = 125,
        MaxHealth = 125,
        RegenRate = 0,
        SubThreatLevel = 0,
        SurfaceThreatLevel = 6,
    },
    Description = '<LOC gea0102_desc>Attack Striker',
    Display = {
        ForcedBuildSpin = 0,
        LayerChangeEffects = {
            AirLand = {
                Effects = {
                    {
                        Bones = {
                            'Exhaust',
                        },
                        Type = 'Landing01',
                    },
                },
            },
            LandAir = {
                Effects = {
                    {
                        Bones = {
                            'Exhaust',
                        },
                        Type = 'TakeOff01',
                    },
                },
            },
        },
        Mesh = {
            IconFadeInZoom = 130,
            LODs = {
                {
                    LODCutoff = 140,
                    ShaderName = 'Unit',
                },
                {
                    AlbedoName = 'gea0102_lod1_albedo.dds',
                    LODCutoff = 215,
                    ShaderName = 'Unit',
                    SpecularName = 'gea0102_lod1_specteam.dds',
                },
            },
        },
        MovementEffects = {
            BeamExhaust = {
                Bones = {
                    'Exhaust',
                },
                Cruise = true,
                Idle = true,
            },
        },
        PlaceholderMeshName = 'UXA0009',
        SpawnRandomRotation = false,
        UniformScale = 0.08,
    },
    Economy = {
        BuildCostEnergy = 40,
        BuildCostMass = 20,
        BuildTime = 10,
    },
    Footprint = {
        MaxSlope = 0.25,
        SizeX = 1,
        SizeZ = 1,
    },
    General = {
        Category = 'Gunship',
        Classification = 'RULEUC_MilitaryAircraft',
        CommandCaps = {
            RULEUCC_Attack = true,
            RULEUCC_CallTransport = true,
            RULEUCC_Capture = false,
            RULEUCC_Dock = false,
            RULEUCC_Ferry = false,
            RULEUCC_Guard = true,
            RULEUCC_Move = true,
            RULEUCC_Nuke = false,
            RULEUCC_Patrol = true,
            RULEUCC_Reclaim = false,
            RULEUCC_Repair = false,
            RULEUCC_RetaliateToggle = true,
            RULEUCC_Stop = true,
            RULEUCC_Transport = false,
        },
        FactionName = 'UEF',
        Icon = 'air',
        TechLevel = 'RULEUTL_Advanced',
        UnitName = '<LOC gea0102_name>TIE Striker',
        UnitWeight = 1,
    },
    Intel = {
        VisionRadius = 32,
    },
    Interface = {
        HelpText = '<LOC gea0102_help>Attack Striker',
    },
    LifeBarHeight = 0.075,
    LifeBarOffset = 0.5,
    LifeBarSize = 1,
    Physics = {
        BuildOnLayerCaps = {
            LAYER_Air = true,
            LAYER_Land = false,
            LAYER_Orbit = false,
            LAYER_Seabed = false,
            LAYER_Sub = false,
            LAYER_Water = false,
        },
        Elevation = 10,
        FuelRechargeRate = 5,
        FuelUseTime = 500,
        GroundCollisionOffset = 1.6,
        MaxSpeed = 0.5,
        MeshExtentsX = 1.25,
        MeshExtentsY = 1,
        MeshExtentsZ = 3,
        MotionType = 'RULEUMT_Air',
    },
    SelectionSizeX = 0.6,
    SelectionSizeZ = 0.9,
    SelectionThickness = 0.49,
    SizeSphere = 1.6,
    SizeX = 1,
    SizeY = 0.5,
    SizeZ = 1,
    StrategicIconName = 'icon_gunship2_directfire',
    StrategicIconSortPriority = 65,
    Veteran = {
        Level1 = 6,
        Level2 = 12,
        Level3 = 18,
        Level4 = 24,
        Level5 = 30,
    },
    Weapon = {
        {
            AboveWaterTargetsOnly = true,
            Audio = {
                MuzzleChargeStart = Sound {
                    Bank = 'UALWeapon',
                    Cue = 'UAL0201_Cannon_Disruptor',
                    LodCutoff = 'Weapon_LodCutoff',
                },
            },
            BallisticArc = 'RULEUBA_none',
            CollideFriendly = false,
            Damage = 10,
            DamageRadius = 3,
            DamageType = 'Normal',
            DisplayName = 'Disruptor Cannon',
            FireTargetLayerCapsTable = {
                Air = 'Land|Water|Seabed',
                Land = 'Land|Water|Seabed',
            },
            FiringTolerance = 2,
            Label = 'MainGun',
            MaxRadius = 25,
            MuzzleSalvoSize = 1,
            MuzzleVelocity = 30,
            ProjectileId = '/projectiles/ADFDisruptor01/ADFDisruptor01_proj.bp',
            ProjectileLifetimeUsesMultiplier = 1.15,
            ProjectilesPerOnFire = 2,
            RackBones = {
                {
                    MuzzleBones = {
                        'Muzzle_01',
                  'Muzzle_02',
                    },
                    RackBone = 'Turret',
                },
            },
            RackFireTogether = false,
            RackRecoilDistance = 0,
            RackReloadTimeout = 10,
            RackSalvoChargeTime = 0,
            RackSalvoReloadTime = 0,
            RackSalvoSize = 1,
            RackSlavedToTurret = false,
            RangeCategory = 'UWRC_DirectFire',
            RateOfFire = 3,
            SlavedToBody = true,
            SlavedToBodyArcRange = 5,
            TargetCheckInterval = 1,
            TargetPriorities = {
                'SPECIALHIGHPRI',
                'STRUCTURE',
                'SPECIALLOWPRI',
                'ALLUNITS',
            },
            TargetRestrictDisallow = 'UNTARGETABLE',
            TrackingRadius = 1.15,
            TurretBoneMuzzle = 'Muzzle_01',
            TurretBonePitch = 'Turret',
            TurretBoneYaw = 'Turret',
            TurretDualManipulators = false,
            TurretPitch = 0,
            TurretPitchRange = 20,
            TurretPitchSpeed = 60,
            TurretYaw = 0,
            TurretYawRange = 10,
            TurretYawSpeed = 60,
            Turreted = true,
            WeaponCategory = 'Direct Fire',
        },
        {
            AboveWaterTargetsOnly = true,
            Damage = 50,
            DamageFriendly = true,
            DamageRadius = 1,
            DamageType = 'Normal',
            DisplayName = 'Air Crash',
            DummyWeapon = true,
            FiringTolerance = 2,
            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 LJ_Pynn — 26 Apr 2020, 23:40


]]>
2020-04-26T23:13:10+02:00 2020-04-26T23:13:10+02:00 /viewtopic.php?t=19145&p=183617#p183617 <![CDATA[Re: Custom Aerial unit Not Firing]]>
It's not possible to give you any advice without viewing the full code and/or test the unit and view the game error log.

So if you like, upload your unit here and we can test/debug it.

You could also join our FAF map/mod discord server to meet other unitcreators and ask there for more help:

- Maps and Mods Team Server:
https://discord.gg/gN4SdPb

Statistics: Posted by Uveso — 26 Apr 2020, 23:13


]]>
2020-04-26T08:39:26+02:00 2020-04-26T08:39:26+02:00 /viewtopic.php?t=19145&p=183603#p183603 <![CDATA[Custom Aerial unit Not Firing]]>
So, I have a T1 Aerial unit that is Direct Fire & Groundfire, like a gunship. Building, targeting, and movement are all fine, but it does not actually attack the targets.

I created a custom weapon file in /hook/lua:

Code:
TIEBolt = Class(DefaultProjectileWeapon) {
    FxMuzzleFlash = EffectTemplate.ADisruptorCannonMuzzle01,}


Linked it to script:

Code:
local TAirUnit = import('/lua/terranunits.lua').TAirUnit
local TIEBolt = import('/lua/aeonweapons.lua').TIEBolt

GEA0102 = Class(TAirUnit)

    Weapons = {
        MainGun = Class(TIEBolt) {
      },
    },

TypeClass = GEA0102


And this is the weapon in .bp (Note: In Blender, I have two weapon muzzle bones [Muzzle_01 & Muzzle_02] parented to 'Turret' bone, and that to the unit's main GEA0102 bone):

Code:
    Weapon = {
        {
            AboveWaterTargetsOnly = true,
            Audio = {
                MuzzleChargeStart = Sound {
                    Bank = 'UALWeapon',
                    Cue = 'UAL0201_Cannon_Disruptor',
                    LodCutoff = 'Weapon_LodCutoff',
                },
            },
            BallisticArc = 'RULEUBA_none',
            CollideFriendly = false,
            Damage = 10,
            DamageRadius = 3,
            DamageType = 'Normal',
            DisplayName = 'Disruptor Cannon',
            FireTargetLayerCapsTable = {
                Air = 'Land|Water|Seabed',
                Land = 'Land|Water|Seabed',
            },
            FiringTolerance = 2,
            Label = 'MainGun',
            MaxRadius = 25,
            MuzzleSalvoSize = 1,
            MuzzleVelocity = 30,
            ProjectileId = '/projectiles/ADFDisruptor01/ADFDisruptor01_proj.bp',
            ProjectileLifetimeUsesMultiplier = 1.15,
            ProjectilesPerOnFire = 2,
            RackBones = {
                {
                    MuzzleBones = {
                        'Muzzle_01',
                  'Muzzle_02',
                    },
                    RackBone = 'Turret',
                },
            },
            RackFireTogether = true,
            RackRecoilDistance = 0,
            RackReloadTimeout = 10,
            RackSalvoChargeTime = 0,
            RackSalvoReloadTime = 0,
            RackSalvoSize = 1,
            RackSlavedToTurret = false,
            RangeCategory = 'UWRC_DirectFire',
            RateOfFire = 5,
            SlavedToBody = true,
            SlavedToBodyArcRange = 5,
            TargetCheckInterval = 1,
            TargetPriorities = {
                'SPECIALHIGHPRI',
                'STRUCTURE',
                'SPECIALLOWPRI',
                'ALLUNITS',
            },
            TargetRestrictDisallow = 'UNTARGETABLE',
            TrackingRadius = 1.15,
            TurretBoneMuzzle = 'Muzzle_01',
            TurretBonePitch = 'Turret',
            TurretBoneYaw = 'Turret',
            TurretDualManipulators = false,
            TurretPitch = 0,
            TurretPitchRange = 20,
            TurretPitchSpeed = 60,
            TurretYaw = 0,
            TurretYawRange = 10,
            TurretYawSpeed = 60,
            Turreted = true,
            WeaponCategory = 'Direct Fire',
        },



The unit will be built, can target enemies, will fly toward them, but will not fire down on them at all. The .bp (less the weapon above) is just a Gunship with the circling removed, so it just goes by like a bomber. Any ideas?

Statistics: Posted by LJ_Pynn — 26 Apr 2020, 08:39


]]>