Standalone [1.3] tModLoader - A Modding API

Ok, I'm getting an error I never used to get before with Tmod.

Code:
5/16/2017 5:32:46 PM
System.EntryPointNotFoundException: Unable to find an entry point named 'InitSafe' in DLL 'CSteamworks'.
   at Steamworks.NativeMethods.SteamAPI_InitSafe()
   at Steamworks.SteamAPI.Init()
   at Terraria.Social.Steam.CoreSocialModule.Initialize()
   at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
   at Terraria.Program.LaunchGame(String[] args)

Its been happening for a few days now and I have found no way to fix it. I have reinstalled tmod, and terraria but nothing. Any solutions?
 
hey I have a problem with downloading it, after I opened the tmodloader installer it said success. But when I went in game, it said the usual "Preparing to launch Terraria" steam thing, then after it popped up with an error notice.
"System.EntryPointNotFoundException: Unable to find an entry point named
'InitSafe' in DLL 'CSteamworks'.
at Steamworks.NativeMethods.SteamAPI-InitSafe()
at Steamworks.SteamAPI.Init()
at Terraria.Soicla.Steam.CoreSocialModule.Initialize()
at terraria .Social.SocialAPI.Initialize(Nullable'1 mode)
at Terraria .Program.LaunchGame(String[]args)"

Help?!?!
 
That example server config file is just an example from the vanilla terraria install. We didn't package a modified version of that file in the installer with that option shown because that would likely overwrite many people's actual server configs. Just add a line with modpath= and then I think either a relative or absolute path to the folder.
Thank you I'll try it.
But sorry to ask but how do you write an relative path?
 
But sorry to ask but how do you write an relative path?

A relative path just means something that doesn't specify a location relative to the drive's root directory.

C:\Program Files\Steam\SteamApps\ is an absolute path.

Steam\SteamApps\ is a relative path, it only refers to the correct location if your working directory is C:\Program Files\
 
A relative path just means something that doesn't specify a location relative to the drive's root directory.

C:\Program Files\Steam\SteamApps\ is an absolute path.

Steam\SteamApps\ is a relative path, it only refers to the correct location if your working directory is C:\Program Files\
Thanks i knew what it meant, I just didn't know how to write it.
 
I'm trying to make a 4*5 painting placed on walls, however the game doesn't seem to allow me to make paintings any larger than 3*3. I tried changing the size and the largest size that works properly is 3*3, the default for TileObjectData.Style3x3Wall. Paintings smaller than that are possible, so I'm not really sure why paintings larger than it don't work.
This is the problem:
9sW6Ug6.png

As you can see it only placed the top-left-most 1*4 tiles. This is doubly odd considering the placement preview only showed the top-left-most 1*3. Has anyone run into this problem before? And if so, how can I fix it?
 
Have to say that I haven't encountered this issue despite having used TileObjectData.Style3x3Wall as a template. Can you show us your SetDefaults override at least, or the whole code that's failing?
 
Have to say that I haven't encountered this issue despite having used TileObjectData.Style3x3Wall as a template. Can you show us your SetDefaults override at least, or the whole code that's failing?
Here's the cs file for the tile:
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Terraria.DataStructures;

namespace chadsfurni.Tiles.Paintings
{
    public class paintplant : ModTile
    {
        public override void SetDefaults()
        {
            Main.tileFrameImportant[Type] = true;
            Main.tileLavaDeath[Type] = true;
            TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall);
            TileObjectData.newTile.Width = 4;
            TileObjectData.newTile.Height = 5;
            TileObjectData.newTile.Origin = new Point16(2, 4);
            TileObjectData.newTile.CoordinateWidth = 16;
            TileObjectData.newTile.CoordinatePadding = 2;
            TileObjectData.addTile(Type);
            dustType = 0;
            disableSmartCursor = true;
            AddMapEntry(new Color(120, 120, 120), "Painting");
        }

        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            Item.NewItem(i * 16, j * 16, 32, 48, mod.ItemType("paintplant"));
        }
    }
}
I tried changing the width and height variables. It works properly as long as they're both 3 or under.
 
Can someone give some in-depth explanation for the Save and Load functions for ModItem?
Code:
public virtual TagCompound Save()
{
   return null;
}
public virtual void Load(TagCompound tag)
{
}
I'm trying to save and load items within an item, but I get the obvious "Cannot convert Terraria.Item to Terraria.ModLoader.IO.TagCompound."

This is the actual code I'm trying to use, it is obviously wrong and needs changing, but I have no clue what to change it to (do I have to save the items' variables like type, name, etc individually?).
Code:
    public override TagCompound Save()
     {
       for(int i = 0; i < beamItems.Length ; i++)
       {
         return beamItems[i];
       }
     }
     public override void Load(TagCompound tag)
     {
       for(int i = 0; i < beamItems.Length ; i++)
       {
         beamItems[i] = tag;
       }
     }


Edit: Actually, nevermind. I looked at the ExamplePlayer.cs and it basically had what I was looking for.

Edit 2: Well, on second thought, I may still need help. Saving an item array is apparently impossible (I either get crashes or, if I use a for loop, only one item gets saved).
 
Last edited:
one question guys. when mod loader gets updated to 1.3.5.3 does that mean I can alreayd play with the mods like tremor and thorium? or do I also have to wait till they get updated for a long time. really need to know cuz i need to play with buddies
 
Here's the cs file for the tile:
...
I tried changing the width and height variables. It works properly as long as they're both 3 or under.

But I believe you need to specify the width and height in the SetDefaults of the item that actually creates the painting tiles using CreateTile() , with your new tiletype as the parameter. Can we see that file as well?
 
Back
Top Bottom