KernCore91 / -SC-Insurgency-Weapons-Project

Custom weapons pack for Sven Co-op.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request, save money between map / level changes.

Sweeper5 opened this issue · comments

If you could save the data for the current money for the players in the level change data.
So if you are playing Half Life campaign or any of these, on each level change you lose your money, but you can keep your weapons.
As such when playing the campaign, you are always reset to the base cash value you have set, if you haven't changed the default config it is 0.
Some maps are very short between the loadings and not optimized as the default Half Life campaign and this creates issues with accessing the nicer stuff before you get to an unmarked loading point.

Commenting out these two lines allows the Buy menu plugin to save money between map changes: https://github.com/KernCore91/-SC-Insurgency-Weapons-Project/blob/master/scripts/maps/ins2/BuyMenu.as#L63-L64

On map init all that data from previous map is lost due to balance. Not every mapper would've liked players starting out with powerful weapons killing everything in their sight.

Well my guess is this "hack" will also work on saving data between maps that are not loaded in sequence if I am wording myself correctly.
If you play the Sven Coop Half Life campaign, the maps go in sequence until you kill the end boss.
But if you swap to a different map via the server, my guess is the plugin will still retain the values from the previous campaign session running the sequenced maps?

Looking at the code it does seem to be doing that, but it would be a small workaround for longer campaigns like They Hunger, Half Life 1 and the like without having a pause and shopping spree at the end of the loading to spend the money that would be lost otherwise.

But if you swap to a different map via the server, my guess is the plugin will still retain the values from the previous campaign session running the sequenced maps?

That is correct, it'll allow the money to be kept between map changes, all of them.

Semi problematic and not the easiest to use, but that fix is better than not having it.
I suppose if you could have a feature to disable it for one load and put it in the configs for the maps, that way it would work for campaigns, but the default reset behavior would be retained.

Thank you in any case though.

Just saying but might wanna fix the link for the lines to comment out.
Since you made a change with the BuyMenu file, it shows the wrong position.
I think this is the fixed link: https://github.com/KernCore91/-SC-Insurgency-Weapons-Project/blob/master/scripts/maps/ins2/BuyMenu.as#L63-L64

Just saying but might wanna fix the link for the lines to comment out. Since you made a change with the BuyMenu file, it shows the wrong position. I think this is the fixed link: https://github.com/KernCore91/-SC-Insurgency-Weapons-Project/blob/master/scripts/maps/ins2/BuyMenu.as#L63-L64

Thanks for pointing that out, I unfortunately have been dealing with a person that stole weapon content from around the community (Ins2, CoF, WW2, AoMDC, AoM, Q1, Q2, Poke646 and others) and is re-packing them inside a old buy menu version that they claim was coded by a team of professionals, going as far as claiming it to be the first open-source buy menu when it belongs to @SamVanheer, when he first released it on the Sven Co-op Forums back in 2016.

It is also unfortunate for me to say that this person in particular is keeping me off releasing more content for the Ins2 Project, seeing as they will clearly steal code and assets in an attempt to get money/fame from his community. And they made it clear that they will not stop stealing content for his own personal project.