Luvaskot 2 Posted July 22, 2016 Hi, I added this unit to Tiberium Wars. I planned it for carrying engineer to a small island where tiberium spike exist. However, I have some problems on .xml file, maybe in .w3x code too. First of all I cannot aim this unit when I try to attack it I just can force fire to the ground and that ship gets damage, but I need to keep aiming different grounds when it moves on the water. Second it cannot take engineer inside. I think it is caused by same codding error. Somehow, I need to increase kind of effect radius. Even if I handle first problem, it will probably only take units from ground. For experiment, I tried to make apc float on water before. And added spawn point for it on the ground. When you try to move it, it will automatically goes water and do not go back to the ground after reach to the water. So i just grab some infantry with that apc when it was still on the ground. But I cannot put back that infantry after it start floating on the sea. Also I cannot grab infantry with it after it start floats. Here is my XML code: <GameObject id="CBRUBuild06" inheritFrom="BaseVehicle" SelectPortrait="Portrait_GDIAPC" ButtonImage="Portrait_GDIAPC" Side="GDI" EditorSorting="UNIT" TransportSlotCount="1" BuildCost="700" BuildTime="7" CommandSet="GDIAPCCommandSet" CommandPoints="100" KindOf="PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS SCORE TRANSPORT VEHICLE CAN_REVERSE_MOVE CAN_BE_FAVORITE_UNIT" RadarPriority="UNIT" ThreatLevel="10" ProductionQueueType="VEHICLE" UnitCategory="VEHICLE" WeaponCategory="GUN" VoicePriority="176" EditorName="CBRUBuild06" Description="Desc:CBRUBuild06" TypeDescription="Type:CBRUBuild06"> <DisplayName xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:CBRUBuild06</DisplayName> <ArmorSet Armor="GDIGuardianAPCArmor" DamageFX="VehicleDamageFX" /> <LocomotorSet Locomotor="GDIAPACLocomotor" Condition="NORMAL" Speed="72.0" /> <SkirmishAIInformation UnitBuilderStandardCombatUnit="true" /> <Draws> <TruckDraw id="ModuleTag_Draw" OkToChangeModelColor="true" TrackMarks="EXTireTrack2" TrackMarksOnlyWhenCorneringQuickly="true" TrackMarksLeftBone="Bone_TireLR" TrackMarksRightBone="Bone_TireRR" LeftFrontTireBone="Bone_TireLF" RightFrontTireBone="Bone_TireRF" MidLeftRearTireBone="Bone_TireLR" MidRightRearTireBone="Bone_TireRR" LeftRearTireBone="Bone_TireLR1" RightRearTireBone="Bone_TireRR1" TireRotationMultiplier="0.2" PowerslideRotationAddition="1.25" InitialRecoilSpeed="0.1" MaxRecoilDistance="0.1" RecoilDamping="2.0" RecoilSettleSpeed="3.0" ExtraPublicBone="FXWeapon BoneGarrison01 BoneGarrison02 BoneGarrison03 BoneGarrison04 BoneGarrison05 BoneGarrison06 BoneGarrison07 BoneGarrison08 BoneGarrison09 BoneGarrison10"> <ModelConditionState ParseCondStateType="PARSE_DEFAULT"> <Model Name="ASROCKS04" /> <WeaponFireFXBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FXWeapon" /> <WeaponRecoilBone WeaponSlotType="PRIMARY_WEAPON" BoneName="FXWeapon" /> <WeaponMuzzleFlash WeaponSlotType="PRIMARY_WEAPON" BoneName="FXWeapon" /> <WeaponLaunchBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FXWeapon" /> <Turret TurretNameKey="Turret" TurretPitch="Turret_Pitch" TurretID="1" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DYING"> <Model Name="ASROCKS04" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFire" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFireDistortion" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallSmoke" FollowBone="true" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="REALLYDAMAGED"> <Model Name="GUAPC_SKN" /> <Texture Original="GUAPC" New="GUAPC_D" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="FORMATION_PREVIEW"> <Model Name="GUAPC_FP" /> </ModelConditionState> </TruckDraw> <TracerModelDraw id="ModuleTag_TracerModelDraw" MinLength="50.0" MaxLength="50.0" Width="3.0" MinSpeed="30" MaxSpeed="30" SweepSpeed="1.0" SpreadAngle="2.0" MinTracersPerFrame="0.2" MaxTracersPerFrame="0.3" FrameLifeTime="35" WeaponSlotType="PRIMARY_WEAPON" Texture="FXTracerGDI" UseAdditiveBlending="true" TracerHitFx="FX_BulletHitGDI"> <HeadColor r="1.0" g="1.0" b="1.0" a="1.0" /> <TailColor r="0.0" g="0.0" b="0.0" a="0.0" /> <ObjectStatusValidation ForbiddenStatus="WEAPON_UPGRADED_01" /> </TracerModelDraw> <TracerModelDraw id="ModuleTag_TracerModelDrawVeterancy" MinLength="50.0" MaxLength="50.0" Width="3.0" MinSpeed="30" MaxSpeed="30" SweepSpeed="1.0" SpreadAngle="2.0" MinTracersPerFrame="0.5" MaxTracersPerFrame="0.5" FrameLifeTime="35" WeaponSlotType="PRIMARY_WEAPON" Texture="FXTracerHeroic" UseAdditiveBlending="true" TracerHitFx="FX_BulletHitGDIHeroic"> <HeadColor r="1.0" g="0.0" b="0.0" a="1.0" /> <TailColor r="0.0" g="0.0" b="0.0" a="0.0" /> <ObjectStatusValidation RequiredStatus="WEAPON_UPGRADED_01" /> </TracerModelDraw> </Draws> <Behaviors> <ProductionUpdate id="ProductionUpdateModuleTag" GiveNoXP="true" /> <WeaponSetUpdate id="ModuleTag_WeaponSetUpdate"> <WeaponSlotTurret ID="1"> <Weapon Ordering="PRIMARY_WEAPON" Template="GDIAPCAutoCannon" /> <TurretSettings TurretTurnRate="200" TurretPitchRate="200" AllowsPitch="true" MinimumPitch="-15d" MinIdleScanTime="1.0s" MaxIdleScanTime="5.0s" MinIdleScanAngle="0.0" MaxIdleScanAngle="90.0"> <TurretAITargetChooserData CanAcquireDynamicIfAssignedOutOfRange="true" /> </TurretSettings> </WeaponSlotTurret> </WeaponSetUpdate> <Physics id="ModuleTag_Physics" /> <ProductionUpdate id="ModuleTag_PU" /> <HordeTransportContain id="ModuleTag_Contain" ObjectStatusOfContained="UNSELECTABLE ENCLOSED CAN_ATTACK" ContainMax="1" Slots="1" AllowEnemiesInside="false" AllowAlliesInside="true" AllowNeutralInside="false" AllowOwnPlayerInsideOverride="true" ShowPips="true" EnterSound="VehicleEnter" ExitSound="VehicleExit" KillPassengersOnDeath="true"> <PassengerFilter Rule="ANY" Include="INFANTRY" /> <DieMuxData DeathTypes="ALL" /> <PassengerData BonePrefix="BONEGARRISON"> <Filter Rule="NONE" Include="INFANTRY" /> </PassengerData> <MemberTemplateStatusInfo ThingTemplate="GDISniperSquad" ObjectStatus="CAN_SPOT_FOR_BOMBARD" /> </HordeTransportContain> <MoveToPositionAndEvacuateSpecialPower id="ModuleTag_MoveToPositionAndEvacuate" SpecialPowerTemplate="SpecialPowerMoveToPositionAndEvacuate" /> <SlowDeath id="ModuleTag_Death" SinkDelay="3s" SinkRate="2.0" DestructionDelay="5s"> <OCL Type="INITIAL"> <OCL>OCL_GDIAPCDebris</OCL> </OCL> <DieMuxData DeathTypes="ALL" DeathTypesForbidden="TOPPLED" /> <Sound Type="INITIAL" List="GDI_Generic_VoiceDieMS" /> </SlowDeath> <FXListBehavior id="ModuleTag_FXList"> <DieMuxData DeathTypes="ALL" /> <Event Index="onDeath" FX="FX_GDIVehicleExplodeNoScorch" /> </FXListBehavior> <!-- <DestroyDie id="ModuleTag_Die"> <DieMuxData DeathTypes="NONE CRUSHED SPLATTED" /> </DestroyDie> --> <SpecialPower id="ModuleTag_FireMinefield" SpecialPowerTemplate="SpecialPowerGDI_APCMinefield" UpdateModuleStartsAttack="true" /> <WeaponFireSpecialAbilityUpdate id="ModuleTag_FireMinefieldUpdate" SpecialPowerTemplate="SpecialPowerGDI_APCMinefield" SpecialWeapon="GDIAPCMinefield" StartAbilityRange="10.0" UnpackTime="1.5s" PackTime="1.0s" Options="CHECK_SPECIALPOWER_REQUIREMENTS_DURING_UPDATE"/> <AISpecialPowerUpdate id="ModuleTag_APCMineLayer" CommandButtonName="Command_APCMinefield" SpecialPowerRadius="100.0" SpecialPowerAIType="SPECIAL_POWER_RANGED_AOE_ATTACK" /> <xi:include href="DATA:Includes/GDICallForTransportForVehicle.xml" /> <StatusBitsUpgrade id="ModuleTag_VeterancyUpgrade" StatusToSet="WEAPON_UPGRADED_01"> <TriggeredBy>Upgrade_Veterancy_HEROIC</TriggeredBy> </StatusBitsUpgrade> <xi:include href="DATA:Includes/GenericPhaseShieldPropagate.xml" /> </Behaviors> <AI> <AIUpdate id="ModuleTag_AI" AutoAcquireEnemiesWhenIdle="YES"> <UnitAITargetChooserData CanPickDynamicTargets="false" SympathyRange="100.0" RotateToTargetWhenAiming="false" /> </AIUpdate> </AI> <Body> <ActiveBody id="ModuleTag_Body" MaxHealth="2800" /> </Body> <Geometry IsSmall="true"> <Shape Type="BOX" MajorRadius="20.0" MinorRadius="10.0" Height="11.5" ContactPointGeneration="VEHICLE" /> </Geometry> <AudioArrayVoice> <AudioEntry Sound="GDI_GuardianAPC_VoiceAttack" AudioType="voiceAttack" /> <AudioEntry Sound="GDI_GuardianAPC_VoiceCreate" AudioType="voiceCreated" /> <AudioEntry Sound="GDI_GuardianAPC_VoiceMove" AudioType="voiceMove" /> <AudioEntry Sound="GDI_GuardianAPC_VoiceMove" AudioType="voiceGuard" /> <AudioEntry Sound="GDI_GuardianAPC_VoiceMoveAttack" AudioType="voiceAttackAfterMoving" /> <AudioEntry Sound="GDI_GuardianAPC_VoiceRetreat" AudioType="voiceRetreatToCastle" /> <AudioEntry Sound="GDI_GuardianAPC_VoiceSelectMS" AudioType="voiceSelect" /> <AudioEntry Sound="GDI_GuardianAPC_VoiceSelectBattleMS" AudioType="voiceSelectBattle" /> <NamedEntry Sound="GDI_GuardianAPC_VoiceMineDrop" Name="InitiateAPCMinefield" /> </AudioArrayVoice> <AudioArraySound> <AudioEntry Sound="AudioEvent:GuardianAPCMoveStart" AudioType="soundMoveStart" /> <AudioEntry Sound="AudioEvent:PredatorIdleLoop" AudioType="soundAmbient" /> <!-- TruckLandingSound="RocketBuggyLand" TruckPowerslideSound="RocketBuggyPowerslide"--> </AudioArraySound> <ShadowInfo Type="VOLUME" /> <VisionInfo VisionRange="350" ShroudClearingRange="400" /> <CrusherInfo CrusherLevel="0" CrushEqualLevelProps="true" CrushableLevel="2" /> </GameObject> and my locomotor: <LocomotorTemplate id="GDIAPACLocomotor" Name="GDIAPACLocomotor" Surfaces="WATER DEEP_WATER" TurnTimeSeconds="0.6s" TurnTimeDamagedSeconds="1.6s" MaxSpeedDamaged="75%" AccelerationSeconds="0.3s" BrakingSeconds="0.3s" SlowTurnRadius="25.0" FastTurnRadius="50.0" UseTerrainSmoothing="true" MinTurnSpeed="20%" TurnPivotOffset="-0.1" BehaviorZ="SEA_LEVEL" Appearance="SHIP" AccelPitchLimit="10d" BounceKick="0d" PitchStiffness="0.5" RollStiffness="0.5" PitchDamping="0.5" RollDamping="0.75" ForwardAccelerationPitchFactor="0.025" LateralAccelerationRollFactor="1.0" HasSuspension="true" ClampOrientationToPathTangent="true" MaximumWheelExtension="-2.3" MaximumWheelCompression="1.4" WheelTurnAngle="35d" CanMoveBackward="false" /> Thanks in advance Share this post Link to post
Stygs 25 Posted July 23, 2016 No idea about the last problem, but the first ones are caused by the lack of a collision box on the model. Share this post Link to post
Luvaskot 2 Posted July 23, 2016 Thank you I changed collision box, now I fixed the first problem. Still several problems left, I made a small video about it. Please look. Share this post Link to post
Stygs 25 Posted July 24, 2016 No idea if these bugs are fixable - I would suggest comparing your code to the Hovercrafts used in the campaigns. Share this post Link to post
Ravendark 43 Posted July 25, 2016 That depends on how much of bfme' logic is still working. Iirc the original bfme locomotors could distinguish between deep (DEEP_WATER) and shallows (WATER) as there was a mechanic of wading through shallow rivers and marshland that slowed down units. If you give infantry the WATER surface in their locomotor and design maps in a way that you actually have deep and shallow water surfaces you might be able to get it working. TW/KW was never intended to work with naval ideas. Hence why most of the naval assets are either IMMOBILE or HOVER related. Most of the pathfinding issues are related to surface settings, same as why you can't onload infantry anymore out of the ferry...if you would think of the load/unload function as a specialpower you could consider that its Flag options don't include WATER_OK because it was designed to be used on land. Unlike bfme or RA3 the current logic in TW oly knows black and white when it comes to land and sea. Trying to load/unload black ground units into white sea units needs a grey area it doesnt have or understand. Hence why sea based transports are Lcacs and use the hover locomotor to skip from sea to land...also note that all the unloading is map scripted...so there is a change they knew it was buggy as hell. Share this post Link to post
Luvaskot 2 Posted July 25, 2016 That depends on how much of bfme' logic is still working. Iirc the original bfme locomotors could distinguish between deep (DEEP_WATER) and shallows (WATER) as there was a mechanic of wading through shallow rivers and marshland that slowed down units. If you give infantry the WATER surface in their locomotor and design maps in a way that you actually have deep and shallow water surfaces you might be able to get it working. TW/KW was never intended to work with naval ideas. Hence why most of the naval assets are either IMMOBILE or HOVER related. Most of the pathfinding issues are related to surface settings, same as why you can't onload infantry anymore out of the ferry...if you would think of the load/unload function as a specialpower you could consider that its Flag options don't include WATER_OK because it was designed to be used on land. Unlike bfme or RA3 the current logic in TW oly knows black and white when it comes to land and sea. Trying to load/unload black ground units into white sea units needs a grey area it doesnt have or understand. Hence why sea based transports are Lcacs and use the hover locomotor to skip from sea to land...also note that all the unloading is map scripted...so there is a change they knew it was buggy as hell. First of all thank you for your answer. Is there any way to add these grey areas into game? I can compile it for this map if it is possible. Also I saw that Ox-Transporter's are AIR unit but when you try to eject the unit they can touch to ground for 1-2 second. Is it possible to do it for this boat. There could also be a third solution, maybe I can increase the boat's eject radius. Like it will eject unit to 1-2 meter far, or it will grab unit from this 1-2 meter far. Share this post Link to post
Ravendark 43 Posted July 25, 2016 Most of those things are probably hardcoded. So not sure how much you can do about that. You could play arround with the worldbuilder and experiment with the water height settings and give infantry a water surface in their locomotor. Again....BFME is a verry long time ago for me, so not sure what still works or is left over from that. Iirc there are some water related attributes in the locomotor template in TW...just check the schematics. for exiting....i suspect the engine does a surface check ...hence why airtransports land first....wich is a harcoded thing i reckon, iirc you can set exit and entry bones in your model and might be able extend those bones onto dry land....but again iirc, those bones need to have a fixed naming convention and i can't recall what it is. Again check the Opencontain module and the transportcontain module to see what is possible in the schematics folder. Share this post Link to post
PurpleGaga27 37 Posted July 25, 2016 I think this sort of bug was probably fixed in Red Alert 3, but using an Engineer to capture a ferry boat.... only if that unit is neutral from all other factions. Share this post Link to post
Ravendark 43 Posted July 26, 2016 I think this sort of bug was probably fixed in Red Alert 3, It is not a bug. A bug is a breakdown of coding within a intended purpose. TW/KW doesn't have intended naval support. The naval troop transports aren't ships, they HOVER. You can't select and control them..they unload based on a map script and trigger. Because naval logic is basilcy none existant. RA3 has intended naval logic..it has special sections i its locomotors that trigger depending on the water modelcondition/status. RA3= SAGE2 TW/KW and before = SAGE(1) Different ideas and requirement were set for both engines. You can't do some the things you do in RA3 with TW/KW. Period. The closest to naval logic Sage1 comes is what it could do in bfme...and even that was heavely map reliant. Alot of that coding was stripped out even for generals/ZH and that had (static/immobile) naval units. You can basicly have objects move on the WATER surfaceType...but afaik the engine doesn't understand water to do land surfacetype transistions. you can still use the WATER modelcondtion(the orca uses it even for particlefx transitions from land to over water fx) but afaik the transistion logic is hardly there anymore. but using an Engineer to capture a ferry boat.... only if that unit is neutral from all other factions. Am i missing something or where in this topic is the engineer/capture discussion? Also engineers/objects can enter anything with the engineer contain module...allies get repaired, enemy and neutral gets captured. Share this post Link to post
Luvaskot 2 Posted July 27, 2016 Most of those things are probably hardcoded. So not sure how much you can do about that. You could play arround with the worldbuilder and experiment with the water height settings and give infantry a water surface in their locomotor. Again....BFME is a verry long time ago for me, so not sure what still works or is left over from that. Iirc there are some water related attributes in the locomotor template in TW...just check the schematics. for exiting....i suspect the engine does a surface check ...hence why airtransports land first....wich is a harcoded thing i reckon, iirc you can set exit and entry bones in your model and might be able extend those bones onto dry land....but again iirc, those bones need to have a fixed naming convention and i can't recall what it is. Again check the Opencontain module and the transportcontain module to see what is possible in the schematics folder. I played with water height settings. Unfortunately when water is not deep and infantries are able to travel through it, boat cannot float on it Share this post Link to post
Luvaskot 2 Posted July 28, 2016 I also found that some locomotor command of BfME series. https://www.the3rdage.net/item-69?addview GROUND RUBBLE IMPASSABLE WATER AIR OBSTACLE seems only surfaces game use. I did not see anything about hybrid surfaces. Share this post Link to post
Ravendark 43 Posted July 29, 2016 That is because the game egnine doesn't use a hybrid perse, but does a transition unto another surface depending on the option you set in the locomotor or by using sertain conditions: Stuff like HOVER and the surfaces. Or having a second locomotor in the game object with a special conditions like: NORMAL_UPGRADED or WALL_SCALING+ WALL_RAILING (maybe cliff would work here aswell) Share this post Link to post
Luvaskot 2 Posted July 29, 2016 I think if I mix the evacuating template of APC and teleportation template of mastermind; which can teleport units loaded to boat. Maybe adding teleportation ability with really low radius (players cannot even see the distance) and using garrison unload animation can work on this unit. Problem is I don't know how to code it into xml. Share this post Link to post
Ravendark 43 Posted August 1, 2016 I don't think you can teleport something into a garrison/container. Mixing the teleport(specialpower) with the transport(opencontain module) is comparing birds to mammals....i think they are to different to work similar. Enless the teleport has a init ability to do so, which i doubt. Share this post Link to post