Leaderboard
Popular Content
Showing content with the highest reputation since 13/02/25 in all areas
-
Hello MTA players, I realised that I had to create this post because I got a lot of feedback, I stopped all my activities in MTA and I don't play MTA anymore because I had to make some changes in my life and change my life direction, I saw MTA in 2010 and I started playing, during this time I made very good friends, developers and players, so I would like to thank you all endlessly, 3 months ago I stopped all my activities in MTA, but I was still receiving a lot of message requests (for paid development or other issues) after that I gave everyone goodwill feedback, but I had to stop this because I was receiving a lot of messages from MTA servers and players, Anyway I have to say that I will miss all MTA players and developers, I will visit from time to time but I won't have much time for that, for some players who will try to contact me I have to say that I don't have a discord server and I don't answer private messages, I think you will be understanding and thanks for that... I have reached the end of my career in MTA. I have worked voluntarily on many servers and participated in numerous projects. I have sold all the projects I worked on, both paid and free, and I would like to announce that I will no longer be continuing my projects. I had a great time on many servers, and for that, I want to express my gratitude. Finally, I am deeply grateful to the valuable members of the MTA team, as they have helped me in many ways. Some of them include @Sarrum, @Vinyard, @Citizen, @IIYAMA, @AlexTMjugador, and myonlake (Patrik). I will miss you, guys!5 points
-
2 points
-
I wasn't paying attention to that part in the wiki, It's working now. Thank you!1 point
-
Thanks IIYAMA... I am looking it over... Also, I notice you're famous XD (You made the wiki page to the function you just described)1 point
-
There is also this useful function: https://wiki.multitheftauto.com/wiki/GetScreenStartPositionFromBox1 point
-
When you set the property, it stays frozen. So for example if you call getWorldProperty and then pass its return value to setWorldProperty, that value will stay until you call resetWorldProperty. But some of those functions (including getSkyGradient) are limited because they can only return the values previously assigned by script - meaning you can't get the unmodified value and assign it to freeze it. It seems that smooth transition is possible for color filter, because getColorFilter has isOriginal argument, allowing you to take the values that would be there if they weren't overridden by script so you can know exactly what values to interpolate to. But it doesn't help much when the same can't be done to other parameters.1 point
-
You can make your own functions that operate in terms of your custom concepts, and use dxDrawRectangle/dxDrawText under the hood for actual drawing. An example: function getCoords(coordSys, x, y) if coordSys then x, y = coordSys.x+x, coordSys.y+y end return x, y end function makeCoordSystem(parent, x, y) local finalX, finalY = getCoords(parent, x, y) return { x = finalX, y = finalY } end function drawText(coordSys, text, x, y) local finalX, finalY = getCoords(coordSys, x, y) dxDrawText(text, finalX, finalY) end function drawRectangle(coordSys, x, y, width, height, color) local finalX, finalY = getCoords(coordSys, x, y) dxDrawRectangle(finalX, finalY, width, height, color) end This implements a concept of coordinate system, the coordinate offset described by table with keys x and y. With this, you can do: local onScreenHud = makeCoordSystem(false, x*1200, y*120) -- false means onScreenHud will be placed in absolute coordinates function drawHUD() drawRectangle(onScreenHud, 0, 0, x*1400, y*400, tocolor(0, 0, 0, 150)) drawText(onScreenHud, "Text", x*20, y*10) end Since makeCoordSystem has parent as first argument, even coordinate systems themselves can be positioned with respect to other coordinate systems: local someInnerHud = makeCoordSystem(onScreenHud, x*20, x*40) function drawInnerHUD() drawText(someInnerHud, "Text in the inner HUD", x*20, y*10) end It's all about coming up with the right abstractions. As an example, you could modify this to add width and height properties to coordinate systems, and use them in calculations so you wouldn't have to write x* and y* everywhere.1 point
-
You can save your coordinates to the variables, and the use them to build text. Like: local rectangleStartX = x*1200 local rectangleWidth = x*1400 dxDrawText(rectangleStartX + rectangleWidth + 10, etc...) But i'm not sure right now about your coordinates, because "width" for dxDrawRectangle - it's not the endpoint, if wiki is right And then code will be more easy, because for width you can use just "200". As for take coordinates from rectangle - well, looks like it can't be done in MTA. P.S. I'm not good in UI scripting, just trying to help with simple logic.1 point
-
function onClientResourceStart() map = Map.new():init() map:setBounds(x*30, y*30, x*1306, y*708) map:setAlpha(200) radar = Map.new():init() radar:setBounds(x*20, y*560, x*281, y*193) radar:setStyle(2) radar:setAlpha(200) radar:setBlipSize(x*24) radar:setVisible(true) -- Variables to track mouse movement mouseDown = false lastX, lastY = 0, 0 map.Switch = function() local wasVisible = map:isVisible() map:setVisible(not wasVisible) radar:setVisible(not wasVisible) showChat(not wasVisible) -- Only show cursor and bind keys when map is visible if not wasVisible then showCursor(true) addEventHandler("onClientCursorMove", root, handleMouseMovement) addEventHandler("onClientMouseWheel", root, handleMouseWheel) addEventHandler("onClientClick", root, handleMouseClick) bindKey("mouse_wheel_up", "down", function() zoomMap("in") end) bindKey("mouse_wheel_down", "down", function() zoomMap("out") end) else showCursor(false) removeEventHandler("onClientCursorMove", root, handleMouseMovement) removeEventHandler("onClientMouseWheel", root, handleMouseWheel) removeEventHandler("onClientClick", root, handleMouseClick) unbindKey("mouse_wheel_up", "down") unbindKey("mouse_wheel_down", "down") end end bindKey('F11', 'down', map.Switch) setPlayerHudComponentVisible("radar", false) toggleControl("radar", false) end -- Function to handle mouse clicks for dragging function handleMouseClick(button, state) if map:isVisible() and button == "left" then if state == "down" then mouseDown = true local x, y = getCursorPosition() lastX, lastY = x, y else mouseDown = false end end end -- Function to handle mouse movement for dragging the map function handleMouseMovement(_, _, x, y) if map:isVisible() and mouseDown then local currentX, currentY = x, y local deltaX, deltaY = currentX - lastX, currentY - lastY -- Move map based on mouse movement local mapX, mapY, mapW, mapH = map:getBounds() -- Adjust movement sensitivity as needed local moveSpeed = 1.5 map:setBounds(mapX - deltaX * moveSpeed, mapY - deltaY * moveSpeed, mapW, mapH) lastX, lastY = currentX, currentY end end -- Function to handle mouse wheel for zooming function handleMouseWheel(direction) if map:isVisible() then zoomMap(direction > 0 and "in" or "out") end end -- Centralized zoom function function zoomMap(direction) if not map:isVisible() then return end local x, y, width, height = map:getBounds() local zoomFactor = 0.1 -- Adjust for faster/slower zooming if direction == "in" then -- Zoom in: decrease size, adjust position to zoom toward center local newWidth = width * (1 - zoomFactor) local newHeight = height * (1 - zoomFactor) local newX = x + (width - newWidth) / 2 local newY = y + (height - newHeight) / 2 map:setBounds(newX, newY, newWidth, newHeight) else -- Zoom out: increase size, adjust position to zoom from center local newWidth = width * (1 + zoomFactor) local newHeight = height * (1 + zoomFactor) local newX = x - (newWidth - width) / 2 local newY = y - (newHeight - height) / 2 map:setBounds(newX, newY, newWidth, newHeight) end end addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStart) function onClientResourceStop() setPlayerHudComponentVisible("radar", true) toggleControl("radar", true) -- Clean up any remaining event handlers if map:isVisible() then removeEventHandler("onClientCursorMove", root, handleMouseMovement) removeEventHandler("onClientMouseWheel", root, handleMouseWheel) removeEventHandler("onClientClick", root, handleMouseClick) end end addEventHandler("onClientResourceStop", resourceRoot, onClientResourceStop)1 point
-
Olá. Verifique na seção de Tutoriais em Geral deste fórum. Você encontrará esse tópico que pode ser útil:1 point
-
1 point
-
Кикает с локалки с той же самой ошибкой? Скинь скриншот её полный. Выходит, что возможно и в самом деле бан, хотя с какого перепугу не пускать даже не локалку... Сбой? Вот кстати сообщение от администрации из похожей темы в этом году:1 point
-
Try this one Client.lua local inventario = { ["THC"] = 0, ["LSD"] = 0, ["Cocaina"] = 0, ["Heroina"] = 0 } local productosVendedor = {"THC", "LSD", "Cocaina", "Heroina"} local precios = { ["THC"] = 500, ["LSD"] = 500, ["Cocaina"] = 500, ["Heroina"] = 500 } local ventana, lista, usarButton, cerrarButton -- Función para abrir el menú de compra function abrirMenuDeCompra() ventana = guiCreateWindow(0.3, 0.3, 0.4, 0.5, "Menu de Compra", true) lista = guiCreateGridList(0.1, 0.2, 0.8, 0.5, true, ventana) local columnaProducto = guiGridListAddColumn(lista, "Producto", 0.6) local columnaPrecio = guiGridListAddColumn(lista, "Precio", 0.3) for i, producto in ipairs(productosVendedor) do local row = guiGridListAddRow(lista) guiGridListSetItemText(lista, row, columnaProducto, producto, false, false) guiGridListSetItemText(lista, row, columnaPrecio, "$"..precios[producto], false, false) end local comprarButton = guiCreateButton(0.1, 0.75, 0.8, 0.1, "Comprar Producto", true, ventana) guiSetProperty(comprarButton, "NormalTextColour", "FF0000FF") -- Botón en rojo cerrarButton = guiCreateButton(0.1, 0.88, 0.8, 0.1, "Cerrar", true, ventana) guiSetProperty(cerrarButton, "NormalTextColour", "FFFFFFFF") -- Botón de cerrar -- Evento para comprar productos addEventHandler("onClientGUIClick", comprarButton, function() local selectedItem = guiGridListGetSelectedItem(lista) if selectedItem ~= -1 then local producto = guiGridListGetItemText(lista, selectedItem, columnaProducto) triggerServerEvent("comprarProducto", resourceRoot, producto) end end, false) addEventHandler("onClientGUIClick", cerrarButton, function() if isElement(ventana) then destroyElement(ventana) showCursor(false) end end, false) showCursor(true) end addEvent("abrirMenuDeCompra", true) addEventHandler("abrirMenuDeCompra", resourceRoot, abrirMenuDeCompra) -- Función para agregar el producto al inventario del jugador function agregarProductoAlInventario(producto) if inventario[producto] then inventario[producto] = inventario[producto] + 1 else inventario[producto] = 1 end actualizarPanelDeInventario() end addEvent("agregarProductoAlInventario", true) addEventHandler("agregarProductoAlInventario", resourceRoot, agregarProductoAlInventario) -- Función para mostrar mensaje de compra fallida function mostrarMensajeCompraFallida() outputChatBox("No tienes suficiente dinero para comprar este producto.", 255, 0, 0, true) end addEvent("mostrarMensajeCompraFallida", true) addEventHandler("mostrarMensajeCompraFallida", resourceRoot, mostrarMensajeCompraFallida) -- Función para mostrar mensaje de compra exitosa function mostrarMensajeCompraExitosa(producto) outputChatBox("Compra exitosa de " .. producto .. ". ¡Gracias por tu compra!", 0, 255, 0, true) end addEvent("mostrarMensajeCompraExitosa", true) addEventHandler("mostrarMensajeCompraExitosa", resourceRoot, mostrarMensajeCompraExitosa) -- Función para abrir/cerrar el panel de inventario (F2) function togglePanelDeInventario() if isElement(ventana) then destroyElement(ventana) showCursor(false) else ventana = guiCreateWindow(0.3, 0.3, 0.4, 0.5, "Inventario de Drogas", true) lista = guiCreateGridList(0.1, 0.2, 0.8, 0.5, true, ventana) local columnaProducto = guiGridListAddColumn(lista, "Producto", 0.6) local columnaCantidad = guiGridListAddColumn(lista, "Cantidad", 0.3) for producto, cantidad in pairs(inventario) do local row = guiGridListAddRow(lista) guiGridListSetItemText(lista, row, columnaProducto, producto, false, false) guiGridListSetItemText(lista, row, columnaCantidad, tostring(cantidad), false, false) if cantidad == 0 then guiGridListSetItemColor(lista, row, columnaCantidad, 255, 255, 255) -- Texto blanco else guiGridListSetItemColor(lista, row, columnaCantidad, 0, 0, 0) -- Texto negro end end usarButton = guiCreateButton(0.1, 0.75, 0.8, 0.1, "Usar Producto", true, ventana) guiSetProperty(usarButton, "NormalTextColour", "FF0000FF") -- Botón en rojo cerrarButton = guiCreateButton(0.1, 0.88, 0.8, 0.1, "Cerrar", true, ventana) guiSetProperty(cerrarButton, "NormalTextColour", "FFFFFFFF") -- Botón de cerrar addEventHandler("onClientGUIClick", usarButton, function() local selectedItem = guiGridListGetSelectedItem(lista) if selectedItem ~= -1 then local producto = guiGridListGetItemText(lista, selectedItem, columnaProducto) if inventario[producto] > 0 then usarProducto(producto) inventario[producto] = inventario[producto] - 1 actualizarPanelDeInventario() else outputChatBox("Debes ir al vendedor para comprar " .. producto, 255, 0, 0, true) end end end, false) addEventHandler("onClientGUIClick", cerrarButton, function() if isElement(ventana) then destroyElement(ventana) showCursor(false) end end, false) showCursor(true) end end bindKey("F2", "down", togglePanelDeInventario) -- Función para usar el producto seleccionado function usarProducto(producto) if producto == "THC" then outputChatBox("Usaste THC", 255, 0, 0, true) -- Aplica efectos de THC elseif producto == "LSD" then outputChatBox("Usaste LSD", 0, 255, 0, true) -- Aplica efectos de LSD elseif producto == "Cocaina" then outputChatBox("Usaste Cocaina", 255, 255, 0, true) -- Aplica efectos de Cocaina elseif producto == "Heroina" then outputChatBox("Usaste Heroina", 128, 0, 128, true) -- Aplica efectos de Heroina end end -- Función para actualizar el panel de inventario function actualizarPanelDeInventario() if isElement(ventana) then destroyElement(ventana) togglePanelDeInventario() end end Server.lua -- Crea un vendedor en una ubicación específica local vendedor = createPed(50, 2165.93, 1696.37, 10.82) -- Congela el vendedor para que no se mueva ni muera setElementFrozen(vendedor, true) setElementData(vendedor, "invincible", true) -- Crea un marker (área de interacción) cerca del vendedor local marketMarker = createMarker(2165.93, 1696.37, 10.10, "cylinder", 1.5, 255, 0, 0, 150) -- Función para mostrar el menú de compra function mostrarMenuDeCompra(player) triggerClientEvent(player, "abrirMenuDeCompra", resourceRoot) end -- Función para manejar la compra de productos function comprarProducto(player, producto) local precio = 500 if getPlayerMoney(player) >= precio then takePlayerMoney(player, precio) triggerClientEvent(player, "agregarProductoAlInventario", resourceRoot, producto) triggerClientEvent(player, "mostrarMensajeCompraExitosa", resourceRoot, producto) else triggerClientEvent(player, "mostrarMensajeCompraFallida", resourceRoot) end end -- Evento para mostrar el menú de compra cuando el jugador entra en el marker addEventHandler("onMarkerHit", marketMarker, function(player) if getElementType(player) == "player" then mostrarMenuDeCompra(player) end end) -- Evento para manejar la compra de productos addEvent("comprarProducto", true) addEventHandler("comprarProducto", resourceRoot, comprarProducto) -- Hacer al ped invulnerable addEventHandler("onPedWasted", root, function() if source == vendedor then cancelEvent() end end) addEventHandler("onClientPedDamage", root, function() if source == vendedor then cancelEvent() end end)1 point
-
Hello, I can't log into the MTA Province server, the first server, all the others are working, I wrote to the technical specialist. They couldn't help us, so they sent me to you. The error name is CD50. Tech support informed me that my serial number matches the number of another player. I have reinstalled Windows 10, 11 and their different versions from pro to enterprise several times, nothing helped. Rebooting the Internet router, reinstalling the game in different directories and on disks also did not help. serial - F413477538AD07BD3D1F52281F71F1E41 point
-
Hi... I don't know what you mean by coreconfig.xml (I don't think this comes with the default MTA SA server... But in the server files you can find mtaserver.conf file which had all of the loaded resources. Down almost at the bottom (of mtaserver.conf): --You'll see this area which is where you put your Resources... --resource src is the name of the resource. --startup="0" means don't start up when server starts and startup="1" means DO start up when server starts. --and protected="1" means don't shutdown server while this service is active (it should be used for database scripts. --I think what you want is: <resource src="YourResource" startup="0" protected="0" /> (startup="0" is what I think you want to do.) <resource src="admin" startup="0" protected="0" /> <resource src="Commands" startup="1" protected="0" /> <resource src="Database" startup="1" protected="1" /> <resource src="DXRec" startup="0" protected="0" /> <resource src="GPS" startup="1" protected="0" /> <resource src="HUD" startup="1" protected="0" /> <resource src="JobSystem" startup="1" protected="0" /> <resource src="LoginSystem" startup="1" protected="0" /> <resource src="MiniMap" startup="1" protected="0" /> <resource src="RadioSystem" startup="1" protected="0" /> <resource src="Spawns" startup="1" protected="0" /> <resource src="Speedometer" startup="1" protected="0" /> <resource src="FuelSystem" startup="1" protected="0" /> <resource src="VehicleSystem" startup="1" protected="0" /> <resource src="YouTubePanel" startup="1" protected="0" /> </config> Sorry if I am way off on this... I am an amateur coder just trying to help.1 point
-
v2.2.0 released: modernization and new command for QoL Download and changelog here: https://github.com/Fernando-A-Rocha/mta-nandocrypt/releases/tag/v2.2.01 point
-
The truth, I had abandoned this project and did not have the opportunity to try your script. But today out of curiosity I asked chatGPT to write me the script and this is the result local vehicleTimers = {} -- Memorizza i timer dei veicoli -- Funzione per controllare se il veicolo è in aria function checkVehicleAir(vehicle) if not isElement(vehicle) then return end if isVehicleOnGround(vehicle) then resetExplosionTimer(vehicle) else startExplosionTimer(vehicle) end end -- Avvia il timer di esplosione function startExplosionTimer(vehicle) if vehicleTimers[vehicle] then return end -- Evita più timer sullo stesso veicolo vehicleTimers[vehicle] = setTimer(function() if isElement(vehicle) and not isVehicleOnGround(vehicle) then blowVehicle(vehicle) -- Esplode il veicolo! vehicleTimers[vehicle] = nil end end, 5000, 1) -- 5 secondi di tempo end -- Resetta il timer se il veicolo tocca il suolo function resetExplosionTimer(vehicle) if vehicleTimers[vehicle] then killTimer(vehicleTimers[vehicle]) -- Ferma il timer vehicleTimers[vehicle] = nil end end -- Controlla lo stato dei veicoli in un loop function monitorVehicles() for _, vehicle in ipairs(getElementsByType("vehicle")) do if getVehicleController(vehicle) then -- Controlla solo i veicoli con giocatori dentro checkVehicleAir(vehicle) end end end setTimer(monitorVehicles, 1000, 0) -- Controlla ogni secondo -- Quando un veicolo esplode, rimuove il timer associato addEventHandler("onVehicleExplode", root, function() vehicleTimers[source] = nil end) chatGPT can write all kinds of functions, it's amazing1 point
-
1 point
-
Thanks IIYAMA, FindRotation3D worked for the getting rotation. Did not achieve the desired result with a rocket projectile (19) though. Even after rotating it directly at point_B the projectile eventually starts heading out in a different direction, not exactly sure whats up with that. I think an easy way to fix that is using createObject along with moveObject and stuff, but in this case, what should I use to properly send projectiles from point A to point B since createProjectile only has starting position arguments to work with?1 point
-
1 point
-
By showing the cursor: https://wiki.multitheftauto.com/wiki/ShowCursor Though setCameraMatrix might also be possible, but you will have to reset the camera.1 point
-
1 point
-
1 point
-
INTERFAZ DE CONFIRMACION SIMPLE Tal y como lo explica su título, este sistema muestra una interfaz simple para confirmar cualquier acción que se requiera. Utilizando funciones dxDraw para ello, con una animación de entrada y salida simple. SYNTAX dxConfirm(string title, string description, function funcYes, ...) -- title string - El titulo que tendrá la interfaz de confirmacion (default: Confirmación) -- description string - El mensaje de confirmacion que desee mostrar (default: ¿Estás seguro de que quieres hacer esto?) -- funcYes function - La funcion que se ejecutará una vez se presione el boton 'Si'. -- (...) vars - Las variables que contiene la funcion que se ejecutará al presionar el botón 'Si'. EJEMPLO PRACTICO function myFunction(var1, var2) outputChatBox("¡Haz presionado que si!") outputChatBox("var1: "..var1) outputChatBox("var2: "..var2) end dxConfirm("Confirmacion", "¿Estas seguro?", myFunction, "hola mundo!", 15); IMAGEN DE LA INTERFAZ ENLACE DE DESCARGA: CLICK AQUÍ ¡No olvides dejar tu estrellita!1 point
-
I just found some old screenshots from 2012 I can't remember what the server name was. at some point in my MTA life, I actually enjoyed playing DD and I was a member of the [HiVi] DD/DM clan. even though I sucked at DD/DM, all that mattered was the friendship. (shoutout to David, Belmin and Kyle) 2012, a private server with zombies 2012, private server. we didn't need much to have fun back then. a private server and an admin panel was all we needed to have fun around this time, I had discovered the map editor and built some sort of a greenzone on LS Observatory 2012 as well. I can't remember which mod it was but it allowed you to literally carpet bomb :~. I found these on Facebook by accident. I wish I had saved more pictures. I'm not sure if Imgur existed back then, but all the images I uploaded were uploaded to tinypic (from 2008) and they are long gone.1 point
-
Não oferecemos suporte para scripts de terceiros, lamento. Entre em contato com o autor do resource e peça uma correção. Além disso, a maioria dos elementos do HUD estão com tamanho e posição fixa, o que dará alteração em resoluções diferentes. Sobre esse problema de distorção, isso acontece por uma questão de proporção (aspect ratio) e não de resolução. Como ele foi feito na resolução 1600 x 900 (proporção 16:9), isso significa que qualquer resolução que esteja nessa mesma proporção irá funcionar normalmente (1280 x 720 também é proporção 16:9, por isso que funciona normalmente nele também). Porém a resolução 800 x 600 tem proporção 4:3, ela é mais quadrada. O que causa distorção no HUD mesmo usando posições e tamanhos relativos. Para corrigir isso, existe a função DxSetAspectRatioAdjustmentEnabled que deve ser chamada dentro da função do onClientRender e antes das linhas do dxDraw.1 point
-
This is the new Los Santos East, Office building version Aka K.Rosenberg & Co Building ! This version contains : Main floor " Reception hall, Chilling area" + 1st Floor "Private office, Meeting room, Open office area, Small reception" + 2st Floor "Private office'Rosenberg office' , 2Meeting room, Open office area, Small reception". Open Interior! Low Poly! Day/Night Prelight ! Combination of Native Objects and a Custom Model! This Model is for sale on my patreon "Exclusive Mod Membership" ! "patreon.com/Skann"1 point
-
1 point
-
LINK: https://payhip.com/TheDarkQ Specification: Low poly ✔ Full lighting Day/Night ✔ Materials ✔ Optimization ✔ Lighting effects [lamps] ✔ LOD ✔ Any question contact me on discord: TheDarkQ#17071 point
-
Hello all. The holiday season is finally here, and we have prepared a more compact summary post for you than usual. Please read on to see, what we have been up to lately. GTA VI The upcoming year will bring us the next game from the Grand Theft Auto series - GTA VI. Planned to launch in Fall 2025 on consoles, it will likely arrive on PC as well, just some months later. The second trailer for GTA VI is also rumoured to be shown soon, with some elaborate fan theories backing these rumours. Will the game be good? Only the time will tell, but looking back, there was not a major GTA game release from Rockstar Games that was bad (for the sake of this argument, let's consider the Trilogy as a minor release ). That alone makes it worth to look forward to it, and it will be also nice to re-visit Vice City similar to how we did it with Liberty City and San Andreas. MTA Status and Updates Not much to report in regards of MTA - we have been focusing on improving various parts of our infrastructure, which is not immediately visible at first glance. Still, since there are many areas that need the attention, there is a lot of work involved. Thankfully, CiBeR, Botder, Lopsi, Dutchman and others have been looking into it. Thanks to the hard work done by our Helper - FileEX, we have also refreshed the Lua syntax highlighting system on our Wiki. For a long time it was unmaintained, causing many of the recent MTA scripting functions and events to be not correctly highlighted in the code snippet examples on the wiki. This has changed though, and it should be working much better now. We have been also tinkering with our #MTASpotlights hashtag on X / Twitter. We are still exploring this idea, but nonetheless, thank you for your submissions so far. If you would like to share some media that we could promote, you can do so on our Discord, just please make sure to read the guidelines beforehand. And, naturally, there have been additions to the mod's source code now and then, bringing in new scripting functions and bugfixes. Similarly, we have been pushing those as client updates for you, also now and then. Player Counts and Other Statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 24,808 players 2024.12.22 (at 18.13 GMT) Highest recorded number of concurrent unique players 52,098 players 2020.04.02 (at 18.00 GMT) Recent number of daily unique players 95,445 players 2024.12.15 (Sunday) Highest recorded number of daily unique players 185,818 players 2018.02.03 (Saturday) Recent number of monthly unique players 478,736 players September, 2024 Highest recorded number of monthly unique players 805,903 players January, 2018 For a mod for a game that is nearly 20 years old now, these are fairly good numbers. Smaller than last year, but still impressive. We are glad that you are still with us. MTA:SA version or series Percentage of players using that version or series as of 24th of December, 2024 1.6.0 99.5% 1.5.9 0.4% <1.5.9 0.1% Also, as of 24th of December, 2024: there are over 90,000 members on our Discord server, we have got 13,790 followers on X/Twitter, 58,000 users follow our Facebook fanpage , and our Steam Community group has nearly 50,000 members. --- To end this post on a high note, we would like to take this moment to wish you all Happy Holidays and a Happy New Year. Enjoy the Season and take care. -MTA Team1 point
-
Moving this to ban appeals. @Sandroka please provide your serial. You can do so by launching MTA, pressing the console key (F8 by default) and typing 'serial' (without quotes). Paste the string provided there into this topic. Thanks!1 point
-
Introduction This guide intends to teach 3ds Max users how maps are converted and imported/exported through 3D applications, to then be used in professional renders, visualizations, machinma's or to utilise 3ds Max as a precise map editor. The below video demonstrates some of the possibilities that are being taught through this guide. There is a download link in the video description to IPL's that I have decompiled and filtered. Table of contents Prerequisites Access to GTA SA assets (read https://forum.multitheftauto.com/topic/119240-mta-modding-in-3d/ on how to extract, etcetera) Converting/decompiling GTA SA assets for compatibility Caution for performance and processing Importing IPL and IDE to 3D application Model issues and solutions Solution: Alpha is severely broken or has the wrong material applied on faces Solution: Random polygons appear black with flipped normals (.001 weld + reset/adjust smoothing groups) Common uses Converting to FBX Mental Ray adaption Designing and rendering a scene Mapping using Max Prerequisites Must have Autodesk 3ds Max of any desired version. Must have Kam's Maxscripts. Must have The Hero's RW importer. Must have GIMS EVO (Max 2016 or below). The beauty of this tool is it can convert various types of materials containing diffuse texture, into standard or GTA 5 material. It supports Kam's and RW material to be converted to standard. It is recommended to add the tool to a secondary copy of 3ds Max due to the heavy size of it. It is possible to have multiple copes of 3ds Max under 1 Student License. IPLs_for_download.rar Access to GTA SA assets This guide assumes you have already extracted the entirety of the .img archives found in \models directory of your GTA SA installation. Extracting the interior and cutscene archives is ideal as well. I'm not going to cover the process in this guide, instead please read my MTA Modding in 3D guide. The following files are needed and has a description for where they're stored. - DFF (gta3.img, cutscene.img, gta_int.img @ Grand Theft Auto San Andreas\models) - TXD (gta3.img, cutscene.img, gta_int.img @ Grand Theft Auto San Andreas\models) - IPL (gta3.img, gta_int.img @ Grand Theft Auto San Andreas\models) - IPL [binary] (Grand Theft Auto San Andreas\data\maps) - IDE (Grand Theft Auto San Andreas\data\maps - these are optional as they store 2dfx etc.) - IFP (Grand Theft Auto San Andreas\anim - these .img archives contain IFP archives which stores a good bunch of animations each. It's possible that gta3.img and cutscene.img contains IFP files too.) Converting/decompiling GTA SA assets for compatibility Before certain data can be processed by 3ds Max, it needs to be decompiled and cleaned up. Fortunately there are modding tools available which can partially get it done, leaving only small bits of work to be done by hand. GTA SA has a set of binary and non-binary IPL files. Every IPL found in gta3.img and gta_int.img are binary, meaning they're in a non-readable format and cannot be read by 3ds Max, as opposed to IPL files found in \maps\ which can be read. IPL files found in .img archives do not contain LOD models, whereas ones in \maps\ does. To help identify a LOD, you can look for lines that ends with -1, although not all of these are LOD's. If you want to load in LOD's separate from high detail's, you'll have to filter out LOD's by hand. In order to decompile binary IPL's you need the Binary decompiler tool from gtainside and the IPL name restorer from GTAforums. By simply decompiling the IPL files, they'll rename all of the model names to "unknown" but retain the ID's. The IPL name restorer tool will then restore the ID's by cross searching IDE files. There are cases where the tool fails to perform the rename, this namely happens for models which are animated such as burger shot, mills, signs etcetera. To correct this, simply use Prineside, look up the ID and get the model name associated with the ID. For those who care to keep LOD's separate from high detail's, simply use a coding editor e.g Notepad++ and use the search function and disable "case dependant" and search "lod". You'll want to have 2 versions of every non-binary IPL, one for LODs and one for high details. For high detail IPLs, delete anything with "lod" in their lines, and opposite for LOD IPLs. The first video in the thread contains decompiled IPL's, sorted with LOD's and without LOD's, and has interior world decompiled as well. Several IPL's can be merged together if so desired, although it may be wise to keep them separate to avoid overloading your scene with thousands of objects. Caution for performance and processing For anyone who doesn't have experience with game model conversion and import of game maps, it's crucial to know that a single part of the map, where that part of the map is not even half of a city, can have fatal consequences for your 3D application and cause shutdowns or hour long freezes if not optimised and dealt with. Your computer will not be very welcoming to thousands of objects and especially materials/textures. It can take 1 IPL district for your viewport to reduce to 5 FPS even without materials visible in viewport. Ways to go about this is using instances and xref/proxies. It seems that IPL imports instances, but at times they lose their instance status and become unique from eachother. If this issue is encountered, you'll want one model to be the parent of a lot of other instances. To do this, either check this Autodesk forum post or open Maxscript listener and add the following code. for obj in selection do instancereplace obj $foo Replace "foo" with the name of the model that you want to use as instance parent. For example you have 11 palm trees, 10 of which are named palm_tree and 1 is named palm_tree_parent. Select those 10 and then replace the word "foo" with "palm_tree_parent". Whenever you make geometry changes to "palm_tree_parent" the 10 others will be affected. Instanced models is a good start on scene optimisation, but is far from great. Deleting objects not seen by the camera or shadows, reflections, etc. can do a great deal of change for your viewport and render speed. Do yourself a favor and google scene/render optimization. I learned a lot for my demoreel through the following articles: https://evermotion.org/tutorials/show/10105/optimizing-3d-scenes-for-faster-rendering https://cgtricks.com/save-memory-when-working-with-big-scenes-3dsmax/ That being said, it's important to be aware of how big an impact these 16 year old maps can have on your $2000 workstation. Your computer won't take the maps lightly. If needed, consider splitting map parts into several max project scenes to avoid overload and rendering/work issues. Be extremely cautious with detail of reflection, refraction, shadows, lighting as these REALLY eat up rendering time from a solid 2 minute to 10 minutes+ if done by somebody without sufficient knowledge. Sometimes alpha materials may also slow down the renderer. There are also ways to enhance rendering speed (if using Mental Ray) by choosing IBL (Image based lighting), this can cut down rendering time by 2-6 times rather than using Final gather, however the quality can degrade so it's really a question about whether a shorter render time is desired at the expense of render quality. Importing IPL and IDE to 3D application Certain GTA scripts such as Kam's vanila and Kam's Goldfish editions comes with IPL import functions titled as "Map IO". These functions can handle not only IPL and IDE import with several settings, but also export. Exporting as .IPL can prove useful for mappers who then convert their IPL to MTA map editor format. I have just found that Goldfish's Map IO allows to to import not only standard materials (negating the need to convert gta material to standard scanline) but also allows to import binary IPL by specifying a local .dat file. This guide however focuses on the traditional way of importing and handling maps using vanilla scripts, not Goldfish's, so that those who want to know more in depth about the formats gets the option to do so. Nevertheless, below spoiler contains a quick overview of doing it using Goldfish's latest script. The below image shows how data files can be imported into 3ds Max along with models, by using Kam's orginal script "Map IO". Path to your DFF files. Ideally, you've extracted all of the IMG archive's contents into 1 folder. Version of the game models. Some DFF models are different depending on game to game (III, VC, SA) Select desired image format. Choose the one that your TXD files were extracted as, in my case it's TGA. Import IPL file. Import IDE file. Import ZON file. Import 2dfx data (after IDE is imported). For the vast majority of binary IPL's, only props, buildings and roads are included. The regular IPL's found in GTA SA installation\maps\ usually contain the land masses and such. The binary IPL's contain stream numbers, so they're split into several different IPL's presumably to put less strain on the GTA streamer. These can be merged into one if desired, but not ideal. Model issues and solutions There aren't any perfect GTA scripts and tools available to public to flawlessly import maps. For all of them there are either limitations or incorrections. Same applies to Blender. This guide contains some of the issues and possible solutions, but they're far from perfect. A minor issue which doesn't deserve any header is where IPL doesn't import anything, or an error message appears. This is usually the case when a different GTA script has been opened in the current 3ds Max instance. Simply close 3ds Max and run again. If it still happens, repeat the step but try on a new project scene, then save as new project file and merge into the main project scene. Solution: Alpha is severely broken or has the wrong material applied on faces All editions of Kam's scripts has issues with importing face or material index correctly. What this means for imported models is that they have randomly flipped faces (identified by black faces) or have the wrong material applied on the wrong place, e.g wall bricks on a house roof or tree bark on tree leaves. To fix these issues, use either CJ2000's RW importer or The Hero's RW importer. These two import materials and normals nearly correctly, although by looking at the models in viewport there's still black (flipped) faces. This is not the case when rendering the model, however. It's important to note that RW does not always import the rockstar models perfectly. There are cases where faces must be manually flipped, or enable doublesided for particular models. Disabling backface culling (on render) solves it most of the times. It's possible that neither of the above scripts imports 2dfx data unlike Kam's. In which case, it may be necessary to import map with Kam's, preserve the 2dfx positions and then replace corrupted models with RW imported ones. If several models are corrupted, it may be a good idea to look into using some object replacement scripts or functions if they come with 3ds Max. This can speed up with auto-aligning correct models to the corrupted ones. These articles may help: https://jamiesjewels.typepad.com/jamies_jewels/2011/10/85-3ds-max-quicktip-substituting-objects.html https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/3DSMax/files/GUID-2CABA3D7-ECFA-4D0D-A8C2-E86600BEFBE4-htm.html Solution: Random polygons appear black with flipped normals (.001 weld + reset/adjust smoothing groups) The "Alpha is severely broken or has the wrong material applied on faces" section explains part of why this occurs. A way to fix the viewport issue is welding all vertices at 0.001 threshold. This removes any overlapping vertex. The model's smoothing groups can then be reset or adjusted, provided the model is imported with 1 total group which makes for a very smooth and unrealistic appearence. To correct the black polygons, use the "Flip normal" function. Simply flip any black polygons which are supposed to be white. This is not relevant to fix if your end goal is to render the map. Simply follow the method for "RW" scripts from the above section. It's only ideal to flip the faces if it annoys you to view the models corrupted in viewport. Common uses A lot of things are possible by importing GTA map into 3ds Max. For instance, film makers are able to integrate their own models with ease, customized animations and even physics, FX and much more. MTA mappers can also use the program to create mappings in 3D with a lot of powerful tools to ease the workflow. This can prove exceptionally useful for race maps due to Max's array functions to instance an object a thousand times along a curve to generate roads, loops and what not. Converting to FBX Instead of being restricted to Renderware and DFF formats, modelers can now import GTA map and then convert materials and the model components to be suitable with other programs and engines such as Cinema 4D, Unreal Engine and Unity. The conversion to FBX is in fact very simple. In order for DFF models to be converted, their material and lights needs to be converted too. GTA/RW material needs to be converted to standard scanline material. Normally it's only a matter of changing the material to standard and copying over the diffuse texture, and in rare cases, a specular and environment image as well. Lights may need to be adjusted to show the color that they're given in their IDE (if they import as dummies). Once that's done, the models may be exported as FBX (or any other model format). To correctly save as FBX format, follow the below steps. Go to File -> Export -> Export selected. This ensures that only the selected assets are being added to the FBX file, and that none other e.g non-converted models interferes and breaks the file. Next, find a location for the FBX file and name it to your liking. Below are the ideal settings for a GTA map to be exported as FBX. Smoothing Groups - enable if your lighting won't rely on vertex colors. You'll instead want to use smoothing groups to define model's shading. Preserve instances - enable if your scene utilises instances, disable if your scene only contains unique models. Preserve edge orientation Embed Media - Max will reference the textures used in the models, search for them in your texture folder, then paste the ones used in the scene into the FBX file. Very useful to cut down on texture folder size as it'll only use the ones that are used by your map. Can save some computer disk space. This can be useful if your client or member doesn't have access to your global texture folder. Units - normally you'll want metric/meters as that's the system used by SA. Axis Conversion - SA is Z-up whereas VC is Y-up (wrong?), so keep as Z-up. It's optional whether you should export lights or not. Look through the settings just to ensure that everything adapts to your preferences. If it does, hit OK and it will export. If you get an error message, make sure you've only selected the models with standard material. Mental Ray adaption For those who own a 3ds Max copy of version 2017 or higher, has the ability to change standard scanline materials to Physical among other material types within a few clicks using the Scene Converter (through the Rendering menu). For simple materials with diffuse maps, there are also other tools and 3rd party plugins that can convert between Vray/Corona/Arnold/Mental Ray and so forth. Having Standard Scanline materials in a Mental Ray scene can add to performance and render speed; it's always a good idea to keep materials corresponding to the active renderer. Arch & Design material also has a lot more functionality than Scanline does. In order to convert Scanline to Arch & Design, install the Material Converter from the following site. https://www.motivacg.com/downloads/scripts-3dsmax/. With this tool, simply choose the materials type according to their renderer. On conversion, all standard materials including multimaterials are converted into Arch & Design for use with the Mental Ray renderer. Designing and rendering a scene 3D rendering can be a beneficial way of visualizing a project or simply create art out of San Andreas. The above was shot on 3ds Max using Mental Ray as renderer in a scene lit by daylight system and parti volume shader as means of environment fog. A separate render pass was exported on the graphics card for Ambient Occlusion. The beauty and AO map were composited together and then color corrected. I tried to imitate "Welcome to the 80's" style of his GTA SA remastered CG shots. Down below I'll have a video and few lines of text on what I did to achieve part of what you see. It will by no means be the perfect guide to produce this exact image, but it hopefully will help people get started and troubleshoot issues through the process of setting up a scene. In the below video's description there are additional links and information. It's important to pause the video once a new subtitle appears, as they do not show for a very long duration. For those looking to add character animations to their project: Own GTA Anim Manager. Minor program that allows you to dig into IFP archives and change/modify their contents. Useful for adding/removing IFP animations in IFP archives. Own Kam's IFP scripts (comes with the DFF IO etc). Allows you to import animations onto skin rigs. It is a good idea to make necessary changes to rigs before applying animations. Necessary changes could be subdivision/smooth, material setup etcetera. After an animation is applied it's recommended to parent the Root bone to a dummy, so the new dummy can rotate the rig without the rig getting deformed while posing it. Mapping using Max Over the years a few community contributors have designed tools which export map files from Max, as well as internet converters which convert IPL to MTA. Which one to use really boils down to user preference. The most common however would be Kam's Map IO. This has the functions to export position/rotation data through IPL and IDE file types. These can be parsed/converted through 3rd party tools not necessarily related to Max. Another Max method of generating MTA maps is exporting using 50p's Map exporter. The beauty of creating maps in Max versus MTA map editor, is the ability to work in 3D and really isolate the mapping from everything else with a few clicks. It also offers great scene management, granting users options to import SA map for position reference, hide the SA map while creating their custom map etcetera. It also allows for visualizations of mappings using modern 3D graphics engines. 3ds Max has a lot of tools to create arrays or scatter objects around the surface of another object, those objects' pos and rot data can then be converted to MTA map file format. Mapping in Max can prove exceptionally handy for race mappers, or for those looking to group objects and move them all together, map with attention to precision or instance thousands and thousands of objects.1 point
-
Introduction This guide intends to teach 3ds Max users the basics and more advanced ways of working with Vertex Colors, in order to achieve lighting solutions for enhanced quality of game models, or blend several textures together using Vertex alpha. A lot of games utilises vertex colors to accomplish lighting or blending effects, which usually impacts the performance less than model shaders. Types of shaders such as Texture Splatting are pixel based techniques for rendering multiple textures onto a model, where each texture e.g earth, grass, gravel, has their own color on the splat map. This however may use up significantly more resources than its alternatives in some cases. As result, game developers may move their aim towards Vertex Alpha and Color rather than geometry shaders. Vertex Color works almost the same way, however it renders per vertex and not per pixel unlike shaders do. This may result in very poor results if the geometry is not subdivided at the places it is painted at. Besides texture blending, vertex colors are also widely used in games for fake lighting baked into models. This is due to some game engines not supporting Ray Tracing or other rendering, or they simply prefer using vertex colors over per-pixel lighting. In GTA:SA the only light rendering is done by vertex colors and 2DFX. In the days that the game was developed, vertex colors was a more sustainable rendering method over other options. Table of contents Different model lighting depending on game time Importance of vertex colors Importance of vertex illumination Basics of per-vertex Radiosity workflow Hard surface prelighting Faking ambient occlusion Texture blending with Vertex Alpha The vertexPaint modifier Extracting channel info Working with several VertexPaint modifiers Different model lighting depending on game time Game models use two vertex channels for lighting. Vertex color is displayed around 06:00 - 20:00. Vertex illumination is displayed outside that timeframe, that is, between 20:00 and 06:00. Between these timeframes, the two channels blends into eachother, creating a realistic daytime and nighttime visualization of the map. Remembering which channel is used for what can be a little troubling, on top of the many other things. Artists could consider Vertex Color = daytime, Vertex Illumination = nighttime. Below are various demonstrations of vertex color and illumination channels. Importance of vertex colors Below video demonstrates the effects of not prelighting game models for GTA:SA. The results are very easy to differ from prelit models, as the only depth seen on the models is made by the diffuse maps, which usually does not add sufficient shadows. That is where the artist may consider prelighting his model. As seen on the video, first footage is of San Fierro chunk without diffuse maps (textures) nor vertex colors. This results in completely white meshes. If however, the artist decides to utilise vertex colors, the model will have a lot greater depth added, without the need to bake light into textures at the expense of computer memory. The video's contents are 1:1 to how San Fierro would be rendered in-game around 12:00. No post processing or edits made to the models. Compression methods, post processing, sky and fog done by the Renderware engine will make it a tad different though. Below screenshot is taken from a Dust2 model ripped from Counter Strike. It shows how the vertex channel brings shadows and ambient occlusion into the model. If it did not have the vertex channel changes made, it would be completely flat, corridors would have no depth whatsoever, only some by the difference between the textures. Importance of vertex illumination Not all models use fancy colors like the pirate assets by Las Venturas strip. A lot of models use the same, though slightly darkened, version of vertex colors for the vertex illumination channel. The result of this is a darker object during night and brighter during day. Perhaps some has some highlights that are cast from streetlights and other light sources that appear during nighttime. Some models, notably light objects use vertex colors in conjunction with 2DFX in order to create realistic light with a real light source. Below example is a runway light. The white version is during day time, where the inner light mesh (the extruded part) is grey to represent an deactivated light. The red version is during night time, where the top surface has light reflected onto it, together with a corona image, more commonly known as 2D billboard or sprites. The corona acts as the light source and creates a bloom alike effect. (Not seen in image) Basics of per-vertex To get a somewhat understanding of how vertex colors work, below demonstration should be helpful. The triangle's top left vertex is painted blue, top right painted green and bottom painted red. This creates an RGB blend display of the triangle. The planar model has its bottom vertices painted black while the top ones are white. This creates more of a gradient across the entire model.To put the difference between per-vertex lighting and per-pixel lighting short, Vertex based lighting creates a gradient from one vertex towards the nearest one(s), and stops there. If a model has only 4 vertices, it is not possible to have circular or very detailed IES-like lighting, as the model would have only 4 points that can have light data. Pixel based lighting can have as many abstract details as artist wishes. It works as if there is a grayscale image on top of the model with a different blend mode, or dynamic lighting based on world models, hence the two are called per-vertex and per-pixel. Radiosity workflow Tired of painting vertex colors onto models with silly brushes all day? 3ds Max has an amazing light renderer, which can produce stunning renders and best of all, stunning prelights. As if it was made for GTA:SA era games! Not to forget, a 3rd party Max script was made to make the workflow a lot less difficult - can be found on: http://www.scriptspot.com/3ds-max/scripts/vertex-color-tools-1. With this script, artists can with a few clicks create a skylight, ground plane (for AO), then render a radiosity solution in less than a minute total. No more setting up radiosity settings, only a few adjustments to your likings if needed. I use it all the time myself, and in fact, I learned to create beautiful prelights by using this tool with radiosity rendering. Before moving on, ParoXum's Radiosity tutorial and the Radiosity wikipedia page contains extra information that is not covered in this thread, for instance particular use of point lights. For that reason they may be benefitable to read through. WARNING! Pressing the AO button on the Vertex Color Tool script, ALL materials will be reset to standard. This can not be reversed! Adding to the above. Make sure to create a backup Max project file prior to working with Radiosity. Use the backup Max project file for vertex colors, leave original file for modeling! This process is covered in the guide. Hard surface prelighting Most artists starting out with vertex colors have probably grown tired of selecting faces of a model, then painting a different value onto each to replicate a hard surface look. As it turns out, this is not an efficient way. The model will look odd if the artist has not put enough time (hours with sweat) into it. That is where automating it with Radiosity rendering is a fantastic solution. To get started, download the following FBX scene https://cdn.discordapp.com/attachments/308956559201796097/632340906170908673/demo.zip. Each point contains a spoiler with a video clip. For those who would like to mess around with the final result of mine, download FBX here: https://cdn.discordapp.com/attachments/308956559201796097/632559814387695626/demo_result.zip (video below) Important thing to note, when using Radiosity for prelights, the shading/lighting which is baked into the model entirely depends on the smoothing of the model. If it's set to Auto Smooth value 2 the shading will resemble 3ds Max's shading 'facets', while if the model has only one smoothing group, the shading will be incredibly smooth and generally won't have any facet shading. San Andreas models generally had very low smoothing value for its models at their creation, judging by their hard surface appearence. If a modeler were to create models that blend in with the game environment, they should strongly consider the above. Video tutorial: Text tutorial: Import the file Click the 3ds max upper left corner, at Import hover over the arrow for a drop down menu to appear. Click Import. Click the demo.FBX. Ensure to include Smoothing Groups on import, and units setup in Meters. Reset X, Y, Z positions to 0, 0, 0. At import the model is not centered. Create light Navigate to Create tab, click the gears icon, finally select the Daylight button. Max will ask if it can set an exposure control flag (not a country flag bleh), click Yes. Click anywhere, this sets the compass. Then, drag the mouse up into the sky, press LMB to spawn the daylight system. The compass position is not important. Alter light Navigate to Modify tab, change Sunlight from Standard to IES Sun. Likewise for sky, make it IES Sky. On Sun Parameters uncheck Shadows. Ensure the sun's state is On. On IES Sky Parameters it is possible to modify the intensity of the sky, as well as the sun. Some of the settings that affect the sun is whether the weather is clear or clouded. Leave default. On hierarchy list, select the Daylight001 item. While on Modify tab, click the Setup button for setting the scene weather. As the light system works like real daylight, the lower the number of hours, the darker the scene. Set hours at 9, month at 9, orbital scale at 320-360. Initiate the radiosity solution by running Vertex Color Tools Ver1.0. Press the AO button. Keep in mind, that this will remove all materials and cannot be reversed with undo. The render setup window opens. Another window from Rendering > Exposure Control is needed. On Exposure Control, change from none to Logarithmic. Tick on the Exterior daylight checkbox, which is required due to scene using a daylight system. Optionally, start rendering previews via the Exposure Control window. These previews are very low resolution and may help visualise the lighting. Or, real renders by SHIFT Q, although this may take significantly more time and processing power. On Render Setup window, reset value of Indirect Lighting Filtering. Increase the Direct Lighting Filtering to a value of 8. Under Radiosity Meshing Parameters tick the Include Skylight checkbox. Under Rendering Parameters select Re-Use Direct Illumination from Radiosity Solution. On Render Setup window, make sure to press Reset, to then start a clean rendering with the updated settings. Click Start. This may be an incredibly slow process, even on high end computers. If it gets stuck, set quality to less. It does not really have much of an impact for GTA:SA light anyway. Voila, done. The final result will be displayed in viewport. The result is equal to what is seen in-game during day hours. If something looks off, go back and tweak settings. Bake Radiosity lighting solution into vertex channel. Navigate to Utility tab, click More..., select Assign Vertex Colors. Upon scrolling down the utility tab, the Vertex Colors settings appear. Vertex Color is for day time, Vertex Illumination is for night time. Choose Vertex Color. Set light model as Lighting + Diffuse. Set Color Assignment as whichever seen fit. On Rendering options, enable Mapping and Radiosity, Reuse Direct Illum. from solution. Finally, click Assign to Selected View vertex color result in viewport. On the VertexPaint modifier, select the channel that was just modified. On the VertexPaint GUI, click the shaded box to the left. This displays the model with only vertex channel rendering, no other 3D shading will be used. Further tweaking If one wishes night time lighting, the best to do is render a new radiosity solution with less sun and daylight intensity, in order to darken the scene. Eventually change to clouded or mess with weather settings. The new radiosity solution will be equally the same as the one for daytime, although a tad darker. When rendered, assign to illumination channel. The letters can be painted for night time to look extra cool. This is where painting by buckets onto face selections of the mesh can come in handy, using the VertexPaint modifier. Odd looking shadows can be fixed up with the blur brush (VertexPaint modifier). Those who are able to get results with the above Radiosity workflow, may utilise their knowledge and take prelighting a next step with other types of lights, in order to create environment lights such as shadows for light poles, torches, buildings etc. Point lights, more specifically Free Light, were used a lot in the ship model further down the topic. Scene lighting is generally hit and miss. There are many settings which may need to be changed e.g scale of daylight and smoothing groups of models, in order to get the right look. Faking ambient occlusion Vertices can easily store ambient occlusion details, negating the need for geometry shaders. Some models may require additional geometry through subdividing the mesh, in order to achieve proper ambient occlusion details with vertex colors. The type of light used is usually skylight or daylight, this creates subtle shadows around corners and creaks, as well as maintaining global lighting. The below model has vertex AO baked by using a Skylight with the following settings. *you can eventually utilise a plane as ground for the ambient occlusion to calculate a lot better. The above practise can be used for GTA:SA assets as well, some settings may require to be tweaked first though. Prelighting in general is trial and error unless the artist has a solid background with lighting and rendering. Generally though, ambient occlusion should not be the only layer for lighting a model. Hard surface lighting as well as adding point lights is highly recommended. Without these, models with AO will still look rather flat in most cases, as there is not much definition between corners, other than soft shadows. Adding point lights to radiosity render will also give the lighting a more natural feeling, this can be done by adjusting the temporature of the light or its color. Combining point lights (free light, omni light, etcetera) with 2DFX can give stunning results. Texture blending with Vertex Alpha Texture blending on MTA was thought to only be possible by shaders, e.g texture splatmap. Instead, we can now blend textures using Vertex Alpha channel. On December 27 2019 we discovered that Vertex Alpha works without need for additional scripting (MTA Discord #modelling). We also need to thank Deniska for writing this guide (gtamaps) on vertex alpha plus creating a maxscript that exports vAlpha channel! Vertex Alpha works based on grayscale values just like alpha masks. Any vertex that's black will not be rendered - any vertex that's not black will be rendered. White is fully opaque, while the greyer it gets, the more transparency is made. Vertex Alpha will not render water behind its faces, so it's important to place an opaque object behind the vertex alpha mesh. This must be a separate model, not part of the mesh that uses vertex alpha. As with vertex prelights, vertex alpha needs geometry to work with. It's highly recommended to turbosmooth/subdivide the mesh so that you can paint in more detail. In the video below, I show how quickly the vertex alpha can be added to your models, and once that's done, you can export the model using the script from this page. Create a plane primitive. Give it 16x16 segments. Convert it to editable mesh. Give it the material that needs to blend using alpha. Set opacity of material to 98. Add a VertexPaint modifier. Select the vertex alpha channel. Use paint bucket with black color, 100 intensity, to paint entire mesh black. Add a secondary vertexpaint modifier. Grab your brush, adjust its size and strength. Begin painting a path from one end to another. Use the blur brush to finetune the semi-transparent edges of your path. Sharp edges ain't good. Looks OK? Start the export-script. You don't need to collapse your modifiers when exporting. Keep them in stack for later adjustments. Export with MMC. Remember to always set alphaTransparency enabled when replacing the model, or else only part of alpha will show. If you want to use another DFF script (for a higher quality dff), simply copy paste the sections e.g "Extra Vertex Colors" via RWanalyze. (Script will break (in which case, close script and run again) if you try to export vertex colors without having first assigned vertex colors/illumination to the model via its respective channels) List of model ID's that use the flag 68 (NO_ZBUFFER_WRITE(64) + DRAW_LAST(4)), which is required for Vertex Alpha: 2728, 3872, 3910, 4227, 4636, 4637, 7892, 9831, 9896, 9897, 11678, 11679, 11680, 11681, 13494, 13495, 13496, 13497, 13498, 13499, 13500, 13501, 13502, 13503, 13504, 13505, 13506, 13507, 13508, 13509, 13510, 13511, 13512, 13513, 13514, 13515, 13516, 13517, 13518, 13519, 13520, 13521, 13522, 13523, 13524, 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13534, 13535, 13536, 13537, 13538, 13539, 13540, 13541, 13542, 13543, 13544, 13545, 13546, 13547, 13548, 13549, 13550, 13551, 13552, 13553, 13554, 13555, 13556, 13557, 13558, 13559, 13560, 13561, 13563, 16375, 16445, 16498, 16623, 16676, 16677, 16733, 16734, 16753, 16754, 16756, 16757, 16758, 16783, 16784, 17436, 17437, 17438, 17439, 17440, 17441, 17442, 17443, 17444, 17448, 17450, 17451, 17451, 17452, 17458, 17459, 17460, 17461, 17462, 17463, 17464, 17465, 17466, 17467, 17468, 17469, 17470, 17474, 17524, 18073, 18112, 18610, 18611, 18612, 18613, 18614, 18615, 18616, 18617, 18618, 18619, 18620, 18621, 18622, 18623, 18624, 18625, 18626, 18627, 18628, 18629, 18630, List of model ID's that use the flag 64 (NO_ZBUFFER_WRITE(64)) which are not tested, but might work for Vertex Alpha: 1315, 2981, 4712, 4724, 4554, 8004, 8044, 11306, 14765, Below are a few examples of how vertex alpha can be used to blend several textures together. Above image courtesy: worsas @ project tamriel (see link for more) 128x128 textures, 8192 polygons (can be a lot less!) You can probably create something a lot better than this. Time to get creative! If you're looking for additional inspiration, see the videos in spoiler. Note: The below spoiler contains information that does not apply to vertex alpha method, but instead to vertex colors. This requires shaders, since SA uses the colors for lighting, but is a decent alternative if the model use lighting shaders. The vertexPaint modifier VertexPaint is the modifier that houses the WIP vertex colors, illumination and alpha modifications. It may be accessed on Modifiers tab. While it is open, it allows the artist to do various changes to the vertex channels. Ranging from painting with the use of brushes, to refining vertex colors by blurring, adjusting hue, saturation, lightness etcetera. This is a very powerful tool, despite not having been updated for years. To get started, the modifier works with a float GUI with all of its necessary functions in it. It is worth noting that the modifier can not change existing vertex channel data, only the data that is stored in the modifier. That means it is not possible to import a GTA:SA asset and modify the hue of the vertex color channel. For an exhaustive list of what the modifier offers, check Autodesk's page on the VertexPaint Modifier. Brief explanation of what the modifier has to offer, from top to bottom: Extracting channel info For whatever reason, an artist may want to copy the vertex channel data, that is, the custom vertex information, and paste that onto their latest version of the mesh. This could be due to an irreversible action that would prevent the artist from undoing the lighting changes on present model, resulting in work lost and having to redo it all over again. Although this may seem like a promising solution to regain old channel data, it can generate problems if the two models contain different geometry counts. Below steps explains how to copy/paste data. Navigate to Utilities tab, click the More button, after which, click Channel info. At last, press the button that appeared on the bottom of the utilities tab. At first, the Channel Info GUI may seem complicated; but it really is not. The only information to look out for is the ID column and Channel Name column. The Num Verts, Faces etc. are only important to verify that the two model contains the same model geometry count. In the above example, the model has no custom channel data. The -2:Alpha, -1:Illum and 0:vc are the types of channel info's that are relevant for GTA:SA, although the Alpha data currently isn not compatible with MTA. To copy data, simply select either of the rows and press the Copy button. Then, highlight the present model, select the corresponding channel and paste. Working with several VertexPaint modifiers On more advanced tasks it may be necessary to use multiple VertexPaint modifiers stacked onto the model. Artist may find it helpful if they are doing several versions of prelighting for their model and wants to go through each result, picking the one that suits them the most. This means that each type of radiosity lighting solution will be stored in its own modifier, allowing artists to go through all of them and delete the poor ones. Having multiple modifiers on stack can also improve workflow by utilising each modifiers for each element of the model, such as Modifier1 for bonfire logs, Modifier2 for bonfire shadows, Modifier3 for ambient occlusion, Modifier4 for moonlight etc. Modifiers can also be renamed to quickly tell the artist what they are representing. The model can have as many modifiers in its stack as the artist wishes (or until the software times out), and they do not require to be collapsed when exporting the model to MTA. This means that the modeler simply needs to select the model, export it and load into MTA. Modifiers can then be collapsed to stack when job's done, however, it is strongly recommended to keep them in stack for future, in case of parts requiring rework. Below model may give a good look into just how much it helps to utilise multiple modifiers. The ship has its own modifier for virtually any type of light emmitting source. The rectangular screens to the right are symmetrical on the other side, so there is one modifier that represents those 6 rectangular emmissive screens. Same goes for the cyan U-shaped engravement, which uses its own independant modifier, and so on. This allowed to change the engravement prelight from initially dark blue to cyan, by not affecting other lights when modifying the hue, as the modifier was only used by that particular area. The stack works like so: By clicking the bottom modifier, only that one's layer will show. If clicking the one above it, assuming it is same channel, it will show both of them. Now, if clicking the top modifier, it will show all layers e.g the rest 4 that are associated with Vertex Illum channel. It will only display the channel that is selected on the right most panel. (This depends on version of Max)1 point
-
Introduction Modding is a term used when modifying components, files and what not, in this particular case modifying game installation files in order to achieve unique results not seen in the vanilla game. GTA:SA is 3D era, where modding the game requires special 3D packages. Older games such as GTA:II uses a 2D engine, which means that modding the game was commonly done with image editing applications. We will cover some aspects of modding game textures and models. This guide intends on introducing those inexperienced with modding and 3D as a whole, on how to obtain 3D software and their recommended tools. It also introduces ways to import and export models, basic workflows for 3ds Max, texturing and creating models. TOC 3D packages, helpful tools and how to obtain them Extracting game assets How each type of game model works Limitations - MTA vs GTA Working with 3ds Max Texturing a game-ready cube 3D packages, helpful tools and how to obtain them There are various applications being used for modding. Although some has more tools available, there really isn't one that tops the others. In this section there'll be lists of a few 3D packages and tools used for modding. 3ds Max, arguably the most used program with the greatest amount of third-party plugins and scripts for various games. For GTA:SA, this program is favored by many modders due to it having 3rd party scripts for dealing with animations, collisions, lighting, modeling etcetera. There isn't much that 3ds Max can't, that other programs can, when it comes to GTA:SA modding. Although this can be expensive to run on a longer term, there are education licenses available which last for 3 years. These do not allow commercial use, and is marked purely as "educational use only". View more. Kam's (vanilla) max scripts, the first official script package for modding GTA:SA with 3ds Max. After the release of his scripts, a lot of others has developed scripts of their own, some of which are more optimized and less prone to issues. Even despite Kam's scripts having overseen issues, it is still to this day widely used for tasks such as, but not limited to; IPL map generation and import, collisions, animations, characters, vehicles, environment modeling. View more. Kam's (2018) max scripts, a modified version of Kam's vanilla scripts for 3ds Max. Notable features that were added are; DK22pac's Normal map plugin support, reflection map support for environment models, 2dfx panel for lights such as aircraft lights or street lamps. View more. The Hero's RW importer/exporter, a modern plugin that works extremely well with vehicles and environment models. Due to its simplified layout it is very easy to get used to. It's far recommended to use for vehicle model import/export due to its quality handling and materials, which are based on RW formats (renderware, the engine GTA:SA runs off). With the plugin using different model material formats from Kam's, it comes with a maxscript to convert scene materials from GTA_MTL to RW_MTL and vice versa, if needed by the modeler. View more. Deniska's max scripts, a pack for various types of GTA:SA modding, some features are obsolete for MTA users due to IPL and IDE modification required. Although, the pack does come with a few tools that may be useful to MTA modders, such as prelight tools to set the vertex colors and illumination to fixed values. View more. DexX's 2dfx export script, a standalone 3ds Max script that exports Omni and Dummy informations to .sae file formats, to then be added to the .dff using RW analyzer. With this script it's possible to integrate lights and particles into custom models, e.g flashing aircraft lights, street lights, fire and smoke, etcetera. With the release of Kam's 2018 scripts, this script is used less as using Kam's may be less work for some cases. View more. Blender 3D, a freeware (yes, completely free, no paid watermarks or any limitations), not as favored by modders throughout the years until recently, where a developer has released his script 'DragonFF' on GTAforums. Although it is WIP, modders has already binned 3ds Max and moved permanently to Blender. Although Blender is free, it actually combines several programs into one, allowing a Blender user to sculpt, paint, do lighting, professional rendering and modeling in one. A recent update in 2019 changes the RMB selection to LMB and UI among other things, making for a potential alternative to 3ds Max. View more (Blender). View more (Blender GTA script) Zmodeler, not as commonly used as the aforementioned programs, although it is being used very frequently by modders in various games, most notably for GTA:games. It does not have support for skinned characters, although it is being commonly used for vehicles, and sometimes environment modeling as well. This is a fairly inexpensive solution, but lacks tools for more broad modding. View more. Sketchup, a 3D application that focuses on architecture. For modding, it is a rather uncommon, though has a free and paid version and can be used for seemingly OK modeling. It does not have access to any 3rd party scripts for GTA:SA, hence its only use is modeling and then exporting model files to then import into 3ds Max or Blender. View more. Photoshop, mainly used for graphic design, but can also produce 3D models, video, GIF and textures for assets. Photoshop is the most favored by modders in regards to working with textures e.g paintjobs and retexturing. Although there are alternative image editors in the market, Photoshop definitely hits the top in terms of usable scripts (user-customized scripts as well) and ease of workflow. View more. DFF Viewer, a 3D graphics engine that is used for visualising GTA:SA models and supports .DFF and .TGA formats. Only single dff's can be loaded at a time. Though this is rarely used by those who has access to 3ds Max and Blender, it is commonly used for troubleshooting/testing work that involves retexturing a model e.g changing the clothing textures of a character. This program is entirely free and available from various GTA modding sites. View more. TXD Workshop, a texture dictionary editor that has been around for years, only since recent years to be succeeded by Magic TXD. Though TXD Workshop may not be the best for setting up TXD files, it has a built-in IMG archive editor, allowing one to browse all of the contents of gta3.img. View more. MagicTXD, a new texture dictionary editor with features for mass exporting .TXD contents from folders into image subfolders, texture compression, mipmaps, resizing textures etcetera. This is broadly used for .txd files and almost took over TXD workshop when it comes to working with texture dictionaries. View more. RW Analyze, a multi-use program with notable features being; ability to lock/unlock game files, add data to game models e.g 2dfx and vertex colors information extracted from other DFF files. View more. Extracting game assets In order to start modding GTA, access to the files is required. The files in question are commonly found in parent files that require some sort of program to open. In this case, TXD Workshop or any IMG editor and optionally Magic TXD for later on will work just fine. The below steps shows one way to extract all models and their texture dictionaries. For IMG editors (e.g Alci's IMG Editor): Open the editor. Under File, select Open. Find gta3.IMG stored in GTA SA directory\models. Highlight the first file in the list, then scroll down to the very bottom and SHIFT+LMB click the file on the bottom. This highlights every file in GTA3.IMG. Right click the list of files and select Export. On the popup window, find and select, or create a new folder on desktop called GTA SA ASSETS. Click enter to proceed. ((For cases where specific files are wanted, use the search field to find the necessary files and export them individually)) For TXD Workshop users: Open TXD Workshop. In the toolbar it says Open IMG. Click this, then find and select gta3.IMG stored in GTA SA directory\models. Highlight the first file in the list, then scroll down to the very bottom and SHIFT+LMB click the file on the bottom. This highlights every file in GTA3.IMG. Right click the list of files, select Extract. On the window, find and select, or create a new folder on desktop called GTA SA ASSETS. Click enter to proceed. ((For cases where specific files are wanted, use the search field to find the necessary files)) Now the folder GTA SA ASSETS contains nearly every .dff, .col, .txd and so on used by the game. Assuming one would like having all of the textures in PNG, DDS, TGA or any other common image format, they may follow the below steps using Magic TXD. Inside GTA SA ASSETS create a new folder named IMAGES. Open any .txd file found in GTA SA ASSETS using Magic TXD. Navigate to the toolbar. On Tools, click Mass export. Export settings are as following. Game root = root folder containing TXD's Output root = folder where images goes Image format = self explanatory With texture names only = exports images directly to folder and duplicate named ones gets replaced by one another Pre-pended with TXD name = exports images with TXD prefix In separate folders = makes new folder(s) for every TXD's contents Hit export. This process may take some time. Note that this process is the same for other .IMG archives such as player.img. There are also .txd and .dff files elsewhere, such as \models\generic\generic.txd, which is the vehicle shared texture dictionary file. How each type of game model works Models used on GTA SA uses different rendering techniques and data hierarchy than others. This section will introduce the features that some models has that others don't. Vehicles: Vehicle model components utilises hierarchies, where each component is linked to a dummy (helper) and each dummy is linked to parent dummies e.g chassis_dummy, for them to be registered in the hierarchy. In order for vehicles to not look flat or cartoon, a few steps are made in the model; Diffuse material is given a grunge texture or AO map, this helps telling the depth of the vehicle as well as giving it a feel of realism, so it isn't just clean. A specular lighting image is applied to the vehicle surface material, giving it a fake shine when looking from certain angles. If the vehicle has hard edges (smoothing), this image can increase the visibility of the normals, retaining its original look rather than being flat without visible difference in geometry. An environment (ENV) map is applied to the vehicle surface material, producing a fake reflection that is animated horizontally as the vehicle travels. Vehicles also has a lot of hardcoded features such as headlights, brake lights, emissive lights, taxi/aircraft lights, rotatable components and dynamic collisions for special vehicles like Forklift. Vehicles are also the only dff models that uses baked collisions, which means they are stored in the .dff itself. Below is a detailed hierarchy used for cars, and special components used by a number of vehicles (click the spoiler). Skin characters: Ped skin characters uses bones (dummy objects) that are connected to each other and linked to the character model. These bones are not visible in-game. In order for the bones to know what part of the 3D model they're responsible for, the skin needs to be rigged. Character rigging for GTA:SA is done by applying weigh on vertices. Using heatmap display, colors go through blue-red, low-high respectively. Values go from 0 to 100. If the value is 0, it means that the vertex is not used for any bone. This can cause issues. If the value is < 100, it means that the vertex is used for multiple bones. This results in smooth animations ingame, as the 3D model transitions smoothly through each bone. If the value is 100, it means that the vertex is only responsible for one bone. Skin rigging is generally something that is being avoided by modelers and makes Skin modeling the most difficult on GTA. Bones are as shown: CJ character: Carl Johnson's 3D model is split into several pieces in order to be compatible with the clothing script used to let the player customize CJ. These models uses a function known as multiclump to support 3 meshes per dff; normal, ripped and fat. This is for CJ's health stats to physically show in-game. Other than multiclump and additional bones, modding CJ skin is essentially the same as any other ped skin. Map environment: World objects .dff contains only single models, though they do support omni and dummy objects for 2d effects. These types of models uses Vertex Colors/Face Colors. This requires the modeler to paint colors onto the model which is then stored in the vertex colors channel (daytime) and vertex illumination channel (nighttime). Although uncommonly used by R*, these models do support reflection maps like vehicles use. Goldfish's modified version of Kam's scripts is excellent for exporting with reflection maps. GTA SA utilises multiple collision archives (.col) for every IPL district, being responsible for all of the world objects' collisions. However, on MTA, collision archives are not supported, so custom collision files are single models per .col. Not every object uses collisions though, some merely has their bounding space. These objects can not be selected with MTA map editor, thus requires additional scripting or modding. Limitations - MTA vs GTA Speaking of native support, MTA currently is behind in several places. Notable features that aren't available on MTA, but on GTA are as following. Item Placement (IPL) - another type of mapping file, but contains a lot more functions such as zones for real-time reflections as seen in interiors. Item definition (IDE) - a file used to but not exclusively, define settings for models, enabling alpha flags, disabling backface cull, enable breakable effect and much more. Limit adjuster - a rework of the game that allows for adding more ID's and bypass common limits. This however is being developed by one of MTA's contributors. There are various limitations such as polys per model, max dimensions for models and collisions, (very) strict size limits for collisions and CPU usage that can easily cause issues for modders. Not to mention the majority of the game data files which most MTA servers likes to force original, else the player won't be able to connect. These limits all has potential solutions being developed as with the limit adjuster. Working with 3ds Max As described above, 3ds Max is without a doubt the most common program for GTA modding. It's also used by professionals within architecture and visualisation and film industry. What's amazing about this program is that whatever is created in 3ds Max can ultimately be added to the game. A modeler made a square - it can get added right away, no adjustments required. That's the charm of 3ds Max. There's no need for additional tools to process the model for it to be compatible with GTA. It is also the primary program that Rockstar's developers used for creating the environment in GTA:SA. At a first glance, the program may seem rather intimidating. The main functions of the program that a beginner should be aware of are listed below. Shows the default home screen with 4 viewports. Left, Top, Front and Perspective. The 3 side ones are Orthographic viewports while Perspective is in regular mode. It is also the most common one to use. Highlighting a viewport and pressing (left)ALT W will full screen the viewport. In order to rotate camera view, the user must click and drag the square in the upper right corner. Its face also tells which side the camera is viewing e.g Top. If one wishes to see viewport statistics such as polygons per model, vertex amount etc., clicking: [ + ] icon on the upper left side > Configure Viewport > Statistics > Total + Selection > Apply > Clicking 7 on keyboard shows the statistics. This feature is extremely useful for modelers who are limited in polygons per model, or simply wants to see how many polys a car is. Common keyboard shortcuts F1: Opens Autodesk help section in new browser tab F2: Displays blue overlay on models F3: Displays models in wireframe F4: Displays edges on models F10: Opens render setup 9: Shows viewport statistics Q: Select objects W: Select and move E: Rotate R: Select and (mode) scale U: Orthographic viewport mode P: Perspective viewport mode A: Toggle angle snap S: Enable snap D: Disable viewport G: Enable/disable grid J: Display bounding edges LALT X: Xray mode for model Ctrl Z: Undo action Ctrl Y: Redo action In a heavy program like 3ds Max, being able to change preferences to one's likings is important. Do so by going to Customize > Preferences. Performance, file settings and such can all be configured in there. For GTA:SA modding, knowing how to subdivide and add geometry to existing GTA models is very important. Below is a list with actions that may come in handy. No-brainer: Editable Mesh is inferior to Editable Poly. Use Poly, poly, poly, poly... Editable mesh modeling Vertex selection mode Edit Geometry section Attach: attaches another model in the scene to the selected mesh Chamfer: chamfer selection of vertices; creates additional geometry Weld: merges vertices together within a specified threshold Surface Properties section Edit Vertex Colors: sets the color and illumination of selected vertices Edge selection mode Edit Geometry section Divide: divides an edge, adding a new vertex where it was divided/split Extrude: create and pull a new face out from existing edges (keyboard shortcut: LSHIFT + LMB-drag) Face selection mode Edit Geometry section Divide: creates a new face Extrude: pulls the select face(s) outwards or inwards and creates new geometry off that Bevel: essentially an Extrude followed by scaling of the face Surface Properties section Flip: flips a face 180 degrees Smoothing groups: defines the smoothing of the model. Autosmooth is in many cases OK, but may not fulfil everyone's expectations Editable poly modeling Vertex selection mode Edit Vertices Connect: selecting 4 verts on a box side and using this function will triangulate the side. Edge selection mode Edit Edges Connect: creates an edge between the selected edges, as in a bridge between two cliff sides (use the 'Settings' to choose between multiple or one edge on creation) Polygon selection mode Edit Polygons Inset: places a new polygon inside the selected, allowing to be scaled Bridge: connects two opposing polygons by creating a bridge between them (can be used for walls and gaps) Edit Geometry Slice Plane: enables the user to create a perfect cut on the model, can be rotated by degrees Rendering scene Modelers working on projects for companies or friends might want to show what they've accomplished, but a regular screenshot may not suffice. Talking of a screenshot like this: Instead, the modeler might want to show the scene with textures. Perhaps more than just textures - lighting? reflections? transparency? - this is where 3D rendering comes into play, and can be done by simply pressing SHIFT + Q on the keyboard. This can also by default use alpha channel. However, the quality could improve. The quality of the render depends on the scene assets (models, materials, lights), the Renderer and its settings. By default, 3ds Max utilises Scanline Renderer. This is not a production quality render, but rather meant for test shots and demos. Though the quality isn't great, it's still possible to produce seemingly interesting renders. The following render took merely 8 seconds. Using 3ds Max allows modders to bring GTA:SA into modern graphics, easily comparable or even superior to ENB's. It also enables modelers to share visualizations of their models to help the customer understand how it could potentially look for their game. In the above render, a Skylight is used with Scanline Renderer. A very basic render, though interesting and contains lots of depth. In order to replicate this result, below are the steps to follow: On the Create panel, where one would normally find boxes and spheres, click the toolbar Lights. Where it says Photometric change that to Standard. Click the Skylight and place it in the 3ds Max scene. Settings for Skylight explained Multiplier: intensity of the light Sky color: the color of the light Cast shadows: enable to produce shadows, though this is more of an Ambient Occlusion than actual shadows Rays per sample: quality of the shadow, ideally keep at <5 for tests and 15-20 for final shots In the actual render above, a sample of 5 was used, creating grainy shadows but quick render. Backface culling was enabled to avoid slowing down the render time. Skylight is great light source and is generally used to illuminate an entire scene and not particular models. In the same Lights tab, one may find use of Omni or Free lights, which both works great. These are great point lights, which as opposed to skylight, are able to illuminate parts of the scene e.g acting as street lights. Modifiers When modeling, modifiers can come in use and save the modeler a lot of time. The following modifiers are highly suggested for beginners to know about. Bend: bends the model, effect depends on the differences in the geometry Mirror: copies the mesh and mirrors it on the other side, commonly used for vehicles using symmetrical geometry Smooth: generates and applies smoothing to the model, generally the lower values makes for higher file sizes Symmetry: essentially the same modifier as 'Mirror' Turbosmooth: Smoothens the mesh, adding geometry, uses iterations Unwrap UVW: advanced UV editing, commonly used for preparing textures for models like characters and game assets UVW map: basic UV editing, X/Y/Z projection mapping as well as spherical, box and planar mapping Vertexpaint: allows for painting colors onto vertices and faces, these colors are rendered during either ingame or night time Texturing a game-ready cube Modeling has to start somewhere. Using standard 3D primitives is a good place to start. For the purpose of this guide, a Cube will be created in 3ds Max and textured in Paint.net, a free image editing software. Video tutorial: To start off, navigate to 3ds Max's Create tab on the right hand side panel, as shown below. Shows the Create tab on the panel. For this guide, click on Box (Cube). Use LMB and click and drag the mouse in the viewport to create the cube. Now that the Cube primitive is spawned in the viewport, on the same panel that it was created from, go to Modify tab and set its dimension parameters to 5,0, 5,0, 5,0 and 1 segment for all 3. Convert the model to Editable Poly by right clicking it in the Viewport > Convert to > Editable Poly. Go into Polygon selection mode and scroll down until the following buttons are visible: With viewport selected, on the keyboard press `CTRL A` to select all faces on the cube. Now, where it says `Color`, click the bar and on `Value` set it to 100, then do the same for `Illumination` but value at 35. What this does is it sets the vertex colors so that the model won't be overexposed during day/night time. Exit polygon selection mode and on Modifier List, click that and find Unwrap UVW. This applies a modifier stacked on top of the Editable Poly mesh. Under Edit UVs click Open UV Editor. This allows the user to make changes to the UV coordinates which tells the model how textures are projected onto the model. On the editor, ensure that Polygon selection is enabled. While in the UV editor, press `CTRL A` to select all UV islands. On the top of the editor click Mapping, then Unfold Mapping.... Keep it as Walk to closest face and enable Normalize Clusters. Click OK. The result should remind the user of how a simple cardboard box in real life looks when it's yet to be folded into a box. With the model unwrapped, on the toolbar on the UV editor, click Tools > Render UVW Template. The export settings below are ideal for this particular task. If one wishes to know exact dimensions of each square, enable Seam Edges. After exporting, on the modifier stack, press Collapse to. This saves the new UV's. The width and height should be on a 1:1 ratio to avoid stretching issues. 1024x1024 is more than enough. On the rendered image window, click the Save button and find a location to save it in, name it Cube_unwrapped and use Alpha channel (optionally). Now open Paint.net and insert the image. Once happy with the result, export as cube_diffuse. Diffuse map generated with the help of a UVW template. In order to apply the texture on the model, simply drag and drop the image from file browser onto the model in the Viewport. Although the example above is not textured properly in regards to rotations, it shows what can be done by using UVW templates, and how easy it really is to produce textures for models made from scratch. The model can be directly exported as DFF. Materials are not required to be GTA or RW, they can be standard and still show ingame. Some exporters wants the model in Editable Mesh however, so converting it may be required. Thanks for reading this guide, we hope it helps and we wish you the best of luck with modelling! For questions on modding, please refer to MTA's modding FAQ or MTA discord #modelling channel. KAM_s_GTA_Scripts_Upd_by_GF_v0.3.7.zipKAM_s_GTA_Scripts_Upd_by_GF_v0.3.7.zip1 point
-
Forum Rules for Multi Theft Auto: Forums Welcome to Multi Theft Auto: Forums. Please follow these rules to ensure your stay here. TL;DR version Please use common sense and do not do anything which would cause us trouble and we will do our best to not cause you trouble either. Also, be nice. How to contact the Forum Staff MTA Forums are maintained by a team of volunteer administrators and moderators, later referred to as Forum Staff. Please respect their work, as they do it in their spare time and are not getting paid for it. The Forum Staff consists of all active Moderators (section-specific Moderators and forum-wide Moderators) and MTA Team members and is lead by Lead Global Moderators. Their job is to keep these forums in check. You can find the list of Forum Staff members in the Staff section of the Forum. If you need to contact us, you can use following communication channels: Discord (recommended for general questions): Server details | Click to join Forum Messages (PM; recommended for account actions requests and private queries): Staff List Twitter (you can highlight us in your tweets if you would like to receive a reply): @MTAQA Steam Group: Steam Community A. General Forum Rules This is an international forum so all posts should be in English and should also be placed in appropriate sections. Discussions in other languages are allowed, but only within the designated section. By posting to this board, you agree that any content (including code snippets) posted by you will stay visible indefinitely unless decided otherwise by the Forum Staff. Requests for release dates, beta tester positions and demands for information regarding future MTA features may be refused or ignored. Racism, discrimination, bigotry, obscenity and illegal activities are unacceptable in any form, whether it be posts, images or signatures. This includes pornographic and racist images, violent and insulting language of any kind, and posting copyrighted content and warez. Breaking this rule may result in an immediate ban. Do not disclose personal details (eg. names, addresses, telephone numbers, photos) of other users. Do not insult or impersonate other forum members. Do not post religious content on these boards (and on the other services we provide). This is a forum for a multiplayer mod, and not the one to discuss religions. We have no problem with whatever you believe (or whatever you do not believe), just do not drag us into it. Flaming and 'flame wars' will not be tolerated. Ban evasion will not be tolerated either and will be dealt with severely. Backseat moderation² is not allowed. If you see that something should be done about a certain topic, post or user, please report it and leave the decision to the Forum Staff. Do not post anything that is against our EULA. Any advertisement, discussion or sales which appears heavily based on content from existing servers, may be subject to deletion at the discretion of forum staff. Do not post any software that could be used for cheating in MTA gameplay. However, if you have such software in your possession and you would like to share it with MTA Developers, please send it directly to Anti-Cheat Team members via PM (currently ccw & Dutchman). If it is an unknown cheat, we may offer you a compensation for it. Do not advertise non-MTA related products, services and websites on our forums and other pages. MTA-related products, services and websites can be advertised in the following sections: MTA gameservers and communities that you can play on – please use the Servers to play on section hosting companies that can host a MTA server for you – please use the Hosting solutions section paid scripting, mapping, administration, web-design and similar offers – please use the Looking for staff section You can appeal a ban or a decision made by the Forum Staff member – see tips below on how to do it correctly. Insulting a Forum Staff member or getting in an argument with them are not the best ways of doing so. You can expect further actions from us if you do that. B. User Accounts Rules The Forum Staff will never ask you for passwords to your forum account, game server or other services. Quite contrary – we urge you to keep your user account credentials safe, and if possible, to use unique passwords in our forums. If you lost credentials for your old forum account and you can not use the forum’s built-in Password Recovery form, then we can attempt to recover your account manually for you. Please contact us in such a case and make sure to provide us as much information about the account as possible (eg. possible associated e-mail addresses, registration and used IP addresses / ISPs / countries, last activity dates or usage patterns). It is possible to merge two or more accounts into a single forum account, provided that you own all of them. Please contact us and we will do it for you – all of the content will then be moved to that single account. It is possible to rename your forum account, although only once per a while. Please read this topic to find out how to do it and how often it can be changed. Users can own more than one forum account, as long as these accounts are not used for breaking forum rules or other malicious actions (eg. evading a ban, tampering with forum statistics or poll results, disrupting topic discussions). Using multiple forum accounts for posting fake feedback or opinions on servers/server hosters/resources/etc. is strictly forbidden. Similarly, we allow sharing accounts, with the exception of the following cases: Shared account has moderator permissions – sharing such an account is strictly disallowed. One of the users involved in sharing an account is banned. Account is shared with an intention of personal gain by one of the involved users (eg. by tampering with forum statistics). Account is shared with an intention of derailing an existing forum topic by posting off topic comments. Very rarely, we may use special counter-measures against spam bots and ban evaders, such as manual account activation. When this is in effect, new user accounts may not be activated instantly. Please do not create an additional account as it will not be activated faster in such a case, (unless you need an additional account). Instead, please contact us by using any of the communication channels listed at the top of this article and provide your username or e-mail address. Similarly, new and junior Forum accounts must use the Forums for a period of time before being granted all Forum features. These restrictions are to combat spam and abuse. C. Posting Rules and Advice Please use the Forum Search feature to see if your question had been asked before. Additionally, please consult the online documentation if you have problems with the mod or Lua scripting before you post. If you cannot locate your topic or post, please search for it. It could have been moved to another section. If you want to create a topic, please use the sub-forum which suits best for it. You can find the list of sub-forums on the main page of the forum. Make sure to use descriptive titles for your topics. Topic titles which consist just of words such as 'HELP', 'Help me' or 'Please read' are not descriptive at all. Please keep in mind that when you make a post, you may not be able to edit it after 2 hours since it was posted pass. This is done to prevent users from removing the original post content right after they received a satisfactory reply. There are exceptions to this though – see this topic for more details. Please avoid making double posts. Do not post the same topic or content multiple times or re-post it to different sub-forums. It is okay re-post the translation of the content which was originally in English to Other Languages sub-forum as long as this does not violate other rules. Likewise, it is okay to re-post a foreign language topic to main forums, but it needs to be translated to English and posted in the correct section. If there is a topic similar to the one you wish to create, please reply in that topic rather than making a new one. You may bump¹ an old topic if it was created by you, or if the topic is about a problem you are also having. Please do that sparingly though, and only after some time has passed since you have posted. If you intend to bump a support topic then please provide some additional details about the problem in the new post, if available. Please use the [ quote] tag sparingly. Usually there is no need to quote the full message of the original poster, or the message of the poster directly above your post, so please do not do that. If you need to include a source code snippet in your post, always put it inside the [ code] tag. This makes your code easier to read and provides syntax highlighting where applicable, also makes it possible to automatically provide wiki links to MTA scripting functions where needed. Do not reply to spam posts or other posts severely breaking the rules, please report them instead! The reason for this is, that if you reply to a spam bot, your posts will remain even after we delete all posts made by such a bot. Not only this leaves us with more work, but it may also lead to mistakenly flagging your account for removal for posting unwanted content. At the same time, please keep in mind that we will ignore post reports which are related to an argument between some forum users and ask us to support either side. Similar to User Accounts Rules, very rarely we may use special counter-measures against spam bots and ban evaders, which may lead to hiding newly posted content until it is approved by the Forum Staff. In such a case please wait patiently until we approve the post – there is no need to re-post it. D. User Profile Rules Total size of images in your signature must be within either 500x150 OR 720x80 pixels. Anything larger may be removed when noticed. Signatures should use reasonably sized fonts and only a limited number of hyper-links. E. Moderator Decision Appeals Please do not contact several Forum Staff members regarding the same subject. You can contact another Forum Staff member if you do not get a reply to your first message in a timely manner (eg. within 48 hours). Our Moderators are chosen from talented, respectful and active members of our community. We are confident in decisions they make. However, if you are not satisfied with a certain moderator's decision, you can contact them directly about your concerns. Make sure to be polite and explain your point well. If you are still not satisfied with the decision, you can ask a moderator with a higher rank to mediate for you. Just like above, be polite and try to explain your point even better. See Appendix C below for a more extensive explanation of the appeal process. F. Ban appeals Please do not create a new forum account once you get banned from the forum. If you do so, you will be banned again for ban evading and the duration of your original ban will be extended. Instead of evading the ban, you can try appealing it on our Discord’s #support channel. If you were also banned on Discord, please do not try to evade your ban there. Ask someone to contact us for you (or use another communication method as listed at the top of this article). Based on your infractions, we might decide to issue a cooling off period for your ban, during which you should not access the forums. Once it expires and you have followed our suggestions, you can ask us again to remove your ban. If you are looking for an appeal for a ban from a certain MTA server, please contact the server owner of that server. We can not unban you as we have no power over that server. Easiest way to contact the server owner would be to go to that server's website or look for the contact details for that server in Servers to play on sub-forum. G. Section Specific Rules a. General MTA -> Other languages (non-English) section and its sub-forums Basic guidelines. Additional rules may apply, depending on the section. You can only post in these sections if you speak the language which is used in the specific section. Do not post there otherwise. Additionally, English discussions are generally not allowed in those sections. Posting in English in these sections may result in a forum warning. Exceptions apply – if a Moderator starts a topic in such section in English, then other users (only those who speak the language of that section) can post in English in such topic too. Posting in English is also allowed (and preferred) in the General Multi Language discussion sub-forum. Moderation in some sections might be limited if we do not have moderators fluent in such languages. b. MTA:SA -> Support for Client & Server sections Client - How to ask for help in the Client Section Client - Introduction to MTADiag utility c. Community -> Scripting sub-forum Guidelines and formatting tips Additional guidelines d. Community -> Resources sub-forum Community regulations & guidelines Stolen resource accusations are not allowed e. Community -> Other Creations & GTA Modding -> Modelling sub-forum Purpose and usage of this section f. Community -> Competitive gameplay / Gangs sub-forums You may only post in another gang's thread to: ask for a match, arrange time for a match, cancel a match, apply to join, or to offer assistance such as refereeing or providing a server/web space. You may NOT post in another gang's thread for any other reason. Arguments and disagreements should be taken up elsewhere, such as the gang's own forums, for instance. g. Community -> Servers -> Servers to play on sub-forum Only one thread per server is allowed. This makes it easier to find information about a certain server, as it will all be available in a single topic – just make sure to keep it updated. Stolen resource accusations and other causes for fighting are not allowed. Click here for a detailed explanation. In addition to above, we may take extra measures against users who are server owners and are trying to pick a fight in topics of competing server owners. Make sure to report such posts instead of replying to them. h. Community -> Servers -> Looking for staff sub-forum Rules and formatting for this section i. Community -> Servers -> Hosting solutions sub-forum This sub-forum can be used by companies who sell MTA-related hosting services. This also includes web-hosting and virtual/dedicated server hosting, as long as they can be utilized by MTA servers or for hosting them. It can also be used by users to discuss their experiences with a certain host, or who are looking for a server host. We have additional rules in place for entities who would like to offer hosting services to our users. You can find them here. j. Other -> B.L.A.S.T. sub-forum This section is reserved for off-topic fun chat. Blind spamming, however, is not allowed. Posts made in this section do not count for post count or rank improvement. k. Other -> Multi Theft Auto 0.5r2 and Older MTA:VC/GTA3 versions sub-forums These sections are all about our older creations – MTA for GTA3 (also known as GTA3MTA) and for GTA: Vice City (MTA:VC). We no longer maintain these mods, so you may not receive support for them. These mods may also not work on newer PCs at all. You might notice some third party MTA derivatives that are listed in this section, which may or may not be supported by said third parties. While these attempt to recreate the experience of our older creations, they were not made by us so use them at your own risk. l. Other -> Third party GTA mods sub-forum Rules page H. Other Notes If you no longer intend to visit our forums, we can remove your forum account on request. You can ask any Lead Global Moderator for an account removal. See Appendix D for details on how this is done. We are constantly looking for new moderators, especially for the sub-forums in the Other Languages section which do not have any moderators yet. Remember though, you have to be an active forum member with a significant amount of contributions to the forum to even consider applying for the position. What we consider as contributions to the forum: posting useful or original content, providing help to other forum members, reporting troublesome posts and topics and helping us with organizing the forums. What we do not consider as a contribution: having a huge post count gained by posting (at best) normal content or by posting in (at best) regular discussions. Not to even mention gaining it by spammy ways. To apply, please contact a Forum Staff member via a forum PM or ask us on our Discord. However, please keep in mind that by sending your application you agree that it will be shared with other Forum Staff members. This is to ensure that your application is evaluated and handled properly. If you fail to comply with these rules, your post or topic may be immediately deleted from this board without a warning and/or you may face additional consequences depending on the severity of your actions. Thank you for your understanding. -- MTA Team Appendix A – Glossary ¹ Bumping a topic happens when a user posts in a topic solely with an intention of putting it at the top of the list of topics in a sub-forum. ² Backseat moderation is an occurrence when a person who is not a moderator tries to act like one, eg. by posting messages such as 'This topic is dumb and should be locked' or 'This user should be banned' and so on. It is a generally unwelcome behavior on Internet forums. Appendix B – List of possible moderation actions for rule violations A Private Message with a complaint from the Forum Staff member (usually this is the only thing that happens, providing that user is co-operative with us) Forum Warning (expires over time, can be seen in a user's forum profile; having 3 or more warnings at the same time disables user's ability to post) Posting Restrictions (any new posts or topics made by a user may require an approval by a forum moderator) Temporary Forum Ban (user can not access the forums during a specified period; each further ban has a longer duration) Permanent Forum Ban (same as above, except that it does not expire over time; has to be appealed in order to be removed) Global Ban on all of our services (given to extreme cases of rule abusing, using exploits, hack or cheat tools, or posting potentially dangerous resources; generally disallows user from accessing any MTA-related service, including playing the mod itself) Abuse Letter to user's ISP abuse department (last resort if user is still causing us problems) Appendix C – Moderator Decision Appeal process Forum Staff member made a decision which you did not like or think that it might have been biased. You contact this Forum Staff member about it, stating why do you think this decision is wrong and what should be done instead. Forum Staff member adjusts their decision and now both of you are happy about it and no further action is needed. ✓ Alternatively, they sustain or adjust their decision, but you are still not satisfied with it. X You contact a second Forum Staff member with a higher rank than the one who made the initial decision. You explain the situation well and ask this Forum Staff member to review the situation again. Second Forum Staff member evaluates the situation from both yours and original Forum Staff member’s point of views. Once that is done, they give their decision (which is final) as well as an explanation to this decision which should hopefully satisfy all of the parties. Notes: If the original decision is going to be changed, a Lead Global Moderator should be notified about it by the second Forum Staff member before any changes are made. As mentioned above, the appeal should be made to a Forum Staff member with a higher rank than the original one (or another Lead Global Moderator if there are none available). It should not be made to the Forum Staff member with the same rank/level. Appendix D – Forum Account Removal process If you decide that you no longer need your forum account then we can remove it for you. Keep in mind though that we reserve the right to not remove your posts when your account is removed, as they might be still useful for other forum users. Whether your posts will remain or will be removed, will be announced to you by a Forum Staff member who will handle your case. This depends on the amount of the posts on your account and their actual content. If your posts will remain, you will have a choice of them being listed either under your nickname, or under a “Guest” nickname. To remove a forum account: Send a PM on Forums to a Lead Global Moderator (alternatively, you can send it to any Forum Staff member and they will forward it accordingly) asking for an account removal. A Forum Staff member will handle this request and will attempt to verify whether you are the rightful owner of the account. This might be done in various ways and not all of them will require any interaction from your side. Once verified, you will receive a response, giving you terms for removing your account. If you agree to these terms, you will be asked to confirm the removal by sending an e-mail message from the same e-mail address that is associated with the forum account to an address given by the Forum Staff member. Such an e-mail should at least contain the forum username and the account removal request. Once you have sent an e-mail message, you will receive an e-mail message stating that your account will be removed after 14 days, provided that you will no longer access the account during that time. Once you receive this message, you should log out from the account on Forums and no longer try to log in to this account again. Simply log out using the Forum Log Out feature and you are done. After 14 days have passed and the account was not accessed during that time, it will be removed by the Forum Staff member and you will receive an e-mail message, stating that forum account was removed. If the account is accessed any time during the removal period then the process is cancelled.1 point
-
local moneySuff = {"K", "M", "B", "T", "Q"} function convertMoney(cMoney) didConvert = 0 if not cMoney then return "?" end while cMoney / 1000 >= 1 do cMoney = cMoney / 1000 didConvert = didConvert + 1 end if didConvert > 0 then return "$" .. string.format("%.2f", cMoney) .. moneySuff[didConvert] else return "$" .. cMoney end end1 point