• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

Standalone [1.3] tModLoader - A Modding API

zadum4ivii

Official Terrarian
16 without means that it's good that we've commented out the coordinate heights.

18 with means that we need to change the animationFrameHeight to include the purple lines. So it looks like there are 3 tiles, so animationFrameHeight should be 54.
Also, how to change time of frame changing? Because they change too slow as for me.
 

blushiemagic

Retinazer
tModLoader
Also, how to change time of frame changing? Because they change too slow as for me.
Assuming this is what your code looks like right now:
Code:
    frameCounter++;
    if(frameCounter > 8)
    {
        frameCounter = 0;
        frame++;
        frame %= 8;
    }
If you want to double the speed for example, you'd change it to something like this:
Code:
    frameCounter++;
    if(frameCounter > 4)
    {
        frameCounter = 0;
        frame++;
        frame %= 8;
    }
 

zadum4ivii

Official Terrarian
Assuming this is what your code looks like right now:
Code:
    frameCounter++;
    if(frameCounter > 8)
    {
        frameCounter = 0;
        frame++;
        frame %= 8;
    }
If you want to double the speed for example, you'd change it to something like this:
Code:
    frameCounter++;
    if(frameCounter > 4)
    {
        frameCounter = 0;
        frame++;
        frame %= 8;
    }
Thanks again!
 

BiscuitBro

Terrarian
When I Build/reload my mod Terraria crashes. I'm not sure why so here is what I have so far of my mod.

Dropbox link: Link removed

Also please don't copy my ideas!
 
Last edited:

blushiemagic

Retinazer
tModLoader
When I Build/reload my mod Terraria crashes. I'm not sure why so here is what I have so far of my mod.

Dropbox link: https://www.dropbox.com/sh/pz1c1rovy65asys/AADH3ziwMRQva0MvB9zzDz1pa?dl=0

Also please don't copy my ideas!
If it's crashing, then most likely there's a missing equipment texture. The next update (which I hope to release today) will fix missing equipment textures crashing the game, so then we'll see whether this is actually causing your crash.
 

Smiffy

Skeletron Prime
There's no such thing as having too much fun.


This little experiment is turning out to be a success. I might release it soon, although I will have to overcome some usability issues before I do so (e.g. changing brush radius, selecting tiles not currently available to the user, etc).
 

Berserker66

Terrarian
What exactly are differences in world file format, if any? Had a quick test and my Omnitool seems to comprehend it just fine, but if mods can tinker with it I'd like to know and adapt - so here I am asking.
 

blushiemagic

Retinazer
tModLoader
What exactly are differences in world file format, if any? Had a quick test and my Omnitool seems to comprehend it just fine, but if mods can tinker with it I'd like to know and adapt - so here I am asking.
At the moment I have it so that if a world contains absolutely no modded thing, there is no difference in world file format. So worlds that contain nothing modded actually can be ported back to vanilla. So far it's been my goal to keep it this way.

If a world or player contains a modded item, then instead of writing an ID, it writes the maximum possible integer, the mod name, the item name, and any custom data the mod maker wants to write (I don't remember the exact order but it's on the Github). If a world contains a modded tile or wall, then it writes a bunch of 255s, then writes tables mapping modded tile and wall IDs to their mod name and internal name.
 

MarioKart7z

Plantera
There's no such thing as having too much fun.


This little experiment is turning out to be a success. I might release it soon, although I will have to overcome some usability issues before I do so (e.g. changing brush radius, selecting tiles not currently available to the user, etc).
dont' release it until the next tmodloader update comes so you'll be able to fix the pasted tile frames

Also, looks really fun :D
 

Smiffy

Skeletron Prime
I'm guessing there are no mods for this yet (if any then they are in development atm)
I don't think there are any 100% finished mods (after all, tModLoader isn't even finished yet and therefore we may have to adapt to any new changes before it finishes). However people have made whatever progress they have made on their mods available for download in this sub-forum.
 

Sugars

Retinazer
The main problem is, I have zero idea of how to add in custom sounds. That's what someone else will have to do once I get the code patcher up on Github.
You must have access to Terraria's code to be able to make tModLoader, so you should be able to find the sound code and work something out. Remember, Object Browser is your friend! (you would not believe how much time I spent staring at Terraria's code :p)
 

Hek

Eye of Cthulhu
I would like to include the spore sac function in one of my accessories, but
You must have access to Terraria's code to be able to make tModLoader, so you should be able to find the sound code and work something out. Remember, Object Browser is your friend! (you would not believe how much time I spent staring at Terraria's code :p)
I assume he is using terraria's code:D
 

blushiemagic

Retinazer
tModLoader
You must have access to Terraria's code to be able to make tModLoader, so you should be able to find the sound code and work something out. Remember, Object Browser is your friend! (you would not believe how much time I spent staring at Terraria's code :p)
I suppose I could do that; but since I don't even know anything about sound files I'd have no way to test it :p
 

Jofairden

Duke Fishron
tModLoader
I suppose I could do that; but since I don't even know anything about sound files I'd have no way to test it :p
Focus on the main frame first, atm I don't think sounds are that important yet.
[DOUBLEPOST=1438895349,1438895270][/DOUBLEPOST]
I'm guessing there are no mods for this yet (if any then they are in development atm)
There are. I'm currently working on a mod/several mods (Overhaul) that change certain features in the game. The first one I'm making now is about events (such as Goblin invasion), instead of having to get lucky for a mob to drop a certain item you now get more (custom) crafting materials to craft these cool items yourself. Also it is my aim to make some recipes more realistic.
 

Smiffy

Skeletron Prime
So I figured how to display the chatbox for typing in, however there's no way for me to do anything when the enter key is pressed yet. So I had to improvise.. with tools...




This really is becoming a mess isn't it? Anyway, you can enable the chatbox with the following line:
Code:
Terraria.Main.chatMode = true;
Not sure how to make it do something when you press enter though, so that's why I made an execute tool to execute the last thing I type in and to open the chatbox in the first place. The Terraria.Main.Update method contains the code that decides when to open the chatbox, so having a hook for that to detect key presses could really help.
 
Last edited:
Top Bottom