Jump to content

Another quick weapons question - increasing rarity gamestage requirements for a weapon?


FramFramson

Recommended Posts

As the title says, if I have a mod-added weapon which has been set to spawn at a lower rarity/gamestage, what files and lines should I look for to make it

1) rarer

2) uncraftable

 

For #2 I read a guide which said you need to remove the progression and recipes files/sections, which makes sense, but it also said remove the loot file, which... is that correct? That seems wrong?

 

EDIT: Guess this question applies regardless or whether a weapon is craftable or not.

Edited by FramFramson (see edit history)
Link to comment
Share on other sites

Without a recipe entry in receipes.xml it will never be craftable.

 

Say you have a ranged weapon (shotgun) that you want to make T2 (because it's reasonably powerful)..

  • In loot.xml, there is already an item group called groupWeaponsT2_Boomstick.. which is part of a loot group groupWeaponsT2_Ranged
  • so add your new shotgun to lootgroup groupWeaponsT2_Boomstick
  • it already has gunShotgunT2PumpShotgun in that group
  • so append that lootgroup with your new item that is a shotgun.

Now, it will have T2 rarity... and the probability of it dropping increases with the loot level - defined in ProbT2.

 

In other words, loot level 0 to 101 has a 0% chance to drop... 102 to 234 has a sliding scale of probability.

 

Link to comment
Share on other sites

4 hours ago, JasonX said:

Without a recipe entry in receipes.xml it will never be craftable.

 

Say you have a ranged weapon (shotgun) that you want to make T2 (because it's reasonably powerful)..

  • In loot.xml, there is already an item group called groupWeaponsT2_Boomstick.. which is part of a loot group groupWeaponsT2_Ranged
  • so add your new shotgun to lootgroup groupWeaponsT2_Boomstick
  • it already has gunShotgunT2PumpShotgun in that group
  • so append that lootgroup with your new item that is a shotgun.

Now, it will have T2 rarity... and the probability of it dropping increases with the loot level - defined in ProbT2.

 

In other words, loot level 0 to 101 has a 0% chance to drop... 102 to 234 has a sliding scale of probability.

 

 

Ah thank you! I hadn't seen anything in the wiki, but using "ProbT2" as a keyword helped me find much more specific information than "loot" or "lootstage".

Link to comment
Share on other sites

Note though that just placing it in the T2_Boomstick loot group (using JasonX's example) doesn't make it more rare than the pump shotgun.  If something is picked from that lootgroup, you got a 50% chance of getting the new weapon vs the pump shotgun.

 

If that is okay for you, then that would be the easiest way to add new items to the loot tables.  If not, let us know how rare you want these items and we can provide directions.

6 hours ago, FramFramson said:

 

Ah thank you! I hadn't seen anything in the wiki, but using "ProbT2" as a keyword helped me find much more specific information than "loot" or "lootstage".

 

The more you mess with the loot file, the easier it will be to see where things are placed and how it functions.

Edited by BFT2020 (see edit history)
Link to comment
Share on other sites

9 hours ago, BFT2020 said:

If not, let us know how rare you want these items and we can provide directions.

 

Right now the weapon in question is in the default T2 weapons group, but a sweet spot might be in between T2 and T3.

 

Quote

The more you mess with the loot file, the easier it will be to see where things are placed and how it functions.

 

Move fast and break things? I guess a post-apocalyptic world might be one of the few places that actually does work as intended. Haw haw.

Link to comment
Share on other sites

  • FramFramson changed the title to Another quick weapons question - increasing rarity gamestage requirements for a weapon?

Might continue in this thread for now, rather than spamming all over.

 

I've been revisiting the ideas I've had for a modest overhaul for the game's firearms, just to be used on my own server. At first I was thinking of more drastic changes (all firearms uncraftable except pipe weapons), but the idea didn't really feel workable and was out of step with all the other things you could craft anyway, not without at least one more tier of craftable firearms (simple 9mm revolver, grease/sten gun, etc.), but adding new assets is getting rather ambitious (at least for me), I'd be changing more of the game's base mechanics, feature creep and all that.

 

In the end I've pulled back to what I hope is a simple, manageable plan.

 

1) Continue with my original plan to add 1 new "sidegrade" weapon for each ammunition type and tree (the pistol tree might get 2). These will be treated the same as any weapon, can be crafted, etc. I've mainly been taking a weapon here and there from some mod packs and cutting the rest of the mod pack, to fill a few unfilled niches: a .44 SMG, a carbine or two of some sort. Not much. And they're not critical to what I want to do. Which is...

2) Limit firearm crafting to only Quality 3. This is high enough to produce serviceable, moddable weapons that at least get the job done, while increasing the value of looted weapons and making high-quality weapons more distinctly special. In the end, we can make all kind of ridiculous stuff, so restricting firearms specifically felt too out of step with the rest of the game. It also adds value to bows, which I intend to leave unaltered as they're rarely chosen as a main weapon type.

3) Slightly increase the rarity of all Tier 2+ firearms in traders and loot. Not drastically but if I can understand what I'm doing, then this should be easy to edit to taste

 

The overall goal is to improve weapon variety without adding huge numbers or a pile of new ammunition types*, as well as encouraging players hang on to individual weapons longer, to make them more "special" without forcing hard limits, and to encourage trying weapons a player might not normally use as they just rush upgrades. 

 

As far as help I'm asking for here, I'm mainly wondering what I need to do to implement changes listed in #2 & #3. Melee weapons and bows will remain untouched for now.

 

 

*While in theory, new ammunition increases the challenge in forcing the use of subpar weapons based on available ammunition, the game already has this, and once you're bulk crafting ammo in any quantity it's pretty moot anyway.

Link to comment
Share on other sites

8 hours ago, FramFramson said:

As far as help I'm asking for here, I'm mainly wondering what I need to do to implement changes listed in #2 & #3. Melee weapons and bows will remain untouched for now.

 

For #2, you need to change the progression file, specifically the new crafting_skills area.  Example below is code I put in place to limit crafting of all T0 weapons to only 2 levels

    <set xpath="//crafting_skill/effect_group/passive_effect[@name='CraftingTier' and contains(@tags,'T0')]/@value">1,1</set>

 

Note that everyone starts out at QL1 so the ones in the example above are +1 (QL2).  For you, your value will be 1,2,2 with the last #2 for the max level (so you always have the ability to craft QL3.

 

I then added specific code to change the levels unlocks since I added Q6 crafting to other items

    <set xpath="//crafting_skill[@name='craftingBows']/effect_group/passive_effect[@name='RecipeTagUnlocked' and @tags='gunBowT0PrimitiveBow']/@level">1,122</set>

 

So for each weapon, you need to modify the value on the crafting Tiers.  If you change the number of magazines required, you also have to change the level.

 

In addition to that, you will need to change the display portion

  

 <set xpath="//crafting_skill[@name='craftingBows']/display_entry[@name='gunBowT0PrimitiveBow']/@unlock_level">1,5</set>

 

Note:  For #2, it is not hard, but you will be adding a lot of code.

 

For #3, that is going to be harder.  For the ranged weapons, they are part of the following lootgroup:

 

<lootgroup name="groupWeaponsRangedScaled">
    <item group="groupWeaponsT0_Ranged" loot_prob_template="ProbT0"/>
    <item group="groupWeaponsT1_Ranged" loot_prob_template="ProbT1"/>
    <item group="groupWeapons_RangedParts" loot_prob_template="ProbT1Cap"/>
    <item group="groupWeaponsT2_Ranged" loot_prob_template="ProbT2"/>
    <item group="groupWeaponsT3_Ranged" loot_prob_template="ProbT3"/>
</lootgroup>

 

Those are tied to the ProbT2 and ProbT3 loot probability templates.  If you just want to change for range weapons, you will need to create new probability tables and then change the ones for Ranged weapons to these new probability tables.

 

Easiest way to do this is just to take the ProbT2 and ProbT3 tables, copy them to your file, and then start tweaking the probability numbers.  The Ranged Parts is based on ProbT1Cap so will always have a prob value of 1 once you get to T2 and T3 loot stages.

Link to comment
Share on other sites

Ah. Since #3 isn't a huge priority, it might not be worth the effort if I'm only looking for a slight change. As you mentioned, I could tweak the probability numbers, but I would still have to test it extensively and with a change that subtle (and to a feature which is inherently RNG-based), it might be hard to observe.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...