• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

tModLoader Destructible Tiles - Brutalize your worlds

hamstar

Steampunker



Requires Mod Helpers


Tiles can now be destroyed with direct hits from projectiles. Configurable.

This version is beta. Please try out the mod and report any issues or features you want to see.



Features planned:
  1. Set "physics-like" projectiles to factor velocity and possibly size into damage.
  2. Supply (configurable) table of minimum damage values (e.g. to prevent a wooden bow from breaking into the Lihzarhd temple).
  3. Add support for other weapon types (especially via. API).

Source available. API available. Config settings here.






 
Last edited:

hamstar

Steampunker
v1.2.1
  • Updated for TML11.5
  • Implemented FloatInputElement for config
  • Changed Main.tile references to Framing.GetTileSafely(...)
  • Changed config settings to not use extreme value ranges
v1.2.0
  • Updated to MH5b and TML11.4
  • Added a ProjectileStateDefinition for defining friendly, hostile, is-npc, etc projectiles.
  • Refactored configs to use a projectile definition template to filter hostile, friendly, or NPC-sourced projectiles
  • Added config field ranges
  • Fixed config field defaults (avoids redundancy)
  • Changed TileDataManager deconstructor to use a mod unload LoadHook instead
v1.1.0.1
  • Fixed beam glitching against random tiles
  • Minor internal refactoring
v1.1.0
  • Added TileFinderHelpers.GetNeartestSolidTile(...)
  • Added support for beam weapons
  • Added minor optimization tweaks
  • Added CollisionHelpers (MeasureWorldDistanceToTile)
  • Implemented ProjectilesAsConsecutiveHittingAndCooldown setting (untested)
  • Added assurance of projectiles hitting at least 1 tile in OnTileCollide
  • Restructured some projectile code
  • Added BeamDamageScale config setting
  • Pre-configured ProjectilesAsConsecutiveHittingAndCooldown to let molotov fires "melt" tiles at a rate of ~3/4s per hit
  • Toned down beam weapons by using the same "can consecutive hit" code as regular projectiles
v1.0.1
  • Removes ProjectilesAsConsecutiveHittingAndCooldown and ProjectilesAsPhysicsObjectsAndMaxVelocity settings (for now)
  • Changed ProjectilesAsExplosivesAndRadiusAndDamage to ProjectilesAsExplosivesAndRadius
  • Set auto explosive projectile list building to not override any custom explosive definitions
  • Corrected some bad logic with explosive projectile damage calculation
v1.0.0
  • Set ReloadConfigFromFile() to reset projectile defaults
  • Further modified TileData to use AnimationTimeDuration instead of AnimationTimeElapsed (terminates animation on completion)
  • Modified TileData's use of TTL to be in ticks, and implemented damage reset effect on expire
  • Removed unnecessary debug outputs
  • Traded lock object for ConcurrencyDictionary in TileData
  • Added AllDamagesScale setting
  • Removed redundant tile damage overlay drawing
  • Internally restructured TileDataManager draw code
  • API functions added
  • Added mod icon
  • Added crash failsafe during drawing tile damage
v0.9.1
  • Modified default behavior of tile breaking to not drop items (configurable)
  • Added DestroyedTilesDropItems config setting
  • Implemented DestructibleTilesProjectile.HitTilesInRadius(...)
  • Added tile armor table config setting
  • Added debug outputs config option
  • Added explosive projectiles to in-memory configs
  • Refactored Hit functions to remove projectile references; only effect describing params are now used
  • Added GlobalProjectile.Kill(...) for explosive projectiles to apply their effect in a radius
  • Fixed issue with loading explosive projectiles
  • Properly cleared reference-based config fields in SetDefaults()
  • Added ProjectileTileDamageDefaults and ProjectileTileDamageOverrides config tables for supplying damage values for projectiles
  • Implemented DestructibleTilesProjectile.GetExplosives() as good as it's going to get
  • Added DestructibleTilesProjectile.ComputeProjectileDamage(Projectile)
  • Cleaned up some scaffolding
  • Added placeholder stub for custom tile damage
v0.9.0
  • First beta release.
 

Attachments

Last edited:

Redstormzi~

Steampunker
It looks very good. I have one idea. It would be great if monsters will have the ability to destroy tiles. Not all tiles, but, you know: dirt, sand, rock, etc. low-level tiles in summary.
 

hamstar

Steampunker
v1.0.0 released, now with:
  1. Tile "armor" support (implemented but unused)
  2. Tile "damage scale" support (a secondary armor-like concept) - Martian Conduit added as an example of reducing general damage by 90%
  3. Projectile damage defaults and overrides support - Allows any given tile to receive damage differently from specific projectiles
  4. Explosive projectile support (projectiles can be adjusted)
  5. "In-house" tile damage rendering overlay - Allows for limitless tile breakage
 

Virukino

Terrarian
Will there be support for beam weapons such as the last prism? My first thought upon seeing the mod was to use that and i was mildly sad that it didn't break anything. I'm unsure if the charged blaster cannon is likewise limited.
 

hamstar

Steampunker
Will there be support for beam weapons such as the last prism? My first thought upon seeing the mod was to use that and i was mildly sad that it didn't break anything. I'm unsure if the charged blaster cannon is likewise limited.
I want to, but those require a special touch that will need more work.
 

Creperator

Steampunker
Can you please add configs that prevents projectiles from non-players to destroy tiles ? Also, can you make so rooms housing NPCs cannot be destroyed ? Also, can you please add "compatibility" for the mod Various weathers so that thunder cannot destroy tiles, please ?
 

hamstar

Steampunker
Can you please add configs that prevents projectiles from non-players to destroy tiles ? Also, can you make so rooms housing NPCs cannot be destroyed ? Also, can you please add "compatibility" for the mod Various weathers so that thunder cannot destroy tiles, please ?
You can already configure specific projectiles types or tile types to not give or take damage.

I can (attempt to) add a friend vs foe detection, player vs non-player detection.
 

Creperator

Steampunker
You can already configure specific projectiles types or tile types to not give or take damage. I can (attempt to) add a friend vs foe detection, player vs non-player detection.
A, great ! May i ask a tutorial on the first post on how to do such modifications (and a example)?
 

hamstar

Steampunker
A, great ! May i ask a tutorial on the first post on how to do such modifications (and a example)?
In the config, you'll want to do either of 2 things:

- Edit TileDamageScaleOverrides to specify the tile you want to adjust the damage scale for (set to 0 = invincible tile). By default, martian conduit is set to a really low value, as an example. Just add a new entry (or change the existing martian conduit entry), changing the table key's number value to the ID of the tile type you want.

- Alternatively, you can modify projectile damages directly. Similarly, you can add or edit an entry in ProjectileTileDamageDefaults using projectile IDs to specify the table keys. The second number is, of course, the projectile's damage.

All tiles by default have 100 hp.



Important note: All of this will completely change with the next version release. Hopefully it should be far more intuitive, thanks to ModConfig.
 

Creperator

Steampunker
- Edit TileDamageScaleOverrides to specify the tile you want to adjust the damage scale for (set to 0 = invincible tile). By default, martian conduit is set to a really low value, as an example. Just add a new entry (or change the existing martian conduit entry), changing the table key's number value to the ID of the tile type you want.
Important note: All of this will completely change with the next version release. Hopefully it should be far more intuitive, thanks to ModConfig.
Ah, now xe're talking ! I know it would be a lot of work, but what if all the tiles were already included in the config file, so that all you need to do is searching the number you look for and modify it ?
Also, when i modify the data of a tile with varients, does it includes the varients or not ?
 
Top Bottom