Jump to content

Replacing objects.


Infinate

Recommended Posts

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 by Guest
Link to comment
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

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...