Author Topic: Blockland Save Add-Ons Detector  (Read 8587 times)

Should make it allow you to update your enabled Add-Ons .txt (whatever it's called in prefs/server or config/server) to the set of Add-Ons listed in a save.

Can it display music files needed too?


I'm curious what happens if you quit while it's reading a save file..
I'm not too sure about this, but I think that Blockland forces all FileObjects to close the file before exiting. I can support this by opening any file, not closing it with FileObject's 'close();' method, closing the game, and then opening the file via File Explorer. It opens normally, when while I was in-game and the file was open with the FileObject, I could not open it.
Can it display music files needed too?
I could attempt to make it do that. It currently ignores events, but I can make some exceptions.
The questions I have are: does this only read for add-ons you dont have installed in your add-ons folder, or does it compare the add-ons you have on at the time of checking vs what the save file needs? Because I really need a way to compile lists of needed add-ons for several older projects I want to make into gamemodes.
It reads all UINames mentioned in the save file (currently with the exception of Events) and then checks if you have the add-on or not. If you do not have the add-on, it checks the database that it creates when you first run it for it, and if it cannot find it, will echo out the UI Name. I've already added a feature to download a list of add-ons from my pastebin, and I will add more to it if anyone would be willing to give me their database file (located in Add-Ons/Client_SaveDetector/cache/datablockSurvey.txt).
Also, is there any chance of instead of double clicking save files, there could be a button on the Saves UI? I can just imagine myself wondering why on earth my saves list will sometimes lag completely forgetting about how the mod works.
It's a bug I'm aware of and will be fixed on the next update. I don't like the idea with adding a button to the Save / Load bricks dialog, because the vanilla elements featured in those GUIs' take up all the space on the GuiWindowCtrl. I could put a button on the title bar, but that would look janky -- Please, though, if you really don't care about cluster, just say so and I'll consider replacing the double-click function with a button.

Can someone make a complete list of default datablocks so that it doesn't show them as uninstalled? I'm going to be working on  bug fixes (namely the bug that makes it read the save when you open the load bricks dialog), and maybe some new features.
« Last Edit: April 19, 2017, 11:07:09 AM by RTBARCHIVE »

If you haven't already I have a pretty large list of brick UI-Names in my old save detector here, https://www.dropbox.com/s/pg1sm49sad7lg3p/Client_BrickDatabase.zip?dl=0 .
You could marge the list into your mod to make it more complete, it's located at Client_BrickDatabase\DB_u.txt and is in a format like so.
Code: [Select]
Add-on Name
UI-Names

Version 1.0.1
Code: [Select]
+ Added a GUI
+ Added internet database support
+ Added a button on the escape menu to get to the Save Detector's GUI
+ Added a check to initSaveCheckerDatabase() - You can no longer generate the database file while you are not hosting a server. (Issues with isValidAddon() and similar functions)
+ Added a confirmation message when you attempt to load a build that is more than 100k bricks
+ Tweaked the detection system a bit
+ surveyDatablock() now saves any datablock defined with the class 'AudioProfile', since they have no UINames
+ Cleaned up the notification box telling you that you need to generate a database
+ The save detector now detects music, vehicles, sound files (playSound), and datablock events (changeDatablock)
+ If you click on an addon in the addon list that you dont have, you will get the option to search for it on Blockland Glass. (You require Blockland Glass for this feature to work).
- Removed load bricks gui's feature that allows you to double-click on saves to get their info
Pic of the GUI is in the OP

If you haven't already I have a pretty large list of brick UI-Names in my old save detector here, https://www.dropbox.com/s/pg1sm49sad7lg3p/Client_BrickDatabase.zip?dl=0 .
You could marge the list into your mod to make it more complete, it's located at Client_BrickDatabase\DB_u.txt and is in a format like so.
Code: [Select]
Add-on Name
UI-Names
I require the datablock name in my database, so simply implementing this list won't work. But, I can probably make a script that finds the datablock associated with the uiname (only for the default things on the list) and then convert it to my format so that I can finally fix the default datablocks that show up as not installed. Thanks!

A lot of people off of the forum are asking why I did this when an add-on already exists for it. Well, if you haven't noticed, Pah1023's save detector only detects bricks, whereas mine detects lights, bricks, music, emitters, etc. They are not the same add-on, although we do share very similar ideas. I didn't even know Pah1023's save detector add-on existed before Crown posted about it.
« Last Edit: April 21, 2017, 12:14:27 AM by RTBARCHIVE »

Should make it allow you to update your enabled Add-Ons .txt (whatever it's called in prefs/server or config/server) to the set of Add-Ons listed in a save.
Boop.