• Switch 1.4: New patch released Jan 18, details are here. Read the full release details here. Report bugs here.

Standalone [1.3] tModLoader - A Modding API

egshels

Duke Fishron
Ok, I figured out how to do trails, so I don't need help with that anymore, but I do need help with one more thing; Ore generation. What I've tried so far hasn't worked. Would anyone be able to help me with that?
I'm trying to make an ore spawn at the deepest level of the world, but still above hell. I also want it to only spawn after killing a specific boss, with a line of text saying that it has spawned to let the player know.
You should try the TModLoader Discord server
 

CameronTerrarian

Steampunker
My tMod has this issue with loading, and whenever it starts loading mods, it gets to a mod I use named yoyos2 then freezes and crashes. I was wondering if the mod was causing that or just something in the system. And I'm looking for answers on how to fix this issue, like maybe a way I could go into the files and find mods and delete them? which yes, I have tried. :merchantcry:
 

Cre§trz

Terrarian
Ok, so I'm coding on mac.
I've set my references, them being...
  • Mono.csproj: FNA.dll and tModLoaderMac.exe
  • Windows.csproj: MicrosoftCodeAnalysis.CSharp, MicrosoftCodeAnalysis, Mono.Cecil.Pdb, RosylnWrapper, System.Reflection.Metadata, and tModLoaderMac.exe
To anyone who reads this, I've compiled twice now.
Thanks, Cresterz

P.S. There's a file below with what I did.
 

Attachments

  • volarity.zip
    10.5 MB · Views: 71

Zoky

Terrarian
hey, my friend downloaded tmod loader however it says that he needs to buy the game even tho he did (discontinued version from GOG)
why is that?
This mod and pretty much every single mod works with the cracked versions as well, it's not that (I hope it's not that at least) You might want your friend to verify the file maybe? And a reinstall to the game if possible, he can back-up his characters if needed.
 

TerraGuy

Terrarian
Hello, I'm new to Terraria modding, but I know C# and programming well. I use Visual Studio 2019.

I would like to mod Signs in order to create editable and writable books (or scrolls -- not to be confused with spells). How can I best do that using TModLoader?

Here is what I have found so far:
1. Terraria.exe: decompiling Terraria.exe showed me that Sign is a different class. I mean it's not an Item per se. It seems to be under Terraria.Sign and not under Terraria.Item or Terraria.Tile.
2. TModLoader: It seems that there is no mod class something like ModSign. No, there is no such class. Contrary to the existing classes like ModItem and ModTile. Pity. Is this something that the team might possibly consider adding to TModLoader in the future?
3. ExampleMod: browsing the ExampleMod was helpful, but I didn't find anything even remotely similar to Signs.
3. Make is custom: So the solution seems to be that I create a ModItem, let's call it 'TestScroll' and I create a corresponding ModTile, let's say 'TestScrollTile'. Then within my ModItem class, in SetDefaults() method, I will add a line: item.createTile = mod.TileType("MyScrollTile"); -> in order to be able to spawn the tile in the game.
4. add Sign's functionality: Then I could add methods to my ModTile class, something like RightClick(int i, int j) method. Browsing ExampleBed provides a sample RightClick method. However this part seems to be the most difficult. Is there a way to copy the code from original Terraria? First step, I could simply provide the same functionality as the signs edit and read. In Terraria.exe under Terraria.Sign there seem to be 2 methods: ReadSign() and TextSign(), as well as fields: text, which is string type and x and y, which are int type.
4. Checking in game: Signs have the following functionality in game:
  • Mouse Over the Tile: Speech bubble appears over the Sign. Sign's text (if edited previously) appears under the Sign. The text has transparent background.
  • Right Click the Tile: A blue box appears over the Sign. It seems that it is displayed at a fixed position on the screen (jumping doesn't adjust the position of the box). The box gets larger at the bottom if there is more text -> upto the maximum allowed, so the box's bottom is just over the Sign Tile. Maximum number of letters is 500: 50 letters per row, 10 rows max. Interesting thing is that you can type in more letters, they will be stored, but they will not be displayed (perhaps a small bug/oversight in the game?). There are 2 buttons: Edit and Close. If you click Edit you have 2 buttons: Save and Close.
5. Develop further: then and only then I could program and expand the functionality. This would be the time to shine. But I need to crack the fundamentals first.

I would highly appreciate any help, comments or tips the community could provide.

FYI here is the idea which intrigued me: Writing Sets, Empty Books, and Written Books
 
Last edited:

jopojelly

Retinazer
tModLoader
just posting here about a question. is there away for me and my friend to play together without him being forced to use all the same mods im using. i want to install the 3D Terraria mod but he doesn't want to.
no, mods must be the same or it would break everything. Simply launch vanilla Terraria when you want to play together with your friend. (If you used the installer correctly, it should be called Terraria_v1.3.5.3.exe in the install directory)
 

Umecag.Z

Terrarian
I can't change the Mod's NPC flag. My version of Tml is v0.11 beta 4. (If I use v0.10.1.5, My Game will be broken after Beating the Wall of Fresh.) The original NPC has no problem. Help me please~~
 

Zesste

Terrarian
Hello :) I'm wondering why do I have a System.OutOfMemoryException ?

I have :

processor : intel(R) Core(Tm) i7-7700 3.60GHz 3.60GHz
Graphic card : GeForce GTX 1060 3GB
Ram : 16Go
64bits
windows 10

MODS :

-ancient awoken
-alchemistNPS
-Antiaris
-basemod
-bosschecklist
-bosscursor
-calamityMOD + music
- census
-Elements awoken
-Enabled
-extrensibleInventory
-Fargowiltas
-bosshealtbar
-HamstarHelpers
-IMKsushimod
-joostMod
-More chest loot
-Magic storage
-Maxstack plus
-no more tombs
-Qwerty's Random content
-recipe browser
-redemption
-sacred tools
-spirit mod
-split
-thorium
-univers of sword
-wildlife
-wingslot
 

Attachments

  • terraria crash.PNG
    terraria crash.PNG
    34.2 KB · Views: 222

Axolot

Terrarian
Im trying to make a terraria mod for the first time on OSX, but when I click "Build and Reload" in the mod sources menu of tModLoader, I get the screen in the attached image. If anyone knows how to solve this error, It'd be a big help.
 

Attachments

  • Screen Shot 2019-05-15 at 6.38.25 PM.png
    Screen Shot 2019-05-15 at 6.38.25 PM.png
    251.8 KB · Views: 204

sharkman0101

Spazmatism
Hello :) I'm wondering why do I have a System.OutOfMemoryException ?

I have :

processor : intel(R) Core(Tm) i7-7700 3.60GHz 3.60GHz
Graphic card : GeForce GTX 1060 3GB
Ram : 16Go
64bits
windows 10

MODS :

-ancient awoken
-alchemistNPS
-Antiaris
-basemod
-bosschecklist
-bosscursor
-calamityMOD + music
- census
-Elements awoken
-Enabled
-extrensibleInventory
-Fargowiltas
-bosshealtbar
-HamstarHelpers
-IMKsushimod
-joostMod
-More chest loot
-Magic storage
-Maxstack plus
-no more tombs
-Qwerty's Random content
-recipe browser
-redemption
-sacred tools
-spirit mod
-split
-thorium
-univers of sword
-wildlife
-wingslot

You have too many mods installed. The game is only allowed to use so much RAM because it executes as a 32-bit program, so you need to get rid of a few so that the game will not go over the memory limit.
 

egshels

Duke Fishron
Hello :) I'm wondering why do I have a System.OutOfMemoryException ?
Your using too many mods as this version of TModLoader is 32 bit, meaning its locked to 4 gb of available ram. The 64 bit version of TModLoader fixes this issue as it doesn't have a cap on ram that anyones going to ever hit.
 

McJag

Terrarian
Hey! I didn't know where else to go. I've sunk a lot of hours into Modded Terraria, and i've been running Calamity, Spirit, and some other minor mods on this run. For some reason it won't let me start up my world on Multiplayer, it will just be stuck on "Starting server..." If i try to load it on singleplayer it will just said "No backup found" or something along those lines, BUT i can create a new singleplayer world and run my multiplayer character with all of my good items on it. But creating a new Multiplayer world also does not work. If I have lost my world I'll be very upset, I had so much stuff, and I grinded everyday to beat the final boss and conquer the mod.
 
Top Bottom