Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Glad you found this directory, if you have any other questions feel free to ask.
I added you as a friend so you can access the addon with this system. You can extract the code from the gma file yourself or I can send it to you any other way.
If there are any problems or questions, write to private messages or this forum
[MapPatcherDataTest] lua/autorun/init.lua:20: attempt to index local 'f' (a nil value)
1. unknown - lua/autorun/init.lua:20
extracted it and referenced the path directly with the "MOD" search path instead of the addon name, and it did print but didn't copy the dat file into mappatcher_enhanced. srry if i messed something up, i usually only work with Luau
How to make your own addon with your .dat files:
1. Extract my addon code, delete the test file in the addon directory /data_static/maps/gm_flatgrass.dat, then upload your files to the same directory.
2. Set the title in the addon.json file with the name of your future addon.
3. Edit the file /lua/autorun/init.lua, write the title of your addon in the addonTitle variable:
(Files will be written to the /data/mappatcher_enhanced directory when user joins a server (singleplayer or multiplayer)
Be careful, if you change the title on the workshop page, you will need to change the addonTitle variable too.
Feel free to ask any questions if you have them
For example: I subscribed to your addon, started a singleplayer map, and the file /data/mappatcher_enhanced/gm_flatgrass.dat was created. Then you updated the addon with a newer gm_flatgrass.dat file, the addon will not overwrite my local gm_flatgrass.dat file with your new file.
There are a couple ways to solve this situation, please let me know if this is an issue for you.
Either way there could be rare cases where it deletes the user's mpe dat files that aren't related to my addon.
It's a little too much for my smooth brain to comprehend rn so I'm hoping that including some warnings in the addon description about potential issues like this will suffice
But if there was a way to know that the user didn't edit the save locally, you could automatically update the .dat file, I think users wouldn't mind it.
You only have to go through all timestamps of a map and if the modify timestamp* of the user's file is not equal to timestamp of any version, then the user has edited the file.
(Don't forget to convert json timestamps to numbers)
(Of course, you will have to change the version file every addon update, but the system should work).
How do you like the idea? I am waiting for your feedback :)
* Use http://wiki.facepunch.com/gmod/file.Time to get file's modify timestamp in unix time