Jump to content

GTA:SA Scene2Res Converter


Recommended Posts

  • 7 months later...
Hello everybody!

I decided to release the MTA:GREEN model importer :)

This tool can be used to convert a GTA III engine scene into a MTA resource.

Gostown6 test:

http://www.2shared.com/file/quJZ8Y0U/mt ... final.html

(ver: final, small bugfix)

http://www.2shared.com/file/wRElPUkQ/mt ... p_rc2.html

(ver: rc2, bugfix 2)

Using a previous testing version I made the MTA:United Liberty City video.

How to use this:

  • Put all the IDE and IPL files into the "ipl" folder
  • Extract the textures, models and collisions into the "resources" folder
  • Configure the "config.ini" to fit your needs
  • Run the converter and fix any possible errors output
  • Cut out the contents from "output" into a .zip or a resource folder
  • Start the resource!

You will be able to see your map at the configured offset!

If you experience model loading problems, you can try switching the streaming method.

There are occassional rotation errors which need manual tweaking; use the map editor for that.

And if you still have any problems beyond all help, expect them to turn from blue to green in a matter of time.

Ingame commands for caching:

- mcollect: Garbage collects the world, removing cached entries

- mapmem: Displays the current streamMemory

Configuration description:

  • debug:
    Outputs model streaming information for map debugging and error reporting.
    The list on the right displays every loaded model [modelname (refcount, loadstatus)].
  • xOffset, yOffset, zOffset:
    Recenters the map to a position.
  • mtaBLUE:
    Applies tweaks to optimize the usage with the MTA:BLUE core, such as ignoring model ids which either have a LOD or are LOD.
  • jetpackHeight:
    Sets the jetpack maximum height + zOffset
  • method:
    Switches the streaming method. I recommend using stream, since distance is unstable.
    Should be self-explanatory what they do :)
  • static:
    Unrolls the lua tables to possibly gain performance during execution.
    This feature is experimental; should be optimal for small maps.
  • lodSupport:
    Enables LOD models to be compiled with the map. Setting this to true will apply the original draw distance instead of 500.
  • forceLODInherit:
    Inherits the previous model's collisions. The less collision files get loaded, the less collision errors there are.
  • cached:
    Enabling this will cause models to be loaded on the fly when they are required. Turning this off would theoretically ensure error-free models, but GTA:SA garbage collection picks them up anyway. Recommended.
  • streamerMemory:
    If this value reaches maximum, the streamer tries to free big unused models until the new model request fits into memory. This size is theoretical, since model files scale much higher when loaded by GTA:SA. Recommended at 100.
  • autoCollect:
    Once a model is not used anymore, it gets free'd from memory.
  • runtimeCorrection
    Due to not having onModelLoad, onModelUnload, onModelInvalidate events, you can set this value to unload models which are in an invalid streamer state after x frames. Experimental feature!

In order to get the collisions to work, you have to extract them into single .col files.

I recommend using ColEditorII for that :)

You might need the MSVC++ 2010 Redistributable D:

Happy New Year :P

I have a question, what is the item's limit? Because if I load an IDE and a IPL with a lot of items the replacement doesn't work, but the rest of the map is here (with SA objets).

And, if I run two maps created with this tools MTA became crazy, it spawn parts of objets in anywere.

Link to comment
  • 3 months later...
  • 1 month later...
  • 4 months later...
  • 3 weeks later...

I found bug, when converter parsing IDE files and comparing model names with existing model names, and if names differ big or small letters, he skiping this model.


IDE file:

model name "ODIE_Schraft"

exist model name "odie_schraft"

pls do indifference small big letters.

Or try make autorenamer tool for fix this trouble

sorry for bad english, but i russian.

Edited by Guest
Link to comment
  • 4 weeks later...
  • 4 months later...
  • 1 year later...
  • 5 months later...

Scene2Res has been updated greatly, thanks to renewed interest by people in custom maps in MTA (Matias_Montana, Cody, HeySlickThatsMe just to name a few).

New things:

  • added automatic TXD optimization for smaller and clearer map textures (thanks to my work on Magic.TXD)
  • added support for original GTA3 and GTAVC maps
  • fixed many rotation issues (hopefully all)
  • fixed unicode path issues
  • added Windows XP compatible executable
  • added enableFiltering and ignoreFlagsSecure INI options
  • added ability to automatically process COL archives (has been there for a while but not announced)
  • open source using SVN and CodePlex
  • many under-the-hood improvements

Happy modding! <3

  • Like 2
Link to comment

i kinda try evry year again to use this awesome programm

but badly enough i still get error model not found 

it looks like to have problems with name correction


is there a way to fix all the error's because i want to compile a big map pack 

Link to comment
  • 1 month later...

PSA: Turns out GTA3 DFF files are not supported by SA. Try this fix if you use DFF files from other platform or different game. You need to transform them to SA DFFs, which is easy. :$

* makesadff.bat: https://pastebin.com/2m6brtap
* dffconv.exe: http://gtaforums.com/topic/752450-rel-renderware-file-converter/

When you converted map you get this "output" folder. Put dffconv.exe and makesadff.bat into there. Then run "makesadff.bat". It should create a new folder "models_sa" with GTA:SA compatible DFF files. Delete "models" folder and rename "models_sa" to "models".

Last time I said original GTA3 map is completely supported. So turns out I forgot this. But now it should work, sort of. Better idea is to start out with GTA United 1.2 GTA3 map because it is converted to SA already. This fix works for any map tho, I think The Hero added support for PS2 files aswell. If you have further problems with DFF files please post in his GTAForums thread! :)

- Martin

Link to comment
  • 2 weeks later...

After change and delete collision: "pTable.model=engineLoadDFF("models/trafficlight1.dff", 5553);" to "pTable.model=engineLoadDFF("models/trafficlight1.dff", 1315);"



"1315" is a GTA SA traffic light id. What I doing wrong ?


    pTable.txd=requestTexture(pTable, "textures/dyn_lmppsts.txd");
    engineImportTXD(pTable.txd, 5553);
    pTable.model=engineLoadDFF("models/trafficlight1.dff", 5553);
    engineSetModelLODDistance(5553, 64);


Edited by sasosak
Link to comment

I use this and still the same :/

for Client.lua:


function RestoreCollision ( )
    engineRestoreCOL ( 5553 )

addEvent ( "collisionRestore", true )
addEventHandler ( "collisionRestore", getRootElement(), RestoreCollision )


for Server.lua:


function RestoreCols ( )
    triggerClientEvent ( "collisionRestore", getRootElement(), collisionRestore )
addCommandHandler("restorecol", RestoreCols)


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