Posted by: Distrbd21 - Saturday, September 4, 2010 12:05:25 AM
Hi
I'm trying to make it so when I'm the Air F General, i can build SW General power plant instead of AirF's power plant, and Laser Generals Laser defense instead of AirF's defense, and so on.
Its for a map i have that I'm editing so it will be like this.
as the Air F General,you can build
Laser Defense
SW Power plant
Infra internet cafe, more than one if possible,instead of supply drop.
Nuke's, and Scud's instead of particle cannon.
Build Hackers without the building that you have to have with the internet cafe.
Build Tank Generals battle Masters and upgrades without the nuke
I will add more when i can think of it.
I'm trying to do this with scripts on one map, I'm a basic scripter for ZH.
The idea for the map is a comp stomp,so 1 vs 7 and 2 vs 6.
Posted by: Matthew9170 - Saturday, September 4, 2010 4:52:54 AM
Ok for your map your going to need a map.ini file
Posted by: Distrbd21 - Saturday, September 4, 2010 9:25:08 AM
OK
How would i go about putting all this into a map.ini?
I never went that far with the scripting i did.
Posted by: Annihilationzh - Saturday, September 4, 2010 9:47:29 AM
Is this the 4th or 5th time someone has said it needs a map.ini and then I've come in and said it doesn't?
I explained it best in this thread, IMO:
http://www.cnclabs.com/forums/default.aspx?g=posts&t=9454
But if you get stuck, there are also these threads for reference:
http://www.cnclabs.com/forums/default.aspx?g=posts&t=8971
http://www.cnclabs.com/forums/default.aspx?g=posts&t=9197
All of them ended up with it working.
Posted by: Distrbd21 - Saturday, September 4, 2010 10:01:16 AM
i did follow that, and got it to work on one map i did, made the AirF General Command center build a china ifra dozer and a gla chem worker.
But what i don't rlly understand is, if i make it so the AirF dozer will build a SW power plant instead of a AirF Power Plant, will it work with the command button script?, and so on.
so will it replace the old button?
I want to build a SW power plant and not a Air F power plant.
meaning take off the Air F power plant button, and add the SW power plant button.
Posted by: Annihilationzh - Saturday, September 4, 2010 10:11:05 AM
[quote]so will it replace the old button?[/quote]
Yes. But airforce's supply center requires his power plant, so you'll need to remove prerequisites from it (the script for that is Map>Modify>Adjust the tech tree for a specific object type).
Posted by: Distrbd21 - Saturday, September 4, 2010 10:13:56 AM
OK so i add the SW power plant to that? to make it so i can build the supply center?
Posted by: Distrbd21 - Saturday, September 4, 2010 10:18:45 AM
Also if i change the particle cannon with a scud will it show up on the side?, i think it would because i built it
So just to be clear would this script be right to add a SW power plant to the Air F dozer?
[code]*** IF ***
True.
*** THEN ***
[???] Command button: 'SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 1 (1-12).
'SupW_AmericaPowerPlant' becomes Buildable (Ignore_Prerequisites)[/code]
Posted by: Annihilationzh - Saturday, September 4, 2010 10:25:24 AM
[quote]OK so i add the SW power plant to that? to make it so i can build the supply center?[/quote]
No, you need to use it on AirFs supply center. You'll need the ignore_prerequisites option with that script.
[quote]Also if i change the particle cannon with a scud will it show up on the side?, i think it would because i built it[/quote]
No. That's impossible without a mod or a map.ini.
Posted by: Distrbd21 - Saturday, September 4, 2010 10:27:38 AM
[quote=Annihilationzh][quote]Also if i change the particle cannon with a scud will it show up on the side?, i think it would because i built it[/quote]
No. That's impossible without a mod or a map.ini.[/quote]
So in the map.ini what would i put for it to show up?
Also i will just make it easy and add the SW supply center instead of the Air F Supply,and just add the Chinook to it.
Posted by: Annihilationzh - Saturday, September 4, 2010 10:34:46 AM
You'll need to use this:
[code]CommandSet AirF_SpecialPowerShortcutUSA
1 = Command_SpyDroneFromShortcut
2 = Command_ParadropFromShortcut
3 = AirF_Command_A10ThunderboltMissileStrikeFromShortcut
4 = Early_Command_EmergencyRepairFromShortcut
5 = Command_DaisyCutterFromShortcut
6 = Command_FireParticleUplinkCannonFromShortcut
7 = Command_SpySatelliteScanFromShortcut
8 = Command_CIAIntelligenceFromShortcut
9 = AirF_Command_SpectreGunshipFromShortcut
10 = Command_LeafletDropFromShortcut
11 = AirF_Command_CarpetBombFromShortcut
END[/code]
Unfortunately, you have to replace two of them with these:
[code]Command_NeutronMissileFromShortcut[/code]
[code]Command_ScudStormFromShortcut[/code]
It will likely mismatch online if you use a map.ini.
Posted by: Distrbd21 - Saturday, September 4, 2010 10:46:00 AM
So if i don't use a map.ini it will work online?
And is there away to add it without a map.ini?
This is what i got so far with the dozer how does it look?
[code]*** IF ***
True.
*** THEN ***
[???] Command button: 'SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 1 (1-12).
'SupW_AmericaPowerPlant' becomes Buildable (Ignore_Prerequisites)
[???] Command button: 'Lazr_Command_ConstructAmericaPatriotBattery' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 7 (1-12).
'Lazr_AmericaPatriotBattery' becomes Buildable (Ignore_Prerequisites)
[???] Command button: 'Infa_Command_ConstructChinaInternetCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 4 (1-12).
'Infa_ChinaInternetCenter' becomes Buildable (Ignore_Prerequisites)
[???] Command button: 'SupW_Command_ConstructAmericaSupplyCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 5 (1-12).
'SupW_AmericaSupplyCenter' becomes Buildable (Ignore_Prerequisites)
[???] Command button: 'GC_Chem_Command_ConstructGLAScudStorm' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 6 (1-12).
'GC_Chem_GLAScudStorm' becomes Buildable (Ignore_Prerequisites)
[???] Command button: 'Tank_Command_ConstructChinaNuclearMissileLauncher' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 8 (1-12).
'Tank_ChinaNuclearMissileLauncher' becomes Buildable (Ignore_Prerequisites)
[???] Command button: 'GC_Chem_Command_ConstructGLAPalace' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 9 (1-12).
'GC_Chem_GLAPalace' becomes Buildable (Ignore_Prerequisites)
[???] Command button: 'Infa_Command_ConstructChinaPropagandaCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 10 (1-12).
'Infa_ChinaPropagandaCenter' becomes Buildable (Ignore_Prerequisites)
[/code]
All that works but the Warfactory, and the air feild.
Here is the map so you can see its not fully done yet.
Look at last post for map.
Posted by: Annihilationzh - Saturday, September 4, 2010 11:36:38 AM
[quote]So if i don't use a map.ini it will work online?[/quote]
Yes.
[quote]And is there away to add it without a map.ini?[/quote]
I've already said no.
[quote]This is what i got so far with the dozer how does it look?[/quote]
This:
[code] [???] Command button: 'SupW_Command_ConstructAmericaSupplyCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 5 (1-12).
'SupW_AmericaSupplyCenter' becomes Buildable (Ignore_Prerequisites)[/code]
Should be just this:
[code] 'AirF_AmericaSupplyCenter' becomes Buildable (Ignore_Prerequisites)[/code]
That'll fix the war factory and airfield.
Posted by: Distrbd21 - Saturday, September 4, 2010 11:43:49 AM
The problems i'm having now is
I can build all of the buildings i added with the command button, but i can build them without have power plant or supply first.
Posted by: Annihilationzh - Saturday, September 4, 2010 11:55:17 AM
The only way to fix that would be to have special conditions and a script to enable every building.
Posted by: Distrbd21 - Saturday, September 4, 2010 12:18:14 PM
OK so i fixed the supply, war factory, all that.
now how do i fix it so
i can't build the nuke or scud until the Strategy center is built, and the internet center
And how do i fix it so i can get so i don't need to build the Propaganda Center to get the hackers, and the upgrades that are in that?
so say i build the Strategy center, then the internet center, once those are built, then i can build the nuke and scud.
once i get that then the rest should be easy just adding the hackers into the bar and the battle masters to the war factory, and so on.
also is there away in the map.ini file that i can replace the spydron with the battle master upgrade, and the infra minigunner upgrade?
Posted by: Annihilationzh - Saturday, September 4, 2010 1:06:57 PM
[quote]now how do i fix it so
i can't build the nuke or scud until the Strategy center is built, and the internet center[/quote]
[code]*** IF ***
[???] Player 'player0' has Greater Than or Equal To 1 unit or structure of type 'AirF_AmericaStrategyCenter'
*** THEN ***
'GC_Chem_GLAScudStorm' becomes Buildable (Ignore_Prerequisites)[/code]
It won't work for multiple players, and you'll have to remove the "Ignore_Prerequisites" line from your other script.
[quote]And how do i fix it so i can get so i don't need to build the Propaganda Center to get the hackers, and the upgrades that are in that?[/quote]
You can make the hackers available the same way you made the nuke and scud storm available. You can move the upgrades the same way you added the buildings to the dozer.
Posted by: Distrbd21 - Saturday, September 4, 2010 1:19:32 PM
[quote=Annihilationzh][quote]now how do i fix it so
i can't build the nuke or scud until the Strategy center is built, and the internet center[/quote]
[code]*** IF ***
[???] Player 'player0' has Greater Than or Equal To 1 unit or structure of type 'AirF_AmericaStrategyCenter'
*** THEN ***
'GC_Chem_GLAScudStorm' becomes Buildable (Ignore_Prerequisites)[/code]
It won't work for multiple players, and you'll have to remove the "Ignore_Prerequisites" line from your other script.
[quote]And how do i fix it so i can get so i don't need to build the Propaganda Center to get the hackers, and the upgrades that are in that?[/quote]
You can make the hackers available the same way you made the nuke and scud storm available. You can move the upgrades the same way you added the buildings to the dozer.[/quote]
sorry to ask but, how do i find all that in the scripts?
Posted by: Annihilationzh - Saturday, September 4, 2010 1:22:55 PM
Player>Owns>player has (comparison) unit type
Posted by: Distrbd21 - Saturday, September 4, 2010 2:18:03 PM
so like this?
[code]*** IF ***
[???] Player 'player0' has Greater Than or Equal To 1 unit or structure of type 'AirF_AmericaStrategyCenter'
*** THEN ***
[???] Command button: 'SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 1 (1-12).
[???] Command button: 'Lazr_Command_ConstructAmericaPatriotBattery' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 7 (1-12).
[???] Command button: 'Infa_Command_ConstructChinaInternetCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 4 (1-12).
[???] Command button: 'GC_Chem_Command_ConstructGLAScudStorm' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 6 (1-12).
[???] Command button: 'Tank_Command_ConstructChinaNuclearMissileLauncher' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 8 (1-12).
[???] Command button: 'SupW_Command_ConstructAmericaSupplyCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 5 (1-12).
[???] Command button: 'SupW_Command_ConstructAmericaAirfield' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 13 (1-12).
[???] Command button: 'SupW_Command_ConstructAmericaWarFactory' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 11 (1-12).
'GC_Chem_GLAScudStorm' becomes Buildable (Ignore_Prerequisites)
'Tank_ChinaNuclearMissileLauncher' becomes Buildable (Ignore_Prerequisites)
'Infa_ChinaInternetCenter' becomes Buildable (Ignore_Prerequisites)
[/code]
if so the buildings don't work.
Posted by: Annihilationzh - Saturday, September 4, 2010 2:27:57 PM
Like this:
[code]*** IF ***
True
*** THEN ***
[???] Command button: 'SupW_Command_ConstructAmericaPowerPlant' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 1 (1-12).
[???] Command button: 'Lazr_Command_ConstructAmericaPatriotBattery' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 7 (1-12).
[???] Command button: 'Infa_Command_ConstructChinaInternetCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 4 (1-12).
[???] Command button: 'GC_Chem_Command_ConstructGLAScudStorm' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 6 (1-12).
[???] Command button: 'Tank_Command_ConstructChinaNuclearMissileLauncher' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 8 (1-12).
[???] Command button: 'SupW_Command_ConstructAmericaSupplyCenter' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 5 (1-12).
[???] Command button: 'SupW_Command_ConstructAmericaAirfield' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 13 (1-12).
[???] Command button: 'SupW_Command_ConstructAmericaWarFactory' is added to all objects of type 'AirF_AmericaVehicleDozer' in slot number 11 (1-12).[/code]
And another script:
[code]*** IF ***
[???] Player 'player0' has Greater Than or Equal To 1 unit or structure of type 'AirF_AmericaStrategyCenter'
*** THEN ***
'GC_Chem_GLAScudStorm' becomes Buildable (Ignore_Prerequisites)
'Tank_ChinaNuclearMissileLauncher' becomes Buildable (Ignore_Prerequisites)
'Infa_ChinaInternetCenter' becomes Buildable (Ignore_Prerequisites)[/code]
And another script:
[code]*** IF ***
[???] Player 'player0' has Greater Than or Equal To 1 unit or structure of type 'SupW_AmericaPowerPlant'
*** THEN ***
'AirF_AmericaSupplyCenter' becomes Buildable (Ignore_Prerequisites)
[/code]
Etc, etc.
Posted by: Distrbd21 - Saturday, September 4, 2010 5:03:19 PM
You are the best man, i never would of found all that by my self thanks dude, i'll be sure to add your name to the read me and the intro ;p
Edit so i got all the buildings units etc to work, now all i need to know is how, do i do the generals promotions.
Like replacing the Spy Drone with the mini gunner upgrade, and so on?
Also,how do i gray out the internet center after its built, same with jarmen?
just when there alive.
Posted by: Annihilationzh - Saturday, September 4, 2010 6:42:19 PM
[quote]Edit so i got all the buildings units etc to work, now all i need to know is how, do i do the generals promotions.
Like replacing the Spy Drone with the mini gunner upgrade, and so on?[/quote]
Impossible. I'd suggest just giving it to the player.
Player>science>grant a science
[code] [???] Player 'player0' is granted Science 'Infa_SCIENCE_RedGuardTraining'.[/code]
[quote]Also,how do i gray out the internet center after its built, same with black lotus,and jarmen?
just when there alive.[/quote]
They should already do that. It's impossible to add that ability, even with a map.ini, because it's bugged.
Posted by: Distrbd21 - Saturday, September 4, 2010 7:14:55 PM
Thanks Man, Your name is on the intro ^^
OK so I'm posting the maps here and gonna upload to the site if i can.
[url=http://jkgaming.dsgaming.us/Downloads/Defend%20or%20Die%201v7%20Version%201.rar]Defend or Die 1v7 Version 1[/url]
[url=http://jkgaming.dsgaming.us/Downloads/Defend%20or%20Die%202v6%20Version%201.rar]Defend or Die 2v6 Version 1[/url]
Map is based on Blitz Tactics, I did a few things to it, first the mountains, scripts with the help of Annihilationzh.
Post errors please.
Posted by: normapomero - Thursday, September 23, 2010 5:22:01 PM
Hello everyone, i'm just new in this site and i found out that this thread is great because of the informative post.. Thanks for the post.
-------------
[url=http://planyourbaby.dijisales.com/tips_on_how_to_conceive_a_baby_boy.aspx]tips on how to conceive a baby boy[/url]