Serious Sam Fusion 2017 (beta)

Serious Sam Fusion 2017 (beta)

43 ratings
Guide to Custom Weapons Management (CWM) mod
By NSKuber
This guide describes how the mod works and can help you solve your problems with it.
   
Award
Favorite
Favorited
Unfavorite
Intro
In Fusion, modders are given the ability to create completely new weapons without replacing existing ones.

However, if you want to actually use a custom weapon, you need to have a map which contains this weapon and ammo for it, because already existing maps have predefined items placed on them.
Custom Weapons Management mod helps to solve that problem and allows you to use custom weapons (or just weapons from another game) on any level, without modifying the level itself!
How does it work?
TL;DR: with this mod you can attach weapons and replace weapons. Both of these add to the total weapon count on level. You should do configuration before level starts.

Using the mod you can attach weapons and replace weapons.

Attaching one weapon to another means that you will be receiving first weapon whenever you have or pick up second one, and you will be receiving ammo for first weapon whenever you pick up ammo for second one.

Replacing one weapon with another means that whenever you have first weapon in your inventory, it will be replaced with second, also all weapon items and all or part of (depends on other weapons in the level) ammo items associated with first weapon will be replaced with corresponding items of second weapon.

You should configure all attachments and replacements before level started (loading game doesn't count, level should start from beginning in order for scripts to load new config!). You can configure mod mid-level, but all changes will take effect only on the next level.

If some weapon has both BFE and HD versions (default BFE and HD weapons are different weapons and not versions of each other!), then corresponding version will be loaded for corresponding game. Here is a resource pack with BFE/HD weapons adapted to other game that works wih CWM mod!

Mod works in multiplayer too! For it to work, host should make configurations on his side. Clients don't even need to have this mod, but they need to have any custom weapon that host has added, otherwise they're gonna crash.

Unfortunately, this mod can break some secrets' functionality.

Note: if you replace weapon A with weapon B, items of weapon A that are replaced with items of weapon B are not actually deleted, but are hidden, and first player to pick item of weapon B will also pick item of weapon A that was replaced by it. This is done because some items are required to trigger secrets/spawns and simply deleting them can break the level.
That's why you can feel "double-picking" when using CWM to replace weapons.
Multiplayer Management
In February 2018, a new submenu was added to the CWM, called "Multiplayer Management".

This allows for easy obtaining and removing weapons in multiplayer (it works in Singleplayer as well though)!
It requires for both host and clients to have CWM and Weapon Database, as well as "Network Script Resources" mod.

It works as follows.
Host toggles "Multiplayer Management" between "Off", "List Only", "Any".

When it's "Off", no one can receive weapons.

When "Any" is used, anyone on the server can request (and receive, if both he and host have it installed) any weapon from the weapon database.

When "List Only" is used, anyone on the server can request (and receive, if both he and host have it installed) any weapon from the Weapon List, preconfigured by the host.

While on level, host (and only host) can make changes to the "allowed weapons" list freely, and toggle mod functionality, level restart is not needed.

Also at any point on the level, anyone on the server can request "allowed weapons" list synchronization. This shouldn't be neccessary, as it's done automatically, but in case there are problems, it is there.

Also anyone can use "Remove weapon" menu, to remove any weapon from his inventory.
Left mouse button click in that menu removes weapon, but keeps ammo, right mouse button click removes weapon and all ammo for it. Keep in mind that removing weapon/ammo using this mod won't decrease registered weapons/ammo count (which is limited, see section below).
Stats Management
In February 2018, a new submenu was added to the CWM, called "Weapon Stats Management".
It requires "Network script resources" to use.

This allows the host to modify firing speed (more precisely, recoil duration) and damage multiplier of any weapon (or all of them at once) right on the level!
FIRING SPEED AND DAMAGE ARE THE ONLY THINGS THAT ARE CHANGEABLE DYNAMICALLY USING SCRIPTS. IT IS NOT POSSIBLE TO CHANGE ANY OTHER WEAPON STATS (like reload time, clip size, shotgun spread, max ammo, etc) WITHOUT MODIFYING WEAPON PARAMETERS FILE.

Host can change speed multiplier and damage multiplier for any weapon in "Adjust weapon stats" menu, or change global speed/damage multiplier (which will apply to all weapons) in "Adjust global stats".
Note that if a weapon has individual changes to multipliers, these changes won't stack with global multipliers, but will rather overwrite global multipliers

Some weapons are either hardcoded in some way or have unusual firing mechanisms, which makes it impossible to change either their firing speed or damage multiplier, or both. These are marked with "HARDCODED" in weapon list.

Mod works in multiplayer, but clients should have CWM and "Network script resources" too!
IMPORTANT NOTE
Replacing weapon A with weapon B simply removes weapon A from your inventory, but it cannot remove the fact that you were having weapon A at some point. So both attaching and replacing add to your total weapon count! And it can cause problems.

Fusion has a limit on how many weapons player can own per level, and how many ammo types you own. Currently this limit is set to 64 weapons and 32 ammo types, and when it is reached, you won't be able to pick up any more weapons. Therefore, you need to be careful when replacing/attaching too many weapons, otherwise you may come to a point where you won't be able to pick a weapon and you will have to restart level in order to fix it!

Here is how many weapons you can normally get in a campaign:
TFE has 11 weapons, TSE has 15 weapons, BFE has 13 weapons.
How to configure it?
First, make sure that you're subscribed to CWM mod, to Weapon Resources Database, both of these are enabled and you're running moddable version of the game.

Then you have two ways of configuring - using CWM Menu (new and convenient) or console (old and boring).

To use CWM menu, go into Settings->Keyboard and Mouse->Configure keys and bind "Open/Close CWM Menu" key to something.


(for modders: custom player commands don't work in SED, so in editor menu is opened by pressing "Toggle Player List Lock" key, M by default)

After you did this, start any level and, while being in first-person mode, press binded key to invoke menu.
Note that clicking on weapon while in "Weapon List" submenu gives you selected weapon and full ammo for it. Works only in singleplayer.

It is recommended to use specially created Setup levels, which can be started in 3 ways:
1) Normally through main menu in Campaigns->CWM Setup Levels;
2) By using buttons in CWM Menu while already on level (works only if you are in singleplayer);
3) By using console command:
globals.CWMSetupLevel("GAMENAME")
where GAMENAME is either TFE, TSE or BFE.
These Setup levels have all weapons from corresponding game and some enemies to test weapons on, and load fairly quickly.

If you're looking for console style configuration, at any place in the game, open console (~ on keyboard), and enter one of the following:
__________________________________________________________

globals.CWMHelp()

This command will show short help message which should be enough to remind you of all other functions available.
__________________________________________________________

globals.CWMList()

This command will show you the list of all available (for you) weapons. 'Short name' is the name you should use when setting up your configuration.
__________________________________________________________

globals.CWMConfig()

This command will show all attachments/replacements you have set up.


__________________________________________________________

globals.ReplaceWeapon(X,Y)

This command will replace weapon X in game with weapon Y, where X and Y are short names of weapons (with quotation marks), or parts of short names. You can find short names in globals.CWMList(). Casing doesn't matter.
Examples:
globals.ReplaceWeapon("knife","chainsaw")
- will replace knife with chainsaw;
globals.ReplaceWeapon("Rocket","Grenade")
- will replace Rocket Launcher with Grenade Launcher;
There are some restrictions on replacing, script will notify you if you try to do something forbidden.


__________________________________________________________

globals.AttachWeapon(X,Y)

This command will attach weapon Y in game to weapon X, where X and Y are short names of weapons (with quotation marks), or parts of short names. You can find short names in globals.CWMList(). Casing doesn't matter.
Examples:
globals.AttachWeapon("knife","chainsaw")
- you will have chainsaw whenever you have knife;
globals.AttachWeapon("Laser","Sniper")
- you will receive sniper weapon/ammo whenever you pick laser weapon/ammo;
There are some restrictions on attaching, script will notify you if you try to do something forbidden.


__________________________________________________________

globals.CWMClear(X)

This command will clear all attachments/replacements that involve weapon X in them. Casing doesn't matter.


__________________________________________________________

globals.CWMClearAll()

This command will clear all attachments/replacements you have set up.


__________________________________________________________

globals.CWMSaveConfig(NAME)

This command will save your current CWM configuration under name NAME. Example: globals.CWMSaveConfig("myfavouritesetup"). Casing doesn't matter, it will be lowercased when saved.


__________________________________________________________

globals.CWMConfigs()

This command will show all available configurations.


__________________________________________________________

globals.CWMLoadConfig(NAME)

This command will load prevously saved configuration with name NAME. Casing doesn't matter.
Example: globals.CWMLoadConfig("myfavouritesetup")

There are some predefined configs, which you cannot save over. Please read IMPORTANT NOTE before using them!
"hdtobfe"
- replaces some HD weapons with BFE weapons. Adds up to 12 weapons from BFE. Weapon limit won't be reached when playing TFE, but in TSE it is recommended to remove several replacements to make sure that not more than 9 weapons are added.
"bfetohd"
- replaces some BFE weapons with HD weapons. Adds 11 weapons from HD, therefore this config is safe to play in BFE campaign. Doesn't replace Hands/Sledgehammer, as these weapons can be needed for progression.


__________________________________________________________

globals.CWMDeleteConfig(NAME)

This command will delete configuration with name NAME.


__________________________________________________________

These are all commands there are at the moment!
Examples
"This is good and all, but I just downloaded a cool new PIKD-3000 weapon and want to have it all the time! How do I do it easily?" - you may ask.
Simple example: start with

globals.CWMList()



quite a big list (not all weapons fit), and you can see from it that the short name of PIKD-3000 weapon is simply PIKD. Now you can attach it to, say, Knife:

globals.AttachWeapon('knife','pikd')



this will attach it to knife, therefore you will always have it in HD levels!

Another example: you want to replace HD weapons with BFE ones; you type:

globals.CWMLoadConfig('hdtobfe')



and here you have it!

What weapons are supported by this mod?
This mod supports all default weapons and all custom weapon resources that I added to the Weapon Resources Database. Resources and replacements are not the same. As of now, all custom weapon resources from Workshop are supported. It is also recommended to use this pack if you want to switch weapons between games.

Here is the list: https://pastebin.com/6nY2aP2U
but note, that in CWM mod you can't operate with "DoubleColt", only with "Colt", and if you replace "Colt", both colt weapons will be replaced by new one.
Names on the left are "short names", that are used in console functions.

How new weapons are added?
If you have created and uploaded, or simply found on Workshop some custom weapon that isn't yet supported by CWM mod, write in special thread in CWM mod discussions, or here, about it. I will check if the weapon is fine (not bugged) and will update weapon database.
Have troubles with the mod?
When I type any of those commands listed above I get some "Lua error"! / My menu doesn't open!

Be sure that all following conditions are satisfied:
1) You are subscribed to Custom Weapons Management mod and Weapon Resources Database, and both of these are enabled in game ("Extras->Workshop Packages" in main menu).
2) You are launching moddable version of the game. To run moddable version, click on Fusion in Steam and choose "Play moddable" option. Desktop shortcut launches non-moddable version.
3) You are typing the command correctly. Check Configuration section for examples with screenshots.

I get "Invalid arguments!" message when trying to attach/replace weapon!

This can happen either because one or both weapons you are operating with do not exist in weapon database, or (most likely) you forgot to add quotation marks around weapon's short name. Check examples.

Some other problem

Ask here in the comments or on CWM mod page comments.

That is all! Have fun playing with your favourite weapons!

52 Comments
[Tortilla Papas '90] 18 Aug, 2019 @ 12:04pm 
Thanks a lot! And yeah, pretty sure the removal of the DOOM16 pack is what broke it back then.
NSKuber  [author] 18 Aug, 2019 @ 1:48am 
Ok I found the issue and fixed it, you can now keep the configuration file. After CWM updates for you, it should work again.
NSKuber  [author] 17 Aug, 2019 @ 11:07pm 
But before deleting that file, you could send it to me so I can take a look at what went wrong.
NSKuber  [author] 17 Aug, 2019 @ 11:05pm 
If you feel like your CWM is broken a bit with loading configs, you can try to delete "Content/Config/CustomWeaponsManagement.txt" file.

As for the DOOM16 weapons, author of the weapons asked me to remove them from the database. Maybe their removal is what broke CWM for you.
[Tortilla Papas '90] 17 Aug, 2019 @ 10:40am 
Nevermind, cleared the config with the clear all command.
But now I've figured out that the CWM menu just doesn't change the configs.

As in "Load Config -> BFE to D3" nothing. The current config shows nothing. Reloading the setup levels does nothing to it either.
[Tortilla Papas '90] 17 Aug, 2019 @ 10:35am 
Now something funnier is happening
Allow me to explain:
Up until today I had and was using the DOOM2016 weapons for on BFE.
After CWM apparently updated, the list of weapons for DOOM'16 is no longer there, and now it doesn't let me clear the replacements, change the replacements or anything.

Any idea what I could do to clear the changes/what the shit is happening?
[Tortilla Papas '90] 14 Aug, 2019 @ 11:26am 
Nevermind, launched the game after I restarted steam and it decided to actually work.

Guess I was missing a file or something.
NSKuber  [author] 13 Aug, 2019 @ 9:57pm 
Post the log, please (you can check how in description of the mod).
[Tortilla Papas '90] 13 Aug, 2019 @ 7:56pm 
So I'm subscribed to the necessary components, launched in moddable, bound the key and when pressed in the CWM levels, nothing happens.

Any idea?
NSKuber  [author] 27 Jun, 2019 @ 6:03am 
Hm, console script functions should work for that.