Walter-Correa/SA-Map-Studio
The most comprehensive tool for mapping in GTA San Andreas, for both multiplayer and singleplayer.
README.md
SA Map Studio
Map editor for GTA San Andreas: Singleplayer mods, SA-MP and open.mp: a renewed replacement for the old SA-MP Map Construction, with a new interface and the whole San Andreas map in 3D. Choose Singleplayer to build a mod for the original game (Modloader and CLEO scripts) or Multiplayer to generate Pawn code for your server.
The editor reads the files straight from your GTA San Andreas folder, without changing anything in the game. In Multiplayer it generates Pawn code ready to paste into your gamemode or filterscript; in Singleplayer it generates a mod folder for the Modloader (the game's own files are never changed).
Contents
- Features
- How to use
- Building the program
- The program folder
- Shortcuts
- Code structure
- Languages
- Version history
- Author & Credits
Features
Singleplayer mode (Modloader mods)
When the program opens you choose Singleplayer or Multiplayer (the Mode button in the top bar changes it later).
Each mode has its own projects (projects\singleplayer and projects\multiplayer). A Singleplayer project becomes a
mod for the Modloader: loose files in modloader\SA Map Studio\<project>\, so the original game files are
never changed and removing the mod is deleting its folder.
- Map: new objects and parked vehicles go to an IPL (the cars as car generators, in the streaming IPL of their area). Original buildings are removed by burying them in a copy of the IPL that holds them (text and binary IPLs), which keeps every index and LOD link intact; game objects that were only moved or turned are changed in place.
- Texture swaps: each distinct texturing of a model becomes a copy of it with its own id, DFF, TXD (only the swapped textures, the original TXD as its parent) and collision; the pieces are cut from the game's own TXD and COL byte by byte, so the textures keep their DXT format. Textures can also be replaced in the whole map.
- Own models: import a
.dff(with.txdand.col) from files; it gets a free model id, appears in the catalog under "Own models" and goes into the mod when an object uses it. - Doors (entrances and exits): an outside marker (yellow) and an inside marker (blue) joined by the same name.
- World: the spawn point is an item like the others (the player starts there, also when a new game ends its intro, and after every death or arrest), fixed weather and fixed time of day, and radar icons.
- Game data: vehicle handling (merged into
handling.cfg), weapons (weapon.dat) at each skill level (with "apply to every level" and a reset that covers every level), view distance of a single model. Only what was changed goes into the mod. - Vehicles: tuning and paintjobs, indestructible, doors only for the player, and unique vehicles that stay where the player leaves them and come back at their place after a time when destroyed.
- Pickups and checkpoints with actions: show a message (as text or in a box, with color codes such as
~y~), heal, armour, money, weapon, maximum ammo, wanted level, teleport, give a vehicle, repair, nitro, jetpack, save the game, put fat, muscle, stamina, lung capacity, health, armour, sex appeal or respect at the most or the least, remove hunger, change skin, weather or time, or an explosion trap, optionally only once. Checkpoints are the red mission cylinder with an optional radar point (off by default) and are created only near the player. - In-game menu on pickups and checkpoints: besides the action, a pickup or checkpoint can open the game's own menu with up to 12 options chosen from the actions, each with its own settings and price. The options show in the editor language and can be renamed (only the letters and signs the game font draws are accepted).
- Installed mods follow their project: each project has a permanent id saved in its mod, so a renamed project still finds its installed mod and the mod folder is renamed to the new name. Older mods without the id are found by the name.
- NPCs: skin, animation, invulnerability, weapon with infinite ammunition (no reloading) or a chosen amount (the weapon
is thrown away when it runs out and the NPC fights with its hands), time to come back after dying, and a role:
- Neutral: stays in place and never reacts; if moved more than 0.5 m it is put back with its angle and animation.
- Protector: follows the player running (fast or normal speed), each one with its own place around him, gets into his car, and is brought next to him (all together, 3 m behind him or 10 m when he is in a vehicle, never during a cutscene or while he flies or is in the air) when far away, in another interior or stuck. The car he drives goes through the protectors on foot, and protectors and enemies swim instead of drowning. A protector riding in a vehicle with a firearm that shoots bullets (and ammunition) shoots from the car (drive by). It fights with priority over everything: the police helicopters first, then the enemy NPCs, the cops while the player is wanted and anyone shooting at the player, only what it can hit (clear line of sight), spreading over the enemies, and never the characters of the game's story unless they hurt the player. Vehicles and whoever is inside them only with a weapon that shoots and has ammunition (never destroyed ones, and tanks only with a rocket launcher), and a target it has not killed in 15 seconds is let go so it never stays stuck. It never hurts the player, and its kills count as the player's (kill statistics and wanted level).
- Enemy: attacks the player, and can follow him within 100 m (never into interiors and never teleported).
- Moving objects that go back and forth between two points (they are taken away just before the game saves, so a save has nothing of the mod).
- Scripts: everything that needs a script is generated as CLEO scripts by an assembler built into the editor, only when something needs them (CLEO is required in the game only then).
- Install and manage: install, uninstall, export as ZIP and open the folder from the editor; the list of installed mods shows up to date, out of date or without project. The folder is organized by type with a README. The editor warns when the Modloader, CLEO or an ASI loader is missing and links to where to get them.
- Import: importing a map in Singleplayer brings its objects, texture swaps and removed buildings. The objects of SA-MP are available when SA-MP is installed in the game folder: the mod brings their files, so they are mod objects.
Map and navigation
- The whole of San Andreas with streaming and LOD, water, interiors and the SA-MP objects (
SAMP.img), loaded in the background (Web Workers) and prioritizing what is in front of the camera. - Editor-style free camera: right button + drag to look,
WASDto move,E/Qto go up and down,Shift/Altfor faster / slower, middle button to slide, mouse wheel to go forward and back. - A green sign with the area name and the coordinates; click it to teleport, right click to copy the position.
- Teleport (
Ctrl+G): places and interiors with search, or any coordinate (x, y, z,x y zor aSetPlayerPos(...)line); withoutzthe camera lands on the ground. - View menu: view distance (up to 2500 m), camera speed, weather (0 to 45) and time of day shown in the editor, LOD in the distance, water, interiors only, selection box and removing the LOD together with a building.
- The "Click coordinates" field at the top of the right panel shows where the mouse is pointing, with a button to copy it and another to go there.
Objects and transformations
- Catalog with categories (Furniture, Buildings and houses, Streets and roads, Beach, Vegetation, Lighting, Doors and windows, Signs, Construction kit, Vehicles and more), source (SA-MP, Los Santos, San Fierro, Las Venturas and more), search by name or ID, favorites, nicknames, recent items and thumbnails stored on disk.
- Sharp thumbnails: drawn at 192 px with anti-aliasing and transparent, so they take the background of the theme. Old low resolution ones are shown until each one is drawn again while you browse (or all at once with the button that prepares every thumbnail).
- Hover preview: pointing at an item of the Objects list (objects, vehicles, pickups, actors...) or of the Textures list opens a big picture in the middle of the screen; it closes when the mouse leaves or on click.
- Place by clicking on the map (
R/Xrotate 15° / 90° before dropping,Shift+ click keeps placing), gizmo to move and rotate (world or object axes), movement and rotation speeds from 0.001x to 10x, grid snapping, magnetic snapping to the edges of nearby objects and the automatic snap of tracks, ramps and roads (category Tracks, ramps and roads: the tubes of SA-MP and ramps of the game join by their edges) and Auto Create, which builds tracks (roads, tubes, pipes), furnished interiors (up to 4 floors) and mazes in front of the camera. - Multiple selection with joint movement and rotation around the common center;
Ctrl+Aselects everything. - Duplicate (
Ctrl+D) and Place another one create the copy in the same spot, already with the move gizmo;Enddrops the selection on the surface,Xrotates 90°,Page Up/Page Downraise and lower. - Undo and redo for every change.
- Project list: selecting an item that exists in the world turns on the gizmo and takes the camera to it.
- Remove buildings from the original map (
RemoveBuildingForPlayer, together with the LOD) or make them editable. - Click a map object and the right panel shows its position, rotation, file and LOD, plus the list of its material indexes with the texture and the texture name of each one (5 rows visible, the rest scrolls).
Vehicles, tuning and colors
- Vehicles (
CreateVehicle/AddStaticVehicleEx) with tuning shown live in 3D (AddVehicleComponent) and paintjobs previewed on the vehicle. - Compatible tuning and paintjobs: strict filtering of tuning components, paintjobs (0 to 2) and colors following the
official SA-MP/open.mp rules (
IsModValidForVehicle,IsPaintjobValidForVehicle,IsVehicleValidForModding,IsVehicleValidForColor), showing only compatible parts in the inspector. - Palette with the 256 vehicle color IDs (including the new ones from ID 128).
Actors
- Created from the catalog with a skin gallery (all 312 skins, with categories and search) and an animation picker (the game's 135 animation libraries, with a video preview and an offline package to download).
- Actors stand upright with their feet on the surface (
CreateActor).
open.mp NPCs (controllable NPCs)
- In a Multiplayer project for open.mp (the project server, in the project panel), any actor can become a NPC
controlled by the server, using the official NPC component of open.mp (
NPC_*natives, no plugins). SA-MP projects show the option locked: the NPC component only exists in open.mp (there the NPCs are exported as actors). - Properties: player name, skin, health, armour, invulnerable, interior, virtual world, fighting style, special action, animation, weapon with ammunition, clip, infinite ammo, reloading, accuracy, shoot and reload times, clip size and the skill with the 11 weapon classes, respawn time, damage taken (multiplier), reaction to damage (nothing, fight back, flee).
- Fights: how it chases (walking, running, sprinting) and when it gives up, hand to hand strikes (normal, the special one of the fighting style or both in turns, time between strikes, reach), with a gun the shooting range, stopping to shoot or shooting while walking, where it aims (body, head, legs), time between shots and what it does out of ammo (puts the gun away and fights hand to hand, flees or keeps aiming), how it flees (along the sidewalks on foot, the roads driving, how far, how long on the alert and how long it waits before going back) and how it goes back to its place. A NPC in a vehicle gets out to fight, then walks back to its vehicle, gets in and drives on.
- Seen by the players: colour and radar icon, and a chat bubble (the game shows no name tag over a NPC).
- Behaviours: standing (with animation, looking at the player who comes close), path drawn on the 3D map (patrol or
driver, in a loop, there and back or once, by clicking the ground), route through the streets or sidewalks to a
clicked point (worked out by the editor over the official open.mp street nodes), wandering the streets on foot or
driving, free (
NPC_PlayNode, going from one area of the map to the next) or inside a radius or an area drawn on the map like a gang zone (over the streets of the place, keeping to the right lane on roads with traffic both ways, never against a one-way road, with rounded corners), guard (attacks whoever comes within range and goes back to its place), follow the player (along the sidewalks on foot, or along the roads in a vehicle, staying on the road 5 m from the player) and recordings (.rec, with the path previewed on the map). A NPC that moves can start when a player first sees it, so it is seen leaving its place. - Each point of a path can have actions on arrival: wait, animations, special action, turn, aim and shoot at a point, strike, enter, exit or be put in a vehicle, siren, landing gear, Hydra thrusters, train speed, vehicle health, weapon and weapon state, keys, push, teleport, interior, world, health, armour, skin, play a recording, wander the streets, surf, die and stop.
- Vehicles of the map as driver or passenger (siren and vehicle health) and surfing on a vehicle or an object.
- Preview in the editor (the NPC walks its path or recording at its speed) and the real test in the open.mp test
server, which compiles and runs exactly the exported code. In game,
/gravar namerecords a path (on foot or driving) and the editor imports it into the project. - The Pawn export has tables with the settings (read back by the import) and a ready routine with the OnNPC* callbacks
hooked by themselves; the import also reads NPCs written by hand (
NPC_CreateandNPC_Set*calls).
Dynamic objects
MoveObject/MoveDynamicObject: test the movement in the world (one cycle) and save its parameters.AttachObjectToObject/AttachObjectToVehicle: attach objects with direct editing of the child object's position in the world; objects attached to project vehicles are exported next to the vehicle.
3D Texts (3D Text Labels)
- Created and shown directly in 3D, billboarded towards the camera (
Create3DTextLabel/CreateDynamic3DTextLabel). - Multiple lines (
\n), embedded{RRGGBB}color codes, quick SA-MP palette and hexadecimal picker. - Draw distance (
drawDistance), line-of-sight test (testLOS), interior and virtual world.
Pickups
- Created and shown in 3D with an animated rotating mesh (
CreatePickup/CreateDynamicPickup). - Categorized catalog with the official open.mp presets: Health (1240), Armour (1242), Money (1274), Houses and Information (1272, 1273, 1239), Weapons (IDs 321 to 372) and Equipment.
- Pickup type, respawn time, interior and virtual world.
Checkpoints
- Normal checkpoints and race checkpoints (types 0 to 4) with the real 3D shapes and the arrow towards the next point
(
SetPlayerCheckpoint/CreateDynamicCPandSetPlayerRaceCheckpoint/CreateDynamicRaceCP), placed by clicking the map or in front of the camera, with size and comment.
MapIcons
- Visual editor on the radar map to create and move MapIcons (
SetPlayerMapIcon/CreateDynamicMapIcon), with the 64 official icons (IDs 0 to 63), a picker with the icon images, the four styles and the color.
GangZones (interactive radar map)
- Modal dialog with the official San Andreas radar map (-3000 to +3000) in high resolution, with pan and zoom.
- Rectangular zones drawn by dragging the mouse (
GangZoneCreateandGangZoneShowForAll); duplicate and add place the new zone in the nearest free space. - Magnetic edge snapping: automatic alignment between neighboring zones with cyan guides on screen.
- RGBA color picker with opacity and a flat 3D projection on the map ground.
3d-editorgamedevgta-sagta-san-andreasgtasalevel-editormap-editormappingmoddingopen-mpopenmppawnsa-mpsamp
Cette page est construite à partir de ce que GitHub publie sur le dépôt. samp.directory n’héberge pas le code. Signaler un problème avec cette fiche