[miLKy_wAy] Posted May 17, 2010 Share Posted May 17, 2010 wth is that test mode ? speak normally please. I do <.< If you are in map editor you can start test mode, so you download all the map models and you see them... Btw. still no custom models.. heres a screenshot Link to comment
karlis Posted May 17, 2010 Share Posted May 17, 2010 bad diea to replace that obj, the landbit in that map will be spoiled Link to comment
50p Posted May 18, 2010 Author Share Posted May 18, 2010 bad diea to replace that obj, the landbit in that map will be spoiled The Max script generates code that replaces models starting with ID 4000. That's just a random number that came to my mind at scripting time. Also, I was aiming to "race" mappers, so it doesn't really matter what model is replaced since race maps are fully custom. I may add a text box which will let user insert their own ID. I also thought of a feature that will let users set their spawn points straight in 3DS Max. [miLKy_wAy], I managed to get MTA to work and I'll test some maps including yours. Just post your latest resource here and I'll try to figure out what is wrong. Link to comment
[miLKy_wAy] Posted May 18, 2010 Share Posted May 18, 2010 bad diea to replace that obj, the landbit in that map will be spoiled The Max script generates code that replaces models starting with ID 4000. That's just a random number that came to my mind at scripting time. Also, I was aiming to "race" mappers, so it doesn't really matter what model is replaced since race maps are fully custom. I may add a text box which will let user insert their own ID. I also thought of a feature that will let users set their spawn points straight in 3DS Max. [miLKy_wAy], I managed to get MTA to work and I'll test some maps including yours. Just post your latest resource here and I'll try to figure out what is wrong. <!-- Meta.xml generated with 50p MTA:SA MAXScript v0.1 (23/04/2010) --> <meta> <info author="" gamemodes="race" type="map" name="pool01" /> <script src="pool01.lua" type="client" /> <map src="pool01.map" /> <file src="pool01.dff" /> <file src="pool01.col" /> </meta> my map file <map edf:definitions="race,editor_main"> <object name="pool01" model="4000" posX="-56.6282" posY="-119.069" posZ="0.0" rotX="-89.8685" rotY="0.816823" rotZ="95.4547" /> </map> my lua file -- Script generated with -- 50p MTA:SA MAXScript v0.1 (23/04/2010) modelNames = { "pool01", } function reloadModels( ) for i, modelName in ipairs( modelNames ) do local temp = engineLoadDFF( modelName .. ".dff", 0 ); engineReplaceModel( temp, i + 4000 ); temp = engineLoadCOL( modelName .. ".col" ); engineReplaceCOL( temp, i + 4000 ); end end addEventHandler( "onClientResourceStart", getResourceRootElement(), reloadModels ); addCommandHandler( "reload", reloadModels ); Link to comment
50p Posted May 18, 2010 Author Share Posted May 18, 2010 [miLKy_wAy], I've been testing and fixing the bugs that may cause models not to be replaced. I forgot that for loops in MAXScript start with 0 whereas Lua's tables start with 1. So if you try to replace 1 model, it will not be replaced because the for loops in Lua script tries to replace model with ID 4001 but model ID in map file starts with 4000. You can fix it by changing 1 thing in Lua script. Change the followings: engineReplaceModel( temp, i + 4000 ); engineReplaceCOL( temp, i + 4000 ); -- to this: engineReplaceModel( temp, (i-1) + 4000 ); engineReplaceCOL( temp, (i-1) + 4000 ); Also, if you want your models to be visible from long distance (max 300 units), add this line below engineReplaceCOL: engineSetModelLODDistance( (i-1) + 4000, 300 ); EDIT: I just found out that sometimes when you want to restart the custom map resource and you made some changes by 3DS Max (like re-exported the map), it may fail to restart and output an error: "Couldn't parse meta.xml for 'yourresourcename'". This is caused by 3DS Max not closing the file properly and MTA can't open it. To fix this, you have to close 3DS Max and "refresh" server (it's a refresh command that you type in console or in-game) to try and parse meta.xml again. I can't figure out why it happens but I'm sure it may be annoying to close 3DS Max and open it to re-export. Link to comment
[miLKy_wAy] Posted May 18, 2010 Share Posted May 18, 2010 it looks like this now.. -- Script generated with -- 50p MTA:SA MAXScript v0.1 (23/04/2010) modelNames = { "pool01", } function reloadModels( ) for i, modelName in ipairs( modelNames ) do local temp = engineLoadDFF( modelName .. ".dff", 0 ); engineReplaceModel( temp, (i-1) + 4000 ); temp = engineLoadCOL( modelName .. ".col" ); engineReplaceCOL( temp, (i-1) + 4000 ); end end addEventHandler( "onClientResourceStart", getResourceRootElement(), reloadModels ); addCommandHandler( "reload", reloadModels ); But there are still no custom models Link to comment
50p Posted May 18, 2010 Author Share Posted May 18, 2010 it looks like this now.. -- Script generated with -- 50p MTA:SA MAXScript v0.1 (23/04/2010) modelNames = { "pool01", } function reloadModels( ) for i, modelName in ipairs( modelNames ) do local temp = engineLoadDFF( modelName .. ".dff", 0 ); engineReplaceModel( temp, (i-1) + 4000 ); temp = engineLoadCOL( modelName .. ".col" ); engineReplaceCOL( temp, (i-1) + 4000 ); end end addEventHandler( "onClientResourceStart", getResourceRootElement(), reloadModels ); addCommandHandler( "reload", reloadModels ); But there are still no custom models Have you noticed there is a new release? Try the new one (v0.3) and see whether it works for you now. Link to comment
Ivan_xXx Posted May 21, 2010 Share Posted May 21, 2010 hey dude, great stuff. Thx a lot. Is it possible to manually select the map location by typing in the co-ordinates? You've used the edittext tag in the script, but it only shows the coords, i cant edit those in the "choose location" window. i would like the map to be 5000 units to the right so it's at sea. Link to comment
50p Posted May 21, 2010 Author Share Posted May 21, 2010 hey dude, great stuff. Thx a lot.Is it possible to manually select the map location by typing in the co-ordinates? You've used the edittext tag in the script, but it only shows the coords, i cant edit those in the "choose location" window. i would like the map to be 5000 units to the right so it's at sea. I do not recommend spawning maps that far away. There are many issues with maps that are spawned outside SA map (mainly camera clipping) so more than 3000 is not recommended. I will add one more text box with Z where you can change Z but not X and Y (maybe in the far future). Link to comment
duncan088 Posted June 21, 2010 Share Posted June 21, 2010 open scrip on 3d max 8 and error to open CharDFFimp.mse help pls Link to comment
Faw[Ful] Posted June 21, 2010 Share Posted June 21, 2010 normally I build my custom map in the MTA editor, its work I can see my models+texture and its like a normal san andreas object, I can move rotate and the collision work perfect after I save the map and I can play it if I include the script of my custom models of course in the meta.xml : Good work I can use this to save time, because is long to build the script and the meta when you have a lot of models (in the script you have to write where the files are and in the meta too, is long.) Link to comment
50p Posted June 22, 2010 Author Share Posted June 22, 2010 open scrip on 3d max 8 and error to open CharDFFimp.mse help pls You need KAM's scripts. http://www.gtaforums.com/index.php?showtopic=218318 benox583, that's what I was aiming for.. Because making custom maps entirely in 3DS Max and then exporting every single model separately takes ages. Though, I'd love to export collision files as well but I can't figure out how... Link to comment
Faw[Ful] Posted June 22, 2010 Share Posted June 22, 2010 I cant very help you, because im bad in script sorry 50p im just a mapper, a good mapper, but a mapper, what I do to play with my custom models (rotate moving like a normal sa object ) in the MTA map editor, I do these steps and its long, but not too long, I dont have to build the map in 3ds max. : 1)Think in your head what the map look like 2) make your custom model + texture + the collision (collision very easy copy your model and add a .col shader) 3) make another custom model and look if they fit correctly, the both, togheter for a race map example 4)export in gta sa engine 5)I have a resource named test2 in my resource folder, the script to show the custom model in MTA is there, I just have to put my .dff .txd and .col in this folder and make sure the script + meta target the custom models files 6) start a serve write start editor in it and start test2 (my custom model script) 7) begin a new map and place your custom models where you want for your map, result build the map in MTA map editor. Maybe you can make a tool to creat a script for your custom models like my resource test2, so you build the map in MTA map editor and not 3ds max here my script in the resource test2 : addEventHandler('onClientResourceStart', resourceRoot, function() local txd = engineLoadTXD('files/akina.txd') engineImportTXD(txd, 2052) engineImportTXD(txd, 2053) engineImportTXD(txd, 2054) engineImportTXD(txd, 2371) engineImportTXD(txd, 2372) local col = engineLoadCOL('files/akina1.col') engineReplaceCOL(col, 2052) local col = engineLoadCOL('files/akina2.col') engineReplaceCOL(col, 2053) local col = engineLoadCOL('files/akina3.col') engineReplaceCOL(col, 2054) local col = engineLoadCOL('files/akina4.col') engineReplaceCOL(col, 2371) local col = engineLoadCOL('files/akina5.col') engineReplaceCOL(col, 2372) local dff = engineLoadDFF('files/akina1.dff', 0) engineReplaceModel(dff, 2052) local dff = engineLoadDFF('files/akina2.dff', 0) engineReplaceModel(dff, 2053) local dff = engineLoadDFF('files/akina3.dff', 0) engineReplaceModel(dff, 2054) local dff = engineLoadDFF('files/akina4.dff', 0) engineReplaceModel(dff, 2371) local dff = engineLoadDFF('files/akina5.dff', 0) engineReplaceModel(dff, 2372) engineSetModelLODDistance(2052, 500) engineSetModelLODDistance(2053, 500) engineSetModelLODDistance(2054, 500) engineSetModelLODDistance(2371, 500) engineSetModelLODDistance(2372, 500) end ) is not complicated and you can send your custom models + script to a friend so he can build his custom map by placing the model in MTA map editor, example I send custom tube shape and with it we can make different custom map in MTA map editor like a normal sa object but more funny. and people who make custom race map or just map, share with the other on the community, because they are so nice In this topic I speak about hidden custom race map, people made it, but they dont share the good work they do, of course maybe they dont are ready. : https://forum.multitheftauto.com/viewtop ... 93&t=27992 Link to comment
50p Posted June 22, 2010 Author Share Posted June 22, 2010 I don't know what you're trying to say by this post benox583. Are you trying to give a suggestion? Are you trying to teach me how to make custom maps? Maybe something else? I'm not very sure... and because of that, I don't know what to reply to you Link to comment
Faw[Ful] Posted June 23, 2010 Share Posted June 23, 2010 50p, Its just my stages to have working custom models in MTA map editor like this : Uploaded with ImageShack.us Link to comment
50p Posted June 23, 2010 Author Share Posted June 23, 2010 I don't know mate... I made the script so it creates new resource for you and all you have to do is: - export collision mesh yourself manually (I can't figure out how to write collision exporter) - add some code to change textures of the exported models You can start the resource in map editor and it should replace the models for you because my MAXScript creates Lua script for you... Link to comment
Ivan_xXx Posted July 9, 2010 Share Posted July 9, 2010 Yeah man I find it very very helpful thx. Already converted some 7 maps from other games Including the full: -Nurburgring takes 7 minutes to complete on our F1 server! -spa-francochamps -Bathurst and others check them out on the SKC server Thx again http://img59.imageshack.us/img59/667/dsfcu.jpg[/img] http://img717.imageshack.us/img717/20/28160156.jpg[/img] http://img338.imageshack.us/img338/640/32943567.jpg[/img] http://img28.imageshack.us/img28/3670/88388483.jpg[/img] http://img691.imageshack.us/img691/7484/95274446.jpg[/img] http://img411.imageshack.us/img411/1867/98465799.jpg[/img] http://img717.imageshack.us/img717/3329/47521074.jpg[/img] http://img99.imageshack.us/img99/3043/33312254.jpg[/img] http://img691.imageshack.us/img691/7484/95274446.jpg[/img] Link to comment
50p Posted July 9, 2010 Author Share Posted July 9, 2010 Great to see some work being done by the script! I'm not a fan of racing games/gamemodes but I'm glad it helped you a lot. I wish I could find out how to export collision files as well.. That would speed everything up even more. Keep exporting I may improve it in the future somehow but before I do it, please give suggestions, what would you like to see and/or what needs change in your opinion? Link to comment
Faw[Ful] Posted July 9, 2010 Share Posted July 9, 2010 I d'ont know I can import map ipl into 3dsmax, so now I can use your tool to export it with speed thanks, I need to do alot of work to convert some parts of anderius city into MTA Link to comment
Faw[Ful] Posted July 13, 2010 Share Posted July 13, 2010 OMG ! I try it and its dont work with 3ds max 9, error at these lines in the scripts named MapExporter.ms : local gtaMap = openBitmap ( ( getDir #scripts ) + @"\MapExporter\gtasa-map-small.jpg" ); and local marker = openBitmap ( ( getDir #scripts ) + @"\MapExporter\marker.tga" ); error message at start up or when I try to run the script, here the error : --syntaxe error: at bad, expected factor --in line local gtaMap = openBitmap ........ and I cant read after, but of course is the two lines I think he cant find the files : - gtasa-map-small.jpg and - marker.tga I try to put these files at different places in 3ds max, but nothing change ! I did a big work to extrack some models of a map with Med editor !!! yes I need to test all the things before, but I dont see error on this forum section ! I speak about your new ! I did not try the old Map Exporter. and kams script work. Link to comment
50p Posted July 13, 2010 Author Share Posted July 13, 2010 Make sure you extracted files into proper location. As you can see the images should be in <3ds max>/Scripts/MapExporter/ folder. Link to comment
Faw[Ful] Posted July 13, 2010 Share Posted July 13, 2010 thanks for the speed answer, but no this isnt the solution I try it before and I try it again to be sure after your answer, but no d'ont work ! Arggg is bad for a 3D beginner ! Here the best I can do to show what I see : Message error : For better , want a video ! and of course I use win 7. I cant say its an error its mostly a warning, but a mega killer warning ! Ouch ! Link to comment
50p Posted July 13, 2010 Author Share Posted July 13, 2010 OK, now I get it. All you need to do is change the string from this: @"\MapExporter\gtasa-map-small.jpg" and @"\MapExporter\marker.tga" to "/MapExporter/gtasa-map-small.jpg" and "/MapExporter/marker.tga" The reason for it is because @ was added in 3DS Max 2008, so the script will work in 2008 and newer versions of 3DS Max. Let me know if this solves the issue. Link to comment
Faw[Ful] Posted July 13, 2010 Share Posted July 13, 2010 Now I have this : a rollout clause syntaxe error ! it say in line on r WTF ! I cant change nothing in this line But what do you say solve the first error, the new error is far from the first error line, not too far ! 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