tModLoader Even More Modifiers Relaunch Beta

upload_2018-10-19_13-45-24.png

not a bug or anything but got this with +29 luck and over 500 cubes on that one item (i was trying for +3 luck total)
 
Updated to v0.1.2.3
  • I fixed a bunch of caching issues, once again. I hope this should fix the bugs causing absurd damage, at least it did so for me in multiplayer.
  • I added support for anti social so that you get the modifier bonuses when they are equipped in vanity.
  • Wing slot is not yet supported, because I cannot access the slots. It may be supported in the future.
 
I recently updated this mod after a long time and started a multiplayer game with some friends. Unfortunately for one of them Every weapon they crafted ended up with the cursed modifier. There are 2 huge problems with this, firstly that they kept dying because there was no debuff icon showing why they were taking damage and constantly dying, "Cursed" doesn't really explain itself upfront. The second problem is that it both feels really awful and doesn't make any sense for crafted items to be cursed, you made it with your own hands where did the curse come from?

Would is be possible please to either add a config so we can disable the cursed modifier just for us or to prevent curse from being applied to crafted (or bought) items. I think having curse as a possibility on random drops or found items is interesting, but having all your weapons you craft get cursed feels awful and is a huge resource sink.

We've disabled this mod for now, hopefully we can try it again at some point.
 
I recently updated this mod after a long time and started a multiplayer game with some friends. Unfortunately for one of them Every weapon they crafted ended up with the cursed modifier. There are 2 huge problems with this, firstly that they kept dying because there was no debuff icon showing why they were taking damage and constantly dying, "Cursed" doesn't really explain itself upfront. The second problem is that it both feels really awful and doesn't make any sense for crafted items to be cursed, you made it with your own hands where did the curse come from?

Would is be possible please to either add a config so we can disable the cursed modifier just for us or to prevent curse from being applied to crafted (or bought) items. I think having curse as a possibility on random drops or found items is interesting, but having all your weapons you craft get cursed feels awful and is a huge resource sink.

We've disabled this mod for now, hopefully we can try it again at some point.
Well this would go for any modifier then, because no modifier has no backstory on how it got to that item. When ModConfig makes it into tModLoader, I can make what you ask a feature, but nobody knows for sure when that will happen. Sad to see you stop using the mod, you can always just do a single reforge or use a single cube to get rid of the modifier...
 
Well this would go for any modifier then, because no modifier has no backstory on how it got to that item. When ModConfig makes it into tModLoader, I can make what you ask a feature, but nobody knows for sure when that will happen. Sad to see you stop using the mod, you can always just do a single reforge or use a single cube to get rid of the modifier...

Unfortunately our issue occured at the literal start of the game before we even made a house let alone found the tinkerer. First weapon drop they got (a yoyo) had cursed as well as multiple weapons they crafted.

I believe mod configs are already available, I know "Reduced Grinding", "Wing Slot", and "Yet another Boss Health Bar" have .json configs that I can edit before loading the server.
https://github.com/blushiemagic/tModLoader/wiki/Basic-JSON-&-ModConfigs

Maybe I can convince them to try it again as a mod we install after getting the tinkerer, but I don't think they'll go for it from the start any more so long as cursed is a thing. Thank you for listening and replying.
 
I believe mod configs are already available, I know "Reduced Grinding", "Wing Slot", and "Yet another Boss Health Bar" have .json configs that I can edit before loading the server.
https://github.com/blushiemagic/tModLoader/wiki/Basic-JSON-&-ModConfigs
You do realize I made that page? I am a tModLoader developer, and ModConfig is not yet available. (The page also states that). These mods created their own code for config files. But, I do you get your complaint. It's been said before. I guess a good compromise is only unlocking the cursed modifier after killing BoC or EoW.
 
Yeah, I think a good solution would be 'unlocking' cursed after EoC. This keeps it off of earlygame stuff that you'll end up using for a while. And by the time you fight the eye you should reasonably have enough health to deal with the curse.
 
You do realize I made that page? I am a tModLoader developer, and ModConfig is not yet available. (The page also states that)

Welp, it's official, I can't read. :p


Despite my mistake, I really do appreciate you listening and taking this feedback. I look forward to seeing what changes you decide on, but locking cursed behind a boss sounds good.
 
Hey, the mod worked fine until recently, but now I can't enchant anything with black cube or random drops. The cube just gets used.
 

Attachments

  • Modlist.png
    Modlist.png
    40.1 KB · Views: 191
Hey guys, so I've been playing around with the lib a little bit, trying to make some new modifiers. I don't know if this is the right place to post this stuff but its been giving me a few errors when building the code from Tmodloader inside of Terraria.

First one seems to be caused by this chunk of code I got from your source. I see that its expecting/not expecting different symbols but I'm not well versed in C# or lambda expressions so I honestly don't know whats going on here.
Code:
public override ModifierTooltipLine[] TooltipLines => new[]
         {
            new ModifierTooltipLine {Text = $"+{Properties.RoundedPower}% damage vs max life foes", Color = Color.LimeGreen},
        };
c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,45) : error CS1056: Unexpected character '$'

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,60) : error CS1002: ; expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,66) : error CS1031: Type expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,66) : error CS1519: Invalid token '[' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,67) : error CS1001: Identifier expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(47,10) : error CS1031: Type expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(47,10) : error CS1519: Invalid token '{' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,37) : error CS1519: Invalid token '{' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,43) : error CS1519: Invalid token '=' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,107) : error CS1519: Invalid token '=' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,124) : error CS1519: Invalid token '}' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,125) : error CS0116: A namespace cannot directly contain members such as fields or methods

I then commented out that block of code to see if it would run but then I get this runtime error.
Failed to resolve assembly: 'Loot, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection`1 parameters)
at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute)
at Mono.Cecil.CustomAttribute.<Resolve>b__34_0(CustomAttribute attribute, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.CustomAttribute.Resolve()
at Mono.Cecil.CustomAttribute.get_ConstructorArguments()
at Mono.Cecil.ImmediateModuleReader.ReadCustomAttributes(ICustomAttributeProvider provider)
at Mono.Cecil.ImmediateModuleReader.ReadMethods(TypeDefinition type)
at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
at Mono.Cecil.ImmediateModuleReader.ReadModule(ModuleDefinition module)
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters)
at Terraria.ModLoader.ModCompile.PostProcess(Byte[] dll, Boolean forWindows)
at Terraria.ModLoader.ModCompile.CompileMod(BuildingMod mod, List`1 refMods, Boolean forWindows, Byte[]& dll, Byte[]& pdb)
at Terraria.ModLoader.ModCompile.Build(BuildingMod mod, IBuildStatus status)
at Terraria.ModLoader.ModCompile.Build(String modFolder, IBuildStatus status)
at Terraria.ModLoader.ModLoader.<>c.<BuildMod>b__74_0(Object _)

Not sure what's causing this one but I think its from this chunk of code here since I tried commenting out different parts of code to try and narrow it down.
Code:
 [AutoDelegation("OnModifyHitNPC")]
        [DelegationPrioritization(DelegationPrioritization.Late, 999)]
        public void ModifyHitNPC(ModifierPlayer player, Item item, NPC target, ref int damage, ref float knockback, ref bool crit)
        {
            if (target.life == target.lifeMax)
            {
                HealthyFoes(ref damage);
            }
        }

Any advice would help a ton. Thanks.
 
Hey guys, so I've been playing around with the lib a little bit, trying to make some new modifiers. I don't know if this is the right place to post this stuff but its been giving me a few errors when building the code from Tmodloader inside of Terraria.

First one seems to be caused by this chunk of code I got from your source. I see that its expecting/not expecting different symbols but I'm not well versed in C# or lambda expressions so I honestly don't know whats going on here.
Code:
public override ModifierTooltipLine[] TooltipLines => new[]
         {
            new ModifierTooltipLine {Text = $"+{Properties.RoundedPower}% damage vs max life foes", Color = Color.LimeGreen},
        };
c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,45) : error CS1056: Unexpected character '$'

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,60) : error CS1002: ; expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,66) : error CS1031: Type expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,66) : error CS1519: Invalid token '[' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(46,67) : error CS1001: Identifier expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(47,10) : error CS1031: Type expected

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(47,10) : error CS1519: Invalid token '{' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,37) : error CS1519: Invalid token '{' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,43) : error CS1519: Invalid token '=' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,107) : error CS1519: Invalid token '=' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,124) : error CS1519: Invalid token '}' in class, struct, or interface member declaration

c:\Users\Tyler\Documents\My Games\Terraria\ModLoader\Mod Sources\TestMod\Modifiers\SatansAce.cs(48,125) : error CS0116: A namespace cannot directly contain members such as fields or methods

I then commented out that block of code to see if it would run but then I get this runtime error.
Failed to resolve assembly: 'Loot, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection`1 parameters)
at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute)
at Mono.Cecil.CustomAttribute.<Resolve>b__34_0(CustomAttribute attribute, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.CustomAttribute.Resolve()
at Mono.Cecil.CustomAttribute.get_ConstructorArguments()
at Mono.Cecil.ImmediateModuleReader.ReadCustomAttributes(ICustomAttributeProvider provider)
at Mono.Cecil.ImmediateModuleReader.ReadMethods(TypeDefinition type)
at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
at Mono.Cecil.ImmediateModuleReader.ReadModule(ModuleDefinition module)
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters)
at Terraria.ModLoader.ModCompile.PostProcess(Byte[] dll, Boolean forWindows)
at Terraria.ModLoader.ModCompile.CompileMod(BuildingMod mod, List`1 refMods, Boolean forWindows, Byte[]& dll, Byte[]& pdb)
at Terraria.ModLoader.ModCompile.Build(BuildingMod mod, IBuildStatus status)
at Terraria.ModLoader.ModCompile.Build(String modFolder, IBuildStatus status)
at Terraria.ModLoader.ModLoader.<>c.<BuildMod>b__74_0(Object _)

Not sure what's causing this one but I think its from this chunk of code here since I tried commenting out different parts of code to try and narrow it down.
Code:
 [AutoDelegation("OnModifyHitNPC")]
        [DelegationPrioritization(DelegationPrioritization.Late, 999)]
        public void ModifyHitNPC(ModifierPlayer player, Item item, NPC target, ref int damage, ref float knockback, ref bool crit)
        {
            if (target.life == target.lifeMax)
            {
                HealthyFoes(ref damage);
            }
        }

Any advice would help a ton. Thanks.
You need to compile in c#6. Why are you tinkering?
 
Hi Jofairden I have a question with one the functions in this mod, does RecalculateStack properly subtract item count for increments higher than 1?

Code:
internal void RecalculateStack()
{
// @todo track cube tier as well
// after cube is slotted, count total number
// .Take 58 because 59th slot is MouseItem for some reason.
int stack = Main.LocalPlayer.inventory.Take(58)
.Where(x => x.type == item.type)
.Select(x => x.stack)
.Sum();
if (Main.mouseItem?.type == item.type)
{
stack += Main.mouseItem.stack;
}
stack = (int)MathHelper.Clamp(stack, 0f, 999f);
this.item.stack = stack;
}


Code:
                // Remove stack from player's inventory
                // .Take 58 because 59th slot is MouseItem for some reason.
                foreach (Item item in Main.LocalPlayer.inventory.Take(58))
                {
                    if (item.type == _cubePanel.item.type)
                    {
                        checkMouse = false;
                        item.stack -= nCube;
                        break;
                    }
                }

                if (checkMouse)
                {
                    // This check should be redundant; otherwise we should never have reached this point
                    //if (Main.mouseItem?.type == _cubePanel.item.type)
                    Main.mouseItem.stack -= nCube;
                    if (Main.mouseItem.stack <= 0)
                    {
                        Main.mouseItem.TurnToAir();
                    }
                }

I'm hosting a personal server with some friends and they wanted a more complex system so I implemented a feature where the more rerolls done on a specific item would increase amount of cubes consumed.


However I'm getting issues with larger increments to the point it doesnt subtract from the next set of cubes.


Which is where the first question comes in, any ideas? This is the first time messing around with c# so there might be something wrong with some of the logic I implemented.
 
Well, is that only happening in the last slot of the inventory? The answer is simple, you need to debug. I can't really help a lot with personal endeavors unfortunately.
 
Well, is that only happening in the last slot of the inventory? The answer is simple, you need to debug. I can't really help a lot with personal endeavors unfortunately.

Alright so this time I'm using emm downloaded directly from the mod browser, no changes but I'm still able to reproduce the issue, the cubes aren't in the last slot of the inventory.


Edit: Also another issue in both sp and mp if you leave the item in the slot and you exit the game via menu or disconnect from server, crash, etc it will be lost.
 
Last edited:
Edit: Also another issue in both sp and mp if you leave the item in the slot and you exit the game via menu or disconnect from server, crash, etc it will be lost.
I already fixed this for next release

The second part you linked will need additional logic, since the base mod does not go by consuming multiple cubes. You'll have to calculate if the stack isn't big enough, and see if there's another stack that can take the remainder.
 
Hi, how is possible to lock a single effect? i have tried that with sealing cube, but lock every modifier.

  • Lock entire modifier (cannot re-roll with reforging)
  • Lock a single effect (cannot re-roll with reforging)
  • Re-roll 1/2/3/4 effect(s)
  • Re-roll everything, you're luckier rolling higher magnitudes
  • Re-roll everything, choose what to keep 1/2/3/4 effect (between old AND new)
  • And then also:
    • Reroll magnitudes
      • 1 line
      • 2 lines
      • 3 line
      • everything
    • And more...
 
Back
Top Bottom