Giter Site home page Giter Site logo

custom-npcs's People

Contributors

phoenixice avatar pychnight avatar taeir avatar taeirjenkins avatar xenowanderer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom-npcs's Issues

null refence error [v1.3 - v1.4] [FIX]

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.HandlerCollection1.Invoke(ArgsType args)

Alive Counter Counting issues [v1.0 - v1.4] [FIX]

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.

[OTA] Custom Loot

This Feature needs to be reenabled for OTA, though it should be improved to support completely replacing Boss Loot ๐Ÿ‘

Custom Monsters spawn outside Specified Zones (all Versions) [FIX]

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.

Transformation Projectile Issues [v1.0 - v1.4] [FIX]

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.

[OTA Branch] Broken Events

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;

        }
}

Custom ID issues. [v1.0 - v1.4] [FIX]

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)

cannot compile the test npc and debug npc

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

Custom Loot issues [v1.4 Only] [FIX]

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.