sub4gman
  • sub4gman
  • 51% (Neutral)
  • Private Topic Starter
6 years ago
Hey i want to add a decal/fx of an existing unit to another unit. For example, i want to add China's troop crawler/tower's red wave propaganda fx/decal to crusader tank. So the crusader tank has the fx/decal of troop crawler/tower all the time as long as he is alive. Do you know how to do that?
Sponsor
AdrianeMapMaker
5 years ago
the code usually is under geometry parrameters.

Shadow texture =
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




sub4gman
  • sub4gman
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

the code usually is under geometry parrameters.

Shadow texture =

Originally Posted by: adrianemapmaker 


UserPostedImage
For example, i want that yellow circle and red star decal from battlemaster tank to crusader tank. I just want the decal not the whole effect and status. Can it be done through "shadowtexture=". And where can i get all the list of shadowtexture? Because i don't know the name of them.

EDIT; I've tried "shadowtexture" with no luck. Nothing's appear in the game.
UTD^Force
5 years ago
I was willing to finish the code for you, but I don't have much time now.
Anyway, here is the code, use it as a base and tweak with it until it suits your idea.

ParticleSystem SonicRangeCrusaderNew
  Priority = CRITICAL
  IsOneShot = No
  Shader = ADDITIVE
  Type = PARTICLE
  ParticleName = EXSonic2.tga
  AngleZ = 0.00 0.00
  AngularRateZ = 0.00 0.00
  AngularDamping = 0.80 0.85
  VelocityDamping = 0.50 0.50
  Gravity = 0.00
  Lifetime = 30.00 30.00
  SystemLifetime = 0

  Size = 50.00 60.00
  StartSizeRate = 0.00 0.00
  SizeRate = 0.20 0.30
  SizeRateDamping = 1.00 1.00

;  Size = 0.00 0.00
;  StartSizeRate = 0.00 0.00
;  SizeRate = 10.00 10.00
;  SizeRateDamping = 0.92 0.92
  Alpha1 = 1.00 1.00 2000
  Alpha2 = 0.00 0.00 30000
  Alpha3 = 0.00 0.00 0
  Alpha4 = 0.00 0.00 0
  Alpha5 = 0.00 0.00 0
  Alpha6 = 0.00 0.00 0
  Alpha7 = 0.00 0.00 0
  Alpha8 = 0.00 0.00 0
  Color1 = R:0 G:255 B:255 2000
  Color2 = R:0 G:0 B:0 30000
  Color3 = R:0 G:0 B:0 0
  Color4 = R:0 G:0 B:0 0
  Color5 = R:0 G:0 B:0 0
  Color6 = R:0 G:0 B:0 0
  Color7 = R:0 G:0 B:0 0
  Color8 = R:0 G:0 B:0 0
  ColorScale = 0.00 0.00
  BurstDelay = 5.00 5.00
  BurstCount = 1.00 1.00
  InitialDelay = 0.00 0.00
  DriftVelocity = X:0.00 Y:0.00 Z:0.00
  VelocityType = ORTHO
  VelOrthoX = 0.00 0.00
  VelOrthoY = 0.00 0.00
  VelOrthoZ = 0.00 0.00
  VolumeType = POINT
  IsHollow = No
  IsGroundAligned = Yes
  IsEmitAboveGroundOnly = No
  IsParticleUpTowardsEmitter = No
  WindMotion = Unused
  WindAngleChangeMin = 0.149924
  WindAngleChangeMax = 0.449946
  WindPingPongStartAngleMin = 0.000000
  WindPingPongStartAngleMax = 0.785398
  WindPingPongEndAngleMin = 5.497787
  WindPingPongEndAngleMax = 6.283185
End

Object AmericaTankCrusader
  RemoveModule ModuleTag_01
  AddModule
  Draw = W3DTankDraw ModuleTag_01Override
    DefaultConditionState
      Model               = AVLeopard
      Turret              = Turret
      WeaponFireFXBone    = PRIMARY TurretMS
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY TurretFX
      WeaponLaunchBone = PRIMARY TurretMS

      ParticleSysBone = NONE SonicRangeCrusaderNew
    End
    ConditionState       = REALLYDAMAGED
      Model              = AVLeopard_D

      ParticleSysBone = NONE SonicRangeCrusaderNew
    End
    ConditionState       = RUBBLE
      Model              = AVLeopard_D
    End

    TrackMarks           = EXTnkTrack.tga
    TreadAnimationRate      = 2.0  ; amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
    OkToChangeModelColor = Yes
  End
 End
End

A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
sub4gman
  • sub4gman
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

I was willing to finish the code for you, but I don't have much time now.
Anyway, here is the code, use it as a base and tweak with it until it suits your idea.

ParticleSystem SonicRangeCrusaderNew
  Priority = CRITICAL
  IsOneShot = No
  Shader = ADDITIVE
  Type = PARTICLE
  ParticleName = EXSonic2.tga
  AngleZ = 0.00 0.00
  AngularRateZ = 0.00 0.00
  AngularDamping = 0.80 0.85
  VelocityDamping = 0.50 0.50
  Gravity = 0.00
  Lifetime = 30.00 30.00
  SystemLifetime = 0

  Size = 50.00 60.00
  StartSizeRate = 0.00 0.00
  SizeRate = 0.20 0.30
  SizeRateDamping = 1.00 1.00

;  Size = 0.00 0.00
;  StartSizeRate = 0.00 0.00
;  SizeRate = 10.00 10.00
;  SizeRateDamping = 0.92 0.92
  Alpha1 = 1.00 1.00 2000
  Alpha2 = 0.00 0.00 30000
  Alpha3 = 0.00 0.00 0
  Alpha4 = 0.00 0.00 0
  Alpha5 = 0.00 0.00 0
  Alpha6 = 0.00 0.00 0
  Alpha7 = 0.00 0.00 0
  Alpha8 = 0.00 0.00 0
  Color1 = R:0 G:255 B:255 2000
  Color2 = R:0 G:0 B:0 30000
  Color3 = R:0 G:0 B:0 0
  Color4 = R:0 G:0 B:0 0
  Color5 = R:0 G:0 B:0 0
  Color6 = R:0 G:0 B:0 0
  Color7 = R:0 G:0 B:0 0
  Color8 = R:0 G:0 B:0 0
  ColorScale = 0.00 0.00
  BurstDelay = 5.00 5.00
  BurstCount = 1.00 1.00
  InitialDelay = 0.00 0.00
  DriftVelocity = X:0.00 Y:0.00 Z:0.00
  VelocityType = ORTHO
  VelOrthoX = 0.00 0.00
  VelOrthoY = 0.00 0.00
  VelOrthoZ = 0.00 0.00
  VolumeType = POINT
  IsHollow = No
  IsGroundAligned = Yes
  IsEmitAboveGroundOnly = No
  IsParticleUpTowardsEmitter = No
  WindMotion = Unused
  WindAngleChangeMin = 0.149924
  WindAngleChangeMax = 0.449946
  WindPingPongStartAngleMin = 0.000000
  WindPingPongStartAngleMax = 0.785398
  WindPingPongEndAngleMin = 5.497787
  WindPingPongEndAngleMax = 6.283185
End

Object AmericaTankCrusader
  RemoveModule ModuleTag_01
  AddModule
  Draw = W3DTankDraw ModuleTag_01Override
    DefaultConditionState
      Model               = AVLeopard
      Turret              = Turret
      WeaponFireFXBone    = PRIMARY TurretMS
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY TurretFX
      WeaponLaunchBone = PRIMARY TurretMS

      ParticleSysBone = NONE SonicRangeCrusaderNew
    End
    ConditionState       = REALLYDAMAGED
      Model              = AVLeopard_D

      ParticleSysBone = NONE SonicRangeCrusaderNew
    End
    ConditionState       = RUBBLE
      Model              = AVLeopard_D
    End

    TrackMarks           = EXTnkTrack.tga
    TreadAnimationRate      = 2.0  ; amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
    OkToChangeModelColor = Yes
  End
 End
End

Originally Posted by: UTD^Force 



1. Can i put multiple particlesysbone in 1 unit?
2. So i have to put that particlesytem name in "ParticleSysBone = NONE", right?

By the way, thank you very much... that's helping me a lot😁
UTD^Force
5 years ago
You're welcome, it always feels good to help.
So this explains the code, again taken from the module list which rrtaya uploaded.


		ParticleSysBone = [Bone name  Entry from ParticleSystem.INI, multiple statements can be used]

So basically the code is to add a particlesystem (or multiple) to a named bone.
NONE, means that the particle system doesn't have to be shown from a specific bone, and as far as I remember it means the particle system will fire from the middle of the unit.

Side note, bones are used in W3D models of the game's units, they are used for different kinds of stuff like where the weapon fires from or the muzzle when a tank fires etc..
Example:

WeaponFireFXBone = SECONDARY WeaponB
WeaponLaunchBone = SECONDARY WeaponB
WeaponFireFXBone = TERTIARY WeaponB
WeaponLaunchBone = TERTIARY WeaponB


A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
sub4gman
  • sub4gman
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

You're welcome, it always feels good to help.
So this explains the code, again taken from the module list which rrtaya uploaded.


		ParticleSysBone = [Bone name  Entry from ParticleSystem.INI, multiple statements can be used]

So basically the code is to add a particlesystem (or multiple) to a named bone.
NONE, means that the particle system doesn't have to be shown from a specific bone, and as far as I remember it means the particle system will fire from the middle of the unit.

Side note, bones are used in W3D models of the game's units, they are used for different kinds of stuff like where the weapon fires from or the muzzle when a tank fires etc..
Example:

WeaponFireFXBone = SECONDARY WeaponB
WeaponLaunchBone = SECONDARY WeaponB
WeaponFireFXBone = TERTIARY WeaponB
WeaponLaunchBone = TERTIARY WeaponB

Originally Posted by: UTD^Force 


Thank you very much my friend. Can i ask one more question? How to make a unit fire/toxic/radiation resistance?
UTD^Force
5 years ago
You're welcome.
You can change that by editing the armor of that unit.
Example, the chemsuits upgrade for USA:


Armor ChemSuitHumanArmor
  Armor = CRUSH             200%    ;humans are easily crushed ["I'm crushing your head"]
  Armor = ARMOR_PIERCING    10%     ;humans don't get hit by tank rounds.  
  Armor = INFANTRY_MISSILE  10%
  Armor = FLAME             150%    ;humans don't like fire
  Armor = POISON            20%     ;Unharmed by poison
  Armor = RADIATION         20%     ;Unharmed by radiation too
  Armor = MICROWAVE         20%
  Armor = PARTICLE_BEAM     150%    ;humans don't fare well against orbital beams...
  Armor = SNIPER            200%
  Armor = LASER             50%     ;LASERs are anti-personel and anti-projectile only (for point defense laser)
  Armor = HAZARD_CLEANUP    0%      ;Not harmed by cleaning weapons
  Armor = KILL_PILOT        0%      ;Jarmen Kell uses against vehicles only.
  Armor = SURRENDER         100%    ;Capture type weapons are effective only against infantry.
  Armor = SUBDUAL_MISSILE   0%
  Armor = SUBDUAL_VEHICLE   0%
  Armor = SUBDUAL_BUILDING  0%
End

As far as I can remember, the percentage is how much damage the unit takes. So if you decrease the POISON and RADIATION to 0% the unit should become immune to them. I'm not sure, but you can try it in your mod/map and will find out.
Good luck.


The sentences after the semicolons do not affect the code and are just explanatory sentences added by the game's developers (I'm sure you already know that, but that's just a note).
Some of the sentences were from copying and pasting from other codes, so they are not always talking about what's before them, as an example, in the code above they said that the armor makes the units be unharmed by poison and radiation, which isn't correct as they are set to deal damage, but that is from copying the HazMatHumanArmor.
Just a side note 😉
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
sub4gman
  • sub4gman
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

You're welcome.
You can change that by editing the armor of that unit.
Example, the chemsuits upgrade for USA:



Armor ChemSuitHumanArmor
  Armor = CRUSH             200%    ;humans are easily crushed ["I'm crushing your head"]
  Armor = ARMOR_PIERCING    10%     ;humans don't get hit by tank rounds.  
  Armor = INFANTRY_MISSILE  10%
  Armor = FLAME             150%    ;humans don't like fire
  Armor = POISON            20%     ;Unharmed by poison
  Armor = RADIATION         20%     ;Unharmed by radiation too
  Armor = MICROWAVE         20%
  Armor = PARTICLE_BEAM     150%    ;humans don't fare well against orbital beams...
  Armor = SNIPER            200%
  Armor = LASER             50%     ;LASERs are anti-personel and anti-projectile only (for point defense laser)
  Armor = HAZARD_CLEANUP    0%      ;Not harmed by cleaning weapons
  Armor = KILL_PILOT        0%      ;Jarmen Kell uses against vehicles only.
  Armor = SURRENDER         100%    ;Capture type weapons are effective only against infantry.
  Armor = SUBDUAL_MISSILE   0%
  Armor = SUBDUAL_VEHICLE   0%
  Armor = SUBDUAL_BUILDING  0%
End

As far as I can remember, the percentage is how much damage the unit takes. So if you decrease the POISON and RADIATION to 0% the unit should become immune to them. I'm not sure, but you can try it in your mod/map and will find out.
Good luck.


The sentences after the semicolons do not affect the code and are just explanatory sentences added by the game's developers (I'm sure you already know that, but that's just a note).
Some of the sentences were from copying and pasting from other codes, so they are not always talking about what's before them, as an example, in the code above they said that the armor makes the units be unharmed by poison and radiation, which isn't correct as they are set to deal damage, but that is from copying the HazMatHumanArmor.
Just a side note ;)

Originally Posted by: UTD^Force 



Thank you so muchh. You're really really helpful. May I ask you when I have more questions later?😁
UTD^Force
5 years ago
You're very welcome.
Yeah sure, just make sure to make a public topic here (or wherever your question should be) so that someone else might benefit as well.

A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
sub4gman
  • sub4gman
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

You're very welcome.
Yeah sure, just make sure to make a public topic here (or wherever your question should be) so that someone else might benefit as well.

Originally Posted by: UTD^Force 


😁 👍