AdrianeMapMaker
9 years ago
hey guys did you know how to add some stealth with a unit example like a stealth Raptor

what do i need to add in a map ini help pls
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Sponsor
acidbrain
9 years ago
If im not mistaking these modules have something to do with it...

StealthUpdate
[this module allows the use of SoundStealthOn and SoundStealthOff parameters on the object and is hardcoded to display MESSAGE:StealthNeutralized when the object has been discovered]
    UseRiderStealth             = [Yes/No]
	StealthDelay = [integer, milliseconds]
	MoveThresholdSpeed = [integer]
	StealthForbiddenConditions = [conditions list]
	HintDetectableConditions = [conditions list]
	FriendlyOpacityMin = [percentage]
	FriendlyOpacityMax = [percentage]
	PulseFrequency = [integer, milliseconds]
	RevealDistanceFromTarget = [real number]
	OrderIdleEnemiesToAttackMeUponReveal = [Yes/No]
	InnateStealth = [Yes/No]
	DisguisesAsTeam = [Yes/No	requires KindOf = DISGUISER]
	DisguiseFX = [entry from FXList.INI	requires KindOf = DISGUISER]
	DisguiseRevealFX = [entry from FXList.INI	requires KindOf = DISGUISER]
	DisguiseTransitionTime = [integer, milliseconds]
	DisguiseRevealTransitionTime = [integer, milliseconds]
    EnemyDetectionEvaEvent = [Entry(s) from Eva.ini]
    OwnDetectionEvaEvent = [Entry(s) from Eva.ini]
End


StealthUpgrade
[enables use of StealthUpdate module on this object, requires InnateStealth = No]
	TriggeredBy = [entry(s) from Upgrade.INI]
    FXListUpgrade = [entry from FXList.INI]
	ConflictsWith = [entry(s) from Upgrade.INI]
	RequiresAllTriggers = [Yes/No]
End
Don't copy/paste from this because there are tabs in it what will cause an error...

You can use the Addmodule command to add the new module, see This  thread for examples...

Greetz
Panem et kirkinses
AdrianeMapMaker
9 years ago
need a true example pls i am noob when its time for coding

By the way thanks for those map.ini code snippets those are pretty awesome 😁 👍 👍 👍
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago
Try this code, put it in a map.ini...

Object AmericaJetRaptor
  AddModule
    Behavior = StealthUpdate Module_Stealth
      StealthDelay                          = 1500
      StealthForbiddenConditions            = FIRING_PRIMARY ATTACKING
      FriendlyOpacityMin                    = 50.0%
      FriendlyOpacityMax                    = 100.0%
      InnateStealth                         = Yes
      OrderIdleEnemiesToAttackMeUponReveal  = Yes
    End
  End
End
Greetz
Panem et kirkinses
zero hour mad map maker
9 years ago
And if you're adding it to a turret, like the patriot missile battery, you need to add some more coding so that the turret ATTACKS and becomes unstealted when it is attacking. Because if you have the turret just stealthed, it won't become un-stealthed and won't attack. I'm sure it doesn't apply to raptors, because I tried the coding on the China Bunker.......and the game crashed LOL. It DOES work for missile batteries (annihilationzh taught me that handy bit of coding xD)


Object SupW_AmericaPatriotBattery
 RemoveModule ModuleTag_07
 AddModule
  Behavior = StealthUpdate ModuleTag_17
    StealthDelay                = 2500 ; msec
    StealthForbiddenConditions  = ATTACKING USING_ABILITY TAKING_DAMAGE
    InnateStealth               = Yes ;Require the upgrade first
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
  Behavior = AIUpdateInterface ModuleTag_07
    Turret
      TurretTurnRate        = 180   // turn rate, in degrees per sec
      TurretPitchRate       = 180
      AllowsPitch           = Yes
      NaturalTurretPitch    = 45   
      GroundUnitPitch       = 40
      MinPhysicalPitch      = -20
      ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
      MinIdleScanInterval   = 250    ; in milliseconds
      MaxIdleScanInterval   = 250    ; in milliseconds
      MinIdleScanAngle      = 0       ; in degrees off the natural turret angle
      MaxIdleScanAngle      = 360     ; in degrees off the natural turret angle
    End
 
    AutoAcquireEnemiesWhenIdle = Yes Stealthed ;ATTACK_BUILDINGS; defensive weapon
    MoodAttackCheckRate        = 250
  End
 End
End

Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
look like it awesome to be stealth hahaha thanks guys
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Annihilationzh
9 years ago

And if you're adding it to a turret, like the patriot missile battery, you need to add some more coding so that the turret ATTACKS and becomes unstealted when it is attacking. Because if you have the turret just stealthed, it won't become un-stealthed and won't attack. I'm sure it doesn't apply to raptors, because I tried the coding on the China Bunker.......and the game crashed LOL. It DOES work for missile batteries (annilationzh taught me that handy bit of coding xD)

Originally Posted by: Zero Hour Mad Map Maker 


That is the AI module of a Patriot Battery given a slight adjustment to make it choose to reveal itself. Bunkers don't have a ModuleTag_07 or AI or a turret, so that wouldn't work.

And there's a hi in annihilation.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
zero hour mad map maker
9 years ago

And if you're adding it to a turret, like the patriot missile battery, you need to add some more coding so that the turret ATTACKS and becomes unstealted when it is attacking. Because if you have the turret just stealthed, it won't become un-stealthed and won't attack. I'm sure it doesn't apply to raptors, because I tried the coding on the China Bunker.......and the game crashed LOL. It DOES work for missile batteries (annilationzh taught me that handy bit of coding xD)

Originally Posted by: Annihilationzh 


That is the AI module of a Patriot Battery given a slight adjustment to make it choose to reveal itself. Bunkers don't have a ModuleTag_07 or AI or a turret, so that wouldn't work.

And there's a hi in annihilation.

Originally Posted by: Zero Hour Mad Map Maker 



Yeah I kind of realized that when the game crashed xD. I'm sorry about the misspelling, I'm absolutely horrible at typos..... Almost every post of mine will say "edited by Zero Hour Mad Map Maker...."


Thank You!


(Just like this post, right now, I had to edit it for typos again......Oops.)
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
MRBraaanz
4 years ago
hello i am new to coding zero hour, and sorry im late. does anyone know what bit of code you can copy from the pathfinder to make an infantry unit like a red guard stealthed for example if thats possible? many thanks
AdrianeMapMaker
4 years ago
your indeed late... anyways most of the code are literally self explanatory ..

"stealth"

Behavior = StealthUpdate ModuleTag_09
StealthDelay = 0 ; msec
StealthForbiddenConditions = MOVING ; stays stealthy while attacking
FriendlyOpacityMin = 30.0%
FriendlyOpacityMax = 80.0%
PulseFrequency = 500 ; msec
MoveThresholdSpeed = 3
InnateStealth = Yes
OrderIdleEnemiesToAttackMeUponReveal = Yes
End


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

UserPostedImage




MRBraaanz
4 years ago
cheers! ngl I am new to coding, I just want to balance and possibly add a few units, but I have played this game since like 05 recently had the thought of atemmpting to mess around with code, also archipelago is an awsome map
MRBraaanz
3 years ago
Sorry to be a nuisance, but does anyone know the code to make a defensive building have the characteristics of a GLA tunnel network i.e be able to garrison units in and send them to another of the same building (if that makes any sense!) I am attempting to make a custom general your help would be much appreciated sorry if you struggle to understand my English!
UTD^Force
3 years ago
You aren't being a nuisance.
I've never needed to do what you want but it might be this behaviour that allows the tunnel network to be a... tunnel network lol. You will probably need to edit the new building's commandset to allow evacuating specific units


  Behavior = TunnelContain ModuleTag_05
    TimeForFullHeal     = 5000   ;(in milliseconds)
  End
--------------
CommandSet GLATunnelNetworkCommandSet
  1  = Command_StructureExit
  2  = Command_StructureExit
  3  = Command_StructureExit
  4  = Command_StructureExit
  5  = Command_StructureExit
  6  = Command_StructureExit
  7  = Command_StructureExit
  8  = Command_StructureExit
  9  = Command_StructureExit
  10 = Command_StructureExit
  11 = Command_TunnelEvacuate
  12 = Command_UpgradeGLACamoNetting
;  12 = Command_Stop
  13 = Command_SetRallyPoint  
  14 = Command_Sell
End


A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
MRBraaanz
3 years ago
Thanks for the help man it worked!! Just trying to see what wacky generals buildings, units and vehicles I can make, I managed to make a Chinese sniper, changed all the animations and skin to USABiohazard suit and it turned out pretty good. apart from the fact I gave him the Jarmen Kell ability, he's overpowered asf haha will have to change him to a pathfinders behaviours at some point to make him more balanced.
UTD^Force
3 years ago
Glad to help.


A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
MRBraaanz
3 years ago
Might I ask why you share this link ❤ ?
UTD^Force
3 years ago

Might I ask why you share this link ❤ ?

Originally Posted by: MRBraaanz 


You just did, jk.

That is my signature, I do not copy and paste this link with every reply I write.
If your question, however, is 'why is that link my signature?' I'll try to be concise.
I'm a Muslim, and in Islam the rights of the parents are stressed upon and emphasized many time in the Quran and Sunnah of our beloved prophet Muhammad (may peace be upon him).
Here is an example from the holy Quran on how Allah tells us to treat our parent even if they tell us to sin:

And We have commanded people to ˹honour˺ their parents. Their mothers bore them through hardship upon hardship, and their weaning takes two years. So be grateful to Me and your parents. To Me is the final return.

But if they pressure you to associate with Me what you have no knowledge of, do not obey them. Still keep their company in this world courteously, and follow the way of those who turn to Me ˹in devotion˺. Then to Me you will ˹all˺ return, and then I will inform you of what you used to do.



The holy Quran, Surah Luqman, 31:14-15 

And from the sunnah of our beloved prophet Muhammad (peace be upon him):

"Abu Huraira reported that a person said:

Allah's Messenger, who amongst the people is most deserving of my good treatment? He said: Your mother, again your mother, again your mother, then your father, then your nearest relatives according to the order (of nearness)."


Reference : Sahih Muslim 2548b 

So in short, I appreciate my parents for the rights that Allah gave them and for what they did for me, they weren't perfect (non of us is) but they still did their best. I am grateful to Allah and my parents for who I am now.

If you have any questions regarding Islam, I made a thread here  where I try to answer other forum members' questions to the best of my capability.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
MRBraaanz
3 years ago
I see, I am not religious in any way shape or form, but I respect all religions and beliefs. Those are very meaningful quotes and morals to live by I must say, thankyou for showing an insight to the Islamic faith I do wish to one day learn more indepth about it, a few of my friends are practising muslims, and the link/signature directs to a good song 🙂
UTD^Force
3 years ago
I'm glad that you appreciate these morals, and if you allow me to advise you, I'd ask you to contemplate life and what's its purpose. For this life is very, very short.
If you have the time, check this video out it is only 7 minutes long , but it might move the urge inside you to look for the true purpose.
I'm asking you to look into what you can look into, Islam and other religions, and see for yourself where the truth lies.
Allah says in the holy Quran:

Did you then think that We had created you without purpose, and that you would never be returned to Us?”


The holy Quran, Surah Al-Mu'minun 23:115 

Have a nice day.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
MRBraaanz
3 years ago
Very true, and the video was so inspirational, I will definately be diving more into the subject, and have a good one!