Posted: Sat Jul 02, 2005 12:47 pm Post subject:
Naval Yard / Alternate Factories.
Subject description: Reccomended for experienced modders.
Naval Yard / Alternate Factories. How to create them using deploying method.
This tutorial will guide you through how to create a working Naval Yard or Alternate Factory using the deploying method. In some ways this tutorial is made obsolete by Naval Yard/Alt war factory V 2.0, however it may be useful to understand how this logic works and of course, if you want to use the deploying method.
How it works.
I stumbled upon this logic whilst playing Tiberian Sun skirmish. I noticed that if you played as G.D.I. and captured a Nod War Factory you gained the ability to produce their vehicles. More interestingly, if I set my G.D.I. War Factory to Primary and tried to build a newly acquired Nod vehicle it would always come out of the Nod War Factory and not my G.D.I. Factory despite being set as Primary. This worked both both ways for both sides, whether it's Nod capturing a G.D.I. Warfactory or etc.
The reason this happens is actually quite simple. For example, the Nod War Factory has the following code:
Code:
[NAWEAP]
Owner=Nod
And Nod vehicles generally have the code:
Code:
[TTNK]
Owner=Nod
Vehicles with Owner=Nod can only come out of a War Factory which also has the settings Owner=Nod and this is why they do not come out of a G.D.I. War Factory, as the G.D.I. War Factory has Owner=GDI. Hopefully you should understand how that works and how the game works in that area. So how can we make a factory that in this instace, will only produce boats from it and not ground units as has been a common problem? It requires quite a bit of coding but is very possible. We firstly need to make some new Houses & Countries we can set as Owner='s. Here is an example on how to do that:
Code:
[Houses]
0=GDI
1=Nod
2=GDINaval -> Add this new house to the list.
3=NodNaval -> Add this new house to the list.
4=Neutral
5=Special
We also need to add new entries to the Side Type List.
Code:
[Sides]
GDI=GDI
Nod=Nod
GDINaval=GDINaval -> Add this new Side to the list.
NodNaval=NodNaval -> Add this new Side to the list.
Civilian=Neutral
Mutant=Special
Now we need to add these to the Country Statistics List. You will need to create entries for GDINaval and NodNaval like these:
Code:
; Global Defence Initiative Naval Faction.
[GDINaval]
Name=GDI Naval Units
Suffix=GDIN
Prefix=G
Color=Gold
Side=GDINaval
; Brotherhood of Nod Naval Faction.
[NodNaval]
Name=Nod Naval Units
Suffix=NODN
Prefix=B
Color=DarkRed
Side=NodNaval
Okay, we have the ground work set to start testing this logic, now we need to make it so the deploying logic works. The deploying logic works very similarly to the Mobile War Factory seen in the Firestorm Expansion pack. There needs to be a unit that can be built from the War Factory, and it needs to be able to deploy into another War Factory (in this case a Naval Yard). The trick in this whole process is the building your unit deploys into will have the tag Owner=GDINaval or Owner=NodNaval, obviously depending for which side you are using. We need to make these deployable vehicles first so add their entries to the Vehicle Type List first:
Code:
[VehicleTypes]
47=CARGOCAR
48=WEED
49=GHUNTER
50=NHUNTER
51=MOBYARDG -> G.D.I. Mobile Naval Yard
52=MOBYARDN -> Nod Mobile Naval Yard
Once the entries have been added, the actual vehicles need to be added:
Code:
; Mobile Naval Yard (GDI)
[MOBYARDG]
Name=Mobile Naval Yard
Image=MCV
Prerequisite=GAWEAP
BuildLimit=1
TechLevel=5
Category=Support
Strength=800
Armor=heavy
Sight=6
Speed=3
Owner=GDI
Cost=1800
Points=60
ROT=5
Crewed=yes
Crusher=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=25-I000,25-I002,25-I004,25-I006
VoiceMove=25-I012,25-I014,25-I016,25-I018,25-I022
VoiceAttack=25-I014,25-I022,25-I024,25-I026
VoiceFeedback=
MaxDebris=6
SpeedType=Amphibious
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousCrusher
Weight=3.5
ThreatPosed=0 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
SpecialThreatValue=1
ZFudgeColumn=12
ZFudgeTunnel=15
DeploysInto=GAYARD
CrateGoodie=no
AllowedToStartInMultiplayer=no
Trainable=no
; Mobile Naval Yard (Nod)
[MOBYARDN]
Name=Mobile Naval Yard
Image=MCV
Prerequisite=NAWEAP
BuildLimit=1
TechLevel=5
Category=Support
Strength=800
Armor=heavy
Sight=6
Speed=3
Owner=Nod
Cost=1800
Points=60
ROT=5
Crewed=yes
Crusher=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=25-I000,25-I002,25-I004,25-I006
VoiceMove=25-I012,25-I014,25-I016,25-I018,25-I022
VoiceAttack=25-I014,25-I022,25-I024,25-I026
VoiceFeedback=
MaxDebris=6
SpeedType=Amphibious
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousCrusher
Weight=3.5
ThreatPosed=0 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
SpecialThreatValue=1
ZFudgeColumn=12
ZFudgeTunnel=15
DeploysInto=NAYARD
CrateGoodie=no
AllowedToStartInMultiplayer=no
Trainable=no
Now that we have the Mobile Vehicles fully coded and ready to go it's time to add the actual Naval Yard buildings themselves. Add the new entries to the Building Type List:
When these enties have been added the buildings themselves need to be coded in. Here's an example of how it works. It's VERY important to make sure the Owner= tag is correct.
Code:
; G.D.I. Naval Yard
[GAYARD]
Name=Naval Yard
Image=GAWEAP
WeaponsFactory=yes
Factory=UnitType
DeployTime=.044
Strength=800
Armor=heavy
TechLevel=-1
Sight=4
BaseNormal=no
Cost=2000
Points=80
Power=0
Capturable=false
Crewed=no
Bib=no
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=8
ThreatPosed=0 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=408, 880, 435
AIBuildThis=no
WaterBound=yes -> Makes this a water built structure.
Owner=GDINaval -> This is very important.
; Nod Naval Yard
[NAYARD]
Name=Naval Yard
Image=NAWEAP
WeaponsFactory=yes
Factory=UnitType
DeployTime=.044
Strength=800
Armor=heavy
TechLevel=-1
Sight=4
BaseNormal=no
Cost=2000
Points=80
Power=0
Capturable=false
Crewed=no
Bib=no
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=8
ThreatPosed=0 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=408, 880, 435
AIBuildThis=no
WaterBound=yes -> Makes this a water built structure.
Owner=NodNaval -> This is very important.
Now, you should have the vehicles and necessary buildings coded up fine, but what's the use if you have no boats to build? It's time to add some naval units to come out of those Naval Yards. Going back to the logic at the begining where I mentioned, units with Owner=GDI will only come out of factories with Owner=GDI, the same applies here. Our Naval Yards have the tags Owner=GDINaval and Owner=NodNaval. The naval units therefore need Owner=GDINaval or NodNaval, and they will only be buildable through the Naval Yards. Here's some basic code to play around with for some ships:
Code:
49=GHUNTER
50=NHUNTER
51=MOBYARDG -> G.D.I. Mobile Naval Yard
52=MOBYARDN -> Nod Mobile Naval Yard
53=GDIBOAT -> New G.D.I. Ship
54=NODBOAT -> New Nod Ship
Code:
; G.D.I. Boat
[GDIBOAT]
Name=Destroyer
Image=LOCOMOTIVE
Prerequisite=GAYARD
Primary=120mmx
Category=light
Strength=550
Armor=Light
Turret=yes
IsTilter=yes
TechLevel=5
Sight=7
Speed=3
CrateGoodie=no
Owner=GDINaval
Cost=1200
Points=25
ROT=1
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=25-I000,25-I002,25-I004,25-I006
VoiceMove=25-I012,25-I014,25-I016,25-I018,25-I022
VoiceAttack=25-I014,25-I022,25-I024,25-I026
VoiceFeedback=
MaxDebris=45
DebrisTypes=RUBBLE01,RUBBLE02,RUBBLE03,RUBBLE04,RUBBLE05,RUBBLE06,RUBBLE07,RUBBLE08,EXPGAS1
DebrisMaximums=2,2,2,2,2,2,2,2,1
SpeedType=Float
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousCrusher
ThreatPosed=20 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
Accelerates=yes
VeteranAbilities=FASTER,STRONGER,SIGHT
EliteAbilities=FIREPOWER,ROF,SENSORS,SELF_HEAL
; Nod Attack Boat
[NODBOAT]
Name=Missile Boat
Image=CARGOCAR
Prerequisite=NAYARD
Primary=HoverMissile
Category=light
Strength=480
Armor=Light
Turret=yes
IsTilter=yes
TechLevel=5
Sight=7
Speed=4
CrateGoodie=no
Owner=NodNaval
Cost=1200
Points=25
ROT=1
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=25-I000,25-I002,25-I004,25-I006
VoiceMove=25-I012,25-I014,25-I016,25-I018,25-I022
VoiceAttack=25-I014,25-I022,25-I024,25-I026
VoiceFeedback=
MaxDebris=45
DebrisTypes=RUBBLE01,RUBBLE02,RUBBLE03,RUBBLE04,RUBBLE05,RUBBLE06,RUBBLE07,RUBBLE08,EXPGAS1
DebrisMaximums=2,2,2,2,2,2,2,2,1
SpeedType=Float
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousCrusher
ThreatPosed=20 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
Accelerates=yes
VeteranAbilities=FASTER,STRONGER,SIGHT
EliteAbilities=FIREPOWER,ROF,SENSORS,SELF_HEAL
Hopefully this should give you a good idea and base for you to start experimenting with, or at the very least, give you an understanding of how the game deals with Owner= tags on vehicles and factories. This obviously does not apply just to Naval Yards. This logic can be used to create an Airfield which produces only large Aircraft for example, or a Kennel which only produces dogs.
This was originally intended for use with Tiberian Odyssey and thanks go to CCHyper and Big Jah for helping me test this logic with the mod.
P.S. If anyone has any particular questions regarding this please me about it .
Joined: 25 Aug 2004 Location: DAS BOOT IM DER OSTSEE
Posted: Sat Jul 02, 2005 8:44 pm Post subject:
The best part is that i have an excuse for adding the hidden vxls in a mod now! morpher you own. _________________ PPM's Reichstrollfuherer, 236th Trollenparties brigade. QUICK_EDIT
You have done it wrong,it workes fine for me and sveral others however if you do some parts wrong it can go horribly wrong.And yes this will be in my mod but bets used for the more water style maps that wes is working on _________________ QUICK_EDIT
Joined: 18 Feb 2005 Location: Star Kingdom of Manticore
Posted: Mon Jul 11, 2005 12:45 am Post subject:
Morpher.. I must talk to you on MSN regarding this and its use in something. _________________ "Reality is a lovely place, but I wouldn't want to live there." -Adam Young QUICK_EDIT
So what exactly am i wanting to put in my rules files to build a naval yard and ships? I started to get it but then it went into something about "Test" things?? QUICK_EDIT
Test was an example of another side you could try this with,your naval side does not have to be called naval,anyway,the Test part is an optional peice so you can try an alternate war factory. _________________ QUICK_EDIT
Ok im a pain. Since i dont seem to get this exactly i want to make it so both GDI and NOD can build it. Could someone paste what goes where in a post for me so i can put it in my INI? Preferbly with all the settings like GDI,NOD and prices and what not.
Well to be technical im brain injured <--not sarcasm.
If it was just simply like:
This goes in Warheads:
INFO
INFO
INFO
This goes in ART.INI under yadda yadda section:
INFO
INFO
INFO
Then id get it and understand but since there a whole lot of talking(which i know you need to explain) its hard for me to understand it and do what it says. QUICK_EDIT
What the hell!There are no warheads.There are no new graphics,stop being lazy and expect people to make the graphics,I used place holders.I would say read tutorials on this but seen as this is a tutorial I will just simply give you a magic link
If it just said "Put this here" and you listed what it was like you have instead of all the info it would be easy for me but instead you insult me for being disabled. Just because your an obvious know all with a non-damaged brain does mean we all are. All the chatting in between the lines throws it all off for me. Sorry for living in your perfect world. Ill go away and play Seaseme Street games since im not up to par with your intelligence....that and im "Lazy". QUICK_EDIT
'Assassin X', Morpher is a good guy, please dont make him feel bad. & as for you, well, he is saying the unit basically needs to have those extra codes... & the [naval] is the new side so only units under that team come out of its building... QUICK_EDIT
assasin x this tutorial is meant for people with some experience
i suggest you do some basic stuff and try some easier tutorials
also try to look at all things in the rules.ini file and try to learn what it means by making changes and recording what it changed in-game
of course you have to know what entry you're changing and take the appropriate side/map/mission to see what's changed
modding is not the easiest of things therfor you have to do the basics before trying do do something large _________________ Micro TS
Portable, no campaign, movies or music, just the engine and needed resources for skirmish and lan. QUICK_EDIT
I apologise assasin,I suggest you do some more practice with other tutorials before attempting this,you really need to understand how the logic works in it. _________________ QUICK_EDIT
Ive done some of the hard tutorials and got the units to work. I think i can get this. I put in the information but the buildind isnt showing up. Here is what i did:
I put the GDI Naval Ship Yard item in the building list and then in the list(###=GASHIPY)...etc
I put the Heavy Boat Attack Ship and Mobile Naval Yard in the vehicle list and then in the ###= list.
I put [NAVAL] thing in the "Country Statistics".
Now the only two left i wasnt sure where to put them:
These tags enable the alt naval yard/war factory logic, allow the vehicle to deploy only in water, and allow the Deployed Shipyard to become a vehicle again. _________________
if you add Naval to the Owner= tag of the Construction Yard(s), you should be able to build the naval yard directly without having to have the deployable unit to make 1.
since, you can only build stuff of the same type of owner as your factory.
been a while since i modded TS though, but it works in YR.
(I spent weeks playing with the Owner tag when i was researching 4th side stuff in YR several years ago) _________________ QUICK_EDIT
Well done! If this works we can have kennels, naval yards, anything, air fields, all working, this has to be tested, I'l test this very soon and tell the results. _________________ QUICK_EDIT
Just to note you will probably need to make side seperate MCV's for this as the orignal ConYard is also owned by both sides,and playing as GDI dosn't let you use Nod stuff even though it has Nod owner tag in it. _________________ QUICK_EDIT
this works in YR, no idea weather or not it will work the same in TS.
also, adding new MCVs has something we like to call the "Short game Explosion" because the BaseUnit= list does 3 functions, 1 to make the MCV be considered a structure in short game, another is to give you the MCVs according to the owner tags so GDI would get an MCV with Owner=GDI and nod would get 1 with Owner=Nod, the other is to make it zoom to your MCV when you press H, just like it would zoom to your construction yard.
the structure in short game part doesn't work. and since you only have 1 MCV, i assume adding another won't work.
does TS even have a shortgame mode? i can't remember. _________________ QUICK_EDIT
Well I tried it (ONLY VERY BRIEFLY) and it didn't work unfortunately, nothing naval (side) was bothered with.Also, if you do the method correct, you have no NCO or greyed out cameo's. _________________ QUICK_EDIT
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