• 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 Nihilism - Empties the game

hamstar

Steampunker


Requires Mod Helpers


Removes item recipes, mob spawns, item drops from mobs, and items. Configurable. Meant mainly for use by custom maps or mods. Players can enable or disable the mod on a per world basis via. chat commands (type /help for options).



Usage

To activate for a given world, type `/nih-on` in the chat.

To clear the current blacklists and whitelists (e.g. the default samples), type `/nih-clear`.

Use the mod's config editor (settings) to adjust defaults for blacklists and whitelists. Any defaults changes can be applied to the current world with the `nih-defaults-reset` command.

Type `/help` and scroll with the arrow keys to see the full list of commands (also seen here in the source code).



Modders

To use this with your mod, simply call the API functions like so (e.g. to permit only the use of a Gold Pickaxe):
Code:
class MyCustomModPlayer : ModPlayer {
  ...

  public override void OnEnterWorld( Player player ) {
    if( player.whoAmI == Main.myPlayer && this.player.whoAmI == player.whoAmI ) {
      Mod nihMod = ModLoader.GetMod("Nihilism");
      if( nihMod != null ) {
        bool localOnly = true;
        nihMod.Call( "SetItemWhitelistEntry", new ItemDefinition(ItemID.GoldPickaxe), localOnly );
      }
    }
  }

  ...
}

Todo:
  • Blacklist shop items.


Source available here. API now available.

Available config fields are defined here.




 
Last edited:

hamstar

Steampunker
v3.1.0
  • Tweaked some API functions to allow local-only effects
  • Added OnSyncOrWorldLoad API(Action, float) binding for a 'proper' way to configure configs for worlds on load
  • Added group list clear API bindings
  • Fixed API binding ClearFiltersForCurrentWorld not clearing groups
  • Improved debug filter data output
v3.0.2
  • Updated to TML11.5
v3.0.1
  • Added labels and headers to config field
  • Expanded config description header to mention chat commands
v3.0.0
  • Updated to MH5 and TML11
  • Switched to ItemDefinition and NPCDefinition rather than "qualified names" (note: breaks compatibility)
  • Refactored filters (per world) config to use instance switching when InstancedFilters (previous SuppressAutoSaving) on
  • Removed many chat commands for filter list editing; all done with ModConfig now
  • Added item, recipe, NPC, NPC loot groups lists as separate config setting fields
  • Added filter caches for mapping keys and index positions
  • Re-implemented filter setters (and API)
  • Added FiltersAccess setters and API bindings for groups
  • Renamed groups FiltersAccess and API methods slightly
v2.2.1
  • Added NihilismFilterAccess getters for groups-per-item/recipe/npc
  • Added API getters for the above
  • Renamed base code files for convention
  • Added DebugModePerItemInfo config setting (shows filter groups per item in tooltips)
  • Added Blacklist2 Clear API bindings
v2.2.0
  • Added DefaultFiltersClearCommand (/nih-clear)
  • Added ItemBlacklist2EntrySetCommand, LootBlacklist2EntrySetCommand, NpcBlacklist2EntrySetCommand, RecipeBlacklist2SetCommand
  • Altered command bindings to use set instead of add, where applicable
  • Added data fields for whitelist exception stuff (blacklist2)
  • Added NihilismAPI.ClearFiltersForCurrentWorld()
  • Added whitelist exceptions (blacklist2) to NihilismFilterAccess's Is<>Enabled methods
  • Finished implementing whitelist exceptions (blacklist2)
  • Restructured FilterAccess code files into further subdivisions
v2.1.7.5
  • Added error prevention measures against bad references to local player
v2.1.7.3
  • Fixed issue with bags incorrectly refunding stack when blocked from opening
  • Added dependency major version checks
  • Updated to MH v4.2.3
v2.1.7.2
  • Fixed issue with Mod.Call being overly picky with bindings
  • Updated to MH v4.2.2
  • Corrected info for on/off commands
v2.1.7.1
  • Fixed issue with Mod.Call being overly picky with bindings
v2.1.7
  • Updated to MH v4.2.1 (and its standards)
  • Changed snake case to camel case
v2.1.6.1
  • Updated for MHv4
v2.1.5
  • Added Unset API functions for white and blacklists
  • Added API Mod.Call bindings for unset
v2.1.4
  • Updated to Mod Helpers v2.0.2
  • Updated commands to use dashes in names for readability
v2.1.3
  • Added proper item and ammo consumption white and blacklisting
v2.1.2.5
  • (Hopefully) fixed Wing Mod support
v2.1.2.4
  • Attempted better detection of Wing Slot mod for compatibility
  • Attempted fix of secondary function of items
v2.1.2.2
  • Fixed forcing of default settings with previous version
v2.1.2.1
  • Corrected default blacklist
  • Fixed possible error with item use detection
  • Fixed Reset Configs to Defaults control panel button
  • Added bag opening blacklisting
v2.1.2
  • Updated to Mod Helpers v1.6.3
  • Fixed console commands
  • Fixed possible mod compatibility crash issues
v2.1.0
  • Fixed blacklists not being set
v2.1.0
  • Added blacklists back; now identical to whitelists
  • Added API commands to clear lists
  • Altered chat commands accordingly
  • Added Wing Slot mod support natively
  • Updated to new Hamstar's Helpers code layout
v2.0.0
  • Removed blacklists; bool on/off only, now
  • Finished implementing entity groups for whitelists
  • Updated config defaults
  • Refactored whitelist data structures into sets
  • Fixed npc loot drops and odd whitelist checking behavior
  • Added whitelist clearing API functions
  • Set whitelisting to apply to bag opening
  • Set whitelisting to apply to equipping misc items
  • Internal restructuring/refactoring
v1.5.9
  • Set to use new world data file convention (gives alert for old mod version owners)
  • Removed underscores from chat commands and simplified descriptions
v1.5.8
  • Set ammo types to be subjected to filters
v1.5.7
  • Reduced tint of item X
  • Fixed on load crash with certain mods
  • Added preventative measure/fix for mod dependency load order issue
  • Added custom load event internally
  • Now requiring HH v1.4.17
v1.5.6.2
  • Fixed an issue with npcs not dying to DoT damage
v1.5.6.1
  • Fixed item whitelist commands to accept the full parameter string correctly
  • Fixed grappling item detection
v1.5.6
  • Minor internal player data fix
  • Extensive internal refactoring
v1.5.5.1
  • Fixed a minor Mod.Call param error checking issue
  • Set item X overlays to be somewhat transparent
v1.5.5
  • Set items to use non-overrideable names for filtering purposes (allows dynamically-named items)
  • Fixed non-syncing API calls
v1.5.4
  • Added 'SuppressAutoSavingOn' and Off to API
  • Added 'nih_showfilters' command
  • Set API to require parameter for each command to indicate if sync occurs or not
  • Assorted internal refactoring
v1.5.3
  • Fixed recipe lag (hopefully)
v1.5.2
  • Added configs to disable specific filter options
v1.5.1
  • Added API functions NihilateCurrentWorld and UnnihilateCurrentWorld
  • Fixed possible issues with default configs
v1.5.0
  • Added 'nih_defaults_set' command (SetFiltersAsDefaultsCommand)
  • Added 'nih_defaults_reset' command (ResetFiltersFromDefaultsCommand)
  • Added default black and whitelist settings back into the main config file (these do NOT update settings for nihilated existing worlds)
v1.4.0.1
  • Implemented API
  • Implemented commands
  • Fixed syncing
  • Added inbox alert of commands to replace UI
v1.3.3
  • Fixed multiplayer item duplication glitch
  • Fixed configs not setting up with default values properly
v1.3.2.1
  • (Hopefully) fixed multiplayer loading hang issue
v1.3.2
  • Fixed UI positioning
  • UI code refactoring
v1.3.1
  • Fixed issue with default settings being forced to apply (major issue)
v1.3.0.1
  • Added mod icon
  • Added support for Hamstar Helpers v1.2.0 issue report
  • Refactored net protocol
v1.2.0
  • Added blacklist regex patterns.
v1.1.0.1
  • Added a UI popup to enable or disable Nihilism for the current world.
 

Attachments

Last edited:

Shabidoo

Terrarian
So if I've got this right. You can make an obstacle course map then use this mod to disable enemy spawns but white list the grappling hook so players will get an intrusion free run every time?
 

hamstar

Steampunker
So if I've got this right. You can make an obstacle course map then use this mod to disable enemy spawns but white list the grappling hook so players will get an intrusion free run every time?
Yep. But you'll have to either make a simple mod to go with this to specifically implement these rules for the given world (in the way shown up top), or else adjust the mod's config file, which will put these specific settings onto all worlds you select the in-game option to enable nihilism for.

Next version I want an in-line method to add per-world settings, if I can figure on a way to do this non-messily...
 
Last edited:

Zombie1Kenobi

Steampunker
This is pretty neat for custom maps, good job!
The only sort-of problem is that most people who know how to make a custom map probably don't know how to code a mod. (unless this mod's coding is so easy a kindergartner could do it, I'm very bad at coding).
 

hamstar

Steampunker
This is pretty neat for custom maps, good job!
The only sort-of problem is that most people who know how to make a custom map probably don't know how to code a mod. (unless this mod's coding is so easy a kindergartner could do it, I'm very bad at coding).
Modding the settings is just making a glorified config file wrapper. In fact, if you have a config file you want to make into a mod to work with a specific world, just post it here and I'll do it quickly myself. Until an in-game option becomes available, that is.

Edit:

v1.3.0.1
  • Added mod icon
  • Added support for Hamstar Helpers v1.2.0 issue report
  • Refactored net protocol
 

Attachments

Last edited:

セフィロス

Skeletron Prime
I just noticed we can only activate it once per world ? not toggle it ? . -. just killed my test world now xD or what i do missing here . -.
 
Last edited:

hamstar

Steampunker
Whenever i try to run this mod in multiplayer i get stuck at "Requesting World information" Is this mod not multiplayer compatible?
It shouldn't have any effect on multiplayer, but I there may be issues with the NetSend and NetReceive that I'm not aware of. I'll make a quick patch to see if this is fixable...

Edit:

v1.3.2.1
  • (Hopefully) fixed multiplayer loading hang issue
 

Attachments

Last edited:

Sumenora

Plantera
It shouldn't have any effect on multiplayer, but I there may be issues with the NetSend and NetReceive that I'm not aware of. I'll make a quick patch to see if this is fixable...

Edit:

v1.3.2.1
  • (Hopefully) fixed multiplayer loading hang issue
Ahh it seems to work and i can get into my server in multiplayer but i also found another bug.



It seems when a banned item is put into an chest it duplicates into your inventory in multiplayer.
 

hamstar

Steampunker
v1.3.3
  • Fixed multiplayer item duplication glitch
  • Fixed configs not setting up with default values properly
Because of a specific change I made, be on the lookout for item blocking failing in some odd specific context or another, and be sure to report it.
 

Attachments

Sumenora

Plantera
v1.3.3
  • Fixed multiplayer item duplication glitch
  • Fixed configs not setting up with default values properly
Because of a specific change I made, be on the lookout for item blocking failing in some odd specific context or another, and be sure to report it.
Oh i almost forgot i finally manage to get player to join my server to see if only the item in the chest is banned when he enters my server and this was the result.



From the looks of it every item was banned when entering my world. my banned item list don't seem apply to him and he's pretty much was completely disabled. I was expecting only the revengense potion to be effected but all of the items were... meaning their is still major issues in multiplayer

their should be a way to block items when players enter your server and only the items the host bans should be Effected.

but this was before your update soo im not sure if it still applies... but it probably does.
 
Last edited:

hamstar

Steampunker
Oh i almost forgot i finally manage to get player to join my server to see if only the item in the chest is banned when he enters my server and this was the result.



From the looks of it every item was banned when entering my world. my banned item list don't seem apply to him and he's pretty much was completely disabled. I was expecting only the revengense potion to be effected but all of the items were... meaning their is still major issues in multiplayer

their should be a way to block items when players enter your server and only the items the host bans should be Effected.

but this was before your update soo im not sure if it still applies... but it probably does.
Post your `Nihilism Config.json` content here. The default config actually does specify for all items to be disabled (except the Copper Pickaxe).
 

Sumenora

Plantera
Post your `Nihilism Config.json` content here. The default config actually does specify for all items to be disabled (except the Copper Pickaxe).
This is what i had when i was doing the test....and i also asked my friend to send his to see if they were the same...it seems his was at "Default"? ...and mines was modified...if that matters.
 

Attachments

hamstar

Steampunker
This is what i had when i was doing the test....and i also asked my friend to send his to see if they were the same...it seems his was at "Default"? ...and mines was modified...if that matters.
If you're running the server, your config is the only one that should matter. I'll look into this.

Edit: I'm unable to replicate this with local dedicated server hosting. My item whitelist updates correctly for my character upon joining an existing server, even when the client changes their config.
 
Last edited:
Can the configs be edited directly or do all changes have to be made in the game via commands?

Also, would it be possible to make it so the player can add new recipes through this mod? Is that even possible to do via modding? It's been my dream feature ever since using MineTweaker for Minecraft--combined with removing recipes (and items, mob spawns, mob drops, etc.) it's a great way to force mods to play nice together if the end user is willing to put in the effort.
 
Top Bottom