SolvedCustom enemies lagging the realm

Posts 1–9 of 9 · Page 1 of 1
Custom enemies lagging the realm
Howdy!
I've made 4 custom mobs with no problems. I made them spawn in realm via Oryx.cs (thanks Bear!)
But whenever i go to godlands and fight realm gods, i get very laggy. I lag when there are at least 6 realm gods shooting on my screen (even worse when Djin comes with his mass amount of bullets).

Via /killall, the total amount of custom mobs killed in realm was near 900.
Is it because there are too many mobs which i've included? Did i mess something up? Please, help! If additional information is needed, tell me.
Thank you.
Does the total include the originals that are already spawned?

Also how much free ram + CPU do you have left when this happens?

Can you also share the code you added so we can see what values you might have messed up
Quote Originally Posted by Ahl View Post
Does the total include the originals that are already spawned?
Yes. I've restarted the server, went into realm, /killall each custom enemy (it killed 200-300 every kill). I didn't even touch /spawn
Quote Originally Posted by Ahl View Post
Also how much free ram + CPU do you have left when this happens?
With client open, i have 40% CPU and 50% ram occupied. But whenever im in process of editing and adding stuff (opened Visual Studio + browser), my ram is 70-80% and CPU is 60%. My computer is ancient, so probably it is the reason why im laggy. If this is the reason, then thank you for asking me!

Quote Originally Posted by Ahl View Post
Can you also share the code you added so we can see what values you might have messed up
Just in case.


dat1.xml and client:
Code:
<Object type="0x06b8" id="Test God 1">
    <Enemy/>
    <Class>Character</Class>
    <Texture>
      <File>lofiObj3</File>
      <Index>0x466</Index>
    </Texture>
    <HitSound>monster/cubes_hit</HitSound>
    <DeathSound>monster/cubes_death</DeathSound>
    <Size>160</Size>
    <MaxHitPoints>500</MaxHitPoints>
    <Terrain>LowPlains, LowForest, LowSand</Terrain>
    <Level>1</Level>
    <XpMult>2</XpMult>
    <SpawnProb>0.75</SpawnProb>
    <StasisImmune/>
    <Defense>25</Defense>
    <DisplayId>Test God 1</DisplayId>
  </Object>

  
       <Object type="0x13c1" id="Test God 2">
    <Enemy/>
    <Class>Character</Class>
    <Texture>
      <File>lofiObj3</File>
      <Index>0x466</Index>
    </Texture>
    <HitSound>monster/cubes_hit</HitSound>
    <DeathSound>monster/cubes_death</DeathSound>
    <Size>160</Size>
    <MaxHitPoints>1250</MaxHitPoints>
    <Terrain>MidPlains, MidForest, MidSand</Terrain>
    <Level>1</Level>
    <XpMult>2</XpMult>
    <SpawnProb>0.75</SpawnProb>
    <StasisImmune/>
    <Defense>25</Defense>
    <DisplayId>Test God 2</DisplayId>
  </Object>
 
  
  
    <Object type="0x13c9" id="Test God 3">
    <Enemy/>
    <Class>Character</Class>
    <Texture>
      <File>lofiObj3</File>
      <Index>0x466</Index>
    </Texture>
    <HitSound>monster/cubes_hit</HitSound>
    <DeathSound>monster/cubes_death</DeathSound>
    <Size>160</Size>
    <MaxHitPoints>2500</MaxHitPoints>
    <Terrain>HighPlains, HighForest, HighSand</Terrain>
    <Level>1</Level>
    <XpMult>2</XpMult>
    <SpawnProb>0.75</SpawnProb>
    <StasisImmune/>
    <Defense>25</Defense>
    <DisplayId>Test God 3</DisplayId>
  </Object>
  
  
  
    <Object type="0x52b7" id="Test God 4">
    <Enemy/>
    <Class>Character</Class>
    <Texture>
      <File>lofiObj3</File>
      <Index>0x466</Index>
    </Texture>
    <HitSound>monster/cubes_hit</HitSound>
    <DeathSound>monster/cubes_death</DeathSound>
    <Size>160</Size>
    <MaxHitPoints>2500</MaxHitPoints>
    <Terrain>Mountains</Terrain>
    <Level>1</Level>
    <XpMult>2</XpMult>
    <SpawnProb>1</SpawnProb>
    <StasisImmune/>
    <Defense>25</Defense>
    <DisplayId>Test God 4</DisplayId>
  </Object>
oryx.cs:
Code:
    {
                    WmapTerrain.LowPlains, Tuple.Create(
                        200, new[]
                        {
                            Tuple.Create("Hobbit Mage", 0.5),
                            Tuple.Create("Undead Hobbit Mage", 0.4),
                            Tuple.Create("Test God 1", 0.06),
                            Tuple.Create("Sumo Master", 0.1),
                      
                        })
                },
                {
                    WmapTerrain.LowForest, Tuple.Create(
                        200, new[]
                        {
                            Tuple.Create("Elf Wizard", 0.2),
                            Tuple.Create("Goblin Mage", 0.2),
                            Tuple.Create("Easily Enraged Bunny", 0.3),
                            Tuple.Create("Test God 1", 0.06),
                            Tuple.Create("Forest Nymph", 0.3),
                        
                        })
                },
                {
                    WmapTerrain.LowSand, Tuple.Create(
                        200, new[]
                        {
                            Tuple.Create("Sandsman King", 0.4),
                            Tuple.Create("Giant Crab", 0.2),
                            Tuple.Create("Test God 1", 0.06),
                            Tuple.Create("Sand Devil", 0.4),
                 
                        })
                },
                {
                    WmapTerrain.MidPlains, Tuple.Create(
                        150, new[]
                        {
                            Tuple.Create("Fire Sprite", 0.1),
                            Tuple.Create("Ice Sprite", 0.1),
                            Tuple.Create("Magic Sprite", 0.1),
                            Tuple.Create("Pink Blob", 0.07),
                            Tuple.Create("Gray Blob", 0.07),
                            Tuple.Create("Earth Golem", 0.04),
                            Tuple.Create("Paper Golem", 0.04),
                            Tuple.Create("Big Green Slime", 0.08),
                            Tuple.Create("Swarm", 0.05),
                            Tuple.Create("Wasp Queen", 0.2),
                            Tuple.Create("Shambling Sludge", 0.03),
                            Tuple.Create("Test God 2", 0.15),
                            Tuple.Create("Orc King", 0.06)
                        })
                },
                {
                    WmapTerrain.MidForest, Tuple.Create(
                        150, new[]
                        {
                            Tuple.Create("Dwarf King", 0.25),
                            Tuple.Create("Metal Golem", 0.05),
                            Tuple.Create("Clockwork Golem", 0.05),
                            Tuple.Create("Werelion", 0.1),
                            Tuple.Create("Horned Drake", 0.3),
                            Tuple.Create("Red Spider", 0.1),
                            Tuple.Create("Test God 2", 0.15),
                            Tuple.Create("Black Bat", 0.1)
                        })
                },
                {
                    WmapTerrain.MidSand, Tuple.Create(
                        300, new[]
                        {
                            Tuple.Create("Desert Werewolf", 0.2),
                            Tuple.Create("Fire Golem", 0.1),
                            Tuple.Create("Darkness Golem", 0.1),
                            Tuple.Create("Sand Phantom", 0.2),
                            Tuple.Create("Nomadic Shaman", 0.2),
                            Tuple.Create("Test God 2", 0.15),
                            Tuple.Create("Great Lizard", 0.1)
                        })
                },
                {
                    WmapTerrain.HighPlains, Tuple.Create(
                        300, new[]
                        {
                            Tuple.Create("Shield Orc Key", 0.15),
                            Tuple.Create("Urgle", 0.15),
                            Tuple.Create("Test God 3", 0.25),
                            Tuple.Create("Undead Dwarf God", 0.5)
                        })
                },
                {
                    WmapTerrain.HighForest, Tuple.Create(
                        300, new[]
                        {
                            Tuple.Create("Ogre King", 0.3),
                            Tuple.Create("Dragon Egg", 0.1),
                            Tuple.Create("Test God 3", 0.25),
                            Tuple.Create("Lizard God", 0.35)
                        })
                },
                {
                    WmapTerrain.HighSand, Tuple.Create(
                        250, new[]
                        {
                            Tuple.Create("Minotaur", 0.25),
                            Tuple.Create("Flayer God", 0.25),
                            Tuple.Create("Test God 3", 0.25),
                            Tuple.Create("Flamer King", 0.15)
                        })
                },
                {
                    WmapTerrain.Mountains, Tuple.Create(
                    100, new []
                    {
                        Tuple.Create("White Demon", 0.06),
                        Tuple.Create("Sprite God", 0.04),
                        Tuple.Create("Medusa", 0.06),
                        Tuple.Create("Ent God", 0.06),
                        Tuple.Create("Beholder", 0.06),
                        Tuple.Create("Flying Brain", 0.06),
                        Tuple.Create("Slime God", 0.06),
                        Tuple.Create("Ghost God", 0.06),
                        Tuple.Create("Djinn", 0.06),
                        Tuple.Create("Leviathan", 0.06),
                        Tuple.Create("Test God 4", 0.2),
                        Tuple.Create("Arena Headless Horseman", 0.01)
                    })
                },
            };
Quote Originally Posted by pencilXpen View Post
Via /killall, the total amount of custom mobs killed in realm was near 900.
When i do it, on a clean fsod i get around 4-5000 mobs?
Quote Originally Posted by MikeRaarupBirk View Post
4
Its always 1500+ xdd
When is it ever 4
All the Test God's are spawning quite often considering you've placed at least one in each terrain.

Nevertheless, if you're only experiencing lag in the godlands, it has to be Test God 4 spawning too often. Perhaps change it to 0.06 like the rest of the gods
Quote Originally Posted by Ahl View Post
All the Test God's are spawning quite often considering you've placed at least one in each terrain.

Nevertheless, if you're only experiencing lag in the godlands, it has to be Test God 4 spawning too often. Perhaps change it to 0.06 like the rest of the gods
I reduced the spawn rate and im lagging no more! Thank you!
I was always wondering why additional hunderds of enemies make server lag though.

Alright, this is solved. Lock please. (can't tag admins :/ )
Quote Originally Posted by Ahl View Post
@ @Luis @Danny @Raple this has been solved.
ok wongdong

/closed
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?