pychnight / custom-npcs Goto Github PK
View Code? Open in Web Editor NEWCustom Server Side Monsters for Terraria
License: GNU General Public License v2.0
Custom Server Side Monsters for Terraria
License: GNU General Public License v2.0
Warning: Plugin "CustomNPC" has had an unhandled exception thrown by one of its NetGetData handlers:
System.NullReferenceException: Object reference not set to an instance of an object.
at HardmodeDungeonNPC.Core_Controller.HardmodeDungeonNpcPlugin.OnNpcDamage(NpcDamageEvent args)
at CustomNPC.EventSystem.CustomNPCEventHandlerList1.Invoke(Object args) at CustomNPC.EventSystem.EventManager.InvokeHandler[T](T args, EventType type) at CustomNPC.CustomNPCPlugin.OnNpcDamaged(TSPlayer player, Int32 npcIndex, Int32 damage, Single knockback, Byte direction, Boolean critical) at CustomNPC.CustomNPCPlugin.ReadNpcStrike(Int32 playerId, Byte[] readBuffer, Int32 index, Int32 length) at CustomNPC.CustomNPCPlugin.OnGetData(GetDataEventArgs args) at TerrariaApi.Server.HandlerCollection
1.Invoke(ArgsType args)
9c0594e
CustomNPCVars.cs - Custom Invasion Counting Issues.
Produces Causes Bosses to spawn only 1 time for the entire invasion(it should be only only time per wave not 1 time for the entire invasion)
My fix solves that issue but it will also occasionly break the invasion due to counter going into the negative and some odd issues.
This Feature needs to be reenabled for OTA, though it should be improved to support completely replacing Boss Loot ๐
If you define a monster to a Region and only to that region the plugin will try to Spawn X distance away from the player and will occasionally spawn outside the specified region if the player is near the regions edge or is inside a very small region.
The Monster should always try to spawn inside any specified regions and only inside the specified zones even if the player is at the regions edge.
After a monster transforms successfully they will stop firing all attached projectiles, So there is something wrong.
I had fixed this in anther branch but.. the way i did it was more of a hack / work around, Hopefully it can be improved.
All Events seem broken at least on The Lastest Commit,
How to test
Spawn debugevents npc
HIT the npc. (with a very low damage weapon)
Let the npc Collideinto you.
Kill the npc
get the npc below 40 hp.
if the following conditions do no match the following messages... then events are broken
private void OnNpcDamage(NpcDamageEvent args)
{
var npc = NPCManager.GetCustomNPCByIndex(args.NpcIndex);
if (npc == null)
return;
switch (npc.customNPC.customID.ToUpper())
{
//Used for Testing to see if damage is working properly
case "debugevents":
{
Console.WriteLine("Damaged Custom Monster debugevents");
}
break;
//Used for testing transformation
//also used for testing to see if the transformation fires the projectiles
// look for "Transformation function in the CustomNPCS
// line: 184 in the Custom NPC Vars
// This fix is temp Please Improve!
case "DEBUGTRANSFORM":
if (NPCManager.HealthBelow(args.NpcIndex, 40))
{
npc.Transform("DEBUGTRANSFORMED", false, 0);
}
break;
}
}
private void OnNpcCollision(NpcCollisionEvent args)
{
var npc = NPCManager.GetCustomNPCByIndex(args.NpcIndex);
if (npc == null)
return;
switch (npc.customNPC.customID.ToUpper())
{
case "debugevents":
{
Console.WriteLine("Collision Custom Monster debugevents");
}
break;
}
}
private void OnNpcKill(NpcKilledEvent args)
{
var npc = NPCManager.GetCustomNPCByIndex(args.NpcIndex);
if (npc == null)
return;
switch (npc.customNPC.customID.ToUpper())
{
case "debugevents":
{
Console.WriteLine("Killed Custom Monster debugevents");
}
break;
}
}
private void OnNpcUpdate(NpcUpdateEvent args)
{
var npc = NPCManager.GetCustomNPCByIndex(args.NpcIndex);
if (npc == null)
return;
switch (npc.customNPC.customID.ToUpperInvariant())
{
case "debugevents":
{
if (NPCManager.HealthBelow(args.NpcIndex, 40))
{
npc.SelfHealing(200);
}
}
break;
}
}
When you spawn one Custom monster then spawn any normal monsters nearby, it will think all monsters are that custom monster you attacked.
A- Create Custom monster with ABC as custom ID
B- Spawn ABC and damage it
C- Spawn a normal monster and kill it / damage it (this will cause events to fire)
This bug exists in all versions (V1.0 , V1.1, V1.2 Branches)
oh.the custom npc need testnpc.dll and debugnpc.dll.
but when I user the source at visul studio and try to compile,
it can not be compile and ton of error.
result ,the compile dll is smaller than your release dll.
can you help me.
i like this plugin.
thank you
Overriding Loot will not stop default loot from spawning and Custom Loot is currently ether buggy or not working properly
Methods to reproduce
Use Debug Npc plugin included with Custom Npcs or the "TEST" npc that always spawns chairs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.