Changelog
Comments96
118pages on
this wiki
this wiki
The latest version of tConfig is v0.30.4 See the Downloads page for other useful programs and files.
Contents |
Release 13 (v0.23)
v0.23.8
- Added 'placeFrame' attribute to Item INI - specify the frame number to use when placing a tile. This value is zero by default.
- Added 'ShadowTail' and 'ShadowAura' bools to the Player class - set to true in order for player shadow trails or aura to be drawn every frame.
- custom NPCs can now be set to active through NPCLoot , in order to let them avoid death.
- Added DamagePlayer(ref int damage, Player player) , and DealtPlayer(double damage,Player player) to projectiles , you can use these to apply a code over a player that's hit by a projectile with those methods.
- Added baseGravity , maxGravity , baseSpeed , baseSpeedAcceleration , baseSlideFactor , baseMaxSpeed , maximumMaxSpeed for the player class , these are all floats which you can edit in order to control the player's movement , they're reset every frame , and can let you do some really neat stuff! (change baseGravity to 0f for no-gravity , for example)
- Added Main.tileCount[] , this is an int array that contains the amount of every tile type in the game , and is updated every frame , you can use it to make 'custom biome' checks and stuff like that (e.g. Main.tileCount[30] is the count of the wood tiles you can place as a player , that is around your character)
- Fixed buffs not initializing correctly on load.
- Fixed an issue with the installer not generating .gli file (and other things...) after the game launcher is run
- Tile Initialize method now takes coordinates as parameter, so it has the following signature: void Initialize(int x, int y)
- Fixed bug in modpack builder related to using 'override' features and specifying 'code' attribute
- Fixed bug in modpack builder causing the override variable to not be reset
- Fixed bug in modpack builder causing the override feature to build the installer incorrectly
- Fixed issue with KillTile method not being called sometimes
- ModWorld is now initialized before the world is loaded. If this causes problems for anyone, of course, let me know! I'm thinking I could have PreInitialize and PostInitialize methods for loading before and after the world, if it's necessary.
v0.23.7
- Fixed bugs related to custom doors
- Updated modpack builder with new feature: Overrides. Allows you write files that will override the regular ones. For instance, a mod might have the file ModName\Item\Shield.ini. If you want to make an easy mode version of the mod that makes it more powerful, you would have the changed attributes in ModName\Override\easy\Item\Shield.ini, and then compile it by entering "4:easy" into the modpack builder, where 4 is the number associated with the mod folder (for example).
- Some improved error checking in the modpack builder.
- Added many method calls for worldgen methods. If the worldgen method is void, then the custom method must return a boolean for whether or not to execute default code. If the worldgen method is a boolean, then the custom method must return a boolean array containing a boolean for whether to execute default code, and a boolean for the actual return value.
- Improved tile feature: New INI file attribute 'placeOn' - specify how the tile can be placed. Current options are: solid, solidTop, wall, ceiling, side, air. You can use any combinations of these for a tile to have multiple possibilities, and separate them by a space. For instance, to make a tile be placeable on top of solid tiles and solidTop tiles (e.g. tables), then you set "placeOn=solid solidTop".
- Default behavior is "solid wall ceiling side" for Solid tiles
- Non-Solid tiles by default have just "solid" as their placeable attribute
- On the other hand, the location that tiles are placed relative to where you click may be different now: it's always going to place the bottom-left part of the tile where you click. It might be somewhat counter-intuitive for certain tiles...
v0.23.5
- Actually implemented!:
- Removed max mana (with equips) cap
- Removed health/mana cap checks from loadplayer method
- Fixed some major multiplayer bugs
v0.23.4b
- Updated world save format to save frame number for custom tiles. This is necessary due to how the frame number is used for custom tiles now, and fixes an annoying crash.
- v0.23.4a added a check to force users to update mods.
- Created Tiles Examples pack and included:
- Door using code, showing data persistence
- Locked chest w/ unique key identification
- Growing plant
- Active/Inactive tile
- Bed capable of facing both directions and setting spawn point
v0.23.4
- Removed case-sensitivity from INI file processing. Should make things easier!
- Added support for the Boo scripting language. The ModPack Builder will automatically compile .boo files instead of .cs files if they are available. In short, the Boo scripting language is like Python, but with better integration with the Common Language Infrastructure, which is heavily used in Terraria. It might be easier or more convenient to write in Boo than in C# for some people.
- Made some changes to increase the number of tiles that can be loaded at once to about 65,535. Needs further testing to ensure nothing is broken. Also, mod codes may need to be updated to treat tile IDs as ushort instead of byte.
- Minor change that should allow you to be more flexible with checkplacetile - needs testing
- New tile method: bool CanExplode(int x, int y, int projectileType) - Return true if the tile can be destroyed by an explosion, false otherwise. This only affects explosions from vanilla explosive projectiles, such as Bomb, Dynamite, Sticky Bomb, etc.
- Fixed bug causing accessory prefixes to not work when custom code runs on the accessory
- Removed max mana (with equips) cap
- Removed health/mana cap checks from loadplayer method
- Added new Global class called ModGeneric, which goes in Global\Generic.cs.
- ModGeneric method: void OnLoad() - Called after mods and content are loaded. Can be useful for loading texture packs.
- Fixed/changed UpdateSpawn() method. It now gets called from the ModGeneric class.
- Added support for custom doors, with no code required. Add to your tile INI file these two options:
- doorType - Set this to "open" or "closed" - If your door is opened, the sprite must have two frames of a 2x3 door. If the door is closed, it must have one frame of a 1x3 door.
- doorToggle - Set this to the name of the other tile to 'toggle' to when opening or closing. For example, the "Open Stone Door.ini" would have doorToggle=Closed Stone Door. You can also ignore this attribute if you want to have more control by doing it through code.
- Updated how tile code instances are managed; custom multi-frame tiles with code should work properly if you keep the frameNumber attribute of the tiles up to date.
- Added ability to create 'multi-directional' tiles; it will change the sprite frame based on the direction the player is facing when placing the tile. The frames must be going horizontally; see vanilla sprites for the bed and door for example. In the tile INI file, set "directional=True" to enable this capability.
- Note that most mods that have C# code will need to be recompiled; otherwise they will result in errors & crashes.
Example - C# code
public static void Effects(Player player) {
player.wet=true;
player.accFlipper=true;
}
Example - Boo code
def Effects(player): player.wet=true player.accFlipper=true
v0.23.3
- Added error checking for tile limit. If the number of tiles exceeds 255, then it will unload a mod and try again.
- Added new menu option to copy over vanilla save files. Only appears if the tConfig save list is empty.
- When creating a new character or world, the name will have a number appended to it if a character or world of the same name already exists.
- Fixed bug preventing you from creating more than 5 player characters.
- Removed post-processing capability to fix graphical glitches
v0.23.2
- PreDraw and PostDraw for the Player occurs for every instance of DrawPlayer() now
- Added Tile attribute, 'hitSoundList' integer for specifying the sound list to use.
- Unlimited player characters
- Player characters are now saved in zip files
- Added new Render Target, where everything is drawn to. Post processing effects can now occur in PreDrawInterface, which has the RenderTarget2D object passed in as well:
void PreDrawInterface(SpriteBatch spriteBatch, RenderTarget2D globalTarget)globalTarget variable is NULL until further notice.
- Fixed Tile 'CheckTile' method to expect FALSE if the tile does not pass the check and should be destroyed, TRUE otherwise.
- Added PostKill and PreKill methods for Projectiles, called before and after the Kill method, respectively
- Added PreItemCheck(Player p, int playerIndex) and PostItemCheck(Player p, int playerIndex) methods for items; these methods get called before and after ItemCheck() (where UseItem is called)
v0.23.1
- Minor update - ModWorld Load() method is now called after normal world loading methods.
v0.23.0
- New Methods
- Tile
- bool CheckTile(int x, int y) - Check the consistency of the tile types and tile frames. Return true if the check passes; false otherwise.
- bool CheckPlaceTile(int x, int y) - Check the ground, ceiling, surrounding area, etc. to see if the tile can be placed. Return true if the check passes; false otherwise.
- ModWorld
- void GenerateWorld() - overrides the world generation process.
- ModWorld is now initialized before world generation.
- Tile
- Interface-related changes
- void SlotRightClicked(int slot) - overrides the behavior of right clicking an item slot
- Made more variables public; added string 'name' variable to InterfaceObj
- Player methods (for items, armor, etc)
- bool PreDraw(Player player, SpriteBatch spriteBatch) - Called before DrawPlayer; return true to let it continue with DrawPlayer(), false otherwise.
- void PostDraw(Player player , SpriteBatch spriteBatch) - called after DrawPlayer
- Projectile Methods
- bool PreAI() - called before AI(); return true to execute AI(), false otherwise.
- void PostAI() - called after AI()
- Tile stuff
- 'hitSound' and 'hitSoundName' INI attributes for specifying the sound ID, or a custom sound, when the tile is hit with a pickaxe
- Attempted to improve error checking for auto-updating tConfig, and made some other minor improvements; this hasn't been tested yet.
Release 12 (v0.22)
v0.22.8
- Updated installer to stop and tell you if you have the wrong directory selected. This seems to have tripped up/confused a lot of people.
- Basic functionality for auto-updating tConfig itself is in place. Needs more testing however!
- Began work on automatic update check & download for .obj files. You specify a version number and a URL in Config.ini. The URL must point to a text file containing a version number and the URL pointing to the .obj file. Updates are checked for when you start the game; if any are available you'll see a "Updates Available!" menu option. Otherwise you'll see "Check for Updates". When you click on it, it brings up the list of mods with updates available, indicating their new version number, and letting you choose which ones to download. Then click "Download Updates & Reload Mods" to get the updates! Example files:
Config.ini (in your mod's source folder):
[Settings] ;'version' is mostly related to save data. Most people won't need to use it unless they make an update that changes how the save/load methods work. version=1 ;'DLversion' is the version number compared against the version number you post online, for the purpose of figuring out whether a newer version is available. ;DLversion can have two decimal places DLversion=1.0 ;URL pointing to a text file, which must contain the version number on the first line, and the URL to the .obj file on the second line url=https://content.wuala.com/contents/Surfpup/Documents/Projects/Terraria/Release/ModPacks/Portal%20Mod/version.txt
version.txt (online somewhere):
1.0 http://content.wuala.com/contents/Surfpup/Documents/Projects/Terraria/Release/ModPacks/Portal%20Mod/Portal%20Mod.obj?dl=1
v0.22.7
- May have fixed the issue which allows you to hit an enemy way-too-many times with one swing. You should be able to hit an enemy up to 3 times max. Also, this check was added to player versus player attacks.
- Fixed: Tiles weren't being initialized on the client when playing multiplayer
- Fixed/Changed: ModWorld.Initialize wasn't getting called before ModifyWorld() - it is now. May be important for certain kinds of mods.
- Added average color values for walls to world.txt (for mapping tools)
- This release will require everyone to recompile their mods.
v0.22.6
- Added new Player method: void FrameEffect(Player player) - Similar to the PlayerFrame() method, but it gets called for all items, buffs, etc and doesn't care about set bonuses.
- Modpack builder now searches through subdirectories recursively, so you can have more organized folders!
- You can now "include" another file's text into a .cs file by adding something like the following to the file: #INCLUDE "filename.cs"
- Moved Projectile Initialize() method call to a different location, so it is possible to modify certain values such as the velocity, damage, or other values passed into NewProjectile()
- New networking capabilities
- Save/Load for ModWorld no longer transfers data
- Instead, we have two new methods for handling networking data transfers
- void NetReceive(int msg, BinaryReader reader)
- void NetSend(int msg, BinaryWriter writer)
- Called on the server:
- void PlayerConnected(int playerID) - Called on the server when a player connects
void PlayerDisconnected(int playerID) - Called on the server when a player disconnects-Not working as expected- void SyncPlayers() - Called on the server when a player joins, and periodically afterwards.
- Use NetMessage.SendData, or NetMessage.SendModData in these methods to send data to the player(s)
- Call NetMessage.SendData with 100 as the msgType, the mod 'id' value, and your own message ID number, and NetSend() will be called. Here's a simple example of sending a random number to the client periodically (dumb example, but it's a start):
World.cs:
public static int randomNum;
public void Initialize() {
randomNum=WorldGen.genRand.Next();
}
public void UpdateWorld() {
if(Main.netMode==2 && (Main.time % 200 == 0)) {
int modIndex = Config.mods.IndexOf("ModName");
NetMessage.SendData(100, -1, -1, "", modIndex, 1);
}
}
public void NetReceive(int msg, BinaryReader reader) {
int num=reader.ReadInt32();
Main.NewText("Msg="+msg+", Received "+num);
Console.WriteLine("Msg="+msg+", Received "+num);
}
public void NetSend(int msg, BinaryWriter writer) {
writer.Write(randomNum);
Main.NewText("Msg="+msg+",Sent "+randomNum);
Console.WriteLine("Msg="+msg+",Sent "+randomNum);
}
- Updated 'furniture' attribute for tiles - you can now set it to 'torch' or 'door'
- Fixed crash that occured after mod reloading when connecting to a server
- New simplified method for sending messages:
- public static void SendModData(int modIndex, int msgID, int remoteClient = -1, int ignoreClient = -1, params object[] parameters)
- Improved documentation to be released soon
v0.22.5
- Fixed server issues with saving/generating a world
- Updated modpack builder to save color averages, which is loaded and saved to world files
v0.22.4
- ???
v0.22.3
- Updated InterfaceObj class
- You can now specify the color of a text button
- public int AddText(string text, int x, int y, bool clickable,float scale=1f, Color color=new Color())
- Fixed issue with using an item when clicking on a text button
- You can now specify the color of a text button
- Made most methods in Main into public methods
- Fixed issue with invalid IDs - fixes the common dictionary key error. There was an issue in which the ID for "Unloaded Item" wasn't getting saved. Also, for any ID that is unknown, it will make it into an "Unloaded Item" and you shouldn't lose any data.
- Added average color of mod tiles to world.txt (useful for tools/map editors)
v0.22.2
- Multiplayer Synchronization for the ModWorld class. Currently uses the Save() and Load() methods. They will get synchronized when a player joins and then every 30 minutes? or so. This feature is subject to change.
- New ModWorld methods
- void PreDrawInterface(SpriteBatch spriteBatch) - called before interface is drawn
- bool PreHitWire(int x, int y) - called when HitWire() is called. Return true to execute normal hitwire function, false otherwise.
- Improvements to the multiplayer mod transferring feature. More tests need to be done, but it definitely works better than before.
v0.22.1
- Fixed bug related to saving/loading global mod data
- Fixed text input issue
v0.22.0
- Fixed crashing bug related to drawing the player's item?
Release 11 (v0.21)
v0.21.9
- World file names will have invalid characters replaced with an underscore.
- Fixed issues with saving version number of mods for player saves
- Fixed unloaded items
- Added 'drawPretendType' to INI files for Items and Projectiles. Affects the sprite drawn and possibly some other things.
v0.21.8
- ???
v0.21.7
- Actually fixed saving issues related to float values
v0.21.6
- Added some drawing methods. I tried to make this as flexible as possible, so that's why there's two methods, for before and after the regular drawing process.
- For projectiles, NPCs
- bool PreDraw(SpriteBatch spriteBatch) - Called before the default drawing code; return true to execute the regular drawing code, otherwise return false.
- void PostDraw(SpriteBatch spriteBatch) - Called after the default drawing code
- ModWorld class
- void PostDraw(SpriteBatch spriteBatch) - Called every tick, after the default drawing method
- For projectiles, NPCs
Example usage of drawing (draws "Hello World" underneath the player's health) (in Global\World.cs)
public static void PostDraw(SpriteBatch spriteBatch) {
string text="Hello World!";
SpriteFont font = Main.fontMouseText;
Vector2 v1 = new Vector2(628f - Main.fontMouseText.MeasureString(text).X * 0.5f + (float)(Main.screenWidth - 800), 84f);
Color color = new Color((int)Main.mouseTextColor, (int)Main.mouseTextColor, (int)Main.mouseTextColor, (int)Main.mouseTextColor);
float f1 = 0f;
Vector2 origin = default(Vector2);
spriteBatch.DrawString(font, text, v1, color, f1, origin, 1f, SpriteEffects.None, 0f);
}
- The following XNA documentation might be helpful when working with spriteBatch:
v0.21.5
- Save files are now extracted/created in memory (no temporary files necessary)
- Might have fixed the button for starting a server in the menu. Haven't tested it.
- Made some changes that might fix lag issues with custom tiles. However, beware that lag will most probably occur if you have many instances of a custom tile with a .cs file. It is recommended that you write methods in ModWorld class and check the tile type and handle the code there if code is needed for a tile that will exist in large quantities.
- Added ModPlayer method "PreUpdatePlayer" which is simply called before the effects from items and buffs are applied.
v0.21.4
WARNING: This update introduces a new world save format! It will automatically backup your save files in "wldbackups" within the save directory, but you should still be wary!
- Implementation of new save format for worlds. Old save files are loaded and updated appropriately.
- The world selection menu has been updated so that more than 5 worlds are possible.
- The save files for worlds are named after the world name. No longer will you be confused about which world your save file is for!
- Added the game launcher to the installer
- Added 'aiPretendType' attribute to NPCs.
- Added 'UpdateWorld()' method to the ModWorld class
- Fixed problem with the installer causing files to not be overwritten (the modpack builder and the server)
- Updated ModPlayer and ModWorld Initialize() method to be called right before the load method (meaning, when the world is loaded or when the player is loaded). Before it was being called when the mods were loaded.
- Fixed (maybe): Global mod save data not being maintained if the mod is disabled
- Updated world load error message to be more helpful. If a mod tile or wall isn't loaded, it will tell you what mod you need to load. Also, the game no longer automatically tries to use the .bak file, although it will continue to create a .bak file. This is done since most of the time now people are going to fail to load a world because of which mods they have on, and not because the world is corrupted.
v0.21.3
- Added a new internal feature: Tested some awesome code that automatically updates the version number on the wiki, and also handles some other things.
v0.21.2
- Added 'parent' attribute for INI files. Specify the name of another INI file in the same folder, and it will use the attributes in that file, except for ones that have already been defined. It does not make use of the parent's recipe data.
- Changed where 'CreatePlayer()' gets called from. Should fix issue with copper tools getting added after the method is called.
- Changed (internal): RunMethod() for global methods works the same as it does for regular methods.
- New Installer should actually work now. It might require administrator privileges, but I think that's the only potential issue. Also, the option to update old save files (pre-0.18.3) isn't included in this. If anyone needs old save files to be updated, let me know and I'll release a program just for doing that.
v0.21.1
- Minor improvements to the installer
- The "new" installer didn't work out, but I might work on it again at some point. I need it to compute a hash of a file, and I was attempting to accomplish this through loading an external DLL file.
v0.21.0
- Fixed bug related to NPC Save() and Load() methods (used in networking)
- Updated ModPlayer (Player.cs) class to have the following method calls:
- void DamageNPC(Player myPlayer,NPC npc, ref int damage, ref float knockback)
- void DealtNPC(Player myPlayer, NPC npc, double damage)
- void DealtPlayer(Player myPlayer, double damage, NPC npc)
- void DamagePVP(Player myPlayer, ref int damage, Player enemyPlayer)
- void DealtPVP(Player myPlayer, int damage, Player enemyPlayer)
- void OnSpawn(Player player, int id)
- void UpdatePlayer(Player player) - Called every 'tick'
- void CreatePlayer(Player player) - Called when a Player instance is created. This is where it sets the player's default starting items.
- Updated ModWorld (World.cs) class to have access to all tile method calls
- Tile methods
- method update (added playerID): void PlaceTile(int x, int y, int playerID) - playerID is -1 if it isn't done by a player.
- void KillTile(int x, int y, Player player) - Similar to DestroyTile() but it is handled differently. It gets called for built-in tiles as well. 'player' is null if a player didn't destroy it.
- Item method:
- void PlayerGrab(Player player, int playerID, int itemIndex) - Called when the item collides with the player. This is where health or mana crystals give the player health/mana, and normal items go into the player's inventory. Defining this method will override the default behavior for normal items. The itemIndex is the index into the Main.item[] array.
- Example (work-in-progress) mod that makes use of the ModPlayer class: Stats mod
Older
Please see Changelog/v1 or Changelog/v2