• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

tModLoader Licenses - Unlock items as you progress

hamstar

Steampunker
icon.png
Licenses

v2.2.1.1

Mirror


Requires Mod Helpers, Rewards, and Nihilism


Items require licenses to be used. Licenses are acquired with game progression (see Rewards mod). Configurable.

There are 3 kinds of Licenses:
  • Trial Licenses
    : Temporarily unlocks a single item (at a time). By default, any given item can only be trialed once. Amount of Trial Licenses needed to unlock an item is based on that item's rarity (color). Trial period ends after 5 minutes. Use by selecting a stack of trial licenses and clicking on the item in your inventory you wish to licence. Purchased from the Merchant for 2 Gold Coins each.
  • Regular Licenses
    : Unlocks a specific item. Amount needed to unlock an item is based on rarity (color). Use by selecting a stack of licenses and clicking on the item in your inventory you wish to licence. Purchased from the Wayfarer in packs of 6 for 10 PP.
  • Wildcard Licenses
    : Unlocks a random item. The rarity of the item that is unlocked matches the stack size used (in order). Use by simply consuming the item plainly (like a Life Crystal, potion, etc.). Purchased from the Wayfarer in packs of 18 for 10 PP.
You'll get a better deal with Wildcard Licenses, but the items they unlock are entirely random.

Source available here. API now available here. Config fields defined here.





 
Last edited:

hamstar

Steampunker
v2.2.1.1
  • Updated Nihilism loading to use it's OnSync API function
  • Replaced OnEnterWorld use via. CustomPlayerData
v2.2.1
  • Updated for TML11.5
  • Fixed issue with Rewards compatibility
  • Implemented FloatInputElement for config
  • Added ranges and relevant labels to some config settings
  • Replaced TrialLicenseCost with TrialLicenseCoinCost
v2.2.0
  • Updated to TML11.4 and MH5b
  • Updated config and internal data structures to use ItemDefinition
  • Renamed LicensesPlayer.TrialLicenseItemByName(...) to TrialLicenseItemByDefinition, LicenseItemByName to LicenseItemByDefinition
v2.1.1.2
  • Added redundant nihilism filters refresh
v2.1.1.1
  • Added safety checks against bad local player references
v2.1.1
  • Fixed Trial License not being whitelisted correctly
  • Added Snowball and "Any Vanilla Alchemy Ingredient" to whitelist
  • Added tooltip indications of license cost amounts per rarity
  • Adjusted NewPlayerStarterLicenses (10)
  • Altered LicensesPerPack (6), WildcardLicensesPerPack (18), LicenseCostRarityMultiplier (1/2), TrialLicenseDurationInTicks (5m)
  • Added TrialLicenseOncePerItem setting (default true)
  • Fixed incorrect ComputeCost for items of Quest rarity
v2.1.0
  • Added ResetPlayerModData(Player) API binding
  • Respeced TrialLicenseCost (1g), LicensesPerPack (3), WildcardLicensePackCostInPP (10), and WildcardLicensesPerPack (10)
  • Restricted trial licenses to one use per item type
  • Fixed issue with subsequent game sessions not (re)loading licenses properly
  • Fixed issue with trial re-licensing not unsetting previously licensed trial item correctly
  • Added some new debug outputs
  • Fixed wildcard "savings" computation
  • Restructured wildcard code files
  • Added indication of wildcard stack being too large
v2.0.6.1
  • Fixed Wildcard output color and info
  • Added dependency mod major version validation
v2.0.6
  • Updated to MH v4.2.2
  • Changed snake case to camel case
v2.0.5
  • Modified config file to use mod's versioning
  • Added mod recommendations to description.txt
  • Set licenses to respect free starter items
  • Restructured player licensing code
v2.0.4.1
  • Added TrialLicenseCost config setting
  • Added more trial license tooltips
  • Fixed trial licensing itself (oops!)
  • Merchant now sells trial licenses (oops!!)
v2.0.4
  • Update to Mod Helpers v2.0.2
  • Added MP player load bug failsafe
  • Added Trial Licenses
  • Fixed load failure (Promise key mismatch)
v2.0.2
  • Update to Mod Helpers v2.0.2
  • Added MP player load bug failsafe
v2.0.1
  • Update to C# 6
  • Fixed Nihilism incorrectly loading blacklists
  • Internal restructuring
  • Changed FreeMaterials, FreePlaceables settings to apply dynamically on load rather than alter other config settings
  • Corrected item blacklist and whitelist loading order and group names
v2.0.0.1
  • Updated to new Hamstar's Helpers code layout
  • Updated to new Nihilism blacklist workings
v2.0.0
  • Settings changes
  • Added Wildcard License
  • Fixed Nihilism API use
  • Altered item unlock messages
  • Fixed player loading of licenses
  • Added API command ClearLicencesForCurrentPlayer
  • Added config setting to remove option to 'grind' bosses
  • Fixed unequip on world enter
  • Refactored player loading
v1.1.1.1
  • Possible fix for mod dependency auto saving suppression fail
  • Added preventative measure/fix for mod dependency load order issue
  • Added custom load event internally
  • Now requiring HH v1.4.17
v1.1.1
  • Attempted fix for License cost mismatch
  • Set License cost for items based on default item rarity
v1.1.0.1
  • Dependency mod version updates
v1.1.0
  • Fixed some OnWorldLoad hook issues
  • Increased licenses per pack +2
  • Added config settings to adjust armor and accessory costs
  • Added numerous default items
  • Fixed issue with licenses not storing correctly per player
v1.0.2
  • Added several default items
v1.0.1.1
  • Fixed config defaults update issue
v1.0.1
  • Changed starting licenses from 3 to 8
  • Changed license pack cost from 5 PP to 3 PP
  • Added a few items to the default whitelist
  • Fixed possible issue with some types of modded items
v1.0.0
  • Added ItemLicenseCostBase, ItemLicenseCostIncreasesWithRarity, NewPlayerStarterLicenses, and ForceSpawnWayfarer config settings
  • Added some default items
  • Fixed player initializing with incorrect licenses
v0.9.0
  • Initial beta release (tested for single player only)
 

Attachments

Last edited:

hamstar

Steampunker
Just to note: Each grade of rarity of an item increases the licenses it needs.

Post-v0.9.0, there are many things I could do with this mod to add depth, including making per-item-type/class licenses, license prerequisites (e.g. guns need other guns licensed, first), temporary licenses, license revokation conditions (e.g. killing a certain type of forbidden mob), and possibly many others.

This version is just basic, bare-bones, and mostly untested.
 
Last edited:

CoronaKing

Steampunker
This seems to remove the crafting menu, as well. Is that part of the mod? I'm wondering if it's because of Nihilism. This sounds really fun, I'll test the crap outta this

Edit: Restarted the game, and crafting menu is back.
 

CoronaKing

Steampunker
I think you have to do a few Nihilism commands to get the crafting menu back on a new world, not really sure on that. I'm new to Nihilism, so I really have no idea how I'm getting it working.
Also, on the default whitelist, I think you meant Wooden Table, Wooden Chair, and Wooden Door, and not just Table, Chair, and Door. Did you want the Wood Wall (not wooden wall, but Wood Wall) included in this? You don't have any wall available to be placed yet via default config

Edit:
tl;dr
Needs to be "Wooden Table" "Wooden Chair" "Wooden Door" and maybe add "Wood Wall"

Edit 2:
May want to add "Wood Platform"
And change:
"Snow" -> "Snow Block"
"Dirt" -> "Dirt Block"
etc

Edit 3:
Add "Acorn"

Edit 4:
All the Wood Weapons (and arrows) Are Wooden, not Wood
 
Last edited:

CoronaKing

Steampunker
A few other default additions could include "Rope" and "Chest". Maybe "Mushroom" and "Lesser Healing Potion" and "Lesser Mana Potion". Maybe Recall Potions, but that might be more fun to unlock. This has me hyped, were you planning on being rigid on the default list?

Edit eleventy four:
Also add weapons from basic chests, i.e. Wand of Sparking, etc? Or make PP available somehow at the start of the game, maybe awarded by getting NPC's?

Edit number potato:
I think the NPC's moving in would be best. Otherwise, in a new world it would be impossible to ever get PP. Can't use hearts to increase health, and can't use the EoC spawners.

Edit number 23:
-Using a license on a default unlocked item (like wood) uses a license
 
Last edited:

hamstar

Steampunker
A few other default additions could include "Rope" and "Chest". Maybe "Mushroom" and "Lesser Healing Potion" and "Lesser Mana Potion". Maybe Recall Potions, but that might be more fun to unlock. This has me hyped, were you planning on being rigid on the default list?

Edit eleventy four:
Also add weapons from basic chests, i.e. Wand of Sparking, etc? Or make PP available somehow at the start of the game, maybe awarded by getting NPC's?

Edit number potato:
I think the NPC's moving in would be best. Otherwise, in a new world it would be impossible to ever get PP. Can't use hearts to increase health, and can't use the EoC spawners.
I'll expand the default list to include those entries. You can configure the default list freely in the config file, by the way. You can even configure the PP earnings from any given mobs, also.

Also, there is a setting that spawns the Wayfarer right away with Rewards mod.
 

CoronaKing

Steampunker
Yeah, I've been tweaking the configs as I go, as goes the License mod. The Rewards mod, I wasn't tweaking as of yet, but was thinking about a very minor amount for most early mobs. I like this, by the way. A ton. I could this be expanded to make specific licenses drop from specific critters. For example, make the License for Bee's Knees a rare drop from a Hornet. I see you have an API, I'm planning on starting to mod soon, so I can make sense of it. I've done enough minor programming to be able to at least tweak some things.
 

hamstar

Steampunker
Yeah, I've been tweaking the configs as I go, as goes the License mod. The Rewards mod, I wasn't tweaking as of yet, but was thinking about a very minor amount for most early mobs. I like this, by the way. A ton. I could this be expanded to make specific licenses drop from specific critters. For example, make the License for Bee's Knees a rare drop from a Hornet. I see you have an API, I'm planning on starting to mod soon, so I can make sense of it. I've done enough minor programming to be able to at least tweak some things.
v1.0.0 is now up, with most of your feedback addressed.

You'll have to add custom item drops with a separate mod, but it should be easy enough.

If you need any help using the API or setting up your own mod, let me know.
 

CoronaKing

Steampunker
Not sure if this matters to you, or if it matters at all, but will a bad prefix on an item that affect rarity make it cheaper to unlock?
 

hamstar

Steampunker
Not sure if this matters to you, or if it matters at all, but will a bad prefix on an item that affect rarity make it cheaper to unlock?
It does, actually. Currently, an overlooked strategy for licensing. Maybe not the best long term design, though.
 

CoronaKing

Steampunker
I'm not complaining, it let me unlock my next pickaxe for a discount, lol. Finally got through a Goblin invasion, btw, and with the other mods I had.... Wasn't pretty. BUT, got my PPs!
 

hamstar

Steampunker
I'm not complaining, it let me unlock my next pickaxe for a discount, lol. Finally got through a Goblin invasion, btw, and with the other mods I had.... Wasn't pretty. BUT, got my PPs!
Discount? You mean, low cost or no cost?

Edit: v1.0.1 out.
 
Last edited:

CoronaKing

Steampunker
Low Cost. Was a Gray item (Annoying Pickaxe). I'll have to double check that later, though, you have me second guessing now. I'm pretty sure it was 1 License to unlock
 

CoronaKing

Steampunker
As I think about this, could you have "Bundle" of items to unlock at once? Kind of like your rewards mod. Have a license pack that unlocks all haste boots (Hermes, Flurry, etc), or one that is all the double jumps (Cloud in a Bottle, etc). You spend a few more Licenses, but unlock more items, at the cost of some of the items you unlock being kinda pointless. This way, a "Frozen Pack" could unlock most everything you get from Ice Chests. This would require planning, as saving up for the extra cost would pretty much block you from other gear, but still give the incentive of making it worth focusing on one type of gear
 

CoronaKing

Steampunker
Also noticed... At least with the Slime Hook, I unlocked it as I should, equipped it, but it won't do anything. Like I'm not wearing it at all


Edit:
Not sure how I did it, but something that said it required 3 licenses suddenly unlocked with just 2. Going to poke at this as I get more, see if I can repro
 
Last edited:

CoronaKing

Steampunker
From what I can tell, if you have MORE than one License, you can unlock more expensive things. I have a Drill that requires 4. 1 License didn't work, 2 did. But if I DID have 4 in my inventory, it would have taken all 4 as it should
 

hamstar

Steampunker
From what I can tell, if you have MORE than one License, you can unlock more expensive things. I have a Drill that requires 4. 1 License didn't work, 2 did. But if I DID have 4 in my inventory, it would have taken all 4 as it should
The cost is based on the rarity (color) of the item.
 
Top Bottom