Mutator: item quantities limitation in loadouts
Mutator Name: INF_LoadLim
Version 1.1 - 09.03.2005
This mutator allow server admins to limit the number of copies of a specific item a player can have at anytime. This is done in two ways:
- Check the player loadout for limited items and correct the quantities when limits exceeded.
- Check, at time of pickup, if the player has already too many copies of the item.
Why this mutator? I’d answer “why not?”.
The reasons behind this mutator are the recent episodes of server crashing using claymore and other abuses of the same type. Limiting the numbers of claymores to a reasonable number is highly recommended.
Installation and configuration:
Running the mutator as a server-side mutator should do the trick.
The INF_LoadLim.ini configuration file contains one variable and one array.
The array setting the limitations has the following format:
LC[*]=(ClassName="somePackage.someClass",LimNum="integer",LimPickNum="integer")
ClassName should contain the name of the class of the item you want to limit.
When a value is put in LimNum, it will limit the number of copies of the class item that can be held in the initial loadout (at spawn). If left blank, considered as zero (0).
When an integer value is put, for an item, in LimPickNum, this value will be used as the maximum number of items that can be picked up and held in the inventory. This is regardless of the value set in LimNum. If LimPickNum is left blank, pickup will not be limited for the item unless the variable bForceLimitPickup is set to true, in which case the value set in LimNum will be used to limit the number of pickup. Note that if a value is set the in LimPickNum, even if bForceLimitPickup is set to true, the value from LimPickNum will be used to limit pickup (priority over LimNum).
Leaving LimNum blank Will still be considered as zero and remove the item from the initial loadout. If you want to limit pickup without limiting the numbers of item in the initial loadout (would be weird but who knows what some might want to do), set LimNum to -1.
For example, the .ini included with the packages reads:
LC[0]=(ClassName="INF_Equip.INFe_Claymore",LimNum="4",LimPickNum="4")
LC[1]=(ClassName="INF_Core.INFc_HK69SmokeShell",LimNum="8",LimPickNum="")
LC[2]=(ClassName="INF_Core.INFc_HK69Shell",LimNum="8",LimPickNum="")
LC[3]=(ClassName="INF_Core.INFc_M67Ammo",LimNum="4",LimPickNum="")
LC[4]=(ClassName="INF_Core.INFc_M67Pickup",LimNum="4",LimPickNum="")
LC[5]=(ClassName="INF_Core.INFc_AttachM16A2_ACOG",LimNum="",LimPickNum="")
LC[6]=(ClassName="SOPMOD_M4.INF_AttachM4A1_RX",LimNum="",LimPickNum="")
LC[7]=(ClassName="INF_Core.INFc_M16Clip",LimNum="-1",LimPickNum="15")
...
In this example:
- The max number of Claymores in a loadout is 4 and a player cannot pick up more that 4.
- The max number of 40mm smoke grenades in a loadout is 8 and pickup is not limited, unless bForceLimitPickup is true, where the pickup will be limited to 8.
- Same for the 40mm HE grenades as for the 40mm smoke grenades
- Same for the M67 but with a limit of 4
- The ACOG attachement for the M16 will be totally removed form a loadout (but only for the M16A2... no other ACOG, on other weapons, will be affected)
- The Reflex Sight on the M4A1 will be removed from a loadout
- The number of M16 Mag (should affect all weapons that use this type of mag - FAMAS and cie.) will not be limited in the intial loadout, but will be limited to 15 pickup, regardless of bForceLimitPickup.
Note that all children of a given limited class will also be limited accordingly. So, for example, limiting something like INF_Core.INFc_Ammo should impose the limit to ALL ammo types. [UNTESTED]
Attachements and Destructible ammo fully supported since version 1.1.
Known Issues
- The player is not informed when his loadout is modified at spawn time, but he is informed when not allowed to pickup an item.
This is my first attempt working with loadout mutators, so if you find any major issues, please report them. I’ll fix them as soon as possible.
Acknowlegements
A very big Thank You to Beppo for his suggestions and thoughts. Turns out the pseudo code you sent me was pretty much what I had done
--------------------------------------------------
| INF_LoadLim_v1.1_09.03.2005.zip(version 1.1) (09.03.2005 13:07 EST) [CAN]
|
--------------------------------------------------
| INF_LoadLim_07.03.2005.zip(version 1.0) (07.03.2005 15:30 EST) [CAN]
| Readme: INF_LoadLim_Readme_07.03.2005.rtf
|
--------------------------------------------------
Mutator Name: INF_LoadLim
Version 1.1 - 09.03.2005
This mutator allow server admins to limit the number of copies of a specific item a player can have at anytime. This is done in two ways:
- Check the player loadout for limited items and correct the quantities when limits exceeded.
- Check, at time of pickup, if the player has already too many copies of the item.
Why this mutator? I’d answer “why not?”.
The reasons behind this mutator are the recent episodes of server crashing using claymore and other abuses of the same type. Limiting the numbers of claymores to a reasonable number is highly recommended.
Installation and configuration:
Running the mutator as a server-side mutator should do the trick.
The INF_LoadLim.ini configuration file contains one variable and one array.
The array setting the limitations has the following format:
LC[*]=(ClassName="somePackage.someClass",LimNum="integer",LimPickNum="integer")
ClassName should contain the name of the class of the item you want to limit.
When a value is put in LimNum, it will limit the number of copies of the class item that can be held in the initial loadout (at spawn). If left blank, considered as zero (0).
When an integer value is put, for an item, in LimPickNum, this value will be used as the maximum number of items that can be picked up and held in the inventory. This is regardless of the value set in LimNum. If LimPickNum is left blank, pickup will not be limited for the item unless the variable bForceLimitPickup is set to true, in which case the value set in LimNum will be used to limit the number of pickup. Note that if a value is set the in LimPickNum, even if bForceLimitPickup is set to true, the value from LimPickNum will be used to limit pickup (priority over LimNum).
Leaving LimNum blank Will still be considered as zero and remove the item from the initial loadout. If you want to limit pickup without limiting the numbers of item in the initial loadout (would be weird but who knows what some might want to do), set LimNum to -1.
For example, the .ini included with the packages reads:
LC[0]=(ClassName="INF_Equip.INFe_Claymore",LimNum="4",LimPickNum="4")
LC[1]=(ClassName="INF_Core.INFc_HK69SmokeShell",LimNum="8",LimPickNum="")
LC[2]=(ClassName="INF_Core.INFc_HK69Shell",LimNum="8",LimPickNum="")
LC[3]=(ClassName="INF_Core.INFc_M67Ammo",LimNum="4",LimPickNum="")
LC[4]=(ClassName="INF_Core.INFc_M67Pickup",LimNum="4",LimPickNum="")
LC[5]=(ClassName="INF_Core.INFc_AttachM16A2_ACOG",LimNum="",LimPickNum="")
LC[6]=(ClassName="SOPMOD_M4.INF_AttachM4A1_RX",LimNum="",LimPickNum="")
LC[7]=(ClassName="INF_Core.INFc_M16Clip",LimNum="-1",LimPickNum="15")
...
- The max number of Claymores in a loadout is 4 and a player cannot pick up more that 4.
- The max number of 40mm smoke grenades in a loadout is 8 and pickup is not limited, unless bForceLimitPickup is true, where the pickup will be limited to 8.
- Same for the 40mm HE grenades as for the 40mm smoke grenades
- Same for the M67 but with a limit of 4
- The ACOG attachement for the M16 will be totally removed form a loadout (but only for the M16A2... no other ACOG, on other weapons, will be affected)
- The Reflex Sight on the M4A1 will be removed from a loadout
- The number of M16 Mag (should affect all weapons that use this type of mag - FAMAS and cie.) will not be limited in the intial loadout, but will be limited to 15 pickup, regardless of bForceLimitPickup.
Note that all children of a given limited class will also be limited accordingly. So, for example, limiting something like INF_Core.INFc_Ammo should impose the limit to ALL ammo types. [UNTESTED]
Attachements and Destructible ammo fully supported since version 1.1.
Known Issues
- The player is not informed when his loadout is modified at spawn time, but he is informed when not allowed to pickup an item.
This is my first attempt working with loadout mutators, so if you find any major issues, please report them. I’ll fix them as soon as possible.
Acknowlegements
A very big Thank You to Beppo for his suggestions and thoughts. Turns out the pseudo code you sent me was pretty much what I had done
--------------------------------------------------
| INF_LoadLim_v1.1_09.03.2005.zip(version 1.1) (09.03.2005 13:07 EST) [CAN]
|
--------------------------------------------------
| INF_LoadLim_07.03.2005.zip(version 1.0) (07.03.2005 15:30 EST) [CAN]
| Readme: INF_LoadLim_Readme_07.03.2005.rtf
|
--------------------------------------------------
Last edited: