Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
To get the effects of vanilla acessories onto modded acessories, you put
"public overide void UpdateAccessory(Player player, bool hideVisual)"
into the item, and put "player.#", replacing # with the effect you want. This can be done with GlobalItem as well, I believe; you just have to put "Item item" before "Player player" and do a check for the item.
To find a player effect, you can go into the .csproj file, open it, and go to a file within there that uses "player". There, hover over it if it's blue, and double click when "Player" (it's shown in a greenish-cyan) shows up. It will open up the Player class, and you can view all of the player effects in Vanilla, among a lot of other things. Some things are named rather obviously (ala "magicQuiver" granting the effects of Magic Quiver) but others might need a bit more detective work (ala "dash" being a integer, so you have to find out what integers correspond to what kind of dash)
To get vanilla projectile IDs, you should probably head to https://github.com/tModLoader/tModLoader/wiki/Vanilla-Projectile-IDs
For modded projectiles, put down
ModContent.ProjectileType<ThePlaceWhereTheProjectileIs.ProjectileName>()
with the same rules as the modded item one.
If you haven't already, read this wiki page from tModloader's github;
https://github.com/tModLoader/tModLoader/wiki/Basic-tModLoader-Modding-Guide
There's also some other pages that can help you if you find them.
Also when I make accessoires I want to add combined ones out of them,
So it would help alot to know how to use item references.
shttps://forums.terraria.org/index.php?threads/adding-bundle-of-balloons-an-modded-accessory.99761/
https://forums.terraria.org/index.php?threads/is-there-a-mod-that-tells-you-the-item-id-of-other-mods.100309/
Also omniswing has blacklist that might show item ids, I will try that for ids
Sidenote: Acessories that provide immunities to debuffs just have "player.buffImmune[the buff ID] = true;" in their UpdateAccessory, so there are no bools for acessories like Armor Polish and the Ankh in the Player class.
Also maybe make the reference say frostspark boots
On the topic of boots, they're a somewhat special case while trying to replicate them, where they instead modify player stats while having most of their exact boosts unlisted... unless you go into the source code.
While I myself haven't ventured into the source code, I've got a rough estimate of the increases Lightning Boots give.
player.maxRunSpeed += 3.2f;
player.moveSpeed += 0.08f;
player.rocketBoots = 96;
How would I add both to the combined one
Example:
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.longInvince = true;
player.magicQuiver = true;
player.magmaStone = true;
player.manaFlower = true;
player.allDamage += 0.1f;
}