Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Hey I would like to know how to create a command button for a war factory that accesses more buildable units that don't have room to fit in it. I'm looking for something like an arrow button that when you click on it in a War Factory, It brings up more buildable units. Any ideas?
Sponsor
CommieDog
12 years ago
Is this for Generals or Zero Hour?
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
It's for Zero Hour and its for a mod that I have called Remix Escalation.
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Well I figured out how to put an arrow button in Lazar Generals War Factory, but I cannot click on it to bring up the "additional commands" because it says conflicting upgrade cannot be purchased. On some of the Cyber Generals building they have that arrow button and you can click on it to access "additional commands" for the buildings and also there is another button that says back on it to go back to the main Commands for Cyber Generals War Factory for example. I don't know what I am not dong correctly. I have been experiencing with the CommandSet.ini folder for this. Here is the CommandSet.ini folder so you can see how it works for Cyber General:



CommandSet Cybr_AmericaWarFactoryCommandSet_Micro
1 = Cybr_Command_ConstructAmericaTankCrusader
3 = Cybr_Command_ConstructAmericaVehicleDroneCarrierLight
5 = Cybr_Command_ConstructAmericaVehicleAvenger
7 = Cybr_Command_ConstructAmericaVehicleDroneCarrier
2 = Cybr_Command_ConstructAmericaMechSpider_Micro
4 = Cybr_Command_ConstructAmericaMechSpiderAA_Micro
6 = Cybr_Command_ConstructAmericaVehicleClusterTomahawkTank
8 = Cybr_Command_ConstructAmericaVehicleBigTom

11 = Command_UpgradeAmericaTOWMissile
13 = Command_SetRallyPoint
14 = Command_UpgradeGLAWorkerFakeCommandSet

9 = Cybr_AI_Command_ConstructAmericaMechSpider_Macro
10 = Cybr_AI_Command_ConstructAmericaMechSpiderAA_Macro
12 = Cybr_AI_Command_ConstructDroneCarrierLight_AI
End

CommandSet Cybr_AmericaWarFactoryCommandSet_Macro
1 = Cybr_Command_ConstructUSAMechVulture
3 = Cybr_Command_ConstructAmericaMechSpider
5 = Cybr_Command_ConstructAmericaMechSpiderAA
2 = Cybr_Command_ConstructAmericaInfantrySpiderMine_Macro
4 = Cybr_Command_ConstructAmericaVehicleClusterTomahawkTank
6 = Cybr_Command_ConstructAmericaVehicleBigTom
11 = Command_UpgradeAmericaTOWMissile
13 = Command_SetRallyPoint
14 = Command_UpgradeGLAWorkerFakeCommandSet

7 = Cybr_AI_Command_ConstructDroneCarrierLight_AI
8 = Cybr_AI_Command_ConstructDroneCarrierLight_AI_v2
9 = Cybr_AI_Command_ConstructDroneCarrier_AI
End

CommandSet Cybr_AmericaWarFactoryCommandSetDrones
1 = Command_ConstructAmericaVehicleBattleDrone
2 = Command_ConstructAmericaVehicleScoutDrone
3 = Command_ConstructAmericaVehicleHellfireDrone
4 = Command_ConstructAmericaVehiclePointDefenseDrone
5 = Command_ConstructAmericaVehicleStingerDrone
6 = Command_ConstructAmericaVehicleSuicideDrone
13 = Command_SetRallyPoint
14 = Command_UpgradeGLAWorkerRealCommandSet
End

acidbrain
12 years ago
Do you have these modules in the Warfactory object code?

Behavior = CommandSetUpgrade ModuleTag_ComSet01
  CommandSet = Cybr_AmericaWarFactoryCommandSetDrones
  TriggeredBy = Upgrade_SwitchCommandSet
  RemovesUpgrades = Upgrade_SwitchBackCommandSet
End

Behavior = CommandSetUpgrade ModuleTag_ComSet02
  CommandSet = Cybr_AmericaWarFactoryCommandSet
  TriggeredBy = Upgrade_SwitchBackCommandSet
  RemovesUpgrades = Upgrade_SwitchCommandSet Upgrade_SwitchBackCommandSet
End

Panem et kirkinses
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
I don't have it in Lazer Generals War Factory. I looked at Cyber Generals War Factory and saw a similar code of what you just posted. It is a little bit different, however.


Behavior = CommandSetUpgrade ModuleTag_ComSet01
CommandSet = Cybr_AmericaWarFactoryCommandSetDrones
TriggeredBy = Upgrade_SwitchCommandSet
RemovesUpgrades = Upgrade_SwitchBackCommandSet
End
Behavior = CommandSetUpgrade ModuleTag_MiE0_2
CommandSet = Cybr_AmericaWarFactoryCommandSet_Micro
TriggeredBy = Upgrade_SwitchBackCommandSet Upgrade_Nationalism
RequiresAllTriggers = Yes
RemovesUpgrades = Upgrade_SwitchCommandSet Upgrade_SwitchBackCommandSet
End
Behavior = CommandSetUpgrade ModuleTag_MaE0_2
CommandSet = Cybr_AmericaWarFactoryCommandSet_Macro
TriggeredBy = Upgrade_SwitchBackCommandSet Upgrade_Fanaticism
RequiresAllTriggers = Yes
RemovesUpgrades = Upgrade_SwitchCommandSet Upgrade_SwitchBackCommandSet
End

Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Okay acid Brain, I put in that code that you showed me just to see if that would work and after I did that I put in a new unit in Lazer Generals War Factory to be with the additional commands, but when I click on the arrow button to access the additional commands, the game crashes. Here are the changes I put in and they are all highlighted:


Lazer General.ini

Behavior = DestroyDie ModuleTag_22
End

Behavior = CommandSetUpgrade Module_TagComSet01
CommandSet = Lazr_AmericaWarFactoryCommandSetAdditionalCommands
TriggeredBy = Upgrade_SwitchCommandSet
RemovesUpgrades = Upgrades_SwitchBackCommandSet
End

Behavior = CommandSetUpgrade ModuleTag_ComSet02
CommandSet = Lazr_AmericaWarFactoryCommandSet
TriggeredBy = Upgrade_SwitchBackCommandSet
RemovesUpgrades = Upgrade_SwitchCommandSet Upgrade_SwitchBackCommandSet
End




CommandSet.ini

CommandSet Lazr_AmericaWarFactoryCommandSet
1 = Lazr_Command_ConstructAmericaVehiclePitbull
3 = Lazr_Command_ConstructAmericaVehiclePitLas
5 = Lazr_Command_ConstructAmericaVehiclePitMis
7 = Lazr_Command_ConstructAmericaVehiclePitScout
9 = Lazr_Command_ConstructAmericaVehiclePitAven

2 = Lazr_Command_ConstructAmericaVehiclePredator
4 = Lazr_Command_ConstructAmericaVehiclePredator_Part
6 = Lazr_Command_ConstructAmericaVehiclePredator_Plas
8 = Lazr_Command_ConstructAmericaVehiclePredator_Micr
10 = Lazr_Command_ConstructAmericaVehiclePredator_AA

11 = Command_UpgradeUSABuildingDefense
12 = Command_UpgradeAmericaAuxMissiles_UpgradeObject

14 = Command_UpgradeGLAWorkerFakeCommandSet
13 = Command_SetRallyPoint
End

CommandSet Lazr_AmericaWarFactoryMoreCommmandSet
2 = Lazr_Command_ConstructAmericaTankPaladin
1 = Command_UpgradeGLAWorkerRealCommandSet
End




CommandButton.ini

CommandButton Lazr_Command_ConstructAmericaTankPaladin
Command = UNIT_BUILD
Object = Lazr_AmericaTankPaladin
TextLabel = CONTROLBAR:ConstructAmericaTankPaladin
ButtonImage = SAPaladin
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildPaladin
End



Now in the CommandSet.ini folder, Cyber General's war factory Addional Command button and back button for the drones are labeled as this:

Command_UpgradeGLAWorkerFakeCommandSet for the Additional Commands button.
Command_UpgradeGLAWorkerRealCommandSet for the back button to the main commands.

That is how I got those lines.
acidbrain
12 years ago

Okay acid Brain, I put in that code that you showed me just to see if that would work and after I did that I put in a new unit in Lazer Generals War Factory to be with the additional commands, but when I click on the arrow button to access the additional commands, the game crashes. Here are the changes I put in and they are all highlighted:


Lazer General.ini

Behavior = DestroyDie ModuleTag_22
End

Behavior = CommandSetUpgrade Module_TagComSet01
CommandSet = Lazr_AmericaWarFactoryCommandSetAdditionalCommands
TriggeredBy = Upgrade_SwitchCommandSet
RemovesUpgrades = Upgrades_SwitchBackCommandSet
End

Behavior = CommandSetUpgrade ModuleTag_ComSet02
CommandSet = Lazr_AmericaWarFactoryCommandSet
TriggeredBy = Upgrade_SwitchBackCommandSet
RemovesUpgrades = Upgrade_SwitchCommandSet Upgrade_SwitchBackCommandSet
End

Originally Posted by: Nick.B 




CommandSet.ini

CommandSet Lazr_AmericaWarFactoryCommandSet
1 = Lazr_Command_ConstructAmericaVehiclePitbull
3 = Lazr_Command_ConstructAmericaVehiclePitLas
5 = Lazr_Command_ConstructAmericaVehiclePitMis
7 = Lazr_Command_ConstructAmericaVehiclePitScout
9 = Lazr_Command_ConstructAmericaVehiclePitAven

2 = Lazr_Command_ConstructAmericaVehiclePredator
4 = Lazr_Command_ConstructAmericaVehiclePredator_Part
6 = Lazr_Command_ConstructAmericaVehiclePredator_Plas
8 = Lazr_Command_ConstructAmericaVehiclePredator_Micr
10 = Lazr_Command_ConstructAmericaVehiclePredator_AA

11 = Command_UpgradeUSABuildingDefense
12 = Command_UpgradeAmericaAuxMissiles_UpgradeObject

14 = Command_UpgradeGLAWorkerFakeCommandSet
13 = Command_SetRallyPoint
End

CommandSet Lazr_AmericaWarFactoryMoreCommmandSet
2 = Lazr_Command_ConstructAmericaTankPaladin
1 = Command_UpgradeGLAWorkerRealCommandSet
End




CommandButton.ini

CommandButton Lazr_Command_ConstructAmericaTankPaladin
Command = UNIT_BUILD
Object = Lazr_AmericaTankPaladin
TextLabel = CONTROLBAR:ConstructAmericaTankPaladin
ButtonImage = SAPaladin
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildPaladin
End



Now in the CommandSet.ini folder, Cyber General's war factory Addional Command button and back button for the drones are labeled as this:

Command_UpgradeGLAWorkerFakeCommandSet for the Additional Commands button.
Command_UpgradeGLAWorkerRealCommandSet for the back button to the main commands.

That is how I got those lines.



The names of the upgrade commandset are different.
Panem et kirkinses
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Okay I changed the Command Set for Lazer Generals War Factory.


CommandSet Lazr_AmericaWarFactoryAdditionalCommandsCommmandSet
2 = Lazr_Command_ConstructAmericaTankPaladin
1 = Command_UpgradeGLAWorkerRealCommandSet
End



The game still crashes though anyway.
acidbrain
12 years ago
Go to 'Documents and Settings\Command and Conquer Generals Zero Hour Data' and copy paste the data that is in the 'ReleaseCrashInfo' file in here.
Panem et kirkinses
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Okay here is the ReleaseCrashInfofile from note pad:



Release Crash at Sat Dec 07 13:10:40 2013
; Reason Uncaught Exception in GameEngine::update

Last error:


Current stack:

acidbrain
12 years ago

Behavior = CommandSetUpgrade Module_TagComSet01
CommandSet = Lazr_AmericaWarFactoryCommandSetAdditionalCommands
TriggeredBy = Upgrade_SwitchCommandSet
RemovesUpgrades = Upgrades_SwitchBackCommandSet
End



CommandSet Lazr_AmericaWarFactoryAdditionalCommandsCommmandSet
2 = Lazr_Command_ConstructAmericaTankPaladin
1 = Command_UpgradeGLAWorkerRealCommandSet
End


The commandset names are still different, just copy/paste the name to the commandset.
Panem et kirkinses
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Okay I copied and pasted the commandset names and made them the same, but the game still crashes after I click the Additional Commands button in Laser Generals War Factory. I even switched them around the other way, but it still did the same thing. Here is the reliefcrashinfo from the Zero Hour data folder in my documents:



Release Crash at Sun Dec 08 08:03:48 2013
; Reason Uncaught Exception in GameEngine::update

Last error:


Current stack:



As you can see, it still has the same error.
acidbrain
12 years ago
Hmm, can you post the Warfactory object code from begin to end?
Panem et kirkinses
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Yeah sure here it is:



;------------------------------------------------------------------------------
Object Lazr_AmericaWarFactory



ConditionState = WEAPONSET_PLAYER_UPGRADE
ShowSubObject = POD
End
End

PlacementViewAngle = -135

; ***DESIGN parameters ***
DisplayName = OBJECT:WarFactory
Side = AmericaLaserGeneral
EditorSorting = STRUCTURE

Prerequisites
End

BuildCost = 1
BuildTime = 1
ExperienceValue = 75 75 75 75

MaxSimultaneousOfType = DeterminedBySuperweaponRestriction ; Normally

unlimited, but can be selected by players in multiplayer games

EnergyProduction = 1
CommandSet = Lazr_AmericaWarFactoryCommandSet
VisionRange = 200
ShroudClearingRange = 200

WeaponSet
Conditions = none
Weapon = PRIMARY none
End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY AvengerPointDefenseLaserOne
End

Behavior = WeaponSetUpgrade ModuleTag_Weapon
TriggeredBy = Upgrade_USABuildingDefense
End

ArmorSet
Conditions = None
Armor = StructureArmor
DamageFX = StructureDamageFXNoShake
End

; *** AUDIO Parameters ***
VoiceSelect = WarFactoryUSASelect
SoundOnDamaged = BuildingDamagedStateLight
SoundOnReallyDamaged = BuildingDestroy

UnitSpecificSounds
UnderConstruction = UnderConstructionLoop
End

; *** ENGINEERING Parameters ***
RadarPriority = STRUCTURE
KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE REPAIR_PAD SCORE

IMMUNE_TO_CAPTURE FS_FACTORY AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY FS_WARFACTORY

CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT

Body = StructureBody ModuleTag_09
MaxHealth = 2000.0
InitialHealth = 2000.0
SubdualDamageCap = 2200
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 100
End


Behavior = GrantUpgradeCreate ModuleTag_0999
UpgradeToGrant = Upgrade_AmericaAdvancedControlRods
ExemptStatus = UNDER_CONSTRUCTION
End

Behavior = GrantScienceUpgrade ModuleTag_Science0111
GrantScience = SCIENCE_WarFactory
TriggeredBy = Upgrade_AmericaAdvancedControlRods
End

Behavior = ProductionUpdate ModuleTag_10
NumDoorAnimations = 1
DoorOpeningTime = 3250 ;in mSeconds
DoorWaitOpenTime = 3000 ;in mSeconds
DoorCloseTime = 4000 ;in mSeconds
ConstructionCompleteDuration = 1500 ;in mSeconds
End
Behavior = DefaultProductionExitUpdate ModuleTag_11
UnitCreatePoint = X: -10.0 Y:-30.0 Z:0.0
NaturalRallyPoint = X: 53.0 Y:-30.0 Z:0.0;NaturalRallyPointX must always

match GeometryMajorRadius! -ML
End
Behavior = RepairDockUpdate ModuleTag_12
TimeForFullHeal = 5000 ;(in milliseconds)
NumberApproachPositions = 5
End
Behavior = BaseRegenerateUpdate ModuleTag_13
End

Behavior = TransitionDamageFX ModuleTag_15
;-------------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

Behavior = CreateObjectDie ModuleTag_16
CreationList = Lazr_OCL_AmericanRangerDebris05
ExemptStatus = UNDER_CONSTRUCTION
End

Behavior = FlammableUpdate ModuleTag_18
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 5 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End

Behavior = CreateObjectDie ModuleTag_20
CreationList = OCL_LargeStructureDebris
End

Behavior = FXListDie ModuleTag_21
DeathFX = FX_StructureMediumDeath
End

Behavior = DestroyDie ModuleTag_22
End

Behavior = CommandSetUpgrade Module_TagComSet01
CommandSet = Lazr_AmericaWarFactoryCommmandSetAdditionalCommandsCommmandSet
TriggeredBy = Upgrade_SwitchCommandSet
RemovesUpgrades = Upgrades_SwitchBackCommandSet
End

Behavior = CommandSetUpgrade ModuleTag_ComSet02
CommandSet = Lazr_AmericaWarFactoryCommandSet
TriggeredBy = Upgrade_SwitchBackCommandSet
RemovesUpgrades = Upgrade_SwitchCommandSet Upgrade_SwitchBackCommandSet
End

Behavior = AIUpdateInterface ModuleTag_AI
Turret
TurretTurnRate = 540
RecenterTime = 1000
ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
MinIdleScanInterval = 250 ; in milliseconds
MaxIdleScanInterval = 250 ; in milliseconds
MinIdleScanAngle = 0 ; in degrees off the natural turret angle
MaxIdleScanAngle = 360 ; in degrees off the natural turret angle
End
AutoAcquireEnemiesWhenIdle = Yes
MoodAttackCheckRate = 250
End


Geometry = BOX
GeometryMajorRadius = 53.0
GeometryMinorRadius = 60.0
GeometryHeight = 40.0
GeometryIsSmall = No
FactoryExitWidth = 25 ; How much space to leave for units exiting.
Shadow = SHADOW_VOLUME
BuildCompletion = PLACED_BY_PLAYER
End



I had to cut the code down some so I could fit it on here.
acidbrain
12 years ago

MaxSimultaneousOfType = DeterminedBySuperweaponRestriction
Warfactory is not a superweapon, make it a number.

Well, just make a copy of the Lazr_AmericaWarFactory code and add your commandsetswitch modules to it, give the copy a new name Lazr_AmericaWarFactory2 or something and test.
Forget about the weapon and first test if the switch works, if you got that working you can add more stuff.
I would have to take a look in your mod files to determine the problem so it would be helpfull if you can upload it somewhere.
Is the warfactory the only thing you modded sofar?
Panem et kirkinses
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Well I had changed a lot of how the generals work because when I got it, I did not like the prerequisites on all of the buildings because they required certain upgrades or special powers to access all of the generals buildings, vehicles, infantry, and upgrades and you could not access all of them. Plus I did not like that you could not build buildings from another generals captured dozer because you could only play that general to build his buildings. 😒 I wanted it to be like regular zero hour so I would not have to deal with that. I must warn you that this mod came with a lot of errors and bugs because it was unfinished when it was released. The mod files are attached. I will go ahead and make a copy of laser generals war factory and see what I get from it.

By the way I can't get the files I want to upload on here. They are to big to fit in or the file types I have are not accepted. Oh and I also tried to upload it through a zip file but an error came up saying uploading was denied.
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Okay I copied the lasers war factory and I changed the name to Lazr_AmericaWarFactory2, but now the game crashes at start up.

Here is what the error says in the releasecrashinfo in my documents:



Release Crash at Mon Dec 09 13:52:11 2013
; Reason Error parsing INI file 'Data\INI\Object\LaserGeneral.ini' (Line: 'Object Lazr_AmericaWarFactory2 ')


Last error:


Current stack:

acidbrain
12 years ago
Well, i think it's best if you find a place to upload your stuff, it takes ages to find it out like we do now, maybe the warfactory isnt the problem but something else in the mod is.
Panem et kirkinses
Nick.B
  • Nick.B
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Okay I will try to upload the files again.