Jump to content
Sign in to follow this  
ztz2019

How to make half-track vehicle available?

Recommended Posts

In ZH, QuadCannon vehicle has the module W3DTankTruckDraw.

 

But in CC3 there's only TankDraw and TruckDraw in AssetTypeGameObject.xsd or CnC3Types.xsd.

 

So how to make half-track vehicle available?

 

 

0067u1Szjw1eytrap09z3j30ne0hejtz.jpg

0067u1Szjw1eytrapn6f6j30is0e7dhq.jpg0067u1Szjw1eytraq2ciwj30gd0fj762.jpg

Share this post


Link to post

Easy aswer fake it:

Just use truck draw for the wheel physics..the tank treads are nothing more then a scrolling texture..you can alter the scroll speed in 3dmax by tuning the settings in the correct shader. other then that the tracks usually are made out of 4 meshes. stop, forward, left and right turn. you dont really need the tank draw to create a visually believable tank tread animation and effect. You can do that with the animation and model itself.

 

Harder answer:

create a new schematic, both tank and truck xsd inherit from w3dscriptedmodeldraw module..you could try to change it to:

 

 

<xs:complexType name="NEWW3DTruckDrawModuleData">
        <xs:complexContent>
            <xs:extension base="W3DTankDrawModuleData">
                <xs:sequence></xs:sequence>
                <xs:attribute name="Dust" type="FXParticleSystemRef" />
                <xs:attribute name="DirtSpray" type="FXParticleSystemRef" />
                <xs:attribute name="PowerslideSpray" type="FXParticleSystemRef" />
                <xs:attribute name="LeftFrontTireBone" type="xs:string" />
                <xs:attribute name="RightFrontTireBone" type="xs:string" />
                <xs:attribute name="LeftRearTireBone" type="xs:string" />
                <xs:attribute name="RightRearTireBone" type="xs:string" />
                <xs:attribute name="MidLeftFrontTireBone" type="xs:string" />
                <xs:attribute name="MidRightFrontTireBone" type="xs:string" />
                <xs:attribute name="MidLeftRearTireBone" type="xs:string" />
                <xs:attribute name="MidRightRearTireBone" type="xs:string" />
                <xs:attribute name="MidLeftMidTireBone" type="xs:string" />
                <xs:attribute name="MidRightMidTireBone" type="xs:string" />
                <xs:attribute name="LeftFrontTireBone2" type="xs:string" />
                <xs:attribute name="RightFrontTireBone2" type="xs:string" />
                <xs:attribute name="LeftRearTireBone2" type="xs:string" />
                <xs:attribute name="RightRearTireBone2" type="xs:string" />
                <xs:attribute name="MidLeftMidTireBone2" type="xs:string" />
                <xs:attribute name="MidRightMidTireBone2" type="xs:string" />

                <!-- default and wheel-specific multipliers, only Front for now -->
                <xs:attribute name="TireRotationMultiplier" type="SageReal" default="1.0" />
                <xs:attribute name="TireRotationMultiplierFront" type="SageReal" default="1.0" />

                <xs:attribute name="PowerslideRotationAddition" type="SageReal" default="0" />
                <xs:attribute name="CabBone" type="xs:string" />
                <xs:attribute name="TrailerBone" type="xs:string" />
                <xs:attribute name="CabRotationMultiplier" type="SageReal" default="1.0" />
                <xs:attribute name="TrailerRotationMultiplier" type="SageReal" default="1.0" />
                <xs:attribute name="RotationDamping" type="SageReal" default="1.0" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
 

dont forget to add the new schematic to cnc3Types.xsd and to gameobject.xsd under the draw section (where you find the tank and truck draws)

 

That should work in theory, you should be able to use best of both worlds now....needs testing tho

Share this post


Link to post

Easy aswer fake it:

Just use truck draw for the wheel physics..the tank treads are nothing more then a scrolling texture..you can alter the scroll speed in 3dmax by tuning the settings in the correct shader. other then that the tracks usually are made out of 4 meshes. stop, forward, left and right turn. you dont really need the tank draw to create a visually believable tank tread animation and effect. You can do that with the animation and model itself.

 

Harder answer:

create a new schematic, both tank and truck xsd inherit from w3dscriptedmodeldraw module..you could try to change it to:

 

 

<xs:complexType name="NEWW3DTruckDrawModuleData">
        <xs:complexContent>
            <xs:extension base="W3DTankDrawModuleData">
                <xs:sequence></xs:sequence>
                <xs:attribute name="Dust" type="FXParticleSystemRef" />
                <xs:attribute name="DirtSpray" type="FXParticleSystemRef" />
                <xs:attribute name="PowerslideSpray" type="FXParticleSystemRef" />
                <xs:attribute name="LeftFrontTireBone" type="xs:string" />
                <xs:attribute name="RightFrontTireBone" type="xs:string" />
                <xs:attribute name="LeftRearTireBone" type="xs:string" />
                <xs:attribute name="RightRearTireBone" type="xs:string" />
                <xs:attribute name="MidLeftFrontTireBone" type="xs:string" />
                <xs:attribute name="MidRightFrontTireBone" type="xs:string" />
                <xs:attribute name="MidLeftRearTireBone" type="xs:string" />
                <xs:attribute name="MidRightRearTireBone" type="xs:string" />
                <xs:attribute name="MidLeftMidTireBone" type="xs:string" />
                <xs:attribute name="MidRightMidTireBone" type="xs:string" />
                <xs:attribute name="LeftFrontTireBone2" type="xs:string" />
                <xs:attribute name="RightFrontTireBone2" type="xs:string" />
                <xs:attribute name="LeftRearTireBone2" type="xs:string" />
                <xs:attribute name="RightRearTireBone2" type="xs:string" />
                <xs:attribute name="MidLeftMidTireBone2" type="xs:string" />
                <xs:attribute name="MidRightMidTireBone2" type="xs:string" />

                <!-- default and wheel-specific multipliers, only Front for now -->
                <xs:attribute name="TireRotationMultiplier" type="SageReal" default="1.0" />
                <xs:attribute name="TireRotationMultiplierFront" type="SageReal" default="1.0" />

                <xs:attribute name="PowerslideRotationAddition" type="SageReal" default="0" />
                <xs:attribute name="CabBone" type="xs:string" />
                <xs:attribute name="TrailerBone" type="xs:string" />
                <xs:attribute name="CabRotationMultiplier" type="SageReal" default="1.0" />
                <xs:attribute name="TrailerRotationMultiplier" type="SageReal" default="1.0" />
                <xs:attribute name="RotationDamping" type="SageReal" default="1.0" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
 

dont forget to add the new schematic to cnc3Types.xsd and to gameobject.xsd under the draw section (where you find the tank and truck draws)

 

That should work in theory, you should be able to use best of both worlds now....needs testing tho

Thanks, I'll try later.

 

 

 

Modified and compiled the xsd directly will cause error, so what should I do next?

 

Critical: System.Xml.Schema.XmlSchemaException: 已经声明了 complexType“uri:ea.com:eala:asset:ArticulationBone”。
在 System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(Object sender, ValidationEventArgs e)
在 System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
在 System.Xml.Schema.BaseProcessor.AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
在 System.Xml.Schema.Compiler.Prepare(XmlSchema schema, Boolean cleanup)
在 System.Xml.Schema.XmlSchemaSet.Compile()
在 BinaryAssetBuilder.Core.SchemaSet..ctor(Boolean countDependencies)
在 BinaryAssetBuilder.Core.DocumentProcessor..ctor(Settings settings, PluginRegistry pluginRegistry, VerifierPluginRegistry verifierPluginRegistry)
在 BinaryAssetBuilder.BinaryAssetBuilder.DoBuildData()
在 BinaryAssetBuilder.BinaryAssetBuilder.Run(String[] args)
在 BinaryAssetBuilder.BinaryAssetBuilder.Main(String[] args)
This is an internal error or potentially a bug.
LoD Stream Builder
Critical: "D:\Command & Conquer 3\MOD SDK\builtmods\mods\HaveTry\data\mod.manifest" not found
Build failed on step 5
Edited by ztz2019

Share this post


Link to post

You cannot just add something if it isn't present and supported by the engine.

Share this post


Link to post

You cannot just add something if it isn't present and supported by the engine.

Isnt this just using a inheritance chain? Did something like this awhile back with the jetai module and it seemed to work ...partially atleast iirc

.

Share this post


Link to post

Ye can't seem to get it to work. Altho i am pretty sure i did something like that a while ago....gonna see if i have it backed up somewhere. could be im forgetting something or so.

Share this post


Link to post

Ye can't seem to get it to work. Altho i am pretty sure i did something like that a while ago....gonna see if i have it backed up somewhere. could be im forgetting something or so.

It works after I direct change the TruckDraw.xsd's code, instead of create new TruckTankDraw.xsd.

 

 

 

And how to let turret not turning whole circle around but just a given angle?

Share this post


Link to post

for actually tracking targets

 

MaxDeflectionAntiClockwise="100d"
MaxDeflectionClockwise="100d"

 

or just when idle?

 

MinIdleScanAngle="0.0"
MaxIdleScanAngle="90.0"

Share this post


Link to post

Well, the other problems have been done, and new problem comes out unsurprusingly.

 

The cannon shell is too low and neither stick to ground like error launchbone nor from the right muzzleflash bone.

 

0067u1Szjw1eyvll015g1j30go0ci78f.jpg

 

<WeaponFireFXBone
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="MUZZLEFLASH_01" />
<WeaponRecoilBone
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="B_BARREL" />
<WeaponMuzzleFlash
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="MuzzleFlash_01" />
<WeaponLaunchBone
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="MUZZLEFLASH_01" />
<Turret
TurretNameKey="Turret"
TurretPitch="BARREL"
TurretID="1" />

The weapontemplete is NODRaiderTankCannon, GDIJuggernaughtArtillery is error, either.

 

Edited by ztz2019

Share this post


Link to post

check if you exported the muzzleflash as bone and mesh in 3dmax, if its justset to mesh it will show up ingame but it wont work as a launchbone.

 

Also check in the weaponset coding in behaviors that you have defined the correct weapon ID and weaponslots.

 

Depending on how you set up your animation and modelconditions, it is possible that it is not inheriting its bone structure from the DEFAULT modelcondition where you have defined the weapon bones if im correct. You might have to define the weapon bones in your modelcondition aswell...specialy in these transformation models.

Share this post


Link to post

check if you exported the muzzleflash as bone and mesh in 3dmax, if its justset to mesh it will show up ingame but it wont work as a launchbone.

 

Also check in the weaponset coding in behaviors that you have defined the correct weapon ID and weaponslots.

 

Depending on how you set up your animation and modelconditions, it is possible that it is not inheriting its bone structure from the DEFAULT modelcondition where you have defined the weapon bones if im correct. You might have to define the weapon bones in your modelcondition aswell...specialy in these transformation models.

Both mesh and bone are right.

 

It's not stick to ground as bone error, it's just default height before transform.

0067u1Szjw1eywkqy5foaj30s90f176q.jpg

Share this post


Link to post

Try making an own bone for weapon launch and dont use the muzzle flash one.

Then it works right when deployed but goes wrong at default state :(

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×