I am writing this assuming you have moderate experience with INI code.
Objects and ModulesThere are three things you can do with Modules.
Add:
Code: AddModule ModuleTag_XX
Behavior = YYY ModuleTag_XX
[parameters]
End
[You can put other modules here]
End
Remove:
Code: RemoveModule ModuleTag_XX
The easy one. It simply removes a module, so nothing else needs to be stated in the code.
There is also a replace module that should never be used:
Code: ReplaceModule ModuleTag_XX_Override
Behavior = YYY ModuleTag_XX
[parameters]
End
End
This module causes crashes with some modules. Just use Remove and Add if you want to replace a module.
Other code, such as ArmorSet, WeaponSet, and geometry do not need any extra code. They can be copied directly from normal INI code. There is an exception with locomotors, which require the AIUpdate to be replaced before the locomotor is specified. The same is true in reverse, if you replace an AIUpdate, you need to include the locomotor. Remember, locomotors always go AFTER the AIUpdate.
OCLs, CommandButtons, and moreMost other code (code not in the Object folder of the INI files), from OCLs to CommandButtons and CommandSets can be used the same way they would be in the INI files. For example:
Code:ObjectCreationList SUPERWEAPON_AnthraxBombGamma
DeliverPayload
Transport = GLAJetCargoPlane
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-10
Payload = AnthraxBombGamma
DeliveryDistance = 140
DeliveryDecalRadius = 200
DeliveryDecal
Texture = SCCAnthraxBomb_GLA
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:33 G:255 B:67 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
DeliverPayload
Transport = AmericaJetB3
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-10
Payload = MOAB
DeliveryDistance = 160
PreOpenDistance = 160
DeliveryDecalRadius = 170
DeliveryDecal
Texture = SCCFuelAirBomb_USA
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
DeliverPayload
Transport = ChinaJetCargoPlane
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 4
DropOffset = X:0 Y:0 Z:-2
DropVariance = X:20 Y:20 Z:0
Payload = EMPPulseBomb 1
DeliveryDistance = 150
DeliveryDecalRadius = 200
DeliveryDecal
Texture = SCCEMPPulse_China
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:40 G:110 B:210 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
This will replace the anthrax bomb with three planes, one drops the anthrax bomb, another drops a MOAB, and the final one drops an EMP bomb.
Examples and applicable topicsFor a great example of map.ini code to learn from, I suggest Beng's Bushehr: Operation Partisans' Challenge, which you can download here:
http://www.cnclabs.com/d...oads/details.aspx?id=274Here's an in-depth explanation thread with examples:
http://www.cnclabs.com/f...help-with-a-map-ini.aspxGlitchesMap.inis are prone to glitches. Some bugs include:
Unit costs and build times cannot be altered. They will display a new price in game, but not change anything.
Unit limits also have a glitch. They will allow you to queue as many as you want to until you have actually reached the limit on the map. For example, if you add a limit of 1 to rangers, you will be able to queue 9 rangers per barracks until the first one is finished.
Questions and closing statementsPlease do not ask for help in this topic. Please start your own topic in the Mapping or modding forum sections.
I hope to update this as I remember other things you can do with a Map.ini. Please, if you're reading this and know of anything I've missed out, do not be reluctant to comment.
Edited by user Tuesday, November 29, 2016 6:02:21 PM(UTC)
| Reason: New code tags. STICKED