Standalone [1.3] tModLoader - A Modding API

Discussion in 'Works-in-Progress' started by blushiemagic, Jul 7, 2015.

  1. Saobie

    Saobie Terrarian

    I got this too. I was making my own mod at the time so i ignored it and was going to deal with it later. Guess a redownload wouldnt have fixed it huh
     
  2. Callum Johnson

    Callum Johnson Terrarian

    When will tmodloader be out for version 1.3.5.3??
     
  3. jopojelly

    jopojelly Retinazer

    That is not needed at all, and for all intents and purposes it already is.
     
  4. Jofairden

    Jofairden Golem

    Set the mods you want enabled/disabled, don't click reload but restart the game instead. Hopefully this issue is resolved in the next release.
     
  5. Callum Johnson

    Callum Johnson Terrarian

    Yeah but i cant play with people that dont have tmodloader.
     
  6. Jofairden

    Jofairden Golem

    Try using the ModifyTooltips() hook for this, it's intended for this stuff.
    Code:
        public class MyGlobalItem : GlobalItem
        {
            public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
            {
                TooltipLine line = tooltips.FirstOrDefault(tooltip => // FirstOrDefault means we will get this tooltip line, or it will be null if it can't be found
                    tooltip.mod == "Terraria" // Checks if the line comes from vanilla Terraria
                    && tooltip.Name == "Tooltip0"); // Checks if the line is the tooltip line, first line
    
                if (line != null) // if the line is not null, it means we found it
                {
                    switch (item.type) // switch on our item type
                    {
                        case ItemID.UmbrellaHat:
                            line.text = "Slow falling speed"; // Set the line to something new
                            return;
                    }
                }
            }
        }
     
  7. Jofairden

    Jofairden Golem

    And you will never. If you want to play with them they should either get tModLoader or you should revert to vanilla.
     
  8. Ronon Omega

    Ronon Omega Terrarian

    Thanks for responding, Im a c# noob unfortunately..
    Im getting a missing namespace or assembly reference now

    Code:
    \ModedItem.cs(27,56) : error CS0246: The type or namespace name 'List' could not be found (are you missing a using directive or an assembly reference?)
    c script
    Code:
    using System;
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Graphics;
    using Terraria;
    using Terraria.ModLoader;
    using Terraria.ID;
    using Terraria.Localization;
    
    namespace mymod
    {
        public class ModedItem : GlobalItem
        {
            public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
            {
                TooltipLine line = tooltips.FirstOrDefault(tooltip => // FirstOrDefault means we will get this tooltip line, or it will be null if it can't be found
                    tooltip.mod == "Terraria" // Checks if the line comes from vanilla Terraria
                    && tooltip.Name == "Tooltip0"); // Checks if the line is the tooltip line, first line
    
                if (line != null) // if the line is not null, it means we found it
                {
                    switch (item.type) // switch on our item type
                    {
                        case ItemID.UmbrellaHat:
                            line.text = "Slow falling speed"; // Set the line to something new
                            return;
                    }
                }
            }
    I deleted some clutter from there but 27,56 was the first mention of List<>

    Thankyou very much for your time, sorry for noob questions
     
  9. Callum Johnson

    Callum Johnson Terrarian

    why will i never be able to?
     
  10. jopojelly

    jopojelly Retinazer

    We haven't programmed tmodloader to allow connecting to vanilla servers. That would just crash things.
     
  11. Callum Johnson

    Callum Johnson Terrarian

    ahhh ok i didnt know that but thanks for your help
     
  12. alexzhang05

    alexzhang05 Terrarian

    My mod browser is broken for some reason...
    It justs says Mod Browser Offline (UNKNOWN)
     
  13. SlippyCheeze

    SlippyCheeze Terrarian

    It is highly likely something is blocking the website that it needs to fetch data from. Try visiting the "manual browsing" link in the first post in your web browser, and see if you can figure out what.
     
  14. alexzhang05

    alexzhang05 Terrarian

    Ahhh I am currently in China so the website must be blocked here... Thanks!
     
  15. rikd1977

    rikd1977 Terrarian

    Anyone know how to make can run in Windows 10 visual studio 2017? Can't find any posts that actually work??
    --- Double Post Merged, Jul 29, 2017, Original Post Date: Jul 29, 2017 ---
    Xna not can
    --- Double Post Merged, Jul 29, 2017 ---
    I got some code working with that monogame ###$#$$$ but?? XNA would be so much easier
     
  16. SlippyCheeze

    SlippyCheeze Terrarian

    https://github.com/blushiemagic/tModLoader/wiki/Developing-with-Visual-Studio
     
    Jofairden likes this.
  17. Saobie

    Saobie Terrarian

    Im developing a spell tome for my mod and am just curious how i make it cost hp to cast AS WELL as mp?
     
  18. Linx145

    Linx145 Terrarian

    Um, whatever happened to item.name? I can't find it anywhere in ExampleMod anymore. Is it still relevant? Because I still need access to naming items differently from the item file's name.
     
  19. Saobie

    Saobie Terrarian

    Is it possible to get projectiles to use more than 1 AI style?

    I want my projectile to behave similarly to razorblade typhoon, but also bounce off surfaces and get faster as they travel
     
  20. Saobie

    Saobie Terrarian

    For the life of me i cannot get my boss to spawn custom entities and shoot projectiles. I also cant get said entities to shoot projectiles

    Im aiming for the boss to constantly spawn entities every few seconds

    Anyone able to teach me how to do this?