Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crafting Terminal doesn't work in multiplayer #20

Closed
chvolkmann opened this issue Jul 3, 2017 · 12 comments
Closed

Crafting Terminal doesn't work in multiplayer #20

chvolkmann opened this issue Jul 3, 2017 · 12 comments

Comments

@chvolkmann
Copy link

The Crafting Terminal doesn't seem to work in multiplayer.

I pick an item, click the "Craft" button afterwards, nothing happens. The server console prints the following error message:

Error on message Terraria.MessageBuffer

This feature does however work in singleplayer.

I'm running the latest version of MagicStorage (v0.4.0.2) with tModLoader v0.10.0.2 and Terraria v1.3.5.2.
Additional mods are:

  • Which Mod Is This From? v2.2.1
  • Cheat Sheet v0.2.7.1
  • Recipe Browser v0.2.0.4
  • Summoners Association v0.2.4
  • Fargo's Mutant Mod: Summons and Souls v0.10.3
  • imkSushi's Mod v4.0.8
  • Helpful Hotkeys v1.5.4

...although I don't suspect them to cause this issue.

@RunicPixels
Copy link

Can confirm the same happening to me.
Also running magic storage 0.4.0.2 and tModLoader 0.10.0.2.
All of the above listed mods as well.

@blushiemagic
Copy link
Owner

Does the error have any more details, or is it only that one line?

@chvolkmann
Copy link
Author

Nope, that's all information the console spits out

@Reprisal35
Copy link

Having the same issue. Works just fine in single player, doesnt work in multiple player. Throwing the same message as Freemanium. Running the following Mods on tModLoader 0.10.0.1 and Terraria 1.3.5.2.

  • Magic Storage v0.4.1.1
  • Boss Materials Plus v1.1.2
  • Loot Bags v0.10.2
  • Thorium Mod v1.4.0.5

@Infinoid
Copy link

I can reproduce this in a new (clean) world without any other mods enabled.

Terraria Server v1.3.5.2 - tModLoader v0.10.1
MagicStorage 0.4.2

The Storage Heart works great, in both single-player and multi-player. The Storage Crafting Interface opens and looks normal in both single-player and multi-player. But in multi-player, the "Craft" button doesn't actually craft anything. It makes the crafting noise, but no crafting happens... the new item doesn't appear and the ingredients aren't subtracted. This happens regardless of whether the recipe required a crafting station. It seems to happen for mana crystals, iron bars, everything.

[I also posted on the forum about this. Apologies for the redundancy.]

@AssassinsKeeper
Copy link

I'm getting it as well. The storage itself works fine, but like everyone else here says it's 1 line, no other errors show up in any logs. It was working just fine for probably about a week, but only a few hours after we went into Hardmode and it's broken.

Terraria Server v1.3.5.2 - tModloader v0,10.1 w/ MagicStorage 0.4.2

@vcepela
Copy link

vcepela commented Sep 30, 2017

real exception is:

System.NullReferenceException: Object reference not set to an instance of an object
  at Terraria.GameContent.UI.Elements.UIText.InternalSetText (System.Object text, System.Single textScale, System.Boolean large) [0x0002b] in <3e6851c102b24f3c9b5479ac02ec4b1e>:0
  at Terraria.GameContent.UI.Elements.UIText..ctor (System.String text, System.Single textScale, System.Boolean large) [0x00071] in <3e6851c102b24f3c9b5479ac02ec4b1e>:0
  at MagicStorage.CraftingGUI..cctor () [0x000fb] in <0fc9a6de5748445e9737694c16bb02e9>:0

that is getting called from List<Item> items = CraftingGUI.DoCraft(heart, toWithdraw, result); in NetHelper.ReceiveCraftRequest().

CraftingGUI fails to initialize static UIText() because
DynamicSpriteFont.MeasureString thats used in its constructor returns null when running on dedicated server (tested on Linux).

Quick fix was to move static constructors of UIText() to static method CraftingGUI.Initialize() for those two variables:

private static UIText capacityText;
private static UIText reqObjText2;

@Mr-Rixa
Copy link

Mr-Rixa commented Oct 4, 2017

Quick fix was to ...

Now if I only knew how to do that and build it 😅

Ok I got it built and crafting works on server for now so ain't complaining. 👍

@ahjsrhj
Copy link

ahjsrhj commented Oct 11, 2017

Ok I got it built and crafting works on server for now so ain't complaining. 👍

@Mr-Rixa Can you share this mod? thanks a lot

@Mr-Rixa
Copy link

Mr-Rixa commented Oct 11, 2017

@ahjsrhj Well I have very limited knowledge of coding and it was a bit hit and miss. You'll take all responsibility of what might happen if you do this. I recommend taking a manual backup of your world before doing this. (so far I've had no problems 😅)

  1. You'll need to put this source into Mod Sources folder
    (windows location: %userprofile%\Documents\My Games\Terraria\ModLoader\Mod Sources )
    note: it might not exist, you probably need to make the folder!
  2. make sure the extracted folder is called MagicStorage ( Mod Sources\MagicStorage )
  3. File you'll be editing is CraftingGUI.cs
  4. after editing go in-game mod sources menu and hit build+reload.
line code
change 80 private static UIText capacityText;
change 92 private static UIText reqObjText2;

and then add this after line 312

// hacky test fix that didn't lag
if (reqObjText2 == null)
{
	reqObjText2 = new UIText(Language.GetText("LegacyInterface.22"));
}
if (capacityText == null)
{
	capacityText = new UIText(Language.GetText("LegacyInterface.22"));
}

Like I stated earlier this was a bit hit and miss and if anybody has a better or more elegant way to fix it please correct my horrible hacky ways 😅

@ahjsrhj
Copy link

ahjsrhj commented Oct 11, 2017

@Mr-Rixa Thank you very much!

@chvolkmann
Copy link
Author

@Mr-Rixa If you feel like it, you can even issue a pull request, so others can quickly import your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants