Jump to content


[ZH/How to] Tiberium and Stealth generator.


20 replies to this topic

#1 Sgt. Rho

    Kerbal Rocket Scientist

  • Project Leader
  • 6870 posts
  • Projects: Scaring Jebediah.

Posted 14 May 2007 - 11:24

NOTE: Some advanced coding skills required!

Here are 2 tutorials, initially by DetoNato in icq^^

Stealth generator:

First of all:

Add this into your unit´s or structures code which should be affected by the stealth effect:
StealthUpdate ModuleTag_98
	[...]
		RequiredStatus = STATUS_RIDER8
End


And this into the stealth generator´s code:

StealthUpdate ModuleTag_98
		RequiredStatus = STATUS_RIDER8
End

FireWeaponUpdate ModuleTag_99
	Weapon = StealtGenerator
	  ExclusiveWeaponDelay = 0
	  InitialDelay = 0
End


Now, copy and paste the avenger targetdesingnator weapon in the weapon.INI.

Change "FAERIE_FIRE" to "STATUS_RIDER8". The PrimaryDamageRadius decides the are of effect (350 = range of a nuke cannon)

--------------
Tiberium:

Create 7 different objects, (2 dummy's, 1 tiberiumtree and 4 different crystals)

Tiberium tree:


Create a new structure first, call it..TiberiumTree.

Now: give it 2 fireweaponupdates:

FireWeaponUpdate ModuleTag_90
	Weapon = CristalSpawner
	  InitialDelay = 20000
End 
FireWeaponUpdate ModuleTag_91
	Weapon = CristalKiller
	  InitialDelay = 0
End


----

Tiberium Cristal:

Create a structure with 2 fireweaponupdates, Call it "Cristal1":

FireWeaponUpdate ModuleTag_90
	Weapon = CristalSpawner
	  InitialDelay = 20000

FireWeaponUpdate ModuleTag_91
	Weapon = CristalKiller
	  InitialDelay = 0

;and add this too:

SpawnBehavior ModuleTag_92
	SpawnNumber = 1
	OneShot = Yes
	SpawnTemplateName = OCL_Cristal2
	SpawnedRequireSpawner = No
	InitialBurst = 20000
End

FireWeaponUpdate ModuleTag_90
	 Weapon = CristalGrowArea
	   InitialDelay = 0



Now create 3 more cristals:

Call them from cristal2 up to cristal 4:

SpawnBehavior ModuleTag_92
	SpawnNumber = 1
	OneShot = Yes
	SpawnTemplateName = OCL_Cristal3;everytimes one above the actual cristal (if it is Cristal2, put cristal 3 etz.)
	SpawnedRequireSpawner = No
	InitialBurst = 20000
End


Now the dummys:

Dummy1:

call it "CristalDummy"

SpawnBehavior ModuleTag_90
	SpawnNumber = 1
	OneShot = Yes
	SpawnTemplateName = OCL_Cristal1
	SpawnedRequireSpawner = No
	InitialBurst = 2000
End

CreateObjectDie ModuleTag_91
	ExemptStatus = STATUS_RIDER4 

End

CreateObjectDie ModuleTag_92
	RequiredStatus = STATUS_RIDER4;Increase with each cristal
		CreationList = OCL_Cristal1 
End

LifetimeUpdate
	MinLifetime = 100
	MaxLifetime = 100
End
Now create another dummy:

Call it CristalGrowingArea, this one will limit the growing of the field and it allows you to make somethink like a road where the tiberium grows.

FireWeaponUpdate ModuleTag_90
	Weapon = CristalGrowArea
	  InitialDelay = 0


Now lets go to teh weapons:

CristalKiller;it´s a staus weapon
[...]
PrimaryDamageRadius: 2
[...]
STATUS_RIDER1;as status set by the status weapon
[...]
End


Next one:

CristalSpawner
[...]
OCL_CristalDummy
[...]
End


Next:

CristalGrowArea
[...]
STATUS_RIDER4
[...]
End


Now teh OCL´s

OCL_Cristal1;Increased with each cristal grow-staus
[...]
Cristal1
Y = 3
[...]
Cristal1
Y = -3 
[...]
Cristal1
X = 3
[...]
Cristal1
X = -3
End


Teh Cristal Dummy:

OCL_CristalDummy;Increased with each cristal grow-staus
 [...]
 CristalDummy
 Y = 3
 [...]
 CristalDummy
 Y = -3 
 [...]
 CristalDummy
 X = 3
 [...]
 CristalDummy
 X = -3
 End


I think that´s it^^

Special thansk to:

DetoNato -> Show me how it works
Chris (Yayo01) -> Giving me the module list^^

-ill edit soon again :P -

Edited by Master_Chief, 14 May 2007 - 12:37.


#2 Zeke

    The X General

  • Project Team
  • 3504 posts
  • Projects: Deep Impact (formerly EC)

Posted 14 May 2007 - 11:31

Perfect timing I was just about to ask if it were possible :P

#3 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 15 May 2007 - 18:15

Just wondering,
Do you have an ingame pic sequence (or vid)?
Posted Image

#4 Sgt. Rho

    Kerbal Rocket Scientist

  • Project Leader
  • 6870 posts
  • Projects: Scaring Jebediah.

Posted 15 May 2007 - 18:29

As i saied soem time before, i don´t have ZH anymore....you should ask DetoNato...

#5 Chrizz

    E-Studios™ 2012

  • Gold Member
  • 2012 posts
  • Projects: C&C3: Tiberium Icestorm

Posted 16 May 2007 - 11:37

hmm good to know u dont have ZH anymore lol why u dont have it anymore? ppl stil play in massivly online

#6 Sic

    Veteran

  • Project Team
  • 5507 posts
  • Projects: NLS 2D Artist, Code 13 Cameo Artist

Posted 16 May 2007 - 12:26

I think he sold it because he needed the money, he posted a thread about it :).
Posted ImagePosted Image
Posted Image

#7 Sgt. Rho

    Kerbal Rocket Scientist

  • Project Leader
  • 6870 posts
  • Projects: Scaring Jebediah.

Posted 16 May 2007 - 13:38

I have no more ZH but....It´sah miah, cnc3ah^^ I got cnc3 now^^

#8 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 16 May 2007 - 14:24

Right, i'm implamenting this.

But i'd like to point out, that it's VARY vage.

[...] dosn't mean much to a coder.
Posted Image

#9 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 16 May 2007 - 20:08

Right, Back from work now, so i'll continue work on the Code.

If M_C dosn't mind, i'll post up the full code when i get it working.
Posted Image

#10 Golan

    <Charcoal tiles available>

  • Member Test
  • 3300 posts

Posted 16 May 2007 - 20:11

I just had only a short look at the code, but why are there several crystals spawning each other?
Now go out and procreate. IN THE NAME OF DOOM!

#11 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 16 May 2007 - 20:14

Dam router.

Anyway, in responce to that:
diferent sized crystal feilds.

you can't spawn induvidual crystals in gens, because of the way the supply units harvest.
They will harvist till they are full OR till the supply source runs out.
Then they return to the supply center, even if they're not full.

In ConRed, there are 4 sized 'fields', Large/Medium/Small/Tiny
Rangeing from $1000 to 250

Edited by Slye_Fox, 16 May 2007 - 20:20.

Posted Image

#12 Golan

    <Charcoal tiles available>

  • Member Test
  • 3300 posts

Posted 16 May 2007 - 20:33

Ahh, I see, thanks. Allways solved this by having fitting ressource values (like one/two/three/... full harvester loads per field). Guess I´ll give that one a try. Thanks to MasterChief aswell.

Edited by Golan, 16 May 2007 - 20:34.

Now go out and procreate. IN THE NAME OF DOOM!

#13 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 17 May 2007 - 01:18

Wow, this is taking a while to get to work.

Alot of the code posted, were useing the incorect moduals.

I got my "tree" to spawn the dummy "crystal", but the dummy isn't spawning the normal "crystal" apon death.

Anyway, a dummy spawning is better than nothing.
Posted Image

#14 Kris

    <Custom title available>

  • Project Team
  • 3825 posts

Posted 17 May 2007 - 01:39

Ermmm the "SpawnTemplateName" IIRC, Doesn't take ObjectCreationList.ini entries..







#15 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 17 May 2007 - 02:21

iI'm not useing SpawnUpdate, I'm useing CreateObjectDie
Posted Image

#16 Sgt. Rho

    Kerbal Rocket Scientist

  • Project Leader
  • 6870 posts
  • Projects: Scaring Jebediah.

Posted 17 May 2007 - 19:26

no, it´s not for that, it is to spawn the next "phase"

#17 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 17 May 2007 - 21:59

the Spawn logic don't work like that

SpawnBehavior ModuleTag_92
	SpawnNumber = 1
	OneShot = Yes
	SpawnTemplateName = OCL_Cristal2
	SpawnedRequireSpawner = No
	InitialBurst = 20000
End


The "SpawnTemplateName =" uses Objacts not OCL's
And the "InitialBurst ="is how many are created when it's first fired (which is emidiatetly), not how a delay.

So basicly, you're spawning 20,000 'OCL_Cristal2' objects.

----------------------------------------------------------------------------------------------------------------------------------------------------

I'm trying to use this code;
  Behavior = CreateObjectDie ModuleTag_91
	DeathTypes	 = NONE
	ExemptStatus   = STATUS_RIDER4
	CreationList   = OCL_GrowableOreMedium
  End

  Behavior = CreateObjectDie ModuleTag_92
	DeathTypes	 = NONE
	RequiredStatus = STATUS_RIDER4
	CreationList   = OCL_GrowableOreLarge
  End

  Behavior = LifetimeUpdate ModuleTag_93
	MinLifetime = 20000
	MaxLifetime = 20000
  End


What this does, is if it's in the growing feild (generated by the drill and 'stage 4' ore/tiberium) it creates the naxt stage ore/tiberium.
If not, it remains at the same size.

Edited by Slye_Fox, 17 May 2007 - 22:02.

Posted Image

#18 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 18 May 2007 - 03:51

Right, got the ore spawning properly now.
Just tweeking it before i post the code, If that's okay with you M_C (still not got a reply from you about that).

Edited by Slye_Fox, 18 May 2007 - 03:51.

Posted Image

#19 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 18 May 2007 - 05:32

Sorry if all the multi-posting is anoying people, But editing a post dosn't inform people that an update has been made.

Anyway;
I've got the ore to 'grow' and spread out away from the drill.

But i'm haveing a problem with spawning again.
The ore is spawned ontop of piles all ready there.
Posted Image

#20 Sgt. Rho

    Kerbal Rocket Scientist

  • Project Leader
  • 6870 posts
  • Projects: Scaring Jebediah.

Posted 18 May 2007 - 11:57

Can you explain it a bit better? :D

#21 Slye_Fox

    FOXTec Leader

  • Project Leader
  • 2351 posts
  • Projects: CnC: Condition Red, Sigma Invasion, Armoured Sky: Ethereal Dawn

Posted 18 May 2007 - 16:26

I'm useing the CreateObjectDie modual
It's supposed to ignore the STATUS_RIDER1 so it dosn't make ore on spots where ore allready is.
Posted Image



7 user(s) are reading this topic

0 members, 7 guests, 0 anonymous users