pasik wrote:
you're not the first one to bring it up.
Yeah, I noticed this while trying to find an answer that was a little more clear than just adding them to the player's chosen faction armory. Mostly all I could find was guides/tips on making one of the normal weapons a super weapon that cost nothing or setting a value inside the weapon file that didn't exist (maybe an outdated flag that has since been removed?).
For online play, it actually makes sense to have it decay and I agree with that method. They only way that I can think of forcing a faction to capture an opponent's faction weapon in order to unlock it (instead of selling five and immediately buying five to put in your stash) would be to create a flag for dropped weapons that would declare what faction dropped the weapon. However, that would create a bit of a nightmare in weapon stacking with having to have two stacks of each faction reserved weapon (one from the owning faction, one from non-owners). Not sure what else would be viable in that situation.
One more question: Does editing the unlock decay statement apply to rare weapons obtained through cargo trucks, briefcases and laptops as well or are those coded elsewhere?
Edit 01:It seems that none of the changes I make to the unlock_manager.as file are having a desired effect on the unlocked weapons inside the armory.
Code:
UnlockManager(Metagame@ metagame, UnlockRemoveListener@ listener, float unlockStartTime = -1.0) {
@m_metagame = @metagame;
@m_listener = @listener;
m_unlockStartTime = 4.0 * 60.0 * 60.0;
if (unlockStartTime > 14400) {
m_unlockStartTime = unlockStartTime;
}
}
As far as I can tell this should disable the decay timer, since the check will always try to see if the unlockStartTime is greater than 14400, which it never will be since it starts there. Another thing I tried was setting float unlockStartTime = -0.0 on line 55. I've also tried +1.0 on the same location. I was sure that any of these edits would stop the decay of unlockStartTime so that the weapons I unlock in the armory never expire but obviously I'm missing something...
Edit 02:Oh, I see what I was missing before. I misunderstood the last comment regarding lines 60-62 being an override timer activation check. I thought that was a decay timer.
Well, that means that I have looked through the file for any obvious signs of a decay timer for unlocked equipment to no avail. Editing the initial timer to greater than what it is seems the only thing I am able to understand at this time. I was going to try to set up an if statement to reset m_unlockStartTime back to 14400 once it hit 60, but I'm fairly certain (if I'm understanding correctly now) that wouldn't do anything since m_unlockStartTime is not the timer that decays. It's only the reference number that a variable elsewhere uses to set it's own timer, which I am unable to locate. My coding knowledge is pretty basic and I'm rocking the flu, so I really can't follow the coding in front of me to save my life....
