Quantcast
Channel: RaGEZONE - MMO Development Forums
Viewing all articles
Browse latest Browse all 30179

Adding a monster spawn

$
0
0
I use 010 Editor for this so the tutorial will explain how to do it in that

First off you need to take this and make a file called monster.bt(or anything you want .bt)
Code:

typedef struct{    signed int nCount;
}header;


typedef struct{
  signed int spawn_id;
  signed int type;
  signed int guessed_enable;
  float guessed_spawntime;
  float fInterval2;
  signed int guessed_spawncount;
  float tempPosx;
  float tempPosy;
  float tempPosz;
  float gen_fMinRadius;
  float gen_fMaxRadius;
  float act_fMinRadius;
  float act_fMaxRadius; 
  signed int nPatrolCount;
} mob;


typedef struct{
    float tempPosx;
    float tempPosy;
    float tempPosz;
} patrol;


while( !FEof() )
{
    local int i = 0;
    local int j = 0;


    header header_;
    for( i = 0; i < header_.nCount; ++i )
    {
        mob mob_;
        for( j = 0; j < mob_.nPatrolCount; ++j )
        {
          patrol patrol_; 
        }
    }
}

Now to add a spawn

Decide where you want to add a mob and go there ingame and type /mypos
This will output your coords in client end numbers, enter these coords into my coord converter MapCoordGui.rar here and click convert

The output will be a lower X and Y + a map on the server end data in the world folder look for a folder named what the map output was IE if it says 1-1 go to the 1-1 directory and open 1-1.monster in that directory using 010 Editor

Click Run Template and open the monster.bt you made earlier you will get a new window called template results
Change the header-> nCount to 1 higher then it was.

Scroll to the bottom and find the last time it says "struct mob mob_" click that and it will select it on the hex window. Select from the start of the selected window until the end of the file and copy that.

Select the very end of the file and paste(this is easier to do then writing it all from scratch)

Now run the template again and go to the last "struct mob mob_" Click the arrow beside it
Edit spawn_id to 1 higher then it is
Edit type to the monster type you want to spawn(from monster.bin)
Edit guessed_spawntime to the respawn time you want
Edit tempPosx, y and z use the x and y from the coord tool and the z from the output of /mypos
Edit nPatrolCount to the number of mobs you wanna spawn(1 is minimum and if you wanna spawn 1 mob use 1)

Now go to the next entry on the template output that should be "struct patrol patrol_" and click the arrow beside it if you edited nPatrolCount you will need to either add more of these or remove some there should be 1 patrol_ for each nPatrolCount so 1 of them if you put 1 2 if you put 2 and so on edit those at this point by selecting it and copy -> pasting the data to the end of the file

Once you have the right number of them run the template again and go back to the bottom and edit the patrol_'s you just made
Edit tempPosx, y and z use the x and y from the coord tool and the z from the output of /mypos

Remember if you are spawning more then 1 patrol the coords need to be very close to the center coord you entered in the mob_ struct if you are just starting it's easier to just do 1 patrol_ per Mob_


Anyone with time can also use this .BT struct to create a spawn editor... I had one working but lost it and don't have time to rewrite it sadly.
Attached Files

Viewing all articles
Browse latest Browse all 30179

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>