berberborscing
Skeletron Prime
Has it been already reported that Reindeer Bells crash tAPI on drop? Ice Queen's drops misspell it as "Reindeer Balls", crashing the game
whats the error i could help!What is wrong with this coding? It's my brothers and I can't find anything wrong with it. Please help.
Code:{ "internalName": "DaBomb", "displayName": "DaBomb", "texture": "Items/DaBomb", "size": [20,20], "maxStack": 1, "value": [99,99,99,99], "useStyle": 1, "useAnimation": 1, "useTime": 1, "damage": 900, "knockBack": 5, "useSound": 1, "autoReuse": true, "useTurn": true, "melee": true, "recipes": [{ "items": { "Dirt Block": 10 }, "creates": 1 }] }
hm are you using cs or json file?I want to make a prefix, but I get this: Key "allCrit" is missing or is not a Bool!
Here is the code:
{
"displayname": "George's",
"allDamage": 1.08,
"moveSpeed": 1.08,
"allCrit": 8,
"maxLife": 8,
"maxMana": 8,
"meleeSpeed": 1.08,
"tier": 8,
"value": 8.0,
"type": ["Accessory"] }
What am I doing wrong???
First you'd have to iterate through the first 1000 entries of the Main.projectile array, checking the type and active fields of every projectile. Also make sure you don't check the projectile against itself. Then if you find a different projectile with the same type and that's active, then you can either set that projectile's active variable to false, or call Kill on it.How do you make a projectile die if another instance of it exists in the world?
This worked. Thanks!First you'd have to iterate through the first 1000 entries of the Main.projectile array, checking the type and active fields of every projectile. Also make sure you don't check the projectile against itself. Then if you find a different projectile with the same type and that's active, then you can either set that projectile's active variable to false, or call Kill on it.
Another way would be to iterate through this array before the projectile is created, and do any removing you need to do then.
json, that's what you use for a prefixhm are you using cs or json file?
That depends on what exactly you want to do. So far, it looks like everything I want to do is possible (although at some parts you'll have to copy/paste a lot of code, unavoidable unless redundant hooks are added); I'm pretty sure that with enough creativity, anything would be possible (except maybe liquids?)Hey, I've got a mod germinating and I'm trying to decide whether to make it a tAPI or standalone mod. Broadly speaking, what sorts of things aren't currently possible with tAPI? Can vanilla events be interrupted or cancelled? Like, could I make a mod that tweaks existing mechanics in addition to adding new content?
Changing the drop rates of items can be done by changing the LootRules that are stored for the monsters, and I'm pretty sure that recipes can be changed (and if they can't, they can be removed then another one added). From a brief glance, it looks like it might be possible to get Truffle to spawn another way (not completely sure though). But yeah, I haven't looked into the death screen, so I'm not sure if that's possible, and it would be easiest to make a standalone mod if you want to make liquids. (Although, you could make a second liquid system to run in parallel, but that would just be too much work, both for you and for the game.)Tweaking certain drop rates. Specifically, The Axe and Binoculars. It's easy to say "Oh, one in 200 ain't that bad" until you're on run seventy and the boss is painfully unfarmable, like Plantera. From a game design perspective, an item will get that "pie in the sky" appeal with far fewer than 200 runs.
And the death screen lingers far too long. And there's no reason why the mushroom NPC should require an ENTIRE BIOME, a house made of mushroom blocks and furniture should be enough. And the golden crown requiring 30 gold bars is absurd, even in the late game.
But uh... I digress. Just certain things about the game are a bit iffy and I can code, so I figured I'd give it a go.
I had one or two liquids in mind, yeah. I've heard the water code is gnarly, so I guess it isn't surprising.
Good to know, thanks.Changing the drop rates of items can be done by changing the LootRules that are stored for the monsters, and I'm pretty sure that recipes can be changed (and if they can't, they can be removed then another one added). From a brief glance, it looks like it might be possible to get Truffle to spawn another way (not completely sure though). But yeah, I haven't looked into the death screen, so I'm not sure if that's possible, and it would be easiest to make a standalone mod if you want to make liquids. (Although, you could make a second liquid system to run in parallel, but that would just be too much work, both for you and for the game.)
public override void PostNPCLoot()[/FONT][/FONT]
[FONT=Courier New][FONT=Trebuchet MS]
{
if (NPC.downedGolemBoss && Main.hellLayer)
{
if(Main.rand.Next(1, 3) == 1)
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width / 2, npc.height / 2, ItemDef.byName["Pumpking:EndgameEssence"].type, 1, false, 0);
}
}
}
The Main.hellLayer variable stores the altitude of the underworld, not whether or not the monster is in the underworld, so you'll have to check the NPC's altitude (make sure to convert it to block coordinates) to Main.hellLayer.I am trying to make an item that drops from enemies in the Underworld after the Golem is defeated. I get this message in the tAPI Builder:
Operator '&&' cannot be applied to operands of type 'bool' and 'double'
if (NPC.downedGolemBoss && Main.hellLayer)
Code:public override void PostNPCLoot()[/FONT][/FONT][/FONT][/FONT] [FONT=Courier New][FONT=Trebuchet MS][FONT=Courier New][FONT=Trebuchet MS] { if (NPC.downedGolemBoss && Main.hellLayer) { if(Main.rand.Next(1, 3) == 1) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width / 2, npc.height / 2, ItemDef.byName["Pumpking:EndgameEssence"].type, 1, false, 0); } } }