Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 3:48 am
All times are UTC + 0
Cyborg Carrier with Npatch (****)
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
AprilWar
Rocket Infantry


Joined: 05 Sep 2007
Location: Somewhere in rulesmd.ini

PostPosted: Tue Aug 12, 2008 8:22 pm    Post subject:  Cyborg Carrier with Npatch (****)
Subject description: Making Vehicles to spawn unlimited Infantry at certain ROF
Reply with quote  Mark this post and the followings unread

Main Mechanisms in this Tutorial:
*InfDeathAnim/MakeInfantry/AnimToInfantry
*GattlingLogic
*DeployingFire/AreaFire
*SprayAttack
*Fake Infantry

In this tutorial I will explain how a vehicle can spawn unlimited number of infantry at a certain ROF.
Watchout. This will be a lil bit large & complex because lots of things should remain untouched or it will affect the logic,
so avoid modifying the codes too much.

The Unit
First lets go with the code of unit carrier...
This is my cyborg carrier code. Im using rly_big_tank's "bigthingy" voxel as a good example.
Code:
[CABALMACRO]
UIName=Name:CABALMACRO
Name=Disintegrator Platform
Image=BIGTHINGY
Prerequisite=CABALWF
Primary=CyborgSpawner;This is the weapon that will be sprayfired, but since this is gattling i dont know if its really needed. lets keep it here
Secondary=CyborgMutator;The weapon that will be deployed using AreaFire
IsGattling=yes;Needed for the unit to work. We will use a similiar to create a unit with 3 weapons.
TurretCount=1
WeaponCount=6
Weapon1=CyborgSpawner;Necessary! <1>
EliteWeapon1=CyborgSpawner;Necessary! <1>
Weapon2=CyborgMutator;Necessary! <2>
EliteWeapon2=CyborgMutator;Necessary! <2>
Weapon3=CyborgMutator;This will be the unit's primary weapon so this should be here/
EliteWeapon3=CyborgMutator;same as above
Weapon4=CyborgMutator;This is the Secondary=
EliteWeapon4=CyborgMutator;This is the Secondary=
Weapon5=CyborgMutator;This is how the unit with 3 weapons works, so lets keep it here
EliteWeapon5=CyborgMutator;This is how the unit with 3 weapons works, so lets keep it here
Weapon6=CyborgMutator;This is the Secondary=
EliteWeapon6=CyborgMutator;This is the Secondary
WeaponStages=3;needed
Stage1=1;needed
Stage2=9999999;needed
Stage3=1
EliteStage1=1
EliteStage2=9999999
EliteStage3=1
RateUp=1
RateDown=1
FireAngle=32
ToProtect=yes
Strength=800
Category=AFV
Armor=heavy
Turret=no
IsTilter=yes
Crusher=yes
TooBigToFitUnderBridge=true
TechLevel=2
Sight=3
Speed=3
CrateGoodie=no
Owner=CABAL
Cost=1900
Soylent=2000
Points=55
ROT=3
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=RhinoGenSovVehicleSelect
VoiceMove=RhinoGenSovVehicleMove
VoiceAttack=RhinoGenSovVehicleAttackCommand
VoiceFeedback=
DieSound=
MoveSound=GrizzlyTankMoveStart
CrushSound=TankCrush
MaxDebris=2
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
ThreatPosed=15; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
Accelerates=false
ImmuneToVeins=yes
Size=3
AIBuildThis=yes
MobileFire=no     ;recommended
OpportunityFire=no;recommended
CanPassiveAcquire=no;recommended
CanRetaliate=no;recommended
PreventAutoDeploy=yes;recommended
PreventAttackMove=yes;recommended
Trainable=no
;SizeLimit=2            ; you can give it passengers & pipscale=passengers without trouble
IsCoreDefender=yes
Deployer=yes       ;So you can deploy you infantry anytime you want without needing firing
DeployFire=yes   ;So you can deploy you infantry anytime you want without needing firing
DeployFireWeapon=1;This tells the game that it will fire the Secondary, but since this it gattling it will fire both
Bunkerable=no; Units default to yes, others default to no
SelfHealing=yes
ToProtect=yes
AllowedToStartInMultiplayer=yes
SprayAttack=yes;NEEDED <3>


<1> In this tutorial we will use the ONLY gattling bug to our advantage. If you have tried the Unit with 3 weapons tutorial (one for infantry, one for vehicles and buildings and an AA weapon) you may have noticed that the antiinfantry will fire in the beginning even if yourenot attacking a infantry, then it switches to the anitarmor weapon. Well, we will use this effect so the first weapon spawns infantry (but it will have to be civilian owned troops) and then the second weapon will "turn" them into player owned infantry. The CyborgSpawner will be the weapon that spawns/summons the "fake infantry" i will explain it later.
<2> This weapon will be the one that KILLS the spawned civilian infantry, therefore, using InfDeathAnim and makeinfantry it will become playerowned troops.
<3> Required!, without this tag, the infantry will spawn under the carrier. It has somebugs. it cannot be controlled where does the infantry will be spawned. Sometimes the infantry will be spawned too far from the carrier, about 4/7 cells or even in a rock, under a cliff, etc. But lets say it's a minor bug.  Laughing  

The weapons
Code:
;This weapon will spawn fake civilian owned infantry (similar to the original one)
[CyborgSpawner]
Damage=1;It wont damage at all, it will only spawn
ROF=15;This is the minimum number at what the whole thing will work. Anynumber below this will mess everything: TESTED. <4>
Range=14; So you can target an enemy unit and begin the spawn process. The value is optional
Speed=200
OmniFire=yes;Suggested
Projectile=CyborgSpawnerFakeProj
Warhead=CyborgSpawnerWH
AreaFire=no; not really needed
FireOnce=yes; It will switch quickly to the other weapon so lets keep it here to avoid any bug
FireWhileMoving=no
;Burst=2      ;Adding burst will not change the number of infantry that spawns at the same time, it will only mess the whole thing bugging the weapon: TESTED

[CyborgSpawnerProj]
Inviso=yes   ;there’s no image
Image=none    ;not needed
SubjectToWalls=yes;civilian cyborgs wont spawn passing a wall
SubjectToCliffs=yes; wont spawn in cliffs where the carrier isnt
SubjectToElevation=no
;Cluster=2   ;Adding Cluster=X wont change the number of infantry that spawns at the same time: TESTED

[CyborgSpawnerWH]
Verses=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%  ;It wont damage at all
AnimList=CYBSPAWN ;The spawner anim      
Bullets=yes
ProneDamage=1%

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

[CyborgMutator]
Damage=900     ;This should kill the civilian fake infantry in only ONE shot.
ROF=450         ;The real ROF at what the carrier will spawn the next cyborg (im using cyborgs) Keep it high so it isnt overpowered
Range=14        ;Same as the spawner weapon above?
Speed=1
OmniFire=yes     ;suggested
Projectile=CyborgMutatorProj
Warhead=CyborgMutatorWH
AreaFire=yes; just shoot straight at ground under feet   ;YES, so it can kill any civilian owned fake infantry in its radius
FireOnce=yes; Only fire once; don't stay in attack mission  ;yes, we dont it to keep spawning without permission :P
FireWhileMoving=no;very recommended               
AffectAllies=no;it wont damage any allied medium armored units

[CyborgMutatorProj]
Inviso=yes
Image=none
SubjectToWalls=yes
SubjectToCliffs=yes
SubjectToElevation=yes

[CyborgMutatorWH]
CellSpread=9;It should kill even the farest fake infantry. Unfortunately we cant control the SprayAttack location, so this cant be that short.You can experiment with this a lilbit
Verses=0%,0%,0%,0%,200%,0%,0%,0%,0%,0%,0%;Will affect only the civilian fake inf armor.
PercentAtMax=1;so it kill it in one shot
InfDeathAnim=CYBSPAWN2;a secondary anim that will be the death anim of the civilian owned inf and will spawn the real player owned infantry


<4>Do not add a ROF below 15 or it will cause some serious bug in the logic. With ROF=15 you can have 1 or 2, maximum 3 civlian infantry that spawns at the same time then quickly turns into player owned troops. If you want to ensure that only ONE infantry is spawned, then higher the value of 15 to somethin else. NOT BELOW 15. But, the higher the value, the more it takes to a spawned civilian infantry to become player owned (it's matter of frames what i am talking about)

Add the Warheads to the list.

The Animations
Go to the AnimToInfantry= tag in the rulesmd and add CYBORGP and CYBORG:

AnimToInfantry=BRUTE,CYBORGP,CYBORG

«Where CYBORGP will be the fake civilian owned infantry and CYBORG the playerowned infantry»

Add CYBSPAWN and CYBSPAWN2 to the anim list.
then go to the artmd.ini and create their section.
Code:
;The animation that SUMMONS the civilian spawned inf. I suggest a clone of the WARPIN will look good. in this case im using a blank anim
[CYBSPAWN]
Layer=ground
MakeInfantry=1;This should be the number to the CYBORGP. This value may change if you dont use the AnimToInfantry= code above
YSortAdjust=-100

;The animation wich refers to the InfDeathAnim=, this will spawn the real playerowned infantry. I recommend a blank animation
[CYBSPAWN2]
Layer=ground
MakeInfantry=2;This should be the number to the CYBORG. This value may change if you dont use the AnimToInfantry= code above
YSortAdjust=-100



The infantries
I chose the cyborgs because they are a complex infantry. Obviusly if you can code a cyborg correctly
you can code a simple soldier. You can change them easier if you want.
Now We will have to create the normal cyborg with all of its features and the fake cyborg.

Code:
; This is my code for my cyborg. You can modify everything you want here without trouble .This will be the PLAYEROWNED Cyborg
[CYBORG]
UIName=name:CYBORG
Name=CABAL Advanced Cyborg
Category=Soldier
Image=CYBORG
Prerequisite=CABALBAR,CABALRADAR,CABALWF
Primary=ChaingunArm
ElitePrimary=LaserChaingunArm
Secondary=CannonArm
EliteSecondary=CannonArmE
Crushable=no
TiberiumProof=yes
Fearless=yes;logic
Cyborg=yes;logic
Pip=white
Strength=350; w300
Armor=light;So it doesnt get affected by the 2nd warhead.
TechLevel=3
Sight=6
Speed=5
Teleporter=yes
Owner=CABAL
ForbiddenHouses=Russians,Africans,Confederation,Germans,Alliance,British,America
ns,YuriCountry,OldNod,NewGDI,OldGDI,ScrinCountry,Arabs
AllowedToStartInMultiplayer=no
Cost=700
Soylent=250
Points=6
CrushSound=InfantrySquish
VoiceSelect=TSCyborgSelect;These only work if you added the sound stuff correctly
VoiceMove=TSCyborgMove
VoiceAttack=TSCyborgAttack
VoiceFeedback=
VoiceDie=TSCyborgDie2
DieSound=TSCyborgDie2
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=3
MovementZone=Infantry
DamageParticleSystems=SparkSys
ThreatPosed=15; This value MUST be 0 for all building addons
ImmuneToVeins=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=2
LeadershipRating=6
ImmuneToPsionics=yes
ImmuneToPsionicWeapons=no
SelfHealing=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
IFVMode=0;2
AIBuildthis=yes
DebrisAnims=CRYSTAL1,CRYSTAL3,crystal3
MaxDebris=4
MinDebris=2
PixelSelectionBracketDelta=-8
Sensors=yes
SensorsSight=2
CanPassiveAcquire=yes

;This will be the civilian owned fake cyborg!
[CYBORGP]
UIName=name:CYBORG
Name=Civlian owned Cyborg
Category=Soldier
Image=CYBORG;same as the original
Prerequisite=CABALBAR,CABALRADAR,CABALWF
;Primary=ChaingunArm          ;It will attack the nearest unit if it has a weapon
;ElitePrimary=LaserChaingunArm;It will attack the nearest unit if it has a weapon
;Secondary=CannonArm      ;It will attack the nearest unit if it has a weapon
;EliteSecondary=CannonArmE;It will attack the nearest unit if it has a weapon
Crushable=no
TiberiumProof=yes
Fearless=yes
Cyborg=no;Otherwise it will have to be killed twice =P
Pip=white
Strength=300;The more powerfull the armor the less strenght so it matches the original
Armor=medium;THE ONE THAT WILL BE AFFECTED by the 2nd warhead
TechLevel=-1 ;Cant be built
Sight=6
Speed=0;it should not go anywere :P
Teleporter=yes
Owner=CABAL
ForbiddenHouses=Russians,Africans,Confederation,Germans,Alliance,British,America
ns,YuriCountry,OldNod,NewGDI,OldGDI,ScrinCountry,Arabs
AllowedToStartInMultiplayer=no
Cost=700
Soylent=250
Points=6
CrushSound=InfantrySquish
VoiceSelect=TSCyborgSelect;These only work if you added the sound stuff correctly
VoiceMove=TSCyborgMove
VoiceAttack=TSCyborgAttack
VoiceFeedback=
;VoiceDie=TSCyborgDie2
;DieSound=TSCyborgDie2
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=3
MovementZone=Infantry
;DamageParticleSystems=SparkSys
ThreatPosed=15; This value MUST be 0 for all building addons
ImmuneToVeins=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=2;1
LeadershipRating=6
ImmuneToPsionics=yes
ImmuneToPsionicWeapons=no
SelfHealing=yes
;Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60;We dont want it to have an explosion when it gets killed by the second weapon
IFVMode=0;2
;Parasiteable=no
;DebrisAnims=CRYSTAL1,CRYSTAL3,CRYSTAL3;We dont want it to have an explosion when it gets killed by the second weapon
;MaxDebris=4;We dont want it to have an explosion when it gets killed by the second weapon
;MinDebris=2;We dont want it to have an explosion when it gets killed by the second weapon
PixelSelectionBracketDelta=-8;es para la altura de la barra de vida
Sensors=yes
SensorsSight=2
CanPassiveAcquire=no;Removed weapons
CanRetaliate=no;Removed weapons
PreventAttackMove=yes;Removed weapons
OpportunityFire=no;Removed weapons
Selectable=no;Recommended

If we dont use a fake infantry, there will be problems. Because the civliand owned will attack you, will move and etc.
Be sure to include everything in the respectives lists.

Now, if you want, you have to ensure that the CyborgMutatorWH doesnt affect any Medium armored vehicles. using armor types or any verses, but that it's up to you.

There are minor bugs in this thing.
*You cannot use Ammo= correctly, you may have some bugs: TESTED
*Cyborgs may spawn too far from the carrier's location... ¿And sometimes in trees or rocks?
*Sometimes, when you deploy it, it will fire only once, sometimes NOT and will keep its attack mission.

If you have any comment or suggestion that improves this code please post your feedback.
Also post the bugs so i can add them and find a way to solve them.

A final shot.


Im currently working in a tutorial to make infantry spawn into another infantry in an unlimited way. So stand by. Twisted Evil  

Have Fun.


Key Words: #Tutorials #Modding #RedAlert2 #YurisRevenge #NPatch #Rules.INI 

_________________


My Art

Last edited by AprilWar on Fri Jan 16, 2009 8:39 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website
SSTG
Rocket Cyborg


Joined: 19 Nov 2007

PostPosted: Wed Aug 13, 2008 2:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Sounds promising good way to get around the slave miner logic if you want something to create a vehicle spawning attack infantry

Back to top
View user's profile Send private message
Biohazard
Commander


Joined: 17 Jan 2008
Location: MD,USA

PostPosted: Wed Aug 13, 2008 12:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

haha cool. this could be helpful

_________________

Retired YR Player
Steam Account : MAS93
Xfire: msbiohazard

Back to top
View user's profile Send private message Send e-mail Yahoo Messenger Account AIM Address
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1961s ][ Queries: 11 (0.0097s) ][ Debug on ]