[Fabric] Tweaker Addon v1.4.1

This sub-forum is dedicated to add-ons and texture packs for Better Than Wolves.
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

[Fabric] Tweaker Addon v1.4.1

Post by IssaMe »

Want to be able to change HC Spawn mechanics? Want to disable lightning fires? This addon is for you!
Download
Source

Tweaker currently lets you change the HC Spawn mechanics, abandoned village and looted temple generation radius, and whether lightning should start fires.

When you start the game with this addon, a file will be generated at `./config/tweaker.properties`. You can modify these values to determine the default behaviour for your worlds. Don't forget to restart the game after modifying the config!

If instead you want to define specific behaviour for only one world, or you do not want to restart the game, you can use the command `/tweaker <option> [value]` to tweak any of the available settings. `/tweaker <option>` will let you see what the current value is.

For multiplayer only the server needs to have this mod installed.

Here's a preview of the config:
Preview of tweaker.properties
Show

Code: Select all

# The maximum radius the player will respawn from world spawn.
maxSpawnRadius=2000.0

# The minimum radius the player will respawn from world spawn.
minSpawnRadius=1000.0

# The radius at which the player will respawn after dying recently.
quickSpawnRadius=100.0

# The player's health after a quick spawn. (2 = one heart)
quickSpawnHealth=10

# The minimum amount of hunger after a quick spawn. (6 = one shank)
quickSpawnHungerMin=24

# The amount of hunger a player loses on each quick spawn. (6 = one shank)
quickSpawnHungerLoss=6

# Multiplier used for `maxSpawnRadius` when playing with Large Biomes.
largeBiomeMultiplier=4.0

# Multiplier used for 'maxSpawnRadius' after activating an End portal.
endMultiplier=2.5

# Multiplier used for 'maxSpawnRadius' after summoning a Wither.
witherMultiplier=2.0

# Multiplier used for 'maxSpawnRadius' after activating a Nether portal.
netherMultiplier=1.5

# Villages within this radius from world spawn will be abandoned.
abandonedVillageRadius=2250.0

# Villages within this radius from world spawn will be partially abandoned.
partiallyAbandonedVillageRadius=3000.0

# Temples within this radius from world spawn will be looted.
lootedTempleRadius=2250.0

# Determines if lightning should start fires or not.
lightningFire=true
Last edited by IssaMe on Sun Nov 26, 2023 6:09 am, edited 8 times in total.
User avatar
EpicAaron
Posts: 533
Joined: Sat Jun 09, 2012 9:08 am

Re: HC Spawn Config Addon

Post by EpicAaron »

This looks great! I have also been looking into ways to get my friends to approach the mod, and this might help a lot.

What exactly does it let you configure?
BTW Community Server Discord: https://discord.gg/arZpuYW
Spoiler
Show
Image
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

This is what the config file looks like, it should explain everything:
hcspawn.cfg
Show

Code: Select all

### HCSpawn Config ###

## Respawn Radius ##

# The maximum radius the player will respawn from spawn. (Default: 2000.0)
maxRespawnRadius=2000.0

# The minimum radius the player will respawn from spawn. (Default: 1000.0)
minRespawnRadius=1000.0

# The maximum radius from the previous respawn the player will
# respawn at if they have died within 20 mins. (Default: 100.0)
quickRespawnRadius=100.0

## Respawn Multipliers ##

# Multiplier after activating a Nether portal. (Default: 1.5)
netherMultiplier=1.5

# Multiplier after summoning a Wither. (Default: 2.0)
witherMultiplier=2.0

# Multiplier after activating a End portal. (Default: 4.0)
endMultiplier=4.0

# Multiplier for the Large Biomes world type. (Default: 4.0)
largeMultiplier=4.0

## Structure Generation ##

# Villages within this radius from spawn will be abandoned. (Default: 2250.0)
abandonedVillageRadius=2250.0

# Villages within this radius from spawn will be partially abandoned. (Default: 3000.0)
partiallyAbandonedVillageRadius=3000.0

# Temples within this radius from spawn will be looted. (Default: 2250.0)
lootedTempleRadius=2250.0
User avatar
EpicAaron
Posts: 533
Joined: Sat Jun 09, 2012 9:08 am

Re: HC Spawn Config Addon

Post by EpicAaron »

Oh, that is sweet. This is the kind of configuration I wish we had all along.

I particularly like the ability to config the Respawn w/ Friends feature. Doesn't that get disabled after unlocking portal, though? Would it be easy to add a config to keep that around forever?
BTW Community Server Discord: https://discord.gg/arZpuYW
Spoiler
Show
Image
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

The respawn with friends feature? I'm assuming you're referring to the quickRespawnRadius option, which is the thing that makes you respawn near your previous respawn location if you had died recently. I don't know if that affects other player's spawns, as I just wanted to get this out in its basic state and hadn't done extensive testing. If you're right though, I might look into it sometime as see what I can do.
Hiracho
Posts: 103
Joined: Wed Dec 19, 2012 3:43 pm

Re: HC Spawn Config Addon

Post by Hiracho »

it's not the same as that distance :) I'll post some technical details below on where it's located etc
Spoiler
Show
In class FCUtilsHardcore there is a method: HandleHardcoreSpawn
this part is what handles the spawning together. I'm sure you can adapt it to be configurable :)

Code: Select all

    	if ( !FCUtilsWorld.GameProgressHasNetherBeenAccessedServerOnly() )
    	{
    		// early game, players are tied to respawning together
    		
    		FCSpawnLocation recentLocation = newWorld.GetSpawnLocationList().GetMostRecentSpawnLocation();
    		
    		if ( recentLocation != null )
    		{
    			long lDeltaTime = lOverworldTime - recentLocation.m_lSpawnTime;

    			if ( lDeltaTime > 0 && lDeltaTime < FCUtilsHardcoreSpawn.m_iHardcoreSpawnTimeBetweenReassignments )
    			{
    				if ( AssignPlayerToOldSpawnPosWithVariance( newWorld, newPlayer,  
    					new ChunkCoordinates( recentLocation.m_iIPos, recentLocation.m_iJPos, recentLocation.m_iKPos ), 
						recentLocation.m_lSpawnTime ) )
    				{
    					return;
    				}
    			}
    		}
    	}
    	
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

Hiracho wrote: Sat Jul 24, 2021 7:33 am it's not the same as that distance :) I'll post some technical details below on where it's located etc
Spoiler
Show
In class FCUtilsHardcore there is a method: HandleHardcoreSpawn
this part is what handles the spawning together. I'm sure you can adapt it to be configurable :)

Code: Select all

    	if ( !FCUtilsWorld.GameProgressHasNetherBeenAccessedServerOnly() )
    	{
    		// early game, players are tied to respawning together
    		
    		FCSpawnLocation recentLocation = newWorld.GetSpawnLocationList().GetMostRecentSpawnLocation();
    		
    		if ( recentLocation != null )
    		{
    			long lDeltaTime = lOverworldTime - recentLocation.m_lSpawnTime;

    			if ( lDeltaTime > 0 && lDeltaTime < FCUtilsHardcoreSpawn.m_iHardcoreSpawnTimeBetweenReassignments )
    			{
    				if ( AssignPlayerToOldSpawnPosWithVariance( newWorld, newPlayer,  
    					new ChunkCoordinates( recentLocation.m_iIPos, recentLocation.m_iJPos, recentLocation.m_iKPos ), 
						recentLocation.m_lSpawnTime ) )
    				{
    					return;
    				}
    			}
    		}
    	}
    	
Ah wow nice thank you!
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

Updated the addon to contain the following config options:
Spoiler
Show

Code: Select all

maxSpawnTime
quickRespawnHealth
quickRespawnMinFood
quickRespawnFoodDecrement
hcSoulMatingProgression
deathDespawnTime
More information on what these do can be viewed in the config file.
User avatar
EpicAaron
Posts: 533
Joined: Sat Jun 09, 2012 9:08 am

Re: HC Spawn Config Addon

Post by EpicAaron »

IssaMe wrote: Thu Aug 12, 2021 2:05 am Updated the addon to contain the following config options:
Spoiler
Show

Code: Select all

maxSpawnTime
quickRespawnHealth
quickRespawnMinFood
quickRespawnFoodDecrement
hcSoulMatingProgression
deathDespawnTime
More information on what these do can be viewed in the config file.
Great config options.
:)
Hoping to get a vanilla BTW easy mode server up sometime this year to introduce some friends to the mod.
BTW Community Server Discord: https://discord.gg/arZpuYW
Spoiler
Show
Image
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

Thanks, that’s exactly what it’s for :)
User avatar
jackatthekilns
Posts: 297
Joined: Wed Mar 19, 2014 4:58 pm

Re: HC Spawn Config Addon

Post by jackatthekilns »

I have run the game with this mod checked in MultiMC a couple of times and there is not .cfg file in the config folder. Any idea what I might be doing wrong?
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

I've not updated this addon to BTW CE yet :P
User avatar
jackatthekilns
Posts: 297
Joined: Wed Mar 19, 2014 4:58 pm

Re: HC Spawn Config Addon

Post by jackatthekilns »

ah. that will do it every time.
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

Updated to BTW CE v1.2.1
User avatar
jackatthekilns
Posts: 297
Joined: Wed Mar 19, 2014 4:58 pm

Re: HC Spawn Config Addon

Post by jackatthekilns »

Awesome! Thanks so much
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: HC Spawn Config Addon

Post by IssaMe »

Updated to BTW CE v1.3.0
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: [Fabric] Tweaker Addon v1.3.0

Post by IssaMe »

Updated to use Fabric!
Worlds now use the config as default, and further changes specific to each world can be done through commands (so you can have worlds with different spawn radiuses if you want for example).
Also added the option to turn off fires from lightning.
User avatar
Umekobucha
Posts: 9
Joined: Sun Aug 14, 2022 2:03 am

Re: [Fabric] Tweaker Addon v1.3.0

Post by Umekobucha »

I can't seem to install it.
The error text is as follows
Spoiler
Show

Code: Select all

...Add-On Handler Initializing...
Classloader: sun.misc.Launcher$AppClassLoader
Minecraft jar found: jar:file:/E:/Game/MultiMC/instances/1.5.2BTW/.minecraft/bin/minecraft.jar!/
java.lang.NoClassDefFoundError: net/minecraft/src/FCAddOn
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.minecraft.src.FCAddOn
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more
java.lang.NoClassDefFoundError: net/minecraft/src/FCAddOnUtilsWorldData
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.minecraft.src.FCAddOnUtilsWorldData
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more
java.lang.NoClassDefFoundError: net/fabricmc/loader/api/entrypoint/PreLaunchEntrypoint
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more
java.lang.NoClassDefFoundError: net/minecraft/class_955
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.minecraft.class_955
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: [Fabric] Tweaker Addon v1.3.0

Post by IssaMe »

This is a Fabric mod, so you need to have Fabric installed. Also you should place the addon into the `/mods/` folder.
User avatar
dawnraider
Posts: 1876
Joined: Sun Dec 11, 2011 7:00 pm

Re: [Fabric] Tweaker Addon v1.3.0

Post by dawnraider »

Do we have something on the forums for how to install fabric for BTW? I feel like that's something we should have pinned.
Come join us on discord! https://discord.gg/fhMK5kx
Get the Deco Addon here!
Get the Better Terrain Addon here!
Get the Vanilla Mix TP here!
Get the Conquest TP here!
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: [Fabric] Tweaker Addon v1.3.0

Post by IssaMe »

The closest thing we have is this, but it's under an unrelated heading and not really linked anywhere else.
User avatar
EpicAaron
Posts: 533
Joined: Sat Jun 09, 2012 9:08 am

Re: [Fabric] Tweaker Addon v1.3.0

Post by EpicAaron »

As far as I am aware, the only way to install Fabric is to use the pre-configured MultiMC instance. Additional mods need to be installed on top of that.
BTW Community Server Discord: https://discord.gg/arZpuYW
Spoiler
Show
Image
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: [Fabric] Tweaker Addon v1.4.0

Post by IssaMe »

Updated to be compatible with BTW CE v2.0!
User avatar
CrimsonStorm
Posts: 108
Joined: Sat Nov 26, 2011 11:51 am
Location: USA

Re: [Fabric] Tweaker Addon v1.4.0

Post by CrimsonStorm »

Hi IssaMe! Do you have any plans to update this for BTW CE 2.1+? I currently get this error message when trying to use Tweaker 1.4.0 with CE 2.1.3:

https://pastebin.com/LBf8PcLc
User avatar
IssaMe
Posts: 70
Joined: Thu Feb 18, 2021 6:14 pm

Re: [Fabric] Tweaker Addon v1.4.0

Post by IssaMe »

I plan on getting around to it eventually, but probably not anytime soon. You or anyone else is welcome to make a pull request on GitHub though!
I'm not sure how the new difficulty option system works, but I'm thinking it might be nice to utilise those changes.
Post Reply