logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,677
Total Threads: 8,795
Posts: 95,825

Administrators:
DeeZire, Redemption

There are currently 31 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 04-04-2003, 09:20 AM   #1 (permalink)
qis
Member
 
Join Date: Mar 2003
Location: The Netherlands
Posts: 38
Default Copy a unit from UnitFaction to map.ini

How do I copy something from UnitFaction.ini to a map.ini?
(I know CTRL+C, CTRL+V, but the problem is that makes the game crash while loading the map)

The part I want to copy is a copy of the Humvee. I changed some minor values and want to be able to create both units; the normal Humvee and mine.

My current map.ini (not working) is attached, please have a look and tell me what/how to correct

Thanks in advance
Mzzl, Chris
qis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-04-2003, 03:32 PM   #2 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 1,031
Send a message via ICQ to Phoib Send a message via MSN to Phoib
Default



You can't put a whole new unit in a map.ini and expect it to work!

Here's a pretty big example of what you can do with map.ini's, from my modmap:

Code:
;----------------------------------
;---------Deactivate China---------
;----------------------------------

Object ChinaCommandCenter

 AddModule
  Behavior = LifetimeUpdate ModuleTag_Override01
    MinLifetime = 1000   ; min lifetime in msec
    MaxLifetime = 1000   ; max lifetime in msec
  End 
 End

End

;-------------------
;---No superwebs----
;-------------------

Object GLAScudStorm	
 Buildable = No
End

Object AmericaParticleCannonUplink
 Buildable = No
End

;------------------------------------------
;--------------Altered Images--------------
;-(Don't put in big cause of out of Sync!)-
;------------------------------------------

Object AmericaJetAurora	;F-15E Strike Eagle

  ReplaceModule ModuleTag_01	
    Draw = W3DModelDraw ModuleTag_01_Override	
        DefaultConditionState
        Model            = F15E
        HideSubObject    = BURNERFX01 BURNERFX02
        WeaponLaunchBone = PRIMARY WEAPONA01
      End	


      ConditionState        = JETEXHAUST	
        ParticleSysBone     = WINGTIP01 JetContrail
        ParticleSysBone     = WINGTIP02 JetContrail
      End	

      ConditionState        = JETEXHAUST JETAFTERBURNER
        ParticleSysBone     = WINGTIP01 JetContrail
        ParticleSysBone     = WINGTIP02 JetContrail      
        ShowSubObject       = BURNERFX01 BURNERFX02
        ParticleSysBone     = ENGINE01 JetLenzflare
        ParticleSysBone     = ENGINE02 JetLenzflare
      End

      OkToChangeModelColor = Yes
    End	
  End	

;  WeaponSet
;    Conditions = None 
;    Weapon = PRIMARY AuroraBombWeapon
;    SpecialObject = LaserBeam
;    SpecialObjectAttachToBone = Muzzle01
;  End


;  AddModule
;    Behavior           = SpecialAbility ModuleTag_Override01
;      SpecialPowerTemplate = SpecialAbilityMissileDefenderLaserGuidedMissiles
;      UpdateModuleStartsAttack = Yes
;    End
;  End
;  
;  AddModule
;    Behavior = SpecialAbilityUpdate ModuleTag_Override02
;      SpecialPowerTemplate = SpecialAbilityMissileDefenderLaserGuidedMissiles
;      StartAbilityRange = 500.0       
;      AbilityAbortRange = 800.0 ;If the target moves outside this range, abort.
;      PreparationTime = 1000
;      PersistentPrepTime = 500
;      SpecialObject = LaserBeam
;      SpecialObjectAttachToBone = WEAPONA01
;    End
;  End
End	

Object AmericaVehicleComanche				;TEMPTEMPTEMP!!! CHANGE TO A AUTHENTIC MODEL!!!

  ReplaceModule ModuleTag_01	
    Draw = W3DModelDraw ModuleTag_01_Override	
      DefaultConditionState
        Model                           = AVComanche
        HideSubObject                   = MissileUpgrade
        Animation                       = AVComanche.AVComanche
        AnimationMode                   = LOOP
        WeaponMuzzleFlash               = PRIMARY TurretFX
        WeaponFireFXBone                = PRIMARY Muzzle
        WeaponFireFXBone                = SECONDARY Muzzle
        WeaponLaunchBone                = SECONDARY Muzzle
      End

      ConditionState = WEAPONSET_PLAYER_UPGRADE
        ShowSubObject                   = MissileUpgrade
        Animation                       = AVComanche.AVComanche
        AnimationMode                   = LOOP
        WeaponFireFXBone                = TERTIARY WeaponB
        WeaponLaunchBone  	      = TERTIARY WeaponB
      End

      OkToChangeModelColor = Yes
    End	
  End	
End	

Object GLATankScorpion
  ReplaceModule ModuleTag_01	
;    Draw = W3DTankTruckDraw ModuleTag_01_Override	
    Draw = W3DTankDraw ModuleTag_01_Override
      OkToChangeModelColor = Yes
      ProjectileBoneFeedbackEnabledSlots = SECONDARY ; WeaponLaunchBone will be shown/hidden, not just used for firing offset
      DefaultConditionState
        Model = bmp3
        Turret = Turret01
        ; note, order-dependent: we must hide/show Missile AFTER we hide/show MissileRack!
        HideSubObject = MissleRack01 Missile ; MissileRack misspelled in the Art
        WeaponFireFXBone = PRIMARY Muzzle
        WeaponRecoilBone = PRIMARY Barrel
        WeaponMuzzleFlash = PRIMARY MuzzleFX
        WeaponLaunchBone = PRIMARY Muzzle
      End
      TrackMarks              = EXTnkTrack.tga
    End	
  End	
End	

Object GLAVehicleQuadCannon
  ReplaceModule ModuleTag_01	
    Draw = W3DTankTruckDraw ModuleTag_01_Override	
      DefaultConditionState
        Model = zsu
        Turret = TURRET
        TurretPitch = TURRETEL
        WeaponFireFXBone  = PRIMARY   BARREL
        WeaponMuzzleFlash = PRIMARY   MUZZLEFX01
        WeaponRecoilBone  = PRIMARY   BARREL
        WeaponFireFXBone  = SECONDARY BARREL
        WeaponMuzzleFlash = SECONDARY MUZZLEFX01
        WeaponRecoilBone  = SECONDARY BARREL
        ShowSubObject = TURRET
        HideSubObject = TURRETUP01 TURRETUP02 BarrelFX01 BarrelFX02 BarrelFX03 BarrelFX04
      End
      OkToChangeModelColor = Yes
      TrackMarks              = EXTnkTrack.tga
    End	
  End	
End	

Object GLATankMarauder
  ReplaceModule ModuleTag_01	
    Draw = W3DTankDraw ModuleTag_01_Override
      OkToChangeModelColor = Yes
      DefaultConditionState
        Model               = NVBtMstr
        Turret              = Turret01
        WeaponFireFXBone    = PRIMARY Muzzle
        WeaponRecoilBone    = PRIMARY Barrel
        WeaponMuzzleFlash   = PRIMARY MuzzleFX
        WeaponLaunchBone    = PRIMARY Muzzle
      End
      ConditionState = REALLYDAMAGED
        Model               = NVBtMstr_D
        Turret              = Turret01
        WeaponFireFXBone    = PRIMARY Muzzle
        WeaponRecoilBone    = PRIMARY Barrel
        WeaponMuzzleFlash   = PRIMARY MuzzleFX
        WeaponLaunchBone    = PRIMARY Muzzle
      End
      ConditionState = RUBBLE
        Model               = NVBtMstr_D
        Turret              = Turret01
      End
      TrackMarks              = EXTnkTrack.tga
    End
  End
End


Object AmericaJetCargoPlane

  ReplaceModule ModuleTag_01	
    Draw = W3DModelDraw ModuleTag_01_Override	
      DefaultConditionState
        Model = AVChinook
        Animation = AVChinook.AVChinook
        AnimationMode = LOOP
      End

      ConditionState = REALLYDAMAGED
        Model = AVChinook_d
        Animation = AVChinook_d.AVChinook_d
        AnimationMode = LOOP
      End
 
      ConditionState = RUBBLE
        Model = AVChinook_d
        Animation = AVChinook_d.AVChinook_d
        AnimationMode = LOOP
      End

      ConditionState = RUBBLE SPECIAL_DAMAGED
        Model = AVChinook_d
        HideSubObject = Props01
        HideSubObject = Props02
      End

      OkToChangeModelColor = Yes
    End
  End	

  SoundAmbient    = ChinookAmbientLoop
End	

Object AmericaJetB52
  ReplaceModule ModuleTag_01	
    Draw = W3DModelDraw ModuleTag_01_Override	
      DefaultConditionState
        Model           = AVCargoPln
        Animation       = AVCargoPln.AVCargoPln
        AnimationMode   = LOOP
        ParticleSysBone = Propeller01 JetBlackTrailThin
        ParticleSysBone = Propeller02 JetBlackTrailThin
        ParticleSysBone = Propeller03 JetBlackTrailThin
        ParticleSysBone = Propeller04 JetBlackTrailThin
        ParticleSysBone = WingTip01 JetContrailThin
        ParticleSysBone = WingTip02 JetContrailThin
      End

      ConditionState = DAMAGED
        Model           = AVCargoPln_D
        Animation       = AVCargoPln_D.AVCargoPln_D
        AnimationMode   = MANUAL
        Flags           = START_FRAME_FIRST
        ParticleSysBone = Smoke01 JetFireLarge
        ParticleSysBone = Smoke02 JetFireLarge
        ParticleSysBone = Propeller03 JetBlackTrailThin
        ParticleSysBone = Propeller04 JetBlackTrailThin
        ParticleSysBone = Smoke01 JetSmokeLarge
        ParticleSysBone = Smoke02 JetSmokeLarge
      End

      ConditionState = REALLYDAMAGED
        Model           = AVCargoPln_D
        Animation       = AVCargoPln_D.AVCargoPln_D
        AnimationMode   = MANUAL
        Flags           = START_FRAME_FIRST
        ParticleSysBone = Smoke01 JetFireLarge
        ParticleSysBone = Smoke02 JetFireLarge
        ParticleSysBone = Smoke03 JetFireLarge
        ParticleSysBone = Smoke05 JetFireLarge
        ParticleSysBone = Propeller03 JetBlackTrailThin
        ParticleSysBone = Propeller04 JetBlackTrailThin
        ParticleSysBone = Smoke01 JetSmokeLarge
        ParticleSysBone = Smoke02 JetSmokeLarge
        ParticleSysBone = Smoke03 JetSmokeLarge
        ParticleSysBone = Smoke05 JetSmokeLarge
      End

      ConditionState = RUBBLE
        Model           = AVCargoPln_D1
        Animation       = AVCargoPln_D.AVCargoPln_D
        AnimationMode   = MANUAL
        Flags           = START_FRAME_FIRST
        ParticleSysBone = Smoke01 JetFireLarge
        ParticleSysBone = Smoke06 JetFireLarge
        ParticleSysBone = Smoke03 JetFireLarge
        ParticleSysBone = Smoke05 JetFireLarge
        ParticleSysBone = Smoke01 JetSmokeLarge
        ParticleSysBone = Smoke06 JetSmokeLarge
        ParticleSysBone = Smoke03 JetSmokeLarge
        ParticleSysBone = Smoke05 JetSmokeLarge
      End
    
      OkToChangeModelColor = Yes
    End
  End

  SoundAmbient = C130AmbientLoop
End

;------------------------------------------
;-----------------ParaDrops----------------
;------------------------------------------

ObjectCreationList SUPERWEAPON_Paradrop1
  DeliverPayload
    Transport = AmericaJetCargoPlane
    StartAtPreferredHeight = Yes
    StartAtMaxSpeed = Yes
    MaxAttempts = 4
    DropOffset = X:0 Y:0 Z:-10
    DropDelay = 150         ; time in between each item dropped (if more than one)
    ParachuteDirectly = Yes ; will tell all contained parachutes to go ahead and bunch
    ;PutInContainer = AmericaParachute
    Payload = AmericaInfantryRanger 5
    DeliveryDistance = 200  ;when outbound vehicle must be this close to target to continue delivery
    PreOpenDistance = 10 ;When inbound, vehicle can be this much farther than DeliveryDistance to begin delivery 
    DiveStartDistance               = 500
    DiveEndDistance                 = 200
    DeliveryDecalRadius = 50
    DeliveryDecal
      Texture           = SCCParadrop_USA
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 500
      Color             = R:227 G:229 B:22 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
    ;RequiresLivePlayer = Yes ; I want to require a live player, but I'll settle for dropping neutral rangers instead
  End
End

; -----------------------------------------------------------------------------
; -----------------------------------------------------------------------------
ObjectCreationList SUPERWEAPON_Paradrop2
  DeliverPayload
    Transport = AmericaJetCargoPlane
    StartAtPreferredHeight = Yes
    StartAtMaxSpeed = Yes
    MaxAttempts = 4
    DropOffset = X:0 Y:0 Z:-10
    DropDelay = 80        ; time in between each item dropped (if more than one)
    ;ParachuteDirectly = Yes ; will tell all contained parachutes to go ahead and bunch
    ;PutInContainer = AmericaParachute
    Payload = AmericaInfantryRanger 10
    DeliveryDistance = 200  ;when outbound vehicle must be this close to target to continue delivery
    PreOpenDistance = 100 ;When inbound, vehicle can be this much farther than DeliveryDistance to begin delivery 
    DiveStartDistance               = 500
    DiveEndDistance                 = 200
    DeliveryDecalRadius = 50
    DeliveryDecal
      Texture           = SCCParadrop_USA
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 500
      Color             = R:227 G:229 B:22 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
    ;RequiresLivePlayer = Yes ; I want to require a live player, but I'll settle for dropping neutral rangers instead
  End
End

; -----------------------------------------------------------------------------
; -----------------------------------------------------------------------------
ObjectCreationList SUPERWEAPON_Paradrop3
  DeliverPayload
    Transport = AmericaJetCargoPlane
    StartAtPreferredHeight = Yes
    StartAtMaxSpeed = Yes
    MaxAttempts = 4
    DropOffset = X:0 Y:0 Z:-10
    DropDelay = 80        ; time in between each item dropped (if more than one)
    ;ParachuteDirectly = Yes ; will tell all contained parachutes to go ahead and bunch
    ;PutInContainer = AmericaParachute
    Payload = AmericaInfantryRanger 10
    DeliveryDistance = 200  ;when outbound vehicle must be this close to target to continue delivery
    PreOpenDistance = 100 ;When inbound, vehicle can be this much farther than DeliveryDistance to begin delivery 
    DiveStartDistance               = 500
    DiveEndDistance                 = 200
    DeliveryDecalRadius = 50
    DeliveryDecal
      Texture           = SCCParadrop_USA
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 500
      Color             = R:227 G:229 B:22 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
    ;RequiresLivePlayer = Yes ; I want to require a live player, but I'll settle for dropping neutral rangers instead
  End
  DeliverPayload
    Transport = AmericaJetCargoPlane
    StartAtPreferredHeight = Yes
    StartAtMaxSpeed = No
    MaxAttempts = 4
    DropOffset = X:0 Y:0 Z:-10
    DropDelay = 80        ; time in between each item dropped (if more than one)
    ;ParachuteDirectly = Yes ; will tell all contained parachutes to go ahead and bunch
    ;PutInContainer = AmericaParachute
    Payload = AmericaInfantryRanger 10
    DeliveryDistance = 200  ;when outbound vehicle must be this close to target to continue delivery
    PreOpenDistance = 100 ;When inbound, vehicle can be this much farther than DeliveryDistance to begin delivery 
    DiveStartDistance               = 500
    DiveEndDistance                 = 200
    DeliveryDecalRadius = 50
    DeliveryDecal
      Texture           = SCCParadrop_USA
      Style             = SHADOW_ALPHA_DECAL
      OpacityMin        = 25%
      OpacityMax        = 50%
      OpacityThrobTime  = 500
      Color             = R:227 G:229 B:22 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
    ;RequiresLivePlayer = Yes ; I want to require a live player, but I'll settle for dropping neutral rangers instead
  End
End
I will add coments later (Opensource ), but check this entry and figure out how to do it, if you look close, you'll see how
Phoib is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-04-2003, 04:30 PM   #3 (permalink)
qis
Member
 
Join Date: Mar 2003
Location: The Netherlands
Posts: 38
Default

Maybe you can be more specific. I've been trying lots of stuff but I just can't get it to work in map.ini
I've looked at the stuff you wrote but it's different from what I want, I don't have to use DrawModels...

All I want is to have another option in the USA WarFactory to create a Humvee with 5 MissleDefenders in it. This is done in factionunit by changing this:

Code:
  Behavior = TransportContain  ModuleTag_05
    PassengersAllowedToFire = Yes
    Slots             = 5
    DamagePercentToUnits = 10% ;10%
    AllowInsideKindOf  = INFANTRY
    ExitDelay = 250
    NumberOfExitPaths = 3 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
    GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
  End
to this:
Code:
  Behavior = TransportContain  ModuleTag_05
    PassengersAllowedToFire = Yes
    Slots             = 5
    InitialPayload = AmericaInfantryMissileDefender 5
    DamagePercentToUnits = 10% ;10%
    AllowInsideKindOf  = INFANTRY
    ExitDelay = 250
    NumberOfExitPaths = 3 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
    GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
  End
How can I do this in map.ini? Can I add a unit with map.ini (wich is needed if I want to ADD another option so I still can create a normal Humvee)

Mzzl, Chris
qis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-05-2003, 09:24 AM   #4 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 1,031
Send a message via ICQ to Phoib Send a message via MSN to Phoib
Default

AFAIK, you can't add a new unit to map.ini, only change it.

You can change other commands, such as CommandSet.ini, but it's very limited. My map.ini is the most edited as I have seen so far, far heavier then the Generals' map.ini's (Which are very scarce, to say the least...)

Try this:
(NOTE: DOUBLECHECK THE NAMES AND SPELLING, AS I AM HOME ATM AND MY GENERALS DISC IS AT MY GF'S PLACE!!!)
Code:
AmericaVehicleHumvee

  ReplaceModule ModuleTag_05            
    Behavior = TransportContain  ModuleTag_05_Override    
      PassengersAllowedToFire = Yes 
      Slots             = 5 
      InitialPayload = AmericaInfantryMissileDefender 5 
      DamagePercentToUnits = 10%  
      AllowInsideKindOf  = INFANTRY 
      ExitDelay = 250 
      NumberOfExitPaths = 3 
      GoAggressiveOnExit = Yes 
    End
  End
End
This will replace the regular Humvee's Payload with 5 Missile Defenders. If you want the regular Humvee also, you can always enable the Cine Humvee to be buildable
Phoib is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-05-2003, 09:32 AM   #5 (permalink)
qis
Member
 
Join Date: Mar 2003
Location: The Netherlands
Posts: 38
Default

Thanks I''ll give it a try
qis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-05-2003, 09:45 AM   #6 (permalink)
qis
Member
 
Join Date: Mar 2003
Location: The Netherlands
Posts: 38
Default

No luck though...

I tried it like you wrote with just
AmericaVehicleHumvee

And with
Object AmericaVehicleHumvee

But In both cases I get an error.
The first one gives me this error:
Reason Uncaught Exception in GameEngine::update

The second one gives me and error according to that line:
Reason Error parsing INI file 'fullpath\map.ini' (Line: 'Object AmericaVehicleHumvee ')

Mzzl, Chris
qis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-05-2003, 10:34 AM   #7 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 1,031
Send a message via ICQ to Phoib Send a message via MSN to Phoib
Default

Strange, thought it was a missing End statement (always the case with Update error, so I learned trough trial and error :| )

Code:
Object AmericaVehicleHumvee ;1s

  ReplaceModule ModuleTag_05   ;2s         
    Behavior = TransportContain ModuleTag_05_Override    ;3s
      PassengersAllowedToFire = Yes  
      Slots             = 5 
      InitialPayload = AmericaInfantryMissileDefender 5 
      DamagePercentToUnits = 10%  
      AllowInsideKindOf  = INFANTRY 
      ExitDelay = 250 
      NumberOfExitPaths = 3 
      GoAggressiveOnExit = Yes 
    End ;3e
  End ;2e
End ;1e
Check the rest of the file for missing or extra End statements?
Phoib is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-05-2003, 10:55 AM   #8 (permalink)
qis
Member
 
Join Date: Mar 2003
Location: The Netherlands
Posts: 38
Default

At last, it's working!
Thank you so much

I think I missed Module in ReplaceModule ModuleTag_05, but it's working now

Thanks again

Mzzl, Chris
qis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I get a copy of RenX? schtoogie Generals & Zero Hour Editing 3 12-24-2004 06:17 PM
How do you copy a voxel section? needleman Red Alert 2 & Yuri's Revenge Editing 4 01-26-2004 08:07 AM
About copy and pasting buildings... MMBass89 Red Alert 2 & Yuri's Revenge Editing 3 01-05-2003 04:06 PM


All times are GMT -4. The time now is 03:11 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.