tModLoader

tModLoader

评价数不足
Lurrae's Core Mod
   
奖励
收藏
已收藏
取消收藏
模组功能: 模组类库
tModLoader版本: 1.4.4
语言: 英语
文件大小
发表于
更新日期
122.472 KB
2024 年 3 月 8 日 下午 12:37
8 月 5 日 下午 2:38
3 项改动说明 ( 查看 )

订阅以下载
Lurrae's Core Mod

描述
A core mod used for all of my other content mods, like Terrarmory and Terratweaks! It doesn't add any content on its own, though. It's just a place to store code that I plan to use across several mods.
Modders who would like to use this mod for themselves can feel free to! Lurrae's Core Mod is open-source, so it should be easy enough to look through it and get access to what you need.

Changelog:
v1.0.1:
- The ModFlailProj class now uses an array of strings for ChainTex instead of a single string. Now you can define multiple textures, and they'll cycle through in order!
- The ModFlailProj class also has a new method, OnStartRetracting(). This allows you to, for example, fire a secondary projectile like the Drippler Crippler does
- Fixed issues with ModFlailProj drawing chains with hardcoded width and height values instead of dynamically getting them from the texture
v1.0:
- Initial release
- Includes additional ModItem classes to simplify creation of minion staves, rocket launchers, and whips
- Includes an additional ModNPC class to simply creation of town NPCs (including automated loading of dialogues using tmod's currently-incomplete dialogue substitutions)
- Includes additional ModProjectile classes to simplify creation of flails, minions, pets, spears, and whips
- Includes an Extensions class with the following methods that can be called:
- Conversions.ToFrames(float seconds, int extraUpdates = 0) - Converts seconds into frames (1 second = 60 frames). Set extraUpdates to Projectile.extraUpdates as needed
- Conversions.ToSeconds(float frames, int extraUpdates = 0) - Converts frames into seconds (60 frames = 1 second). Set extraUpdates to Projectile.extraUpdates as needed
- Conversions.ToPixels(float blocks) - Converts blocks into pixels (1 block = 16 pixels)
- Conversions.ToBlocks(float pixels) - Converts pixels into blocks (16 pixels = 1 block)
- Projectile.IsBeeRelated() - Checks if the projectile can be buffed by the Hive Pack (i.e, is a Bee, Giant Bee, Wasp, or Hornet Stinger)
- Item.CloneShopValues_TownNPCDrop() - Sets the item's rarity to Green and its value to 50 silver
- Player.LicenseOrExchangePet(Item sItem, ref bool petBoughtFlag, int npcType, string textKeyForLicense, int netMessageData) - A copy of the private vanilla method of the same name that allows modded town pet licenses to call it without reflection!
- Includes several new item defaults methods:
- Item.DefaultToFlail(int singleSwingTime, int projType, float shotVelocity, int newHeight = 32, int newWidth = 32) - Sets several item values common to flails
- Item.DefaultToYoyo(int projType, int singleShotTime, float shotVelocity, int newHeight = 32, int newWidth = 32, bool hasAutoReuse = false) - Sets several item values common to yoyos
- Item.DefaultToBoomerang(int projType, int singleShotTime, float shotVelocity, int newHeight = 32, int newWidth = 32, bool hasAutoReuse = false) - Sets several item values common to boomerangs
- Item.DefaultToSword(int singleSwingTime, int projType = 0, int shotVelocity = 0, int newHeight = 32, int newWidth = 32, bool hasAutoReuse = false) - Sets several item values common to swords
- Item.DefaultToMeleeWeapon(int singleSwingTime, int newHeight = 32, int newWidth = 32, bool hasAutoReuse = false) - Sets several item values common to melee weapons
- Item.DefaultToAmmo(int ammoType, int projectileType, float velocity) - Sets several item values common to ammo
- Item.DefaultToMinion(int buffType, int projType, int singleSwingTime = 36, int manaCost = 10, int newHeight = 32, int newWidth = 32) - Sets several item values common to minions
- Item.DefaultToSentry(int projType, int manaCost = 20, int singleSwingTime = 30, int newHeight = 32, int newWidth = 32) - Sets several item values common to sentries
- Item.DefaultToSummonWeapon(int manaCost, int singleSwingTime, int newHeight = 32, int newWidth = 32) - Sets several item values common to summon weapons
- Item.DefaultToArmor(int defense, int newHeight = 26, int newWidth = 26) - Sets several item values common to armor pieces
- Item.DefaultToDevSet(int rarity, int newHeight = 26, int newWidth = 26) - Sets several item values common to dev set pieces
- Includes a new Condition:
- ExtraConditions.BestiaryCompletionPercent(float targetPercent) - Can be used in NPC shops to make items that are only sold once a certain percent of the bestiary has been filled in, like vanilla does with some Zoologist items
- Includes a ModdedVariantNPCProfile, which can be used to create custom town pets (or other town NPCs that have distinct variants like the town pets) without vanilla freaking out because it can't find the textures/names
引用自 tModLoader TepigCore
Developed By Lurrae
3 条留言
Lurrae  [作者] 2024 年 3 月 11 日 下午 5:05 
Update: I added the internal name to the Steam Workshop description since I realized I can do that without having to release an update of the mod just for that
Lurrae  [作者] 2024 年 3 月 11 日 下午 4:53 
@uwene I've added this mod as a required item to Terratweaks on the Steam workshop (since Terratweaks is currently the only mod that requires this one), hopefully that should help! I may mention the mod's internal name somewhere in the description here as well if that isn't enough
uwene 2024 年 3 月 11 日 下午 4:35 
please add tepig somewhere in the mod description, kinda hard to find this dependency otherwise