How to - new INF 2.9 Weapons, Ammo aso

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Beppo

Infiltration Lead-Programmer
Jul 29, 1999
2,290
5
38
52
Aachen, Germany
infiltration.sentrystudios.net
Thought that this would be of interest for some others here too...

MP_Duke said:
Is there something special you included in the code to make the additions of weapons "easier"? Can I make a weapon mutator that if activated displays the new weapon in the loadout menu?

Check out the INF_Mutators package. The INFc_Loadout mutator gives the right 'hooks' to jump in at the places needed and the UTWeapons mutator shows you how to use the needed objects then.

Cause your new weapon and ammo classes are unknown to the system you have to give some infos and have to define some item strings that should define your weapon and ammo within the loadout strings.
Check out INFc_LoadoutConfig and the already used ItemIDs to select a unique one for your weapon and ammo classes. Ammo is defined by a leading '*' and attachments by a leading '#'. If weapons work additive on pickup like frag grenades do (they are weapons that count as ammo if picked up and one already in your loadout) then they need a leading '+'.

Then you need so called LoadoutItemInfo classes that define the weapon and ammo a bit more. Check out Info->INFc_LoadoutItemInfo ... then the two examples for the UT8Ball called INFm_LoadoutItemInfo_UT8Ball and INFm_LoadoutItemInfo_Ammo_UT8Ball.

Finally check out the INFc_Weapon->UT8Ball class cause it includes some comments on how to setup the HUD icon and weapon mode descriptions.

To get the stuff displayed within the loadout menu you simply need a proper int file... check out INF_Mutators.int. At the end of this file you can find the LoadoutItem descriptions needed.
The mutator is needed to recognize the new items in-game. So you can setup the loadouts directly with the INT file present but you need the mutator to be active to let the new weapons be recognized as valid additions while playing.

This here is not like a perfect description but should give you a good start.

Beppo