Infinate Posted December 26, 2011 Share Posted December 26, 2011 (edited) Hello, I've recently started a new project. I'm fairly new to scripting and my LUA knowledge is close to 0. But I wanted to make my first script.. And unlike most, I thought, Why should I make those "simple" scripts like a welcome message with my noobish LUA skills if I can also make something AWESOME with my LUA skills. I started browsing the wiki and quickly came accros a few functions that would be enough for me. My idea was to port a complete map mod into MTA. I chose Gostown to learn how to port complete map mods into MTA. I figured, once I got the hang of it. I could start making my own map mod, then port it to MTA and release it to the public. So I started scripting. The whole script basicly looks like this; txd = engineLoadTXD( "TXD/Gp_landbig.txd" ) col = engineLoadCOL( "COL/Gp_land050.col" ) dff = engineLoadDFF( "DFF/Gp_land01.dff", 0 ) engineImportTXD( txd, 5000 ) engineReplaceCOL( col, 5000 ) engineReplaceModel( dff, 5000 ) This example here is supposed to replace model ID 5000 with a custom TXD, COL and DFF. Now I did this over and over with 200+ objects. I also used a converter to turn the IPL file into a .map file for MTA. And then the moment came... I finished it.. I wanted to start the script and... The thing is completely bugged. Parts of the map keep loading and unloading, MTA became REALLY unstable, client crashes every 2 minutes. NO collision whatsoever. (I must add, the whole map uses 1 COL file; COL/Gp_land050.col, so I used this col file for every model, same goes for the texture, but since the texture was shown perfect on every object, I figured there was no problem.) Draw distance is just sad. I have absolutely NO idea what went wrong. I even had a friend of mine look at it and he said that the script was perfectly fine. (Not much to do wrong, aye?) But then again, he didn't know much about object replacement on a large scale. Actually there are not alot of people who know much about this. I hope anyone here can help me. Thanks in advance. EDIT: I got it somewhat more stable by starting to only port the actual land with road (No LOD), and not the city etc. But now I just can't figure out what to do. I can't seem to fix the existing problems. -No collision. -Streamer problems. -Crashing problems/unstable. -Some objects are NOT replaced, even though the script tells MTA to do so. Here is the current complete script, including; -The scripts + meta files. -COL, TXD and DFF files (Credits to the Gostown mod creators http://www.gostownparadise.com/) -.map file, convertered IPL. (Again, Credits to the Gostown creators.) I know some parts of the map go through the original GTA SA map, but that is not an issue for me. I'm not porting this to actually use, I'm porting this to learn how to port future projects of mine to GTA SA with smaller download sizes. If anyone can have a look at it and give me some tips/fix it, I'd be really thankfull. BTW, Replacing the models when the Object script is started can be done with the following CMD "/replace". Download link: http://www.mediafire.com/?bddscdjlgwonwdd Virus scan: http://www.virustotal.com/file-scan/report.html?id=bb926c375624657334bbf1016aef23dcb6f17754421cfc9766f13f1fc8498824-1324932135 Thanks in advance. Edited December 26, 2011 by Guest Link to comment
Xeno Posted December 26, 2011 Share Posted December 26, 2011 Maybe its an MTA bug and it cant handle the amount of objects your replacing? I dont know really, just a guess. Link to comment
Infinate Posted December 26, 2011 Author Share Posted December 26, 2011 Maybe its an MTA bug and it cant handle the amount of objects your replacing? I dont know really, just a guess. The MTA object streamer can display 250 objects at a time, as I recall. Edit: The weird thing is that another GTA SA multiplayer mod can display the map without any issues. Is this an issue (if you can call it an issue.) with MTA itself? Link to comment
Castillo Posted December 26, 2011 Share Posted December 26, 2011 I have started the map and I got warnings on the server console, from line 92 to 111 the model id's are invalid. Link to comment
Infinate Posted December 26, 2011 Author Share Posted December 26, 2011 I have started the map and I got warnings on the server console, from line 92 to 111 the model id's are invalid. Mmm.. Fixed it, Still no collision. Still random crashing. MTA streamer is still going crazy. Link to comment
Castillo Posted December 26, 2011 Share Posted December 26, 2011 When you're replacing a lot of objects and a big map, the streamer will do weird stuff, like make things dissapear. Link to comment
Infinate Posted December 26, 2011 Author Share Posted December 26, 2011 When you're replacing a lot of objects and a big map, the streamer will do weird stuff, like make things dissapear. Mmmm... 1. Is it possible to use a custom streamer? 2. How do I fix the fact that there is no collision? Link to comment
Faw[Ful] Posted December 26, 2011 Share Posted December 26, 2011 Are you using the same COL file for all of them ? If yes then you are crazy , MTA will load this big collision that cover all the objects 200 + ... , it will load the map col on the map col on the map col 200 + time ... lol ! I find that alot of modders like to put 1 COL for all the map , well I open this col with COL editor 2 and I find that this COL is a COL library, so you have all the COL files in 1 COL library file. MTA read the first COL file of the COL library file , so you need to have the DFF + his COL model (This COL file is the same model, but low polys or the same model shape , but made with primitives (box, sphere) and yes the COL is the most buggy file on MTA ! The model can lose his collision when you go far away and come back ! Link to comment
Infinate Posted December 27, 2011 Author Share Posted December 27, 2011 Are you using the same COL file for all of them ?If yes then you are crazy , MTA will load this big collision that cover all the objects 200 + ... , it will load the map col on the map col on the map col 200 + time ... lol ! I find that alot of modders like to put 1 COL for all the map , well I open this col with COL editor 2 and I find that this COL is a COL library, so you have all the COL files in 1 COL library file. MTA read the first COL file of the COL library file , so you need to have the DFF + his COL model (This COL file is the same model, but low polys or the same model shape , but made with primitives (box, sphere) and yes the COL is the most buggy file on MTA ! The model can lose his collision when you go far away and come back ! Thanks alot! I finally got collision. Now I got to get rid of the buggy/shitty MTA object streamer and find a way to use a better streamer. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now