LoneRanger121
Terrarian
Still waiting for the day when Terraria modding API documentation websites aren't steaming piles of utterly useless crap and actually trying to accomplish something isn't 9001% impossible to research
me too... me too.Still waiting for the day when Terraria modding API documentation websites aren't steaming piles of utterly useless crap and actually trying to accomplish something isn't 9001% impossible to research
-snip-
Caution - Player Created Game Enhancement Rules & GuidelinesIn all seriousness though, I hope something is eventually hammered out, I'm just the slightest bit frustrated because I can't seem to get Terraria to decompile correctly and so I'm kind of blind (and left working with the mangled tConfig wiki for support.) I'm extremely satisfied with what has been accomplished though, and I hope Redigit eventually gets a built-in modding system working. For now, this is far beyond expectations. Keep it up guys, it's much appreciated!
And I would actually like to request some help regarding the decompiling. I keep getting entirely empty files (Item, Main, NPC, Player, Projectile, etc .cs...what's happening?)
Caution - Player Created Game Enhancement Rules & Guidelines
I'm sorry, but no one here is allowed to help you decompile Terraria and would get in trouble for doing so. Explaining how to do it is effectively the same as sharing the decompiled source.
I didn't say you couldn't do it. Just that sharing information about how to do it is against the forum rules.Uh...how...what? How in the world is any modding done if you can't get any information on how the source functions work? What? I'm so confused and even more frustrated now.
I didn't say you couldn't do it. Just that sharing information about how to do it is against the forum rules.
I can't decompile it - it doesn't work for me, that's my problem. It would be so much easier if it was just permissibly published somewhere.Just decompile the damned thing already. tAPI is basically modified vanilla source - we CAN'T PUBLISH THAT. Not only is it against the forum rules - it's also AGAINST THE LAW OF EVERY COUNTRY I HAPPEN TO KNOW.
+I'm sorry, but no one here is allowed to help you decompile Terraria and would get in trouble for doing so. Explaining how to do it is effectively the same as sharing the decompiled source.
+Okay, let's move away from the source sharing and decompiling topic please - it is both against the rules and off topic
=WE HIGHLY DISCOURAGE ANYONE TO MOD WITHOUT PRIOR DECOMPILING OF TAPI (OR AT LEAST TERRARIA). Unless you're doing only basic JSON stuff.
Your point? Just get a damn decompiler already.
Also Arkhalis already told you to join our IRC channel to get the decompiler all of us use, as it's kinda hard to find, at least this version of it.
If you're still insisting, go ask Re-Logic for permission for us to publish tAPI (and in turn vanilla) source code, lol. Good luck doing that.
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
using TAPI;
using Terraria;
namespace berberborscing.NPCs
{
public class NightOwl : ModNPC
{
public override bool CanSpawn( int x, int y, int type, Player spawnedOn)
{
return Main.rand.Next(0, 3) == 0;
}
}
}
Looks like you don't define any region nor time when it can spawn. And you check constantly and have a 1/3 chance of it spawning. Do you want it to be like the traveling merchant spawns or how blood moons/solar eclipses are determined?I want my Night Owl to spawn with a 33% chance at night, and only on the surface. This code works at spawning it, but it makes the mob spawn everywhere, and at day time too
Code:using System; using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; using TAPI; using Terraria; namespace berberborscing.NPCs { public class NightOwl : ModNPC { public override bool CanSpawn( int x, int y, int type, Player spawnedOn) { return Main.rand.Next(0, 3) == 0; } } }
Not legal, but you wouldn't listen and @Arkhalis had enough of this talk.
I'm on the barely-legal border. I shouldn't have talked about it in here, but that's the actual way people mod here, so no way I could NOT talk about it.
You have no "damage" defined.Gotcha. I understand it all now. Sorry for being a #$&*.
I found what I wanted, but now I have another problem: my spell won't damage anything. I tried switching it to the Golden Shower projectile instead, but still nothing happens. The projectiles just go right through every enemy without causing damage or inflicting debuffs. There isn't even any debugging to do - it's literally just a copy of Golden Shower. Wat do?
{
"name": "Chains",
"Texture": "chains",
"displayName": "Chains",
"maxStack": 1,
"holdoutOffset": [3.0,2.0],
"useStyle": 5,
"useAnimation": 18,
"useTime": 6,
"autoReuse": true,
"width": 28,
"height": 30,
"rare": 7,
"tooltip": "Get 'em all tied up.",
"knockback": 6,
"useTurn": true,
"shootSpeed": 10,
"mana": 1,
"crit": 4,
"magic": true,
"reuseDelay": 5,
"value": [0,7,33,1],
"noMelee": true,
"useSound": 8,
"shoot": 280,
"recipes": [{"items": {"Dirt Block": 1}, "creates": 1}]
}
if ((!Main.dayTime && Main.bloodMoon && Main.rand.Next(20) == 0) ||
(!Main.dayTime && Main.bloodMoon && Main.rand.Next(10) == 0))
{
return true;
}
return false;