TehModAPI ~ Run multiple mods at once ~ kMod ~ Dynamic Textures ~ ResoChanger

Discussion in 'Released Mods' started by iPie uDie, Dec 8, 2011.

Thread Status:
Not open for further replies.
  1. iPie uDie

    iPie uDie Green Slime


    Yeah, the project has been abandoned
    Honestly, after a good few weeks of solid development I was halfway through the next update around new years when I just gave up. It just seemed like not enough people were taking an interest in what the API actually was, but were all just downloading it for the mods which me and Kyle made for it to get it started. I guess the community just isn't evolved enough for modding right now, after Redigit's lack of contribution to the safety of the games integrity the modding aspect of Terraria gets looked down upon by 90% of the community, even more-so majority of the community isn't even anywhere near active in the forums. Perhaps I'll come back, if Redigit gets off of his lazy ass and does something right for a change, e.g. sell rights to a company that knows how to program. (If you want me to be honest, Terraria should not exceed RAM usage of 150mb on a large world, that's final. Though at 900mb for a large world that clearly is not the case.)

    Status on next release:
    As I'm working on the next release, I initially planned to work on future updates minorly but simultaneously as I implemented the updates in order. However in the programs current state I've ended up mainly focusing on the UI to begin with. Either way it's just in a state of disorientation at the moment so I'll just release all 3 planned updates below at the same time. I'm going to aim for sometime during the first week of January, hopefully there will be a Terraria update during that time which will allow the update to come with a new patch. Until then continue to give feedback =)

    2.3.0 Re-planned upcoming update:
    Given by how long it is going to take to get the UI system working and flowing perfectly (though it's coming do not fret), I am going to be changing the 2.3 update to a Mod Menu oriented one. This will include a re-vamp of the Mod Menu system, implementing the use of infinite sub-menus, though mainly focusing on the ability for instructions and descriptions to be added into mod menus for players to read in addition to adjusting settings.

    2.3.1 Re-planned update:
    This scheduled update is going to implement the previously planned Mod Singplayer mode, in which you have access to an infinite amount of separate single player worlds which are saved and loaded in THE EXACT SAME STATE. Thus allowing mods to fully utilize all possibilities while in this mode. Everything else will be the usual game unless dictated otherwise by mods. I am still however debating on whether or not to assign a specific player per world (e.g. Minecraft) or separate the Players and Worlds (Terraria style)

    2.4.0 Re-planned update:
    This update will(hopefully) bring the implementation of the UI system I'm going to be working on. It is going to be an in-game window based UI system for mods to be able to utilize when not inside the mod menu. Though I plan for it to be very extensive and flexible so that it will suit everyones needs so be prepared for this update to either A. Take a fair while or B. Be pushed back to allow for more important updates.

    Installation by Pedguin:

    Installation by TheGamersCave:

    2.2.2 Updates:
    - Fixed volume settings menu not allowing increasing of volume
    - Added Player/World/Global variable saving which all mods can access (does not effect Terraria save files in any way)
    - TMA Now handles keyboard detection for all mods
    - Lots of new ease of access methods have been implemented into the toolkit
    - A fourth menu option type is now available: Key Bindings
    - All option types are now available via the TehModAPI class (e.g. TehModAPI.Option_Action)

    Show Spoiler
    Q. What is "Custom Mode"?
    A. It's a thing that mods using this API can utilitze, so henseforth it is useless until a mod you are running uses it.

    Q. I downloaded a mod that's "up to date" but it doesn't get loaded?
    A. Sometimes(at random) / always if you download a .dll file without being zipped, the .dll file will be automatically locked by windows disallowing usage of it. To fix this right click on the file in explorer, go to Properties, and at the bottom of the general tab click the "Unblock" button and press ok. Problem solved.

    Old updates:
    Show Spoiler
    - Fixed custom item's not reloading after saving.
    - Fixed custom items not dropping
    - Custom items and npcs now have the ability to inherit a pre-existing one when creating
    - Toolkit now has a method for converting a file into Texture2D
    - Added a system to protect custom item's from dissappearing if the mod is no longer running on another load.
    - Added a few new methods to the Toolkit
    - Fixed a few bugs
    - Started working on separate examples for different things you can do with the API (WIP)
    - Cleaned up and organised the download folder to be easier to navigate, hiding the installation files.
    - Fixed as many random and little bugs as I could find
    - Add the ability to create new custom arcade mode maps and modes for mods, tutorials remain to be written.
    - Finished the player / item / npc event handlers, tutorials remain to be written.
    - Spawn point bug fixed
    - Fixed right clicking in interfaces not working
    - BRAND NEW chat box, smaller chat text allowing 15 lines of text at a time
    - Converted Items to be dynamic, allowing the addition of new Items in mods (100%)
    - Converted NPCs to be dynamic, allows the addition of new enemy NPCs in mods (90%)
    - Updated mod loading procedure to warn of outdated non-2.0 mods

    TehModAPI is a modding API I started working on yesterday morning, and have religiously been developing it into a stable and functional state. It just at the moment lacks the amount of content to be a more accessible API.​

    How it works is, upon loading the API searches through the "mods" folder for all applicable mod .dll(library) files. From that point the API executues preset methods within each mod may they be relevant. After that it's up the the mod itself as to what happens.​

    The API allows mods to take full control over the the Terraria client, with the ease of the API being nothing more but a wrapper.​

    Features the API handles:
    - Allowance of multiple mods at the same time​
    - Access to a custom settings screen to allow changing of bool's and ints and the activation of certain processes through an interactive menu.​
    - Pre and Post update runners​
    - Ability to draw on the Underlay(World) or Overlay(Interface) when drawing sprites and string.​
    - Mouse handling & Keyboard handling for all mods.​
    - Command handling for all mods (Singleplayer, Multiplayer and Custom Mode split)​
    - A toolkit class containing general methods which may be useful to any mod that is continually growing.​
    - World / Player / Globally specific custom saving accessible by all mods.​
    - Custom & cleaned Item and Npc handling, allowing easy access to custom/default Npcs and Items​
    - Custom item deletion protection; if an item is saved to a player and loaded without the appropriate mod, it will remain in the game.​
    - NPC / Item / Player listeners available for all mods to use, catch whenever something appropriate is executed.​
    - A new and cleaned chatbox, now allowing the reading of up to 15 lines of text.​
    - Crash prevention, if a mod is unable to load the game will still run without it.​

    Here are some screenshots running three mods that I've developed using the API.​
    The mods are as follows:​
    - DynamicTextures - Allows the swapping of Terraria Texture Packs from ANYWHERE in the game thanks to the API Menu​
    - ResoChanger - Easily change the resolution of the game ANYWHERE in the game thanks to the API menu (without going fullscreen)
    - WorldEdit - A mod that eases the process of mass world editing. (External thread)​


    Installing the API and mods as of 2.2.0:
    1. Download and extract the API from here.​
    2. Inside the extracted folder run the file named "Installer"​
    3. Before installing the installer will prompt you to install any mods inside the folder called "Mods" and automatically install them for you should you agree to do so.​
    4. It will then procede to install the API.​
    5. Click y when prompted and run TehModAPI.exe in the newly opened explorer window​

    To install mods:
    Take any files extracted from a mod download and put it in the "Mods" folder where the installer is, then run the installer and when it prompts you to install mods files click Y. The installer will install all mods inside the "Mods" folder for you so that next time you run TehModAPI they should work.​

    To use the Texture Pack mod:
    First make a folder called "tpacks" in your Terraria folder (with the "mods" folder), then for every texture pack you want to be accessible add a new folder inside the "tpacks" folder and give it a name e.g. "Texture Pack 1". Then put all of the texture packs images inside the second new folder. See image below:​

    SOURCE of ResoChanger: http://pastie.org/2994736
    SOURCE of Dynamic Textures: http://pastie.org/2994737

    Manual Installation for non-steam users:
    0.IF you have Terraria via steam just run the installer.
    1. Download the API from here the link above.​
    2. Copy "resources\TehModAPI.exe" into your Terraria folder by default on 64bit located (C:\Program Files (x86)\Steam\steamapps\common\terraria)​
    3. Inside the Terraria folder, create a new folder and call it "mods"​
    4. Copy the images from the zip's "resources\Content" folder into Terraria's "Content" folder​
    5. Download a mod .dll file from any post and put it inside the new mods folder you created.​
    6. IF you downloaded the .dll file directly, right click on the .dll file, go to Properties, and under the general tab press "Unblock" and click ok.​
    6. Run "TehModAPI.exe" inside your Terraria folder and viola, as many mods as you want at once =)​
    Nakano15, Lunatrius, Tthing and 18 others like this.
  2. Kyle873

    Kyle873 Devourer

  3. Glaydur

    Glaydur Lava Slime

    OT: This will be extremely helpful for modders. Can't wait to make my own with this api :D

    BTW, that's a really awesome banner you have.. I wonder who made it :cool:
  4. iPie uDie

    iPie uDie Green Slime

    Idk but I'm pretty sure he decompiled my API.
    Klokinator and Kyle873 like this.
  5. Zidonuke

    Zidonuke Slimed Zombie

    Heh this seems pretty awesome, I would love to see this come to the point where the client can connect to a multiplayer server and download a mod automatically then use it. Just a awesome suggestion to make your mod on a server and anyone with this client can connect and play on that server with the mod.
    Reapperrcw likes this.
  6. Milly Rainbowskittlez

    Milly Rainbowskittlez Voodoo Demon

    holy cheese noodles batman!
    Its a world edit for terraria 8O

    Make a banner... NOW! I will support.

    Anyway yes i give you both support. This is the kind of work that Ive been waiting for.

    Edit: also i noticed that you have inf rocket boots. Will there be inf flight for wings as well? I find that using the wings because of the featherfall makes movement alot more easier.

    Another thing, will there be a way to add a moving platform, like the magic carpet for minecraft? (blocks form under you as you walk/jump, and you could go down and such as well through command.)
  7. thelordkhon

    thelordkhon Cave Bat

    we will able to make custom world generation custom item,npc,etc will we?hope we have not to edit to original cs
  8. Cobellanez

    Cobellanez Cursed Man

    I love you. :3

    I've been wanting to mod for quite a while now.
  9. Atomic93

    Atomic93 Green Slime

    could moon phases be implemented(full moon half moon etc)
  10. Milly Rainbowskittlez

    Milly Rainbowskittlez Voodoo Demon

    speaking of moons, what about blood moon, and goblin invasion? @Kyle
  11. iPie uDie

    iPie uDie Green Slime

    Yep =), the Toolkit already has chunks of methods for world edits. Single OR multiplayer xD. EASILY possible tehehe

    Most surely!

    This one is tricky, and is surely the thing that is holding me back, I'm still searching for an easy and simple way to add new items into the game.

    As far as getting the new item in your inventory to begin with I can manage that, It would only be how the game handles the item after that of which could worry me.

    If I can't find a way, I can just replace the Item.cs (just that one) and CLEAN THE SHIT out of that hardcode to make it dynamic.

    If I don't want to do that, Mono.Cecil will be implemented. As for NPC's I would assume the same things.
  12. Kyle873

    Kyle873 Devourer

    Adding moon phases now, blood moon is already in, goblin invasion is on the list.
  13. Milly Rainbowskittlez

    Milly Rainbowskittlez Voodoo Demon

    what about boss events? Or will that be under npc summoning?
  14. Kyle873

    Kyle873 Devourer

    You can create the items under the Boss Summoning catagory to summon the specific bosses. Also added moon phases and goblin invasion. You can also spawn the bosses under the NPC summoning, but that can be unstable as you may not meet the conditions to summon them and it just won't appear, or it will appear then disappear.
  15. Milly Rainbowskittlez

    Milly Rainbowskittlez Voodoo Demon

    Figured as much. That works all in all :3 For now i am content xD yaay

    Edit: I take that back... Would there be a way to put in some sort of range meter for musical items.
    Playing them is like stumbling through the caves without a light source.
  16. Kyle873

    Kyle873 Devourer

    Not now. I think the range is hardcoded and we haven't gotten around to doing something to allow customization of the items yet.
  17. Milly Rainbowskittlez

    Milly Rainbowskittlez Voodoo Demon

    Oh well. It was worth a shot... Ill be back when I think up other things xD

    When using world edit (bac k again xD) will you be able to choose whether or not it also breaks the background?
    And while on the subject of backgrounds, some backgrounds are different from player placed backgrounds (like dirt) Will you be able to choose which of those backgrounds you use?

    ANother thing. Will you be able to spawn trees, and if so will you be able to decide how tall they are? (from small regular planted trees to the really tall off the screen trees)
  18. iPie uDie

    iPie uDie Green Slime

    Trees don't seem the most WorldEdit related thing tbh.. But yes all of the functions you asked for can be implemented into the WorldEdit mod.
  19. Milly Rainbowskittlez

    Milly Rainbowskittlez Voodoo Demon

    The trees are apart of the biome. If you were to spawn a new world and decided to slice out the desert that was near, and instead put in a forest, you would need to be able to spawn/plant trees. But because its world edit, you would want ease of accessibility. We use world edit to get things done quickly, unless im mistaken xD
  20. Glaydur

    Glaydur Lava Slime


    Spread the word!
Thread Status:
Not open for further replies.

Share This Page