Left 4 Dead 2

Left 4 Dead 2

Gun Collectors (Collect All Guns)
WuChan 14 Jan, 2024 @ 7:20am
about gun collectors
I found the mod I want. those it has bugs but it's usable.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1960629647&searchtext=double+primary

this mod works like:
_create another empty primary slot. so player have two empty primary slot
_when player take one primary, just use e + right click to switch to other empty slot and grab the 2nd one.
bugs in this mod:
_sometimes cannot switch.
_it reset other virtual inventory when change to next map.

can you use its code, fix bugs and add some of your options to make your own mod similar to this ?

///

2nd thing is your mod create another good bug: spawn Turret mod (nearly) infinity. though it's good but I think you may check later if you have free time. the mod I mentioned upper doesn't have this good bug).
Last edited by WuChan; 14 Jan, 2024 @ 4:23pm
< >
Showing 1-15 of 34 comments
kurochama  [developer] 14 Jan, 2024 @ 1:25pm 
Originally posted by WuChan:
I found the mod I want. those it has bugs but it's usable.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1960629647&searchtext=double+primary

this mod works like:
_create another empty primary slot. so player have two empty primary slot
_when player take one primary, just use tab E to switch to other empty slot and grab the 2nd one.
bugs in this mod:
_sometimes cannot switch.
_it reset other virtual inventory when change to next map.

can you use its code, fix bugs and add some of your options to make your own mod similar to this ?

///

2nd thing is your mod create another good bug: spawn Turret mod (nearly) infinity. though it's good but I think you may check later if you have free time. the mod I mentioned upper doesn't have this good bug).
I'll try to check the scripts. Btw the idea was coincidentally similar to the idea I gave you on the discussion thread about mod. So other person has actually implemented it in his own ways. Well, I hope that I'll be able to find where the bugs are on that mod.

& about a bug about infinite m60 turret, well, that's probably because once a gun is registered, the value will remain as 1, in which you can always pick that gun by E + shoving. I can make a special script for m60 on this Gun Collectors mod to make it so that once you deploy it as a m60 turret, the value in the virtual inventory will become 0. But actually it's also not a bad idea to have infinite m60 turret though :steamhappy:
WuChan 14 Jan, 2024 @ 4:27pm 
Originally posted by kurochama:
Originally posted by WuChan:
I found the mod I want. those it has bugs but it's usable.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1960629647&searchtext=double+primary

this mod works like:
_create another empty primary slot. so player have two empty primary slot
_when player take one primary, just use tab E to switch to other empty slot and grab the 2nd one.
bugs in this mod:
_sometimes cannot switch.
_it reset other virtual inventory when change to next map.

can you use its code, fix bugs and add some of your options to make your own mod similar to this ?

///

2nd thing is your mod create another good bug: spawn Turret mod (nearly) infinity. though it's good but I think you may check later if you have free time. the mod I mentioned upper doesn't have this good bug).
I'll try to check the scripts. Btw the idea was coincidentally similar to the idea I gave you on the discussion thread about mod. So other person has actually implemented it in his own ways. Well, I hope that I'll be able to find where the bugs are on that mod.

& about a bug about infinite m60 turret, well, that's probably because once a gun is registered, the value will remain as 1, in which you can always pick that gun by E + shoving. I can make a special script for m60 on this Gun Collectors mod to make it so that once you deploy it as a m60 turret, the value in the virtual inventory will become 0. But actually it's also not a bad idea to have infinite m60 turret though :steamhappy:
1/ hope I can use your better double primary mod in the future.
2/ yeah it's not even a bad bug. but it's up to you to fix it or leave it be.
kurochama  [developer] 14 Jan, 2024 @ 4:48pm 
Originally posted by WuChan:
Originally posted by kurochama:
I'll try to check the scripts. Btw the idea was coincidentally similar to the idea I gave you on the discussion thread about mod. So other person has actually implemented it in his own ways. Well, I hope that I'll be able to find where the bugs are on that mod.

& about a bug about infinite m60 turret, well, that's probably because once a gun is registered, the value will remain as 1, in which you can always pick that gun by E + shoving. I can make a special script for m60 on this Gun Collectors mod to make it so that once you deploy it as a m60 turret, the value in the virtual inventory will become 0. But actually it's also not a bad idea to have infinite m60 turret though :steamhappy:
1/ hope I can use your better double primary mod in the future.
2/ yeah it's not even a bad bug. but it's up to you to fix it or leave it be.
1. It's probably rather difficult to find the bugs & fix them, as when I checked the scripts, they're more complicated than I thought (even more complicated than Gun Collectors scripts, I think). But I can remake the features of that mod if you want, by using some combo buttons like "Use + Shove" on primary gun to switch to 2nd primary gun, & "Use + Shove" on secondary weapon to pick the 1st primary gun. The scripts should be simpler than Gun Collectors if I'm not mistaken, as only the picked guns are needed to be registered in virtual inventory, not all guns like Gun Collectors.

2. When I checked the m60 turret scripts again, it looks like it might cause a new bug if I don't make a new feature to turn on/ off. The m60 turret simply uses the shoving button to install the turret. If I put a script to reset m60 in virtual inventory with only Shove button, people who don't use the turret mod & simply want to shove a zombie with m60 will lose their m60 in the inventory. The alternative solution is making a new feature like "M60 Turret Special Case" that can be used when m60 becomes a turret when using a mod.
Last edited by kurochama; 14 Jan, 2024 @ 4:50pm
WuChan 14 Jan, 2024 @ 6:04pm 
Originally posted by kurochama:
Originally posted by WuChan:
1/ hope I can use your better double primary mod in the future.
2/ yeah it's not even a bad bug. but it's up to you to fix it or leave it be.
1. It's probably rather difficult to find the bugs & fix them, as when I checked the scripts, they're more complicated than I thought (even more complicated than Gun Collectors scripts, I think). But I can remake the features of that mod if you want, by using some combo buttons like "Use + Shove" on primary gun to switch to 2nd primary gun, & "Use + Shove" on secondary weapon to pick the 1st primary gun. The scripts should be simpler than Gun Collectors if I'm not mistaken, as only the picked guns are needed to be registered in virtual inventory, not all guns like Gun Collectors.

2. When I checked the m60 turret scripts again, it looks like it might cause a new bug if I don't make a new feature to turn on/ off. The m60 turret simply uses the shoving button to install the turret. If I put a script to reset m60 in virtual inventory with only Shove button, people who don't use the turret mod & simply want to shove a zombie with m60 will lose their m60 in the inventory. The alternative solution is making a new feature like "M60 Turret Special Case" that can be used when m60 becomes a turret when using a mod.
1/ and 2/ better leave it be. your guns collector is already good enough. I'll try to find a way to fix that double primary mod.
WuChan 14 Jan, 2024 @ 6:14pm 
Originally posted by kurochama:
Originally posted by WuChan:
1/ hope I can use your better double primary mod in the future.
2/ yeah it's not even a bad bug. but it's up to you to fix it or leave it be.
1. It's probably rather difficult to find the bugs & fix them, as when I checked the scripts, they're more complicated than I thought (even more complicated than Gun Collectors scripts, I think). But I can remake the features of that mod if you want, by using some combo buttons like "Use + Shove" on primary gun to switch to 2nd primary gun, & "Use + Shove" on secondary weapon to pick the 1st primary gun. The scripts should be simpler than Gun Collectors if I'm not mistaken, as only the picked guns are needed to be registered in virtual inventory, not all guns like Gun Collectors.

2. When I checked the m60 turret scripts again, it looks like it might cause a new bug if I don't make a new feature to turn on/ off. The m60 turret simply uses the shoving button to install the turret. If I put a script to reset m60 in virtual inventory with only Shove button, people who don't use the turret mod & simply want to shove a zombie with m60 will lose their m60 in the inventory. The alternative solution is making a new feature like "M60 Turret Special Case" that can be used when m60 becomes a turret when using a mod.
so although it's has fewer code than your guns collector code, that double primary mod code is complicated than yours ?
kurochama  [developer] 14 Jan, 2024 @ 6:27pm 
Originally posted by WuChan:
Originally posted by kurochama:
1. It's probably rather difficult to find the bugs & fix them, as when I checked the scripts, they're more complicated than I thought (even more complicated than Gun Collectors scripts, I think). But I can remake the features of that mod if you want, by using some combo buttons like "Use + Shove" on primary gun to switch to 2nd primary gun, & "Use + Shove" on secondary weapon to pick the 1st primary gun. The scripts should be simpler than Gun Collectors if I'm not mistaken, as only the picked guns are needed to be registered in virtual inventory, not all guns like Gun Collectors.

2. When I checked the m60 turret scripts again, it looks like it might cause a new bug if I don't make a new feature to turn on/ off. The m60 turret simply uses the shoving button to install the turret. If I put a script to reset m60 in virtual inventory with only Shove button, people who don't use the turret mod & simply want to shove a zombie with m60 will lose their m60 in the inventory. The alternative solution is making a new feature like "M60 Turret Special Case" that can be used when m60 becomes a turret when using a mod.
so although it's has fewer code than your guns collector code, that double primary mod code is complicated than yours ?
More complicated in terms of studying/ investigating the scripts. Scripts on my Gun Collectors consist of simple scripts that are easier to understand how each script works simply by reading them, while scripts on double primary mod require more concentration to see how one script connects to other scripts, how the weapon cycle works on survivors, etc. It would take time to study the scripts of double primary mod, while it takes less time to remake it if I want to, because the main concepts are actually similar, like transferring the status of ammo, ammo clip, weapon upgrade etc. & I actually have already grasped the concepts of how it would work if I were to remake it.
WuChan 14 Jan, 2024 @ 6:37pm 
Originally posted by kurochama:
Originally posted by WuChan:
so although it's has fewer code than your guns collector code, that double primary mod code is complicated than yours ?
More complicated in terms of studying/ investigating the scripts. Scripts on my Gun Collectors consist of simple scripts that are easier to understand how each script works simply by reading them, while scripts on double primary mod require more concentration to see how one script connects to other scripts, how the weapon cycle works on survivors, etc. It would take time to study the scripts of double primary mod, while it takes less time to remake it if I want to, because the main concepts are actually similar, like transferring the status of ammo, ammo clip, weapon upgrade etc. & I actually have already grasped the concepts of how it would work if I were to remake it.
I see. better leave it be.

so I change simple number in that double primary mod. one result is good enough: less delay when switching inventory. the only problem is virtual inventory reset when change to next map.
Last edited by WuChan; 14 Jan, 2024 @ 6:39pm
kurochama  [developer] 14 Jan, 2024 @ 6:44pm 
Originally posted by WuChan:
Originally posted by kurochama:
More complicated in terms of studying/ investigating the scripts. Scripts on my Gun Collectors consist of simple scripts that are easier to understand how each script works simply by reading them, while scripts on double primary mod require more concentration to see how one script connects to other scripts, how the weapon cycle works on survivors, etc. It would take time to study the scripts of double primary mod, while it takes less time to remake it if I want to, because the main concepts are actually similar, like transferring the status of ammo, ammo clip, weapon upgrade etc. & I actually have already grasped the concepts of how it would work if I were to remake it.
I see. better leave it be.

so I change simple number in that double primary mod. one result is good enough: less delay on switching inventory. the only problem is other inventory reset when change to next map.
Probably that double primary mod needs more triggers to save the settings of virtual inventory. For example, there are some event functions like "player_entered_checkpoint", "player_left_checkpoint", "player_use" (put the saferoom door as the trigger like when you press E on the door to open & close), that you can add if you know which scripts modify the virtual inventory on double primary mod. Put the scripts of the virtual inventory there to save the status of the guns. Then use another event function "round_start_post_nav" to load the saved setting on the next map.
WuChan 14 Jan, 2024 @ 6:54pm 
Originally posted by kurochama:
Originally posted by WuChan:
I see. better leave it be.

so I change simple number in that double primary mod. one result is good enough: less delay on switching inventory. the only problem is other inventory reset when change to next map.
Probably that double primary mod needs more triggers to save the settings of virtual inventory. For example, there are some event functions like "player_entered_checkpoint", "player_left_checkpoint", "player_use" (put the saferoom door as the trigger like when you press E on the door to open & close), that you can add if you know which scripts modify the virtual inventory on double primary mod. Put the scripts of the virtual inventory there to save the status of the guns. Then use another event function "round_start_post_nav" to load the saved setting on the next map.
I know your point here. Sadly that I'm just a chicken in this coding because I don't have knowledge about it for now. if you have time. please integrate your code to double primary mod and test it to see if it works or not. (I changed the RefireTime in line 19 to 0.11 so that it has less delay when switching gun btw)
Last edited by WuChan; 14 Jan, 2024 @ 6:54pm
kurochama  [developer] 14 Jan, 2024 @ 7:14pm 
Originally posted by WuChan:
Originally posted by kurochama:
Probably that double primary mod needs more triggers to save the settings of virtual inventory. For example, there are some event functions like "player_entered_checkpoint", "player_left_checkpoint", "player_use" (put the saferoom door as the trigger like when you press E on the door to open & close), that you can add if you know which scripts modify the virtual inventory on double primary mod. Put the scripts of the virtual inventory there to save the status of the guns. Then use another event function "round_start_post_nav" to load the saved setting on the next map.
I know your point here. Sadly that I'm just a chicken in this coding because I don't have knowledge about it for now. if you have time. please integrate your code to double primary mod and test it to see if it works or not. (I changed the RefireTime in line 19 to 0.11 so that it has less delay when switching gun btw)
I'll try to check the scripts again, but mainly to find the scripts for virtual inventory. If I can find them, then probably I'll try to test by adding those event functions I mentioned before to save the settings of virtual inventory to load them to the next map.
WuChan 14 Jan, 2024 @ 7:49pm 
Originally posted by kurochama:
Originally posted by WuChan:
I know your point here. Sadly that I'm just a chicken in this coding because I don't have knowledge about it for now. if you have time. please integrate your code to double primary mod and test it to see if it works or not. (I changed the RefireTime in line 19 to 0.11 so that it has less delay when switching gun btw)
I'll try to check the scripts again, but mainly to find the scripts for virtual inventory. If I can find them, then probably I'll try to test by adding those event functions I mentioned before to save the settings of virtual inventory to load them to the next map.
take your time then. this mod is really great for me. If only I can help you.
kurochama  [developer] 14 Jan, 2024 @ 8:33pm 
Originally posted by WuChan:
Originally posted by kurochama:
I'll try to check the scripts again, but mainly to find the scripts for virtual inventory. If I can find them, then probably I'll try to test by adding those event functions I mentioned before to save the settings of virtual inventory to load them to the next map.
take your time then. this mod is really great for me. If only I can help you.
Btw did you find any virtual inventory files in "ems" folder for double primary mod? Somehow I didn't find it even after using it during testing. If that mod really doesn't have virtual inventory cfg file, then that's the main cause of the weapon reset on the next map. One of L4D2 mechanisms is, all scripts are reset on the next map. One of the ways to save the settings is by using virtual inventory cfg file. You can try to suggest this to the author. & probably I might find out how to fix it.
WuChan 14 Jan, 2024 @ 9:00pm 
Originally posted by kurochama:
Originally posted by WuChan:
take your time then. this mod is really great for me. If only I can help you.
Btw did you find any virtual inventory files in "ems" folder for double primary mod? Somehow I didn't find it even after using it during testing. If that mod really doesn't have virtual inventory cfg file, then that's the main cause of the weapon reset on the next map. One of L4D2 mechanisms is, all scripts are reset on the next map. One of the ways to save the settings is by using virtual inventory cfg file. You can try to suggest this to the author. & probably I might find out how to fix it.
So that's why the virtual inventory is reset when change to next map.

I checked in ems. double primary mod doesn't have cfg file as virtual inventory slot. it create directly "an array of primary slot" as another main slot.

the author may take time to reply my comment. probably just waiting for good news. or won't. because the author made it for fun. may be no feature update.
Last edited by WuChan; 14 Jan, 2024 @ 9:08pm
kurochama  [developer] 14 Jan, 2024 @ 10:57pm 
Originally posted by WuChan:
Originally posted by kurochama:
Btw did you find any virtual inventory files in "ems" folder for double primary mod? Somehow I didn't find it even after using it during testing. If that mod really doesn't have virtual inventory cfg file, then that's the main cause of the weapon reset on the next map. One of L4D2 mechanisms is, all scripts are reset on the next map. One of the ways to save the settings is by using virtual inventory cfg file. You can try to suggest this to the author. & probably I might find out how to fix it.
So that's why the virtual inventory is reset when change to next map.

I checked in ems. double primary mod doesn't have cfg file as virtual inventory slot. it create directly "an array of primary slot" as another main slot.

the author may take time to reply my comment. probably just waiting for good news. or won't. because the author made it for fun. may be no feature update.
After checking several times, it looks like the author used something like "array" on the weapon data like stored weapons, reserve ammo, ammo clip etc. When I tried to add some scripts to load them in normal way like how I usually used, it failed to work. So probably, for now it's only the author who can create virtual inventory cfg file without fail, as I still can't figure out how to decrypt the array into numbers or strings/ texts. You can try to contact the author on the profile (though last time a message posted there was in December 2023).
WuChan 14 Jan, 2024 @ 11:57pm 
Originally posted by kurochama:
Originally posted by WuChan:
So that's why the virtual inventory is reset when change to next map.

I checked in ems. double primary mod doesn't have cfg file as virtual inventory slot. it create directly "an array of primary slot" as another main slot.

the author may take time to reply my comment. probably just waiting for good news. or won't. because the author made it for fun. may be no feature update.
After checking several times, it looks like the author used something like "array" on the weapon data like stored weapons, reserve ammo, ammo clip etc. When I tried to add some scripts to load them in normal way like how I usually used, it failed to work. So probably, for now it's only the author who can create virtual inventory cfg file without fail, as I still can't figure out how to decrypt the array into numbers or strings/ texts. You can try to contact the author on the profile (though last time a message posted there was in December 2023).
I will try. thank you for your hard work.
< >
Showing 1-15 of 34 comments
Per page: 1530 50