EZ_Keyno Nokey
07-04-02, 02:34 PM
Hello,
For those that are making presistant worlds, this script is a really nice setup for spawning mobs. Comes with custom spawn list you can make, easy to setup.
The useage file isnt the greatest, but I'll give the info you need to understand it with no C scripting knowledge.
Ok, to use it. In the zip there is a mod with it working, can open the mod and examine it if you like. Also included the zip is the three scripts you need, just cut and past into the script editor to compile.
The scripts should have the same name as the text file, no extention. Scripting editor will take care of the extention. So the mmorpg_sdllist.txt file cut and paste into the editor should be saved as mmorpg_sdllist.
Next create a invisable placeable name it "XXX" spawner, where XXX is, thats the name of the creatures you will be spawning. now in the TAG of the invisable placeable put this info: goblin_4_40_60_00_05_a
Goblin is the creature list I used. The creature list can be custom mobs you create or the standard mobs in the toolset.
the rest of the info is as follows:
goblin=standard toolset creatures
4= number of mobs to be spawned
40=min delay to spawn next creature in seconds
60=max delay to spawn next creature in seconds
00=min distance to spawn the next creature from another spawn.
05=max distance to spawn the next creature.
a=Unique spawner label, (example, if you have more then on spawner in the same area, then the letter should read B, C for the third and D for the forth spawner in the area and so on.)
All these varibles can be whatever you wish.
All mobs in the spawner will have seperate timers apon death.
Next,
In the invisable placeable, goto the script tab and select the mmorpg_spawner script as the OnHeartbeat script.
Placeable is all setup. Now on to the creature list.
In the mmorpg_spawnlist script you will notice this:
if (strList == "goblin") { // goblin spawner
list_add_rear_string(OBJECT_SELF,"creature_list","33:NW_GOBLINA"); // (01-33 -> Goblin)
list_add_rear_string(OBJECT_SELF,"creature_list","66:NW_GOBLINB"); // (34-66 -> Goblin)
list_add_rear_string(OBJECT_SELF,"creature_list","98:NW_GOBWIZA"); // (34-98 -> GobShaman)
list_add_rear_string(OBJECT_SELF,"creature_list","99:NW_GOBLINBOSS"); // (99-100 -> GobChief)
Info is as follows:
strList == "goblin" ... is the referance to the goblin in your invisable placeable TAG line goblin_4_40_60_00_05_a.
33,66,98,99 before the NW_GOBLINA, NW_GOBLINB, NW_GOBWIZA, NW_GOBLINBOSS. THat is the Dice roll to determine what spawns, every spawn cycle.
1-33
34-66
67-98
99-100
and so on.
This can be changed to whatever you wish as long as it doesnt overlap.
NW_GOBLINA=Goblin (Regular)
NW_GOBLINB=Goblin (Regular)
NW_GOBWIZA=Goblin (Shaman)
NW_GOBLINBOSS=Goblin (Chieftain)
These are the Toolset Blueprint tags for these mobs. To find out the blueprint tag for a mob, create a standard mob of your choosing, edit it and look at it's standard TAG. thats the blueprint tag name.
Creature list is setup. Now if you want more then one spawner in one area, you can add on to the spawn list.. look at the spawnlist in the attached mob for the example. it has two spawners working off one spawnlist, with different mobs.
Heads up, some people have had problems getting the spawner to work the first time around, this is due to some odd bug in the toolset, a workaround to this is to change the debug=0 to 1 in the mmorpg_spawner script .. run the mob once and then change the debug=1 to 0 .. then things will work normaly after that. Debug line can be found towards the middle to bottom have of the script.
Hope thats covered everything for you, if you have questions, let me know.
Special Thanks goes to Nabo at the NWN scripting forum for writing this nice script.
Script and mob zip file.
www.users.qwest.net/~keyn...script.zip
Keyno
<edit>
Forgot to mention, you can create custom mobs for the spawner list aswell. Just create a custom mob, give it a unique TAG, dont place the mob in the area just leave it in your blueprint. Put the TAG name in the spawnlist and it will spawn like a normal mob .. Edited by: Keyno Nokey at: 7/4/02 3:36:59 pm
For those that are making presistant worlds, this script is a really nice setup for spawning mobs. Comes with custom spawn list you can make, easy to setup.
The useage file isnt the greatest, but I'll give the info you need to understand it with no C scripting knowledge.
Ok, to use it. In the zip there is a mod with it working, can open the mod and examine it if you like. Also included the zip is the three scripts you need, just cut and past into the script editor to compile.
The scripts should have the same name as the text file, no extention. Scripting editor will take care of the extention. So the mmorpg_sdllist.txt file cut and paste into the editor should be saved as mmorpg_sdllist.
Next create a invisable placeable name it "XXX" spawner, where XXX is, thats the name of the creatures you will be spawning. now in the TAG of the invisable placeable put this info: goblin_4_40_60_00_05_a
Goblin is the creature list I used. The creature list can be custom mobs you create or the standard mobs in the toolset.
the rest of the info is as follows:
goblin=standard toolset creatures
4= number of mobs to be spawned
40=min delay to spawn next creature in seconds
60=max delay to spawn next creature in seconds
00=min distance to spawn the next creature from another spawn.
05=max distance to spawn the next creature.
a=Unique spawner label, (example, if you have more then on spawner in the same area, then the letter should read B, C for the third and D for the forth spawner in the area and so on.)
All these varibles can be whatever you wish.
All mobs in the spawner will have seperate timers apon death.
Next,
In the invisable placeable, goto the script tab and select the mmorpg_spawner script as the OnHeartbeat script.
Placeable is all setup. Now on to the creature list.
In the mmorpg_spawnlist script you will notice this:
if (strList == "goblin") { // goblin spawner
list_add_rear_string(OBJECT_SELF,"creature_list","33:NW_GOBLINA"); // (01-33 -> Goblin)
list_add_rear_string(OBJECT_SELF,"creature_list","66:NW_GOBLINB"); // (34-66 -> Goblin)
list_add_rear_string(OBJECT_SELF,"creature_list","98:NW_GOBWIZA"); // (34-98 -> GobShaman)
list_add_rear_string(OBJECT_SELF,"creature_list","99:NW_GOBLINBOSS"); // (99-100 -> GobChief)
Info is as follows:
strList == "goblin" ... is the referance to the goblin in your invisable placeable TAG line goblin_4_40_60_00_05_a.
33,66,98,99 before the NW_GOBLINA, NW_GOBLINB, NW_GOBWIZA, NW_GOBLINBOSS. THat is the Dice roll to determine what spawns, every spawn cycle.
1-33
34-66
67-98
99-100
and so on.
This can be changed to whatever you wish as long as it doesnt overlap.
NW_GOBLINA=Goblin (Regular)
NW_GOBLINB=Goblin (Regular)
NW_GOBWIZA=Goblin (Shaman)
NW_GOBLINBOSS=Goblin (Chieftain)
These are the Toolset Blueprint tags for these mobs. To find out the blueprint tag for a mob, create a standard mob of your choosing, edit it and look at it's standard TAG. thats the blueprint tag name.
Creature list is setup. Now if you want more then one spawner in one area, you can add on to the spawn list.. look at the spawnlist in the attached mob for the example. it has two spawners working off one spawnlist, with different mobs.
Heads up, some people have had problems getting the spawner to work the first time around, this is due to some odd bug in the toolset, a workaround to this is to change the debug=0 to 1 in the mmorpg_spawner script .. run the mob once and then change the debug=1 to 0 .. then things will work normaly after that. Debug line can be found towards the middle to bottom have of the script.
Hope thats covered everything for you, if you have questions, let me know.
Special Thanks goes to Nabo at the NWN scripting forum for writing this nice script.
Script and mob zip file.
www.users.qwest.net/~keyn...script.zip
Keyno
<edit>
Forgot to mention, you can create custom mobs for the spawner list aswell. Just create a custom mob, give it a unique TAG, dont place the mob in the area just leave it in your blueprint. Put the TAG name in the spawnlist and it will spawn like a normal mob .. Edited by: Keyno Nokey at: 7/4/02 3:36:59 pm