Adding a monster spawn

Results 1 to 11 of 11
  1. #1
    Yes, it's really me HuninHune is offline
      V.I.P  Rank
    Sep 2006 Join Date
    ::1Location
    1,096Posts

    Adding a monster spawn

    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 groupID;
       float tempPosx;
       float tempPosy;
       float tempPosz;
       float gen_fMinRadius;
       float gen_fMaxRadius;
       float act_fMinRadius;
       float act_fMaxRadius;  
       signed int waypointcount;
    } mob;
    
    
    typedef struct{
        float tempPosx;
        float tempPosy;
        float tempPosz;
    } waypoint;
    
    
    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_.waypointcount; ++j )
            {
              waypoint waypoint_;   
            }
        }
    }
    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 Waypoints as needed

    Now go to the next entry on the template output that should be "struct waypoint waypoint_" and click the arrow beside it if you edited waypointCount you will need to either add more of these or remove some there should be 1 waypoint_ for each waypointCount 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 waypoint_'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


    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.



    EDIT - Thx Yurn for minor corrections there it's been a while since I worked with these
    Last edited by HuninHune; 15-06-14 at 08:21 PM.
    Much of what I say is merely my opinion. My incredibly accurate opinion.

    Quote Originally Posted by AMSK
    My brothers love to kalonline the server I am old husband with you


  2. #2
    Member Yurneroo is offline
    MemberRank
    Dec 2012 Join Date
    31Posts

    Re: Adding a monster spawn

    You should rework parts of this since its not entirly correct.

    Code:
    int _mobCount;
    
    struct MonsterData {
    	int _internalMobID;		// Internall Mob ID
    	int _mobID;			// Reference to the Monster.bin
    	int _enabled			// 1 == enabled
    
    	float _respawnTime;				
    	float _respawnTimeDynamic;	// If 0 then only _respawnTime is used, else itll have a respawn time between those two values
    	
    	int _groupID;			// Mobs with the same ID share the same group, 0 == no group
    	
    	float _spawnX;
    	float _spawnY;
    	float _spawnZ;
    
    	float _unknown1;				
    	float _unknown2;
    	float _unknown3;				
    	float _unknown4; 				
    	
    	int _nodeCount;			// Waypoint count
    	
    	struct Node {
    		float _nodeX;
    		float _nodeY;
    		float _nodeZ;
    	} [_nodeCount]
    } [_mobCount]
    The crucial thing here is the groupID and waypoints you mistaken. Not the "patrol" stuff does set the grouping but the groupID does. Aswell as "patrol" are the acctual waypoints the current mob in the entry takes. It spawns at the spawnX-Y,Z and walks the waypoints in the specified order.

    E/: Oh and "nPatrolCount", so the nodeCount CAN BE 0. Itll be a mob which simply doesnt move.

  3. #3
    Yes, it's really me HuninHune is offline
      V.I.P  Rank
    Sep 2006 Join Date
    ::1Location
    1,096Posts

    Re: Adding a monster spawn

    Updated original post thx >_< working off old BTs I had made in 2011 and trying to remember how it went... I didn't even test this before posting lol.
    Last edited by HuninHune; 15-06-14 at 08:22 PM.
    Much of what I say is merely my opinion. My incredibly accurate opinion.

    Quote Originally Posted by AMSK
    My brothers love to kalonline the server I am old husband with you

  4. #4
    Member Yurneroo is offline
    MemberRank
    Dec 2012 Join Date
    31Posts

    Re: Adding a monster spawn

    Yea, that's common stuff I had to reverse/import since I didnt want to setup 60k mobs by hand.

  5. #5
    Yes, it's really me HuninHune is offline
      V.I.P  Rank
    Sep 2006 Join Date
    ::1Location
    1,096Posts

    Re: Adding a monster spawn

    Quote Originally Posted by Yurneroo View Post
    Yea, that's common stuff I had to reverse/import since I didnt want to setup 60k mobs by hand.
    Yeah I had a pretty nice spawn editor in cali... rendered the minimaps and let you place the spawns... I never did anything with paypoints though lol
    Much of what I say is merely my opinion. My incredibly accurate opinion.

    Quote Originally Posted by AMSK
    My brothers love to kalonline the server I am old husband with you

  6. #6
    Ultimate Member danny5417 is offline
    MemberRank
    Feb 2013 Join Date
    151Posts

    Re: Adding a monster spawn

    Do you know how to create NPC in map ?
    Not by GM command

  7. #7
    Account Inactive Ishtaria is offline
    InactiveRank
    Oct 2013 Join Date
    128Posts

    Re: Adding a monster spawn

    You have to edit the .npc file for the relevant map. The structure isn't complicated (nearly identical to the .monster files) but the editing needed can be tricky plus you may need a special tool for getting the correct map co-ordinates (what you get shown in-game isn't correct in relation to what's in the .npc file).

    Unless you have a LOT of time on your hands I would recommend placing the NPC manually where you want it, type /mypos and make a note of those co-ordinates so you can manually replace it after a server restart. A knowledgeable developer could even create a script to auto-place these NPCs at restart.

    Not ideal I know but all things considered it's probably the best option.
    Last edited by Ishtaria; 19-07-14 at 04:03 AM.

  8. #8
    Newbie yogatama is offline
    MemberRank
    Jun 2015 Join Date
    1Posts

    Re: Adding a monster spawn

    float guessed_spawntime = 6600
    What it's mean ?
    (6600/60)/60 = 1,8 hours,
    Or 6600 = 66 Minutes ?

  9. #9
    Yes, it's really me HuninHune is offline
      V.I.P  Rank
    Sep 2006 Join Date
    ::1Location
    1,096Posts

    Re: Adding a monster spawn

    Quote Originally Posted by Ishtaria View Post
    You have to edit the .npc file for the relevant map. The structure isn't complicated (nearly identical to the .monster files) but the editing needed can be tricky plus you may need a special tool for getting the correct map co-ordinates (what you get shown in-game isn't correct in relation to what's in the .npc file).

    Unless you have a LOT of time on your hands I would recommend placing the NPC manually where you want it, type /mypos and make a note of those co-ordinates so you can manually replace it after a server restart. A knowledgeable developer could even create a script to auto-place these NPCs at restart.

    Not ideal I know but all things considered it's probably the best option.
    Maps are all 262,144 units in each direction, in game get your position, divide it by 262,144. the whole number you get is the map it's on and the remainder is the location on the map... Super easy
    Much of what I say is merely my opinion. My incredibly accurate opinion.

    Quote Originally Posted by AMSK
    My brothers love to kalonline the server I am old husband with you

  10. #10
    Member uic3hj is offline
    MemberRank
    Feb 2014 Join Date
    MNLLocation
    56Posts

    Re: Adding a monster spawn

    Hunin, i tried to use rohan strs for editing monster.bin and i have a problem after editing the monster levels.
    i got this error monster.bin [ERROR] LoadBinFile monster.bin on mapid logs

  11. #11
    Registered temperanceb is offline
    MemberRank
    Jun 2016 Join Date
    6Posts

    Re: Adding a monster spawn

    so have u placed NPC manually?



Advertisement