MonsterHunt: Coding weapon/ammo exchange
Posted: Sat May 05, 2018 5:02 pm
What I want to do:
Some custom weapons integrated in maps (for example "MH-RuinsOfHarobed][+.Lminigun") should be changed before mapstart to tournament weapons in hope that NaliWeapons3 will change them to a NaliWeapon3 afterwards.
For this in the ini file of my monsterhunt mod I store the class name of the weapon to change and the class name of the destination weapon. Same for Ammo.
I have no clue where I should start at. I looked into Stuffswapper mutator code and Nali Weapons 3 code (class NWReplacer) but it seems much too complicated for me. Is there an easy way to do this?
What I have done before was using the NW3 Replacer mutator. This worked fine for me, it changed many weapons and ammo with custom classes. But then I noticed that my weapon priority list stored in User.ini constantly was messed up when using the NW3 Replacer for more weapons than could be stored in User.ini. User.ini stores 50 weapons but I need more weapon replacements, so I use the NW3 Replacer now only for Tournament and UnrealShare weapons. I think my additional wanted weapon changes should not effect the weapon priority list.
Perhaps some source code for this is flying around and can be adapted? Perhaps it is much easier as I think?
Some custom weapons integrated in maps (for example "MH-RuinsOfHarobed][+.Lminigun") should be changed before mapstart to tournament weapons in hope that NaliWeapons3 will change them to a NaliWeapon3 afterwards.
For this in the ini file of my monsterhunt mod I store the class name of the weapon to change and the class name of the destination weapon. Same for Ammo.
I have no clue where I should start at. I looked into Stuffswapper mutator code and Nali Weapons 3 code (class NWReplacer) but it seems much too complicated for me. Is there an easy way to do this?
What I have done before was using the NW3 Replacer mutator. This worked fine for me, it changed many weapons and ammo with custom classes. But then I noticed that my weapon priority list stored in User.ini constantly was messed up when using the NW3 Replacer for more weapons than could be stored in User.ini. User.ini stores 50 weapons but I need more weapon replacements, so I use the NW3 Replacer now only for Tournament and UnrealShare weapons. I think my additional wanted weapon changes should not effect the weapon priority list.
Perhaps some source code for this is flying around and can be adapted? Perhaps it is much easier as I think?