Missile mod

User avatar
D-M
Posts: 8794
Joined: Sat 23 Jul 2011 11:10
Contact:

Missile mod

Postby D-M » Fri 26 May 2017 16:48

Is it possible to mod missile ATGM, SAM, AA, etc into the game ?
Cause there are all the missile of wargame so I assume we can, but since there is no example of a missile descriptor (as referenced in amunition.ndf) in MissileDescriptor.ndf , I have no clue what to put there instead (and unsure if this is enough).
Image

User avatar
Gronank
Colonel
Posts: 2514
Joined: Tue 8 Nov 2011 23:40
Contact:

Re: Missile mod

Postby Gronank » Fri 26 May 2017 20:35

You could use the community mod tools to look in wargame what stuff is necessary for atgms and keep you fingers crossed they haven't removed anything.
Image

User avatar
D-M
Posts: 8794
Joined: Sat 23 Jul 2011 11:10
Contact:

Re: Missile mod

Postby D-M » Fri 26 May 2017 22:27

Would probably be a better idea to look at AoA actually, but the problem is that I 'm not even sure how exactly you can pass from ndfbin to ndf. I sure hope they haven't removed or "blocked" the functionality from the engine, you still have reference to missile models, pylon and textures and they all are in the file and modding assets tool. Would be a waste.
Image

User avatar
Gronank
Colonel
Posts: 2514
Joined: Tue 8 Nov 2011 23:40
Contact:

Re: Missile mod

Postby Gronank » Sat 27 May 2017 02:11

Well, it would be like a week worth of work building a ndfbin-to-ndf decompiler into the community mod tools (the data is already there and we now now how ndf is formatted in text), but that's not really worth the effort . What I meant is that you could use the community mod tools to look at what properties the missile relevant classes are supposed to have.
Image

User avatar
D-M
Posts: 8794
Joined: Sat 23 Jul 2011 11:10
Contact:

Re: Missile mod

Postby D-M » Sat 27 May 2017 03:43

Just tried to do that but something fucked up on the third try*** , something about atomic (operation ?) conversion, it does remind me of something written in the ndf manual of AoW about unit behavior FSM but I 'm still at loss with what to do.

Code: Select all

Title : Revision SVN: 300080629 - gitlab/steeldivision | ASSERT
Message : ASSERTION FAILED
y:\Slayer\Engine\Code\Eugen\CPP\EugCore\Sources\Assertion.cpp (407)
false
File : y:\Slayer\Engine\Code\Eugen\CPP\NDF\Sources\ParseAtoms.cpp @ 214
Test : false
Crash Infos :
EAtomConversionException

"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0 __C_specific_handler
"" line 0 __FrameUnwindFilter
"" line 0 RtlRestoreContext
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0
"" line 0


Stacked debug info:

==================
==================
Nombre total d'erreurs ignorees : 0


Here are all the changes I did :

In Ammunition.ndf => Ammo_Canon_M3_early_75mmL_AP =>
added :

Code: Select all

MissileDescriptor                 = ~/Descriptor_Unit_B1_bis_FFI_Missile


in MissileDescriptor.ndf
added :

Code: Select all

// Ne pas éditer, ce fichier est auto-généré !
export Descriptor_Unit_B1_bis_FFI_Missile is TModularUnitDescriptor
(
    DescriptorId                     = GUID:{a5def612-8e85-4719-a006-c1c4ea827e2f}
    ClassNameForDebug                = 'Unit_B1_bis_FFI_Missile'
    Modules                          = [
        // TypeUnit
        TTypeUnitModuleDescriptor
            (
                ControllerName                   = EControllerName/TypeUnit
                TypeUnitValue                    = nil
                TypeUnitHintToken                = 'Command'
                PortraitForInterface             = nil
                TopViewForInterface              = nil
                MenuIconForInterface             = nil
                TextureForInterface              = nil
                NameInMenuToken                  = nil
                Nationalite                      = nil
                ShowInMenu                       = False
                Category                         = nil
                MotherCountry                    = nil
                TextureMotherCountryForInterface = nil
                UnitTypeTokens                   = [
                        'MISSILE',
                        'MISSILE_Shershen_AP',
                ]
                AcknowUnitType                   = nil
                UnitInfoJaugeType                = nil
                GenerateName                     = true
                AliasName                        = nil
                IsPrototype                      = False
                VisualForInterface              = nil
                Filters            = MAP [] 
            ),

        // Flags
            TFlagsModuleDescriptor
            (
                ControllerName = EControllerName/Flags
                InitialFlagSet =
                [
                    Flag_Detectable,
                    Flag_LdDetectable,
                    Flag_Highlightable,
                    Flag_Selectionnable,
                    Flag_Target,
                    Flag_Combattant,
                    Flag_AlreadyModifiePorteeDuTirUnitGroup,
                    Flag_GhostPlaced
                ]
            ),

        // TargetManager a élim ?
            TModuleSelector
            (
                ControllerName = EControllerName/TargetManager
                Default        = TTargetManagerModuleDescriptor
                (
                    ControllerName = EControllerName/TargetManager
                )
                Selection      = [~/NilDescriptorIfGhostOrCadavre]
            ),

        // Position
            TPositionModuleDescriptor
            (
                ControllerName             = EControllerName/Position
                StickToGround              = nil
                InGeoDb                    = True
                PorteurMustBeVisible       = True
                MustUpdateZoneIndice       = False
                ClampInWorld               = nil
                ClampOutMap                = True
                HasNearlyNullBBox          = nil
                GfxDescriptorPorteur       = ~/GfxPorteurUniteVolante
                Radius                     = ((30) * Metre)
                RelativeScanningPosition   = ~/DecalageParDefautDuPointDeVision
                CameraFollower             = GfxDescriptorCameraFollower_Missile
                LowAltitudeFlyingAltitude  = nil
                NearGroundFlyingAltitude   = nil
            ),
               

        // LinkTeam
            TLinkTeamModuleDescriptor
            (
                ControllerName = EControllerName/LinkTeam
            ),

        // Tags
        {
            TTagsModuleDescriptor
            (
                ControllerName = EControllerName/Tags
                TagSet         = [
                    "AllUnits",
                    "Unite",
                    "UNITE_B1_bis_FFI",
                    "Commandant",
                    "GroundUnits",
                    "Char_Moyen",
                    "Char",
                    "Char_CMD",
                    "Allies",
                ]
            ),
        }

        // Experience
            TExperienceModuleDescriptor
            (
                ControllerName = EControllerName/Experience
                ExperienceLevelsPackDescriptor = nil //~/ExperienceLevelsPackDescriptor_Experience_Vehicule_comm
                CanWinExperience = False
                ExperienceGainBySecond = 0.0
                KillExperienceBonus = 0.0 
            ),

        // Visibility Manque un controlleur quand le param 11 est à 2 (????)
            TModuleSelector
            (
                ControllerName = EControllerName/Visibility
                Default        = TVisibilityModuleDescriptor
                (
                    ControllerName       = EControllerName/Visibility
                    AutoRevealType       = EAutoRevealType/AutoRevealAllies
                    UnitConcealmentBonus = 1.0
                    VisionUnitType       = nil
                    AlwaysComputeLoS     = False
                    UnitIsStealth        = nil
                    HideFromDebug        = nil
                    VisionObstructionType = EVisionObstructionType/Vehicle
                    GroundDissimulationModifierType = EGroundDissumulationModifierType/Ground
                )
                Selection = [~/NilDescriptorIfGhostOrCadavre]
            ),

        // ApparenceModel
            TApparenceModelModuleDescriptor
            (
                ControllerName = EControllerName/MainApparence
                AllowMissingGameplayBBoxBone = False
                Scale                              = 1.0
                PickableObject                     = True
                Depiction                          = ~/Gfx_B1_bis_FFI
                GameplayBBoxBoneName               = 'Chassis'
                IsBaseOnModelCenter                = False
                DefaultMultiRenderTypeMaterialPack = nil
            ),

        // Damage
            TModuleSelector
            (
                ControllerName = EControllerName/Damage
                Default        = TModernWarfareDamageModuleDescriptor
                (
                    ControllerName = EControllerName/Damage
                    CommonDamageDescriptor = TModernWarfareCommonDamageDescriptor
                    (
                        SuppressDamagesRegenRatio = ~/GroundUnit_SuppressDamagesRegenRatioList
                        SuppressDamagesRegenRatioOutOfRange = ~/GroundUnit_SuppressDamagesRegenRatioOutOfRange
                        StunDamagesRegen = ~/GroundUnit_StunDamagesRegen
                        StunDamagesToGetStunned = ~/GroundUnit_StunDamagesToGetStunned
                        StunFreezesUnits = False
                        BlindageProperties = TBlindageProperties
                        (
                            ArmorDescriptorFront = ArmorDescriptor_Blindage_8
                            ArmorDescriptorSides = ArmorDescriptor_Blindage_6
                            ArmorDescriptorRear = ArmorDescriptor_Blindage_6
                            ArmorDescriptorTop = ArmorDescriptor_Toit_Lourd
                        )
                        MaxSuppressionDamages = ~/GroundUnit_MaxSuppressionDamages
                    )
                    MaxDamages = 3
                    HitRollSize = 0
                    HitRollECM = 0.0
                    MaxHPForHUD = 3
                    AutoOrientation = nil
                    IsTargetableAsBoat = False
                    IsTargetableOutsideCenter = nil
                    SkipCadavreCreation  = False
                    FxDoImpactOnUnit = nil
                    UseDamageMultiplierForFirePower = False
                    UseTopArmorAgainstFire = nil
                    Dangerousness = 200.0
                    PhysicalDamageLevelsPack = nil
                    SuppressDamageLevelsPack = nil
                    TypeForGroundDamageModifier = EGroundDamageModifierType/Undefined
                )
                Selection = [ ~/NilDescriptorIfGhostOrCadavre ]
            ),
        // ???
        ~/TemplateHaloDefault,
        // MouvementHandlerLandVehicle
            TMouvementHandler_GuidedMissileDescriptor
            (
                /////ICI
                ControllerName = EControllerName/MouvementHandler
                Maxspeed = ((200) * Metre)
                TempsDemiTour = 0.1
                FxPropulsionOnToken = "fx_propulsion_on"
                FxPropulsionOffToken = "fx_propulsion_off"
                FxStartPropulsionToken = "fx_fire"
                TimeMaxBetweenRandomMoveWhenUncontrollable = 1
                TimeMinBetweenRandomMoveWhenUncontrollable = 0.5
                RangeChaos = 1000
                AngleMaxForRandomMouvUncontrollable = 3.1
                RotationSpeedWhenUncontrollable = 15
                ChaosSpeed = 15
                DefaultConfig = TGuidedMissileMouvementConfigDescriptor
                (
                    AutoGyr = 60
                    MaxAcceleration = 11200
                    MaxSpeed = 14000
                )
                UncontrollableConfig = TGuidedMissileMouvementConfigDescriptor
                (
                    AutoGyr = 25
                    MaxAcceleration = 11200
                    MaxSpeed = 14000
                )
                CruiseAltitude = nil
                AscendantPhaseConfig = nil
                RecedingPhaseConfig = nil
            ),

        // Scanner
            TModernWarfareScannerModuleDescriptor
            (
                ControllerName     = EControllerName/Scanner
                VisibilityRollRule = nil
            ),

        // MinimapDisplay
            TMinimapDisplayModuleDescriptor
            (
                ControllerName     = EControllerName/MinimapDisplay
                Texture = $/UI/Components/Texture_Minimap_unit
                GhostTexture = nil
                IsAlwaysVisible = nil
                UseTeamColor = nil
                FollowUnitOrientation = nil
            ),


    ]
)




*** The first 2 tries failed because of a typo in the anonymous TMouvementHandler_GuidedMissileDescriptor object's members which may indicate that the compiler does recognize the class.
Image

User avatar
D-M
Posts: 8794
Joined: Sat 23 Jul 2011 11:10
Contact:

Re: Missile mod

Postby D-M » Sun 28 May 2017 00:57

I completly forgot the TModuleGuidedMissileDescriptor in the missile descriptor :

Code: Select all

TModuleGuidedMissileDescriptor
            (
                ControllerName = EControllerName/GuidedMissile
                Guidance = nil
                IsSuperWeapon = nil
                ImpactReveal_TimeBeforeImpact = nil
                ImpactReveal_TimeOfReveal = nil
            )


But I still end up with the same error though one interesting thing to note is that it's sensibly different from what the mod tool show in the AoA game files : it has 4 more members ImpactReaveal_Radius, Apparence, Mouvement, Position but those are simply not recognized by the compiler and had to be removed. Apparence, Mouvement and Position refer to the key of the unit's relevant module (in AoA, the module list is actually a map with each module being identified by a key such as "MouvementHandler", "Position" and "Apparence") but since those key don't exist in SD those members are useless.
Image

User avatar
Bougnas
Major-General
Posts: 3699
Joined: Sat 26 Apr 2014 18:24
Contact:

Re: Missile mod

Postby Bougnas » Sun 28 May 2017 17:41

B1 Bis has a guided missile?

French bias.
Image

User avatar
D-M
Posts: 8794
Joined: Sat 23 Jul 2011 11:10
Contact:

Re: Missile mod

Postby D-M » Sun 28 May 2017 18:26

No, B1 bis is a missile. :D
Image

User avatar
D-M
Posts: 8794
Joined: Sat 23 Jul 2011 11:10
Contact:

Re: Missile mod

Postby D-M » Mon 29 May 2017 12:34

In Ammunition.ndf => Ammo_Canon_M3_early_75mmL_AP =>
modified :

Code: Select all

WeaponCursorType                  = Weapon_Cursor_GroundMissile
Arme                              = EArmeType/AP_11_Missile
ProjectileType                    = EProjectileType/GuidedMissile
FxWeaponType                      = ~/TFxWeaponType_MissileATPetit


Still the same issue though.
Image

User avatar
D-M
Posts: 8794
Joined: Sat 23 Jul 2011 11:10
Contact:

Re: Missile mod

Postby D-M » Tue 30 May 2017 02:54

If only a kind soul would just give me the solution, a hint, a suggestion, a word of encouragement. Why Eugen ? Am I not worthy of thy fondness and warmth ? :(

Hulor wrote:summon
Image

Who is online

Users browsing this forum: No registered users and 1 guest