NorthstarLauncher
NorthstarLauncher copied to clipboard
Add "Mod Weapon Vars"
What?
Creates an alternative to weapon mods by allowing overrides of any numeric eWeaponVar through script.
Example
ScriptWeaponVars_SetInt(weapon, eWeaponVar.ammo_clip_size, 50)
Why?
- Weapon files need to be downloaded client side to work, and MAD isn't finished yet.
- Weapon mods have a 200 "modifications" limit. This has been raised to ~240 through admirable work of others, but will not be enough for larger-scale mods/mods that want to apply a variety of modifiers on a variety of weapons.
- Allows setting a variable to a range of values instead of being limited to 32 options (e.g. if you'd want to recreate the nemesis with the current weapon system, you wouldn't be able to because the amount of possible values for its burst delay is effectively infinite, however, this allows such things.)
WIP. Relies on
- #692
Required before merging
- [x] Manager for script weapon modifiers
- [x] System to reapply overrides when weapon vars are recalculated (e.g. after
AddMod
) (Script PR not existing yet)
Optional
~~- [ ] Auto-sync server changes to client through a remote function~~ ~~- [ ] Add "predicted" versions of functions, that do not transmit to client~~ Decided against autotransmitting changes for a few reasons:
- MAD
- would be a pain and overcomplicate things imo
[Screenshots/Examples TBD]
while im not able to "review" this because i dont know anything in c++ or such at all i just want to say that his would be an excelent addition, the mod limit is big but still something that can happen. and having the evars modifyable directly via script enables alot more then the current need of switching mods on stuff.
PR finally works with prediction - gonna try cleaning up code tomorrow.
Unfortunately, i cannot figure out proper naming for the hooked functions - im just going off of frequency of calls :[
Please help if you can.
Also, do we want to support strings/assets/vectors?
Also, do we want to support strings/assets/vectors?
If it's not that bad, yeah would be nice. Vectors probably the most useful
Uh, for some reason format check is failing now @EladNLG :c
Need to change hook, currently fucks up stuff (causes weird MGL-related crash, probably fucked up params?)