View Full Version : Infantry squads
Chrispy
04-11-2007, 10:14 PM
Heys guys, I'm new to this area, as most of you will know.
I've taken some interest in becoming a modder in Generals, and the first step I've taken is that when for example, you train a Ranger, you're actually training about 15.
So when you train a regular Ranger at the Barracks, 15 will come out, but I don't want these to be ''all one'' (like the Angry Mob).
Here's the entry for the Ranger:
; ***DESIGN parameters ***
DisplayName = OBJECT:Ranger Squad
Side = America
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY RangerAdvancedCombatRifle
End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY RangerAdvancedCombatRifle
Weapon = SECONDARY RangerFlashBangGrenadeWeapon
AutoChooseSources = PRIMARY FROM_SCRIPT FROM_AI
AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI
End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 100
ShroudClearingRange = 400
Prerequisites
Object = AmericaBarracks
End
BuildCost = 225
BuildTime = 5.0 ;in seconds
ExperienceValue = 20 20 40 60 ;Experience point value at each level
ExperienceRequired = 0 40 60 120 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = AmericaInfantryRangerCommandSet
; *** AUDIO Parameters ***
VoiceSelect = RangerVoiceSelect
VoiceMove = RangerVoiceMove
VoiceGuard = RangerVoiceMove
VoiceAttack = RangerVoiceAttack
SoundDie = RangerVoiceDie
VoiceFear = RangerVoiceFear
; surrender is cut. sorry. (srj)
; VoiceSurrender = RangerVoiceSurrender
VoiceTaskComplete = RangerVoiceCaptureComplete
UnitSpecificSounds
VoiceEnter = RangerVoiceMove
VoiceEnterHostile = RangerVoiceMove
VoiceGarrison = RangerVoiceGarrison
VoiceCreate = RangerVoiceCreate
VoiceSubdue = RangerVoiceSubdue
VoiceClearBuilding = RangerVoiceClearBuilding
VoiceGetHealed = RangerVoiceMove
VoicePrimaryWeaponMode = RangerVoiceModeGun
VoiceSecondaryWeaponMode = RangerVoiceModeFlashBang
End
UnitSpecificFX
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
CombatDropKillFX = FX_RangerCombatDropKill
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY CAN_RAPPEL SCORE
Behavior = CommandButtonHuntUpdate ModuleTag_02
End
Body = ActiveBody ModuleTag_03
MaxHealth = 180.0
InitialHealth = 180.0
End
Behavior = ExperienceScalarUpgrade ModuleTag_04
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
End
Behavior = AutoFindHealingUpdate ModuleTag_05 ; This update will have the unit go to a healing station if injured. jba
ScanRate = 1000 ; once a second.
ScanRange = 300 ;
NeverHeal = 0.85 ; don't heal if we are > 85% healthy.
AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
End
Behavior = AIUpdateInterface ModuleTag_06
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL BasicHumanLocomotor
Behavior = PhysicsBehavior ModuleTag_07
Mass = 5.0
End
Behavior = ProductionUpdate ModuleTag_08
; nothing
End
Behavior = CommandButtonHuntUpdate ModuleTag_09 ; allows use of command button hunt script with this unit.
End
Behavior = WeaponSetUpgrade ModuleTag_10
TriggeredBy = Upgrade_AmericaRangerFlashBangGrenade
End
SpawnNumber = 10
End
The bold part is the one I did. Will it work this way? Thanks.
Chris :)
randomperson
04-12-2007, 01:37 AM
take a bake up of your files and try it, if it then doesn't work come back here
Rollerghost
04-12-2007, 02:23 PM
I won't work that way. If you take a look at the china redguard (They come in pairs), you will see that the number is actually in the code of the barracks, not the unit.
The china barracks has this:
Behavior = ProductionUpdate ModuleTag_10
QuantityModifier = ChinaInfantryRedguard 2
End
This is what you need to modify a bit and put into the code for the american barracks.
Chrispy
04-12-2007, 03:26 PM
; *** ENGINEERING Parameters ***
RadarPriority = STRUCTURE
KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE HEAL_PAD SCORE CAPTURABLE FS_FACTORY AUTO_RALLYPOINT AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY
Body = StructureBody ModuleTag_05
MaxHealth = 1000.0
InitialHealth = 1000.0
End
Behavior = HealContain ModuleTag_06
ContainMax = 10 ;way bigger than the # of objects we can have
TimeForFullHeal = 2000 ;(in milliseconds)
AllowInsideKindOf = INFANTRY
AllowAlliesInside = Yes
AllowNeutralInside = No
AllowEnemiesInside = No
End
Behavior = DestroyDie ModuleTag_07
;nothing
End
Behavior = CreateObjectDie ModuleTag_08
CreationList = OCL_LargeStructureDebris
End
Behavior = CreateObjectDie ModuleTag_09
CreationList = OCL_AmericanRangerDebris05
ExemptStatus = UNDER_CONSTRUCTION
End
Behavior = FXListDie ModuleTag_10
DeathFX = FX_StructureMediumDeath
End
Behavior = ProductionUpdate ModuleTag_11
QuantityModifier = AmericaInfantryRanger 15
; nothing
End
Behavior = DefaultProductionExitUpdate ModuleTag_12
UnitCreatePoint = X: 0.0 Y: 0.0 Z:0.0
NaturalRallyPoint = X: 55.0 Y: 0.0 Z:0.0
End
Behavior = BaseRegenerateUpdate ModuleTag_13
;No data
End
Behavior = FlammableUpdate ModuleTag_15
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 5 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Behavior = TransitionDamageFX ModuleTag_16
;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
DamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
;---------------------------------------------------------------------------------------
ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
End
Geometry = BOX
GeometryMajorRadius = 55.0
GeometryMinorRadius = 45.0
GeometryHeight = 20.0
GeometryIsSmall = No
FactoryExitWidth = 25 ; How much space to leave for units exiting.
Shadow = SHADOW_VOLUME
BuildCompletion = PLACED_BY_PLAYER
End
However, I'm not sure with Behavior = ProductionUpdate ModuleTag_11; anyone knows what this means?
Chris
Rollerghost
04-12-2007, 04:12 PM
ModuleTag can be anything you want as long as the number is not used. I use my own style, not using numbers at all, just descriptive names.
Test what you did in the game, and tell us how it worked out.
Chrispy
04-13-2007, 12:35 AM
Well, I know where to get a .big file creator, but how do I pack my file in?
The filenames are UnitFaction.ini and BuildingFaction.ini. The Building .ini file is of course, to get multiple units to be trained at once, and the Unit .ini is to give the Ranger a different name (Ranger Squad).
Do I put this in a folder then pack it into a .big?
I read on CNCFiles (C&C Filefront) I have to put them in an empty folder you make called Data, etc.
Any help?
Thanks.
Chris :)
Rollerghost
04-13-2007, 10:50 AM
The files shall be in a folder called object. Usually the game will be installed in C:\Program Files\EA Games\Command & Conquer Generals
The files you have created need to be in the following folder:
C:\Program Files\EA Games\Command & Conquer Generals\Data\INI\Object
You may need to create the INI and Object folder.
This is if you are modding Generals and not Zero Hour. If it is for Zero Hour the folder is named Command & Conquer Generals Zero Hour.
It is also possible to include the files in a BIG-file, but this way works fine. Just remember to delete the files if you want to play without the mod.
Chrispy
04-13-2007, 03:31 PM
Okay, my Generals directory is C:\Games\Generals.
In my Data folder, there's no INI folder. All that's in the .big for the game.
So just to sum it all up, I make a folder called Data, and in that folder, I make a folder called INI, and in that folder I make a folder called Object, and then, I stick my two .ini files in, and pack it into a .big?
Thanks for all your help mate. :color2:
Chris :)
Rollerghost
04-14-2007, 01:21 AM
No need to pack them into a BIG. It works just as fine with the files there as they are.
Just to make sure, your two files should be in this folder:
C:\Games\Generals\Data\INI\Object
I write this because in your last post you mentioned making a data-folder. You already have that one.
Chrispy
04-14-2007, 06:04 PM
I'll try and see what I can do later on today. But one thing though. In my Generals folder, in the Data folder, here are the folders in there:
Cursors
English X
Scripts
EINI
Movies
Waterplane
I'm not sure about English X lol. Although I did make EINI (it's just a folder where I extracted the game's .ini files).
So I'll make a folder called INI, then make a folder called Object, and then put my files in? And it'll work? What if it doesn't?
I'm real busy so later on today I'll try and see if it works.
Thanks.
Chris :)
Rollerghost
04-14-2007, 06:18 PM
If it does not work, tell us what went wrong, and we'll take it from there.
Chrispy
04-14-2007, 08:31 PM
Damnit!
Got a ''Technical Error'' thing when I started up Generals. I guess we'll have to resort to Plan B: pack it into a .big.
Chris
Rollerghost
04-15-2007, 03:08 AM
What does the crash log say? The file is called ReleaseCrashInfo and is in the Command And Conquer Generals Data folder under My Documents.
Chrispy
04-15-2007, 09:49 PM
Mine doesn't have a crash log TBH. Damnit.
All I want is this to be packed into a .big and off we go... lol.
Chris :)
Rollerghost
04-16-2007, 03:23 AM
FinalBIG is the tool to use, but I guess you already have that one since you have extracted INI files from the game.
Chrispy
04-16-2007, 08:23 PM
I think the reason why no log showed up was because I didn't click ''OK'' when I saw the message. I just terminated the application (Generals), as it was faster.
I used ''BigXTractor'' to extract the .ini files from the .big BTW.
Later on today I'll get the program you mentioned and do what I have to do.
Chris :)
Chrispy
04-20-2007, 03:13 PM
I should've done this four days ago but I tried today and it didn't work... :cry:
DAMN!
Maybe you want to reanalyze what I changed?
Chris
Rollerghost
04-20-2007, 05:35 PM
I am going away for the weekend tomorrow, but I will take a look at your code, and try it in my own game as soon as I return. That will be tuesday morning my time (GMT +1)
Me Myself & Pi
04-21-2007, 11:04 PM
After reading through these past posts, I disited to make my own INI file for make ranger squads to see if I could get it working. I was succesful! Here's the INI file, put it in the folder "Data\INI\Object" in your game directory. If you don't have these folders anymore, recreate them. That should do it. I hope this mod INI file is for generals (not zero hour) Let me know if you want it for zero hour. It's made for generals (not zero hour) Remember to extract the INI file out of the zip folder. Scroll down to the GLA barracks, then move up allittle. This is what your looking for:
;------------------------------------------------------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------------------------------------------------------
Behavior = ProductionUpdate ModuleTag_10
QuantityModifier = AmericaInfantryRanger 4
End
;------------------------------------------------------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------------------------------------------------------
Those dashes are to help you find it better. You should scroll down to the 3rd forth of the file to find it better.
Chrispy
04-23-2007, 03:31 AM
I'll be sure to test this out tomorrow!
Thanks bro. :color1:
Chris :)
Chrispy
04-27-2007, 02:30 AM
Damn! Didn't work...
I think I gotta do what you did in the thing you attached. You seemed to put in something kinda different.
If that doesn't work, it's probably because my Generals is effed...
Chris
Rollerghost
04-27-2007, 03:19 AM
Strange, I tested this and it worked just as it was supposed to. I just took the file posted by Me Myself, put it in the folder "Data\INI\Object" and out popped 4 rangers.
Me Myself & Pi
04-27-2007, 08:17 AM
If you think the game has a problem, then I'd reccamend a full reistallation. After unistalling the game go & delete the game directory, (that'll delete any files left over from the unistallment.) Now reinstall it. But first let me know if you've tried openning the game without this INI file. ;)
Chrispy
04-27-2007, 05:21 PM
I don't have the Generals disc TBH, and the one I got was just a transfer off someone else's HDD... :scared:
I'll pack into a .big Me Myself's .ini, and see if that works.
*Edit:
Me Myself, that .ini you attached, the infantry squads entry is in the SupplyDrop entry. Why is that? :O
BTW, I put my .ini into a .big, nothing worked... and your .ini into a .big, and nothing worked. So now I'm gonna put the infantry squads entry in the AmericaBarracks entry and see if that works...
Nope, that didn't work either!
Chris
Me Myself & Pi
04-27-2007, 06:14 PM
What does TBH & HDD stand for?
If you don't have the game disc, then how can you even get of the game?
Something must be very screwy on your computer if you found the squad part of my INI file to be under the drop zone.
Chrispy
04-27-2007, 11:39 PM
WTF the infantry squads entry you did is in USA Barracks, not ParaDrop. My bad.
Well, it worked for you and not for me... That sucks. Do you think you can try my .ini out and see if it works? If it does, I'll release this .ini into the community officially.
Okay, attached is my .ini file I did. I could've just used your .ini file for my mod, but I wanted to see if I could do this without using someone's .ini lol. I also forgot to put the ''End'' at the bottom of the QuantityModifiier for the Ranger but nothing worked still.
By the way, BTW is by the way, and HDD, is Hard Drive.
I don't like saying this but, my Generals is one of those haxxed versions unfortunately.
Chris
Me Myself & Pi
04-28-2007, 10:53 AM
Well that's probably problem, you having a "haxxed" version (not sure what that means.) I reccamend you go & bye your own game. (It's alligal to copy a game from someone elses computer [copy right infringement]) Now unistall your "haxxed" game (delete the game directory too) & reinstall your ligal game. Get back to us if you have any problem after that.
Chrispy
04-28-2007, 06:00 PM
Well it was from my brother, not me (the game).
I feel a bit uncomfortable asking this, but, is it still possible for you to test that .ini I attached and see if it works all good?
Thanks.
Chris :)
Rollerghost
04-28-2007, 07:14 PM
The file works fine. 15 rangers runs out of the barracks.
Chrispy
04-28-2007, 11:47 PM
Thanks Rollerghost.
Does it work for GLA and China as well?
And regarding my copy of Generals, don't blame me if I have a screwed up copy. Seriously. This message is to anyone that wants to blame me for having a screwed up copy.
Rollerghost and Me Myself, I will credit you both in the credits. I owe you. :)
Chris :)
Rollerghost
04-29-2007, 03:38 AM
It works for China, but not the GLA. I believed it to be because you have two module tags with the same number, but I tried to change that and it still didn't work. The code looks fine otherwise, I just can't figure out why GLA barracks refuse to spawn more than one rebel.
Me Myself & Pi
04-29-2007, 10:45 AM
The reason why GLA doesn't work is because the module tag right above is the same as the module tag for the spawning of the infantry. That message clears out module tag 10. So nothing will happen for the module tag the multiple infantry spawns that's also in module tag 10. Just delete it, it looks like this:
Behavior = ProductionUpdate ModuleTag_10
; nothing
End
After I deleted these lines of text, then it worked fine.
Would you like us to try getting the infantry to come out 1 at a time? I did some expirementing with it, but I got the infantry coming out in the same place the red gaurd come out of their barrack. (USA infantry spawn in the middle of the barrack & GLA spawn in the middle top of the the barrack.) But I couldn't get farther then that before the game started crashing. If you want me to continue this, then I'll try again from the start.
Chrispy
04-29-2007, 02:05 PM
When I get home from school I'll check out that GLA Barracks error and see what I can do.
As for you Me Myself, having infantry come out one at a time? Well, if you want really. But having them come out all at once seems alright. :color1:
Chris :)
Me Myself & Pi
04-29-2007, 03:04 PM
Let me know when you get just the squads working on your computer. Then I'll do it.
Chrispy
04-29-2007, 11:02 PM
Okay, I fixed the problem. See the attached FactionBuilding.ini. ;)
Chris :)
Chrispy
05-01-2007, 01:49 PM
Okay, I've lowered the Red Guard QuantityModifier to 8, and not 15, because if it were 15, then they would be simply elite... lol.
I may want to beef up the cost a bit (just to make it a bit more better in terms of realism), but that means I'll have to edit FactionUnit.ini (I know how to edit the costs and all, but I kinda want the mod to be a small 1mb though).
Well, it's only one extra megabyte really. And also, I'm going to change the text for the infantry, so rather than ''Red Guard'', it'll be ''Red Guard Platoon'', etc.
Chris :)
Me Myself & Pi
05-01-2007, 08:04 PM
To moddify the cost for the red gaurd, open up the INI file called "FactionUnit" Serch "ChinaInfantryRedGaurd" by pressing "ctrl+F" The cost should be in there.
Chrispy
05-19-2007, 04:42 PM
Damnit, brother uninstalled Generals.
Last thing, anyone remember the actual cost for the Red Guard? Thanks.
Chris :)
Me Myself & Pi
05-19-2007, 05:00 PM
BuildCost = 300
BuildTime = 10.0
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.