View Full Version : a few questions
Elazul Yagami
04-15-2007, 09:21 PM
i wish to do this all in a map.ini file, specifically for each indvidual custom map, and then create another version to be installed in the main zero hour data ini folder.
1- How do i disable mines from being built? i can disable a building or a unit from being created, but i don't know how to disable the mines upgrade.
2- how can i make the palace ungarrisonable? i want to remove the ability to hide units inside the palace.
3- since the point of my map mod is basically to create a version that disables all forms of denfenses (the beta version of my mod, that disables all superweapons and defenses sans gla tunnels (limited number) and mines (cause i dunno how to do that!) should be up soon) , how can i adjust the AI to not build the defenses? i've already adjusted the Ai as much as i can, but the workers just stand there doing nothing.
thanks in advance.
Zancloufer27
04-15-2007, 09:42 PM
This is more of a modding question. However, for the mines you would have to remove the mine upgrade option from all of the China buildings, or just make mines do 0 damage. Just make the buildings unbuildable via World builder, and for the palce you would have to go to it's objects and remove it's garrison slots.
Elazul Yagami
04-16-2007, 07:50 AM
This is more of a modding question. However, for the mines you would have to remove the mine upgrade option from all of the China buildings, or just make mines do 0 damage. Just make the buildings unbuildable via World builder, and for the palce you would have to go to it's objects and remove it's garrison slots.
thats the question, how DO i remove the mines WITHOUT using the world builder?
i mean for example i used this to prevent the building of stinger sites:
Object Demo_GLAStingerSite
Buildable = No
End
i also found how to prevent units from being built (can't remember the syntax)
i can't find anything equivilant to that in mines, are mines considered units or objects?
Pivac
04-17-2007, 07:12 AM
It's been a long time since I was doing this, but here's the code for ungarrisonable structures.
Object CivilianTEROutPost
ReplaceModule ModuleTag_10
Behavior = GarrisonContain ModuleTag_10Alt
ContainMax = 0
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
End
End
End
It worked for this structure (CivilianTEROutPost) in a single player map, if I remember correctly. Now, you need to change the name in line "Object CivilianTEROutPost" to "Object GLAPalace", and create one code for each GLA general (for example "Demo_GLAPalace" is for Juhziz). You can find all these names in World Builder.
You can also try to use the "KindOf = -GARRISONABLE". I've never tried neither one of these two on a Palace, so it maybe doesn't work.
Disabling the AI from building structures is probably going to result with an messed up AI, as you are forcing it to build in a different way than it's supposed to (just like you mentioned with Workers).
That's just my guess. Of course, there are ways to disable defenses, and I think you should try to edit the AI in World Builder. It's little complicated, but not impossible. ;)
Elazul Yagami
04-17-2007, 07:40 AM
It's been a long time since I was doing this, but here's the code for ungarrisonable structures.
It worked for this structure (CivilianTEROutPost) in a single player map, if I remember correctly. Now, you need to change the name in line "Object CivilianTEROutPost" to "Object GLAPalace", and create one code for each GLA general (for example "Demo_GLAPalace" is for Juhziz). You can find all these names in World Builder.
You can also try to use the "KindOf = -GARRISONABLE". I've never tried neither one of these two on a Palace, so it maybe doesn't work.
Disabling the AI from building structures is probably going to result with an messed up AI, as you are forcing it to build in a different way than it's supposed to (just like you mentioned with Workers).
That's just my guess. Of course, there are ways to disable defenses, and I think you should try to edit the AI in World Builder. It's little complicated, but not impossible. ;)
Dude you rock..
do you have any idea how to disable mines? (not the china promotion, but the defensive upgrade china can build around it's buildings)
thanks again in advance.
edit: i tried both of the types of code you gave me, with several variations, all of them crashed the game... any idea what went wrong?
Pivac
04-17-2007, 09:07 AM
Uh, sorry, I thought this could happen...
Here's the exact code I used:
Object CivilianTEROutPost
KindOf = -SELECTABLE
ReplaceModule ModuleTag_10
Behavior = GarrisonContain ModuleTag_10Alt
ContainMax = 0
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
End
End
End
If you look carefully you'll notice that I used "KindOf" code as well in this one, so maybe it's the reason game didn't crash on my map. The problem is, if you put that "KindOf = -SELECTABLE" player won't be able to select a Palace.
Also, my map was a mission for a Blitzkreig 2 mod, but I don't think that matters.
Try to put that code in a single player map for testing (just put a Palace somewhere and enable player) and see what is going to happen.
Another thing you could do is put the the same code as above, and delete that "-" in "KindOf" line. So Palace will still be selectable.
My apologies if anything goes wrong, I don't have time to test it.
Try this code as well:
Object GLAPalace
KindOf = SELECTABLE
ReplaceModule ModuleTag_10
Behavior = GarrisonContain ModuleTag_10Alt
ContainMax = 0
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
ImmuneToClearBuildingAttacks = Yes
End
End
End
And one advice. If you ever need an example of map.ini code, extract missions from MapsZH.big and look through map.ini's, I'm sure you'll find something useful.
Me Myself & Pi
04-17-2007, 09:12 AM
I know how to remove the mines in the World Builder using a script. But for an INI file, you'll have to serch through all the game INI files until you find one about command buttons. Then coppy & pastse something about mines being removed.
Elazul Yagami
04-17-2007, 07:06 PM
Uh, sorry, I thought this could happen...
Here's the exact code I used:
If you look carefully you'll notice that I used "KindOf" code as well in this one, so maybe it's the reason game didn't crash on my map. The problem is, if you put that "KindOf = -SELECTABLE" player won't be able to select a Palace.
Also, my map was a mission for a Blitzkreig 2 mod, but I don't think that matters.
Try to put that code in a single player map for testing (just put a Palace somewhere and enable player) and see what is going to happen.
Another thing you could do is put the the same code as above, and delete that "-" in "KindOf" line. So Palace will still be selectable.
My apologies if anything goes wrong, I don't have time to test it.
Try this code as well:
And one advice. If you ever need an example of map.ini code, extract missions from MapsZH.big and look through map.ini's, I'm sure you'll find something useful.
your code worked, except that it made it that you can't use any of the upgrades in the palace.
so playing around with the code, this is what ended up working (if you're interested):
Object Chem_GLAPalace
ReplaceModule ModuleTag_10
Behavior = GarrisonContain ModuleTag_10Alt
ContainMax = 0
End
End
End
Object Demo_GLAPalace
ReplaceModule ModuleTag_10
Behavior = GarrisonContain ModuleTag_10Alt
ContainMax = 0
End
End
End
Object Slth_GLAPalace
ReplaceModule ModuleTag_10
Behavior = GarrisonContain ModuleTag_10Alt
ContainMax = 0
End
End
End
Object GLAPalace
ReplaceModule ModuleTag_10
Behavior = GarrisonContain ModuleTag_10Alt
ContainMax = 0
End
End
End
btw, i kinda forgot to make it obvious, i'm not using world builder, and i didn't even consider using it... i just looked at map.ini files and started working from there... THEN i was told by others that World builder makes things easier... go figure :S
now if i manage to remove the landmines (critical) and then adjust the Ai (secondary) my map mini mod will be all done :D
you know what's wrong with this code?
SkirmishBuildList America
Structure AmericaCommandCenter
Location = X:482.2 Y:527.51
Rebuilds = 0
Angle = -135.00
InitiallyBuilt = No
AutomaticallyBuild = Yes
End
Structure AmericaPowerPlant
Name = dapower
Location = X:770.43 Y:727.79
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaPowerPlant
Location = X:759.9 Y:555.84
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaPowerPlant
Location = X:374.82 Y:371.69
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaPowerPlant
Location = X:477.11 Y:174.62
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaPowerPlant
Location = X:189.19 Y:522
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaPowerPlant
Location = X:418.35 Y:827.1
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaAirfield
Location = X:767.04 Y:376.4
Rebuilds = 0
Angle = -135.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaBarracks
Location = X:247.52 Y:734.59
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaWarFactory
Location = X:594.59 Y:635.72
Rebuilds = 0
Angle = -45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaStrategyCenter
Location = X:384.36 Y:652.24
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaSupplyDropZone
Location = X:515.66 Y:347.88
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaSupplyDropZone
Location = X:637.41 Y:490.2
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaSupplyDropZone
Location = X:488.83 Y:760.27
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaSupplyDropZone
Location = X:322.39 Y:502.03
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaWarFactory
Location = X:650.93 Y:843.45
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaWarFactory
Location = X:259.56 Y:289.71
Rebuilds = 0
Angle = -135.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
Structure AmericaWarFactory
Location = X:676.07 Y:670.51
Rebuilds = 0
Angle = 45.00
InitiallyBuilt = No
AutomaticallyBuild = No
End
End
that was just an example, but shouldn't that make the AI ok with not building defences?
off topic, but does anyone know of a method in windows xp to copy a single file into several folders at once?
i don't want to manually copy my ini file into each and every custom map folder... that's BORING!
Me Myself & Pi
04-18-2007, 01:57 PM
That's a lllooonnnggg peice of INI files & I really don't want to go through it, but here's a link for INI debugging techniques at cncmaps.net: http://cncmaps.net/index.php?showtopic=1276 I must warn you that this site has some proplems & may not be able to get on it. So just try it at different times of the day.
I don't know of any ways of you can copy a file into a bunch of folders, you'll just have to copy it one at a time into each folder. Unless someone else knows something I don't.
I don't know how to remove commande buttons with INI files, I'd have to look through all those INI files until I found the right one. I do however know how to add & remove command buttons from any kind of object in the world builer using scripts. I can also make things buildable or not, buildable only by skirmish, or buildable ignoring the prerequisites. So if you want to know how to work these scripts just let me know. I'd be happy to make the scripts for you, just let me know every thing you want.;)
Elazul Yagami
04-18-2007, 06:33 PM
thanks for your offer, i may take you up on it... thing is my world builder won't work for some reason (don't understand why)
regardless, the thing is, landmines, are they considered an object , a building or units or what? cause i can control the building of both units and buildings in the ini file (which makes their command button disappear) but what are landmines?
is it possible to use the
*** IF ***
True.
*** THEN ***
[???] Command button: 'AirF_Command_ConstructAmericaInfantryColonelBurton' is removed from all objects of type 'AirF_AmericaBarracks'.
syntax in a normal .ini ?
oh and is there a way to convert a custom map ini to a general ini/mod ?
once i'm done with this ini, i want to make it so thta the whole game (custom and official maps) work without superweapons or defenses.
Me Myself & Pi
04-18-2007, 08:00 PM
I know why the command button scripts don't work for you. I wanted to know weather or not you were going to use them before getting into it. I asked the same question at cncmaps.net. Here's the topic there, it should answer your question: http://cncmaps.net/index.php?showtopic=1631 Remember that this site doesn't work all the time so try it at different times of the day. You also need to use the script "Map\Modify\Ajust the tech tree for a specific unit" if you going to add command buttons.
I found an INI file from a Generals (not Zero Hour) map that I got from someone. (INI files do work for online play there) In it I found how to set the command buttons for an object here it is:
CommandSet
1 =
2 =
3 =
4 =
5 =
6 =
7 =
8 =
9 =
10 =
11 =
12 =
13 =
14 =
END
After each number put the name of the command button (the names can be found in the script "Unit\CommandButton\Use command ability" In the drop down list you'll see all the command buttons in the game.) If you don't want a command button in a slot number then just delete the corrisponding number in the INI file. Here's an example INI file (not one used in the game):
CommandSet AmericaAirfieldCommandSet
1 = Command_ConstructAmericaJetRaptor
2 = Command_ConstructAmericaVehicleComanche
3 = Command_ConstructAmericaJetAurora
4 = Command_ConstructAmericaJetStealthFighter
7 = Command_UpgradeComancheRocketPods
8 = Command_UpgradeAmericaLaserMissiles
9 = Command_ConstructAmericaVehicleChinook
13 = Command_SetRallyPoint
14 = Command_Sell
End
Mines are upgrades.
I've found the INI file for the infantry general's bunker (mines autmaticly appear after it's built) I edited it so that the mines won't appear. But you'll have to put this INI file in this folder "C:\Program Files\EA Games\Command & Conquer Generals Zero Hour\Data\INI\Object" {You'll have to create a folder called "Object" in the "INI" folder [Because the oringinal INI file came in a folder called "Data\INI\Object" My INI will overide that INI file if placed into the correct folder. (The original INI file & the folders it's in is in a commpressed, BIG folder)]} This INI file will modify all your map {& official maps. [If you play online with this INI file in the above folder it will cause a mismatch if you play any map online. (It may not happen if none of the players are infantry general)]}
Edited: Just read you edited post. You'll have to go through the game INI files, edit the stuff you need to edit, & save it in the same place you need to save the INI file thats avilible below. Althouth when you have FinalBIG up check what folders they're in. If it's in "Data\INI" then don't put it in the "Object" folder.
Elazul Yagami
04-19-2007, 08:15 AM
this type of usage :
CommandSet AmericaAirfieldCommandSet
1 = Command_ConstructAmericaJetRaptor
2 = Command_ConstructAmericaVehicleComanche
3 = Command_ConstructAmericaJetAurora
4 = Command_ConstructAmericaJetStealthFighter
7 = Command_UpgradeComancheRocketPods
8 = Command_UpgradeAmericaLaserMissiles
9 = Command_ConstructAmericaVehicleChinook
13 = Command_SetRallyPoint
14 = Command_Sell
End
doesn't really work because in my code i have :
CommandSet ChinaPropagandaCenterCommandSet
7 = Command_UpgradeChinaUraniumShells
8 = Command_UpgradeChinaNuclearTanks
10 = Command_UpgradeChinaNeutronShells
End
and the original upgrades and mines are still there
did you mean that i do this for example?
CommandSet ChinaPropagandaCenterCommandSet
7 = Command_UpgradeChinaUraniumShells
8 = Command_UpgradeChinaNuclearTanks
10 = Command_UpgradeChinaNeutronShells
11 =
End
i'll test it when i get home, but i doubt it'll work because i recall attempting to do something similar.
(btw, my worldbuilder doesn't work,and my ini folder is completely empty , which i find kinda odd)
btw, i don't have a problem with the bunker mines (for infantry) because bunkers are disabled anyway... i looked through the ini you pasted, and damn is it complex... i didn't really understand how you disabled the mines though...
do you mean i should edit this part
Behavior = CommandSetUpgrade ModuleTag_25
CommandSet = Infa_ChinaBunkerCommandSetUpgrade
TriggeredBy = Upgrade_ChinaMines
End
Behavior = ArmorUpgrade ModuleTag_26
TriggeredBy = Upgrade_ChinaEMPMines
End
to be :
Behavior = CommandSetUpgrade ModuleTag_25
CommandSet = Infa_ChinaBunkerCommandSetUpgrade
TriggeredBy = NULL
;;;; OR
Buildable = No
End
i'll try all the variations when i get home, but if you beat me to the punch, please tell me.
Me Myself & Pi
04-19-2007, 01:28 PM
I didn't test the command button INI file, I just got it from an old Generals map someone made. I never tested it.
Yes, that folder should be empty. The reason it's there is so you could put INI files there that overide the ones in the BIG file.
What do you mean by your world builder not working. Could you tell me what's wrong?
I see, I now know that I didn't need to give that INI file. But after looking through it, I found a spot where allowed mines to autmaticly appear. I just deleted it.
Elazul Yagami
04-19-2007, 07:19 PM
have yet to try what i suggested
but could it be possible that it could be easier (at least until we figure it out) to just disable damage from mines?
problem is, that would render the china promotion useless.
Me Myself & Pi
04-19-2007, 11:29 PM
I think it would be easyer to just remove the command buttons from the objects. Because I think we'd have to go to each building's mines & edit them to harmless. Besides, the computer would put money into mines that don't work. :\
Elazul Yagami
04-20-2007, 06:11 AM
yeah, good point.
the world builder btw, doesn't load, it says "assertion failure token disguised is not a valid member of the index list"
then it says another assertion error with airforce.ini
then it says "error parsing block"
then it gives me a runtime error.
anyway, do you know a method to remove the command button in a map ini?
cause the above didn't work for me.
Me Myself & Pi
04-20-2007, 05:34 PM
I found the original INI files for command buttons, it's called "CommandSet" Go through this INI file & delete any command buttons from it you want to remove. After that, save the INI file with the same name (CommandSet) & save it into you "Data\INI" folder in your game directory. This will affect the hole game.
But first, I'd reccamend uninstalling Zero Hour & Generals. Then delete both game directorys. Now install both games again. Then you should be able to get onto the world builder.
Elazul Yagami
04-20-2007, 11:07 PM
put i currently DON"T want to delete the command buttons from the whole game, i only want a custom map specific ini that does so.
Me Myself & Pi
04-21-2007, 09:58 AM
Oh, I was under the empresion that you wanted to mod the game. No worries, just find the object you want to remove command buttons from, copy it, paste into a map.ini file, then delete the command buttons you want to remove from that object.
Elazul Yagami
04-21-2007, 03:47 PM
Um dude, i already told you i tried that it didn't work.
how am i supposed to delete it exactly?
Me Myself & Pi
04-21-2007, 05:13 PM
I just tried putting a single object command set INI file into a map & nothing happened, just like you said. I was able to make it work modding the game. I soppose you'll have to remove command buttons through scripts for a single map, (Remember, I'd be very happy to do that.) To remove command buttons moddifing the game you just delete the line it's on. Example: Here's the USA dozer command buttons:
CommandSet AmericaDozerCommandSet
1 = Command_ConstructAmericaPowerPlant
2 = Command_ConstructAmericaStrategyCenter
3 = Command_ConstructAmericaBarracks
4 = Command_ConstructAmericaSupplyDropZone
5 = Command_ConstructAmericaSupplyCenter
6 = Command_ConstructAmericaParticleCannonUplink
7 = Command_ConstructAmericaPatriotBattery
8 = Command_ConstructAmericaCommandCenter
9 = Command_ConstructAmericaFireBase
11 = Command_ConstructAmericaWarFactory
13 = Command_ConstructAmericaAirfield
14 = Command_DisarmMinesAtPosition
End
To remove the barracks command button, delete the line it's on, it should look like this:
CommandSet AmericaDozerCommandSet
1 = Command_ConstructAmericaPowerPlant
2 = Command_ConstructAmericaStrategyCenter
4 = Command_ConstructAmericaSupplyDropZone
5 = Command_ConstructAmericaSupplyCenter
6 = Command_ConstructAmericaParticleCannonUplink
7 = Command_ConstructAmericaPatriotBattery
8 = Command_ConstructAmericaCommandCenter
9 = Command_ConstructAmericaFireBase
11 = Command_ConstructAmericaWarFactory
13 = Command_ConstructAmericaAirfield
14 = Command_DisarmMinesAtPosition
End
Elazul Yagami
04-22-2007, 12:34 PM
i agree with you that should work in modding the game proper, but in maps, that doesn't work (like my propaganda center example shows)
if you can figure out a way to make a general script that would work in ANY custom map just by copying it into the custom map folder, then you'd be doing me a HUGE favor.
Me Myself & Pi
04-22-2007, 03:44 PM
I'm sorry but I don't think there's a way to copy scripts & put them into the game folders, you'll have to open up world builder & import the scripts into each map. If your world builder still doesn't work, then uninstall both Generals & Zero hour, delete the game directories, then reinstall them again. If it still doesn't work then the problem is most likely with your computer. I'm not much help there.
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.