Kivo Spawn Examples
Example: a five location selector
Section titled “Example: a five location selector”Config.spawnlocations = { { id = 'beach', coords = vector4(-1411.59, -1241.65, 4.40, 12.28), img = 'images/beach.png', name = 'Vespucci Beach', description = 'Relax by the shore.', temperature = '32C', wind = 'Light', weather = 'sunny', spawnfunction = 'default', }, { id = 'legion', coords = vector4(-269.4, -955.3, 31.2, 205.0), img = '', name = 'Legion Square', description = 'The middle of the city.', temperature = '28C', wind = 'Calm', weather = 'clear', spawnfunction = 'default', }, { id = 'junkyard', coords = vector4(1086.21, -2328.31, 31.30, 236.89), img = '', name = 'Junk Yard', description = 'Quiet and out of the way.', temperature = '30C', wind = 'Light', weather = 'overcast', spawnfunction = 'default', }, -- add two more entries in the same shape}The image file images/beach.png must exist in the resource’s html/images/ folder. Locations with img = '' use the default image.
Example: keep a fixed order and no Last Location card
Section titled “Example: keep a fixed order and no Last Location card”Config.spawnbehavior.allowLastSpawnLocation = falseConfig.lastSpawnThread = falsePlayers always pick from your list. Turning off lastSpawnThread also stops the position recording that feeds the Last Location card.
Example: higher or lower overhead camera
Section titled “Example: higher or lower overhead camera”The hub height is the z value. Raise it for a wider view, lower it for a closer one.
Config.spawnbehavior.hub = { coords = vector3(-269.0, -955.0, 500.0), rot = vector3(-90.0, 0.0, 0.0),}Each location view uses the same height and rotation as the hub, so one change affects the whole selector.
Example: slower or faster camera reaction
Section titled “Example: slower or faster camera reaction”Config.spawnbehavior.cameraHoverDelay = 300 -- wait longer before the camera follows the mouseExample: skip the selector for new characters outside the suite
Section titled “Example: skip the selector for new characters outside the suite”Config.newCharSkipSelector works when another script fires the hand-off event with isNew = true. Kivo Multichar never does, so it has no effect in the suite.
Config.newCharSkipSelector = trueConfig.defaultSpawn = vector4(-269.4, -955.3, 31.2, 205.0)Example: reopen the selector later
Section titled “Example: reopen the selector later”RegisterCommand('respawnmenu', function() exports['kivo-spawn']:openSpawnUI()end, false)Edge cases
Section titled “Edge cases”| Situation | What to expect |
|---|---|
| Kivo Multichar is not started | Kivo Spawn opens by itself when your framework reports the character as loaded. |
Kivo Multichar is started but Config.spawnSelector is 'default' |
Kivo Spawn waits for a hand-off that never comes and stays idle. |
| Kivo Multichar folder renamed | No effect. Kivo Spawn finds Multichar by the name Multichar announces when it starts. |
| New character in the suite | Multichar places the character itself. The selector is not shown. |
New character from another script, isNew = true, newCharSkipSelector = false |
The selector opens, without a Last Location card. |
Location without coords |
The entry is ignored. |
Two locations with the same id |
They are not told apart. Give each location its own id. |
| ESX | Keep spawnmanager started. Kivo Spawn switches off its automatic spawn. |
| QBCore or QBX | spawnmanager may stay started. Kivo Spawn switches off its automatic spawn. |
| No framework detected and no Multichar | The selector opens by itself shortly after the resource starts, which is useful for a demo. |
Troubleshooting
Section titled “Troubleshooting”-
A white screen covers the game.
- Fixed in 1.5.0. Update Kivo Spawn to the current version.
-
Player stuck on the loading screen.
- Make sure your loading screen resource shuts down once the player session starts, before the hand-off event fires.
- Some setups use
setr loadscreen:externalShutdown "false"inserver.cfgas a workaround.
-
The player spawns at the wrong place.
- Use a
vector4with a heading for every location. - Check that the selected location is the one you expect. Two locations with the same
idclash.
- Use a
-
The camera stays stuck after a location is chosen.
- A custom spawn function returned data without
coords. Base it onSpawnFunctions.defaultas shown on Exports and integration.
- A custom spawn function returned data without
-
The selector never opens.
- Kivo Spawn is not started, or Multichar’s
Config.spawnSelectoris not'kivo-spawn'. - Set
Config.debug = trueand read the client console (F8). Kivo Spawn prints which mode it started in.
- Kivo Spawn is not started, or Multichar’s
-
The Last Location card never appears.
Config.spawnbehavior.allowLastSpawnLocationisfalse, orConfig.lastSpawnThreadisfalse, or the character has not played since you turned recording on. A brand-new character has no last location.
-
A location card shows a blank image.
- The
imgpath is wrong. Useimages/<file name>and place the file inhtml/images/.
- The
-
I cannot find coordinates for my locations.
Checklist
Section titled “Checklist”- Other spawn selectors that open by themselves removed
- Locations configured with
id,coordsandname - Hub camera positioned
-
kivo-spawnloads after your framework - Tested with a fresh and a returning character
