tModLoader Learn By Doing

Hiccup251

Skeletron Prime
This is a lightweight RPG mod that allows you to gain levels in a variety of skills by doing things related to those skills, in the style of the Elder Scrolls and Rune Factory games. Leveling skills will grant small, relevant stat bonuses. Hit things with melee weapons and you'll do a little more damage with them. Take a lot of damage, and you'll see your maximum life and defense go up.

Code:
        0,1,2,3 (21): melee, ranged, magic, summon, throwing prof. Raised by damaging and killing enemies with a damage type. Increases damage with that type. [1%]
        4: Running. Increases movespeed. [2%]
        5: Jumping. Increases jump speed and height. [3%]
        6: Swimming. Increases movespeed when swimming. [3%]
        7: Flying. Increases flight time and flight speed. [1%; 1%]
        8: Toughness, raised by taking damage and surviving. Increases defense and health. [1/2 defense, 1 HP] CAP 10
        9: Fall resistance, raised by taking fall damage and surviving. Negates fall damage.
        10: Mana manipulation, raised by using mana. Increases mana recovery speed. [1/2 bonus regen]
        11: Fishing, raised by fishing and completing angler quests. Increases fishing power. [1]
        12: Death resistance, raised by dying. Gives a chance to avoid death. [1%] (chance cannot exceed 80%)
        13: Eating. Increases health and defense slightly. [1/2 HP; 1/4 defense]
        14: Potion tolerance. Increases health and damage slightly. [1/2 HP; 1/3% damage, potion CD -.5 sec] CAP 60 (does not stack with philosopher's stone effect)
        15: Regeneraton, raised by naturally regenerating life. Increases natural life regen speed. [1HP/12sec]
        16: Ammo efficiency, raised by ammo consumption. Provides a chance to not consume ammo. [1%]
        17: Contact resistance, raised by taking contact damage. Unlocked when toughness caps. Decreases contact damage taken. [1%] CAP 10
        18: Projectile resistance, raised by taking projectile damage. Unlocked when toughness caps. Decreases projectile damage taken. [1%] CAP 10
        19: Thorns: raised by taking contact damage. Unlocked when contact resistance caps. Returns damage to enemies that contact with you. [10%]
        20: Evasion: raised by taking projectile damage. Unlocked when projectile resistance caps. Provides a chance to avoid projectile damage. [1%] CAP 10

This mod includes a settings text file that allows you to modify the rate of exp gained and the magnitude of skill bonuses. There is also a flat adjustment that you can use to bring your combat stats up or down by a flat amount in order to adjust for the difficulty of your set of mods. This file can be found in your tModLoader folder after loading the mod for the first time: LBDsettings.txt. The way this file is read isn't particularly robust, so be sure not to change the format of the first three lines, and ensure the first three lines contain only numbers.

You can bind a hotkey in Settings > Controls in game that will allow you to view the current level of all your skills, as well as the bonuses they provide, and the progress to the next level.

Download is available on the mod browser.

I made this while procrastinating on a long essay that I really should have been doing instead. I don't have plans to expand this mod, but if there are any major bugs or imbalances that can't be addressed with the config file, I'll get around to them eventually.
 
Last edited:
Sorry, I didn't see that earlier. :confused:
Is there an option to raise the cap?
No, but only potion tolerance and evasion are capped and without unlocking a new skill after capping, and those two would both cause some pretty serious balance issues if left uncapped relative to the other available skills. You can still increase their effect in the settings, though you can't increase the effect of only individual skills, they're all tied together there.
 
This is amazing. Thank you for this. And you allowing the source to be read is going to make all my mods better. I noticed, you didn't include mining?
 
omfg,sorry about swearing but this mod is awesome,if only there would be a real RPG terraria :D , good job
 
This is amazing. Thank you for this. And you allowing the source to be read is going to make all my mods better. I noticed, you didn't include mining?
I leave all my mods open source, so feel free to check out the others as well.

I'd love to implement a mining skill, but it would be an enormous amount of work to detect the moment where a player breaks a tile with a pickaxe. All the skills in here have relatively simple ways to grant exp.
 
Wait, if there isn't a cap to, lets say, mana regen, could it level up forever?
Yep, but it would take longer for each level. Most skills follow an exponential formula for required EXP, so it gets a little ridiculous at higher levels.
 
Hello!

I found this mod and thought it was amazing, so i tried it out. I turned out to be really OP by just getting hit by a slime like 3 or 4 times. Ate one mushroom and my life regen already prevents me from drowning. Jumping lvl 5 and i can jump like 2-2.5 times my normal jump. I found that very weird.

I tested out Toughness cause it's the easiest to check. Each lvl is 1/2 defense and 1HP, to a max of 5 defense and 10HP. Turns out each lvl gave me 10HP and 5 defense. Clearly all my stats are multiplied by 10 for some reason. I don't know how to fix it or what is causing it. If it helps here is the list of mods i use:

-Boss Checklist
-Cheat Sheet
-Demolitionist+
-Dye Easy
-Experience and Classes
-imkSushi's Mod
-imkSushi's Mod Drops Addon
-imkSushi's Mod Naturally Occuring Moons
-Max Stack +
-Reduced Grinding
-Thorium
-Vanilla Tweaks
-WeaponOut

If there is a way around this and could get help, really appreciated! Or at least a way to edit them myself to fix this issue.

Cheers!

EDIT:
Well, i just went and edited the multiplier to "0.1" and of course it worked because maths. But it would be interesting to see if this is a bug with another mod or something!
 
Hello!

I found this mod and thought it was amazing, so i tried it out. I turned out to be really OP by just getting hit by a slime like 3 or 4 times. Ate one mushroom and my life regen already prevents me from drowning. Jumping lvl 5 and i can jump like 2-2.5 times my normal jump. I found that very weird.

I tested out Toughness cause it's the easiest to check. Each lvl is 1/2 defense and 1HP, to a max of 5 defense and 10HP. Turns out each lvl gave me 10HP and 5 defense. Clearly all my stats are multiplied by 10 for some reason. I don't know how to fix it or what is causing it. If it helps here is the list of mods i use:

-Boss Checklist
-Cheat Sheet
-Demolitionist+
-Dye Easy
-Experience and Classes
-imkSushi's Mod
-imkSushi's Mod Drops Addon
-imkSushi's Mod Naturally Occuring Moons
-Max Stack +
-Reduced Grinding
-Thorium
-Vanilla Tweaks
-WeaponOut

If there is a way around this and could get help, really appreciated! Or at least a way to edit them myself to fix this issue.

Cheers!

EDIT:
Well, i just went and edited the multiplier to "0.1" and of course it worked because maths. But it would be interesting to see if this is a bug with another mod or something!
Maybe E & C?
 
Hello!

I found this mod and thought it was amazing, so i tried it out. I turned out to be really OP by just getting hit by a slime like 3 or 4 times. Ate one mushroom and my life regen already prevents me from drowning. Jumping lvl 5 and i can jump like 2-2.5 times my normal jump. I found that very weird.

I tested out Toughness cause it's the easiest to check. Each lvl is 1/2 defense and 1HP, to a max of 5 defense and 10HP. Turns out each lvl gave me 10HP and 5 defense. Clearly all my stats are multiplied by 10 for some reason. I don't know how to fix it or what is causing it. If it helps here is the list of mods i use:

-Boss Checklist
-Cheat Sheet
-Demolitionist+
-Dye Easy
-Experience and Classes
-imkSushi's Mod
-imkSushi's Mod Drops Addon
-imkSushi's Mod Naturally Occuring Moons
-Max Stack +
-Reduced Grinding
-Thorium
-Vanilla Tweaks
-WeaponOut

If there is a way around this and could get help, really appreciated! Or at least a way to edit them myself to fix this issue.

Cheers!

EDIT:
Well, i just went and edited the multiplier to "0.1" and of course it worked because maths. But it would be interesting to see if this is a bug with another mod or something!
Interesting. It sounds to me like the multipliers are being read as 10x their intended value, or, more likely, the decimal point is being ignored by the parser (1.0 is read as 10, 0.1 is read as 1). Are you on Mac or Windows? This might be something I can avoid by changing the settings file to a .json or something. Of course, this isn't super high priority, since it can be fixed easily enough, but if a good chunk of players are experiencing the issue I should find a way to fix it.

If you wanted, you could test this by setting the values super low (0.00001) to see if anything changes. If everything is the same, I'm probably right. It's very unlikely this is a mod conflict.
 
When I try create a new character, I get this
The input string had the wrong format.
in System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
in LearnByDoing.MPlayer.Initialize()
in Terraria.ModLoader.ModPlayer.CreateFor(Player newPlayer)
in Terraria.ModLoader.PlayerHooks.<>c__DisplayClass4_0.<SetupPlayer>b__0(ModPlayer modPlayer)
in System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
in System.Linq.Buffer`1..ctor(IEnumerable`1 source)
in System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
in Terraria.ModLoader.PlayerHooks.SetupPlayer(Player player)
in Terraria.Player..ctor(Boolean startupInventory)
in Terraria.GameContent.UI.States.UICharacterSelect.NewCharacterClick(UIMouseEvent evt, UIElement listeningElement)
in Terraria.UI.UIElement.Click(UIMouseEvent evt)
in Terraria.UI.UserInterface.Update(GameTime time)
in Terraria.Main.DoUpdate(GameTime gameTime)
in Terraria.Main.Update(GameTime gameTime)
And when I try to enter player select screen with one existing, my game just crashes without a message.
 
When I try create a new character, I get this
The input string had the wrong format.
in System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
in LearnByDoing.MPlayer.Initialize()
in Terraria.ModLoader.ModPlayer.CreateFor(Player newPlayer)
in Terraria.ModLoader.PlayerHooks.<>c__DisplayClass4_0.<SetupPlayer>b__0(ModPlayer modPlayer)
in System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
in System.Linq.Buffer`1..ctor(IEnumerable`1 source)
in System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
in Terraria.ModLoader.PlayerHooks.SetupPlayer(Player player)
in Terraria.Player..ctor(Boolean startupInventory)
in Terraria.GameContent.UI.States.UICharacterSelect.NewCharacterClick(UIMouseEvent evt, UIElement listeningElement)
in Terraria.UI.UIElement.Click(UIMouseEvent evt)
in Terraria.UI.UserInterface.Update(GameTime time)
in Terraria.Main.DoUpdate(GameTime gameTime)
in Terraria.Main.Update(GameTime gameTime)
And when I try to enter player select screen with one existing, my game just crashes without a message.
Can you find the settings text file in your tmodloader folder and post the contents? This is a read error, something is probably wrong with one of the first three lines.
 
Can you find the settings text file in your tmodloader folder and post the contents? This is a read error, something is probably wrong with one of the first three lines.
Is it the LBDsettings? If it is then
1.0
0
1.0
First line is a multiplier for the beneficial effects of skills. Setting this to a negative value will probably have some really weird consequences.
Second line is a flat adjustment to the values of some skills (damage, health, movespeed, jump speed)
It is not recommended to go below -0.5 on this value. -0.05 will normalize to vanilla values pretty early on with skill boosts.
Third line is a multiplier to all experience gained. Setting this to a negative value will probably have some really weird consequences.
 
Is it the LBDsettings? If it is then
1.0
0
1.0
First line is a multiplier for the beneficial effects of skills. Setting this to a negative value will probably have some really weird consequences.
Second line is a flat adjustment to the values of some skills (damage, health, movespeed, jump speed)
It is not recommended to go below -0.5 on this value. -0.05 will normalize to vanilla values pretty early on with skill boosts.
Third line is a multiplier to all experience gained. Setting this to a negative value will probably have some really weird consequences.
The contents are normal. Doing some reading here, looks like periods aren't able to be parsed in certain environments. I'll look for a way to generalize the read/write so it works in all environments (it's probably due to a system language difference). In the meantime, it should work if you change the "1.0"s to "1"s, and might also work if you replace the periods with commas. I'm not sure what other characters might be separators.
 
Back
Top Bottom