Garry's Mod

Garry's Mod

267 betyg
Global Persistence
2
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
Filstorlek
Lades upp
Uppdaterades
7.233 KB
2 jul, 2016 @ 8:56
26 dec, 2020 @ 9:42
4 ändringsnotiser ( visa )

Abonnera för att ladda ner
Global Persistence

Beskrivning
Global Persistence
This makes the Sandbox persistence system (right click -> persist) work in other gamemodes so you can easily save custom maps using built-in gmod functions.

To use it simply load up a map in Sandbox, make some props persistent and then go to your gamemode of choice.

Features
  • Super simple saving system
  • Prevent map cleanups deleting your saved props
  • Prevent the game from saving changes to your props after each round
  • Use some entities in other gamemodes (eg balloons in TTT)

How to use
  1. Open your map in sandbox
  2. Set the sbox_persist cvar to a value (eg "myserver")
  3. Spawn some props
  4. Right click on each prop and choose "Make Persistent"
  5. (optional) Run sbox_persist_save in console
  6. You're done!

Limitations
  • Not every entity will work outside of Sandbox. I've ported a few things like lamps and balloons but I didn't bother with things like buttons that wouldn't work anyway.
  • This will not automatically make sandbox addons work in TTT. I did a brief test and wiremod seemed to work, but each addon needs to be changed to work properly.

Convars
  • sbox_persist - Chooses what file to save/load to.
  • sbox_persist_cleanup - If set to 1, all your persisted props will respawn after map cleanups
  • sbox_persist_autosave - By default Sandbox saves the state of everything every time the server changes level. If you set this to 0, that behaviour is disabled and you will need to run sbox_persist_save each time you want to update your persisted props.

Useful Links
Github[github.com]
Populära diskussioner Visa alla (4)
4
2 apr, 2023 @ 5:27
Server restarts wipes everything clean.
Jeddalo
3
24 mar, 2019 @ 12:21
Restart and map change
chesiren
0
3 jul @ 19:08
Server restarts wipes the file clean for some reason
Arieson
19 kommentarer
>KB> >KEKSQUAD 24 jun, 2024 @ 20:34 
[Global Persistence] gamemodes/sandbox/gamemode/persistence.lua:46: attempt to concatenate local 'name' (a nil value)
1. oldLoad - gamemodes/sandbox/gamemode/persistence.lua:46
2. unknown - lua/autorun/server/globalpersist.lua:85
Timer Failed! [sbox_persist_load_timer][@lua/autorun/server/globalpersist.lua (line 89)]

Happens when calling PersistenceLoad via Lua
>KB> >KEKSQUAD 29 feb, 2024 @ 15:47 
Couldn't include file 'sandbox/entities/entities/gmod_winch_controller.lua' - File not found or is empty (@lua/autorun/globalpersist.lua (line 33))
1. setupEntity - lua/autorun/globalpersist.lua:33
2. fn - lua/autorun/globalpersist.lua:68
3. unknown - lua/ulib/shared/hook.lua:109
SeRoZa-TaRtEk 7 mar, 2021 @ 5:55 
Класс
Lexi  [skapare] 26 dec, 2020 @ 9:44 
Hi all, while trying to fix a weird bug causing double spawns I ended up rewriting the entire tool.

It now supports saving way more things, including NPCs, ragdolls and lamps! (Vehicles are currently bugged and will work next gmod update)

There's more info in the updated description, and as ever if you run into any bugs please tell me so I can fix them!
Lexi  [skapare] 23 sep, 2020 @ 10:43 
Hi, sorry for the delay in getting back to you. Can you try making a single prop persist without using permaprops, and also try without permaprops entirely.

Other than that, I'm assuming your problem is that the platforms just don't show up?
Can you confirm
- Which platforms you mean (I assume mine but need to check)
- What gamemode you want to spawn them in
- If you have any other addons installed that might be related?
- If the platforms spawn correctly when you go back to sandbox
Nebbs 16 sep, 2020 @ 11:34 
I have sbox_persist set to "1" in my server.cfg file. I don't use Global Persistence for anything else, as I just use PermaProps for props.
Lexi  [skapare] 16 sep, 2020 @ 11:20 
You have sbox_persist set to something yes? Is your problem that they don't spawn when other props do, or something else?
Nebbs 15 sep, 2020 @ 20:22 
i'm having problems with getting platforms to persist through server restarts. any tips?
Lexi  [skapare] 26 jun, 2020 @ 13:53 
It's still there for me, but you need to have set sbox_persist to something for it to show up. Unless Falco removed it from DarkRP or something?
HDMineFace 22 jun, 2020 @ 18:10 
For some reason, right clicking to make persistant has been removed from the game, installing this to hope it fixes it/re-adds it