• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

(A21) Server Side Weapons

  • Thread starter Thread starter Guest
  • Start date Start date
Good morning,

Thank you for taking the time to create this mod. My server is however receiving this error from this mod:

2023-12-14T06:04:52 26.676 WRN Type:RequirementItemTier, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is missing the UnityEngine.Scripting.Preserve attribute, this will fail on consoles
2023-12-14T06:04:52 26.676 WRN Type:RequirementItemTier, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is missing the UnityEngine.Scripting.Preserve attribute, this will fail on consoles
2023-12-14T06:04:52 26.676 WRN Type:RequirementItemTier, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is missing the UnityEngine.Scripting.Preserve attribute, this will fail on consoles
2023-12-14T06:04:52 26.676 WRN Type:RequirementItemTier, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is missing the UnityEngine.Scripting.Preserve attribute, this will fail on consoles
2023-12-14T06:04:52 26.676 WRN Type:RequirementItemTier, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is missing the UnityEngine.Scripting.Preserve attribute, this will fail on consoles
2023-12-14T06:04:52 26.676 WRN Type:RequirementItemTier, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is missing the UnityEngine.Scripting.Preserve attribute, this will fail on consoles

Are there any suggestions on how to fix this? The warning did not exist before I installed the custom weapons. Will this effect server performance?
 

Thanks in advance!

 
RequirementItemTier is potentially linked to them not having a TraderStageTemplate Tier level. For example, the regular Chain Saw has a Tier 3 status. None of these weapons have such status because they are only crafted or found in loot and will not be listed at the Traders unless another player sells them there.

The comment, 'this will fail on consoles' is potentially the reason this error is showing, and it seems that console creators and their network is very strict about how things are processed.

This mod was made with PC/Mac/Linux in mind since we have no clear guidance on Console Mod requirements and stipulations. This mod was released in July and there have been no posts related to server performance, even where servers have been running 20+ mods at the same time. I have personally run this mod for extended periods on a dedicated server and with regular server restarts, as is common for any server running 7 Days, it has been a stable and rewarding experience.

I consider that warning to be more specific to console compliance rather than the more flexible PC/Mac/Linux environment, and based on the zero reports of issues since release, don't give that warning any real credence.

 
Ok thank you for the clarification. So adding the ability for the item to be sold at the trader should clear this up? I will just add that ability but make them very expensive at the trader.

Thanks!

 
You can simply add that property to each item without needing to have them in the trader at all, since they would also need to be added to the loot.xml and/or trader.xml to have them in a loot group for trader sales. The top entry for Brainsaw already has that property but commented out with the !--  -- punctuation. Removing that will activate the potential for that feature. I haven't tested it and can't guarantee the result but the warning points in that direction.

 
I've added it to both the trader and the items.xml with no luck:

trader.xml:

<configs>
    <append xpath="/traders/trader_item_groups/trader_item_group[@name='groupMeleeAll']">
        <item name="meleeWpnSledgeT3SteelThorHammer" quality="2,4"/>
        <item name="meleeWpnPolearm" quality="2,4"/>
        <item name="meleeWpnVampireGauntlets" quality="2,4"/>
    </append>

    <append xpath="/traders/trader_item_groups/trader_item_group[@name='groupRangedAll']">
        <item name="gunRifleT3DCLXVIZeus" quality="3,4"/>
        <item name="gunRifleT1HuntingRifleSavery" quality="3,4"/>
        <item name="gunKronosXII" quality="3,4"/>
        <item name="gunPP-19Bizon" quality="3,4"/>
        <item name="gunNewcomen" quality="3,4"/>
        <item name="gunBowT3BlackWidow" quality="3,4"/>
        <item name="gunShotgunQuadrupleBarrel" quality="3,4"/>
        <item name="gunRifleT3DCLXVIZeusAmmo" quality="3,4"/>
    </append>
    
    <append xpath="/traders/trader_item_groups/trader_item_group[@name='rareTools']">
        <item name="meleeToolAxeT3Brainsaw" quality="3,4"/>
    </append>
    
    <append xpath="/traders/trader_item_groups/trader_item_group[@name='ammoArrowsBolts']">
        <item name="ammoRedWidow" count="20,60"/>
        <item name="ammoBlueWidow" count="20,60"/>
    </append>
    
    <append xpath="/traders/trader_item_groups/trader_item_group[@name='ammoAll']">
        <item name="gunRifleT3DCLXVIZeusAmmo" count="40,150"/>
    </append>

</configs>



All items or mods were given this line:

<property name="TraderStageTemplate" value="baseTier3"/>
<property name="TraderStageTemplate" value="modsTier3"/>




Am I missing something?

 
Last edited by a moderator:
That item property for the TraderStageTemplate is appropriate and matches how it is done for the default weapons in the game.

Since those warning messages provide limited information, but do make reference to consoles, the only other suggestion I have is to remove all reference to things like:

                <property name="triggerEffectTriggerPullDualsense" value="PistolTrigger"/>
                <property name="triggerEffectTriggerPullXbox" value="PistolTrigger"/>
                <property name="triggerEffectTriggerShootDualsense" value="PistolShoot"/>
                <property name="triggerEffectTriggerShootXbox" value="PistolShoot"/>

from the items.xml and see if that has any impact. It is sometimes in 2 places for one weapon because of an Action 0 and Action 1.

I suggest this because your warning has 6 messages, and this is added to 6 of the weapons. It is possible there is a connection.

I am logging off now as this timezone is late, but I shall check your message when I next log on.

 
This warning for UnityEngine.Scripting.Preserve attribute appears to be a Unity script that is attempting to preserve some code that isn't really being used. It is still attempting to preserve it anyway. It is outside the scope of this mod since it is using assets already bundled with the game, and anything that is stripped remains in the default weapon that this mod borrows from. It is a yellow warning, and simply that. If it was a red warning, it would generally be more critical. There are a number of yellow warnings we see in game and in the server log. For example, the snake pain audio often brings up such yellow warnings. Another example is certain deco blocks as we advance towards a POI. Since the mod remains functional, even with this warning, which appears to be related to an attempt to preserve some code that isn't generally used, it may just be something that is there but not causing any issues. There have been no reports of server degradation or in game errors related to this warning so far.

 
Hello,

I want to use this on my Multiplayer game with my friends, but they don't want to use the ticket system. How can I disable that and just allow for crafting/looting of the weapons?

Thank you

 
1. Go to loot.xml and delete Lines 117 - 181. This section relates to finding tickets in loot.

2. Go to recipes.xml and delete Lines 101 - 129. This section relates to crafting the Loot Box Machine and related tickets.

3. Delete quests.xml

4. Go to progression.xml and change unlock_level, and level areas to match your crafting progression specifications.

 
Back
Top