T
Thomas Fernandes
25.04.20 05:50 pm
Scripting and coding, question on Weapon ID (Far Cry)
Hi ! Do a mod with lots of weapons. Faced with the problem of the engine not want to register more than 49 types of weapons.At SCRIPTS\Default\Entities\Weapons are the WeaponSystem script.lua which is logged and attributed to the weapon ID for each species. Everything was fine until I got to ID=50.
When you try to zaregat any weapon at number 50 and above the engine immediately refuses to take it in.
The level is not loaded if it has a weapon with that ID, and if you successfully load a saved game while getting in the hands of the weapon with ID=50 will crashes while saving the game. With the numbers from 1 to 49 everything works great.
Does anyone know why ? Or maybe someone meets fashion in which more than 30 types of additional weapons and it works without crashes ?
Here is the script WeaponSystem.lua
the assignment idID for weapons I understand the need for optimization when loading and saving of games, because 2-digit number occupies less space in memory than a long address to the script.
how to check and see the problem on practicemore themselves independently on their version of the game yet to experience. Go to SCRIPTS\Default\Entities\Weapons, open WeaponSystem.lua and Falcon strocke to put instead of 10 such as 50, 90, 450, any number and try to download the game, if by some miracle it booted, try to save the game immediately, the game will crash when you try to press a key and it shuts down
1 Comments