Spawngraphs Tutorial 'by Sfphinx' - Tutorials - Tribes 2 |
||
Table of Contents
PrologueI wrote this tutorial originally like 6 years ago just after the game was released and it fixes have been added over the years. Please realize that generating Spawngraphs is more art then science, one fix that worked for someone else may and probably won't work for you. As you read through this tutorial if you find that none of the fixes work for you and you find a new one, please email me so I can add it to the tutorial. Also please realize that some fixes contradict other fixes, like I said it is more art then science. Good luck and happy mapping. Sfphinx IntroductionSpawnspheres and Spawngraphs are the things that Tribes 2 mappers hate the most. I have compiled with the help of others several spawngraph solutions. Now thanks to the long hours I have spent complaining about my spawngraphs and spawnspheres not working, as well as trying to get them to work, myself...additional help received from various people notwithstanding...I present you with "HOW TO NOT GET A HEADACHE FROM SPAWNGRAPHS". SpawnspheresWhat are Spawnspheres? Well, if you were a Tribes 1 mapper you will remember that there were SpawnMarker (little red arrows with a black dot attached) to mark where a single person would spawn. There were a couple problems with this. Number one, the mapper had to make sure to put enough on the map. Two, it was very time consuming. Well thanks to Dynamix, they made it a little easier on us. They created what we call Spawnspheres (SpawnSphereMarker). These can be easy or a pain. With the spheres, once the spawngraphs have been built, that is were people will spawn into. Ok, that was the easy part now for Spawngraphs. SpawngraphsSpawngraphs are what tell the T2 engine all the coordinates on the map were a person can spawn. If Interior Instances, Objects, and/or the Terrain exist within the sphere the -spnBuild function takes that all into consideration. Basically it takes everything within a sphere and breaks it all down and then says these are all the coordinates that a person can spawn at so that you don't spawn in a building wall or in a tree, etc... It takes all the coordinates and in it's own language puts it into a .spn file, which is located in the base\terrain directory. Creating SpawnspheresHow to create a spawnsphere. First you need to open the editor. Then you need to Alt-Click on the Team1 Simgroup located under the Simgroup Teams. You need to then create a SimGroup called Spawnspheres under the Team1 Simgroup. Alt-Click on the Spawnspheres SimGroup then create the SpawnPointMarker. Also, if you have more then one spawnsphere per team you need to make it so that the SphereWeights of all the spawnspheres added together equal 100; as well as the IndoorWeight and OutdoorWeight added together need to equal 100. How to create the spawngraphs is an essential thing. You should now have all your spawnspheres in place and all of the settings done correctly. Creating SpawngraphsHow to create the spawngraphs is an essential thing. You should now have all your spawnspheres in place and all of the settings should be done correctly. There are two ways to create spawngraphs. One, go to the AI section of the In-game Editor and click on Build TOS, click Save, then click Build Graph. (I don't recommend this way, it tends to freeze your computer.) Two, go to the DOS command, go to the Tribes2\gamedata directory and type the following: tribes2.exe -spnBuild Map Name Map Mission Type (I recommend this way, it seems to succeed the most!). Now I have to put this in because some one will be sure to type in Map Name and Map Mission Type and then will ask me why won't it work? Well you need to actually type in Your Map Name. (example: one of my maps name is Tirith, which is a CTF map, therefore I type in the following: tribes2.exe -spnBuild Tirith CTF. Fix #1Ok, now on to the second largest problem that I have run into, and that others have run into as well. The program works, it creates the .spn file, but it is EMPTY! What to do? Well I have the answer: your map is screwed. Just joking. Actually make sure the TerrainBlock section in the .mis files is right after the SunBlock section (this is suggested, it hasn't proven to be a problem if the TerrainBlock section exists somewhere else in the file). In the TerrainBlock section there should be a command line as follows: The desertdel1 might be lushdet1 or some other ' detailTexture = "details/desertdel1"; ' file that exists that corralates with your terrain texture in your map.
new TerrainBlock(Terrain) {
rotation = "1 0 0 0";
scale = "1 1 1";
detailTexture = "details/desertdet1";
terrainFile = "Training2.ter";
squareSize = "8";
hazeDistance = "250";
position = "0 0 0";
visibleDistance = "1200";
locked = "true";
};
If you find that there is no "detailTexture" command line in the TerrainBlock section that will most likely be your problem, if you do find a command line in the TerrainBlock section then one of the following problems is probably preventing your spawnspheres from working properly. Fix #2Ok, so the TerrainBlock command line was not your problem. Well, here is another troubleshooting option that you have. You have created the spawnspheres and put them in the correct folder names and such. When the spawnspheres are created the "SphereWeight = 100". This is fine as long as there is only on spawnsphere for that team. However, if there are two spawnspheres for a team the overall SphereWeight (both spawnspheres SphereWeights added together) need to equal 100. Also, there are two more dynamic fields that need to be taken care of for a spawnsphere. First, the OutdoorWeight (the percentage of time you want people to spawn outdoors, rather than indoors) and the IndoorWeight (vice versa). The OutdoorWeight and the IndoorWeight added together need to equal 100. Ok, I will admit that it has been brought to my attention that editor doesn't always have a problem if the indoorWeight and outdoorWeight added together doesn't equal 100, however, I still recommend from extensive experience that you do make sure that they equal 100. The reason is when troubleshooting it makes sure that that isn't one of the problems of why it won't create a spawngraph. One other thing is: if you have a spawnsphere that has buildings inside of it and you want to use the indoorWeight, be sure that the spawnsphere is touching the ground else it might not work. Fix #3This solution was presented to all and was brought to my attention by Bytor (from Tribes2Maps.com). For some reason there has been a known problem that Lava, Water, and all other types of WaterBlocks when inside of a spawnsphere will not allow the program to create the spawngraphs. Here is the solution. First, make sure that you have a backup of the .mis file somewhere on your computer. Second, open the editor and delete the WaterBlock. Then save and exit the program and run the spawngraph building program for the DOS command line. Fix #4Well just to make sure that every knows what the NavGraph is and what it is importance is to spawngraphs, I have decided to add this little solution/information section to my tutorial. The NavGraph is for the use of if you have bot support set up with your map. That said if you don't have bot support it doesn't matter if you have one. However you do need the coding for a NavGraph in the .mis file for the Spawngraph to be build else you will get an UE. So make sure you have the code for a NavGraph in your .mis file, refer to Solution #5 for the actual placement position in the .mis file. Fix #5Well here is another solution for you. This one I figured out because Lexor couldn't figure out why his spawngraphs wouldn't create properly. However I just recently discovered that this is not always true. Refer to Solution #6. Make sure the NavGraph() is before the TerrainBlock(). Fix #6This solution was brought to my attention and confirmed my theory, which was you couldn't have a map larger than 2 km, by Lexor with help from Chao$ (Special thanks to Spary for the teleporting code, which can be found on my site). So my next solution is for those maps that are larger then 2 kilometers. This is the only solution that is working right now so this is what you will have to do, unless you find some other method. I would kiss the idea of having a map larger then 2 km and still have it be server-sided, because that will not happen. You will need the teleporting code (found on http://www.tribes2maps.com or on my site) for this solution to work. Take any interior that you would like to use and place it somewhere, preferably under the terrain, and place multiple teleporters in it. Then you can place your spawnspheres in those interiors. One interior per team. Then they will spawn into the interior. Thus using the teleporting code the players will then be able to transport to the actual playing area and have fun, while at the same time allowing you (the mapper) to keep your original ideas intact. Fix #7Well I started mapping again (10.11.02) and I just ran into another problem with creating spawngraphs. This time it was suggested to me, by Sparky (don't let it go to your head Sparky), that I should put the terrainBlock() at the beginning of the .mis file. Therefore, since I had exhausted all of my other resources I moved the terrainBlock() to right after the missionarea(). Fix #8If you have tried all of these different solutions and still cannot get the program to create the spawnspheres, you might want to consider starting over on your map or reinstall Tribes2 or just troubleshoot it until you get it right. If you are successful in coming up with a way to fix your problem that I don't have on this tutorial please email me at sfphinx@sfphinx.com and I will add the solution to this tutorial and give you credit. Fix #9Another problem that has been popping up more and more often with new maps is big buildings. Since Tribes 2 has been out for a long time now most all the buildings have been used so much that maps are getting predictable. So our WorldCraft artists have been making buildings, some small and some large! This problem begins with large buildings. Due to the "bugginess" of the spawngraph generator in Tribes 2, it tends to choke on all sorts of different small problems. Large buildings tend to make it choke because there are so many coordinates that is has to generate it runs out of memory. So here is the solution. If you have a spawngraph in your map that is in a large building replace the places the spawngraph touches with walls. Then copy the coords of the building that you have their currently and delete it. Then run the spawngraph utility, once the spawngraph has been generated then just copy the building back into the map and delete the walls. If you have big buildings on your map, but none of the spawnspheres are within them, and you still can't get it to build a graph. Copy the buildings and delete them for troubleshooting purposes. Then once the graph is built copy the buildings back in to the map! viola! Tips and TricksDo you ever wonder how to make it so that no one will spawn in a certain area of your base without having to use multiple Spawnspheres? Well I have go the answer, thanks to Powdahound. Simply place a crate(s) or some other type of object that when you resize it it can take up the whole space that you don't want people to spawn in and then save. Then create your Spawngraph and then go back in to the editor delete the crate(s) and save. Wow! No one will spawn there. Cool, eh? CreditsAll information in this tutorial was taken from experiences of myself (Sfphinx), Bytor, PJ, and Powdahound. I wish to thank these three who were gracious enough to allow me to take their experiences and combine them with my own to create my Spawngraph and Spawnsphere Tutorial. If anyone notices anything wrong with this tutorial (ie. grammar, spelling, other solutions) please email me at sfphinx@sfphinx.com. Thanks. |
||