• Welcome to SC4 Devotion Forum Archives.

The Ultimate Dependency Solution

Started by robproctor83, October 21, 2014, 08:51:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

robproctor83

Hello everyone,

I would like to discuss the possibility of creating a solution to the problem of dependency management. I am a programmer, mainly web applications, and have a couple ideas on how to solve this once and for all. LEX is great, it actually has a pretty decent dependency tracker built in. It does not however interact with your actual plugin directory, so you still must manage everything manually. Wouldn't it be nice if you could just install whatever mods you wanted and then click a button and the system would find, install and update all dependencies automatically? With the help of the LEX, modders and the community I think it could be done.

With the advent of new technologies in HTML 5 it is possible for a web application to read your local computer files. The way I am thinking it would work is you would visit a webpage in your browser and then using something like Windows Explorer you would drag the plugins folder from your computer onto the website. The website can then read the folder and give information about all of the files within your plugin directory. This is where something like LEX comes in, because in order for something like this to work there needs to be a database somewhere that connects the pieces together. LEX already has a dependency tracker setup for mods, so theoretically it would be possible to automate the entire dependency experience.

Even if you have renamed and reorganized the dependencies it shouldn't be a problem as long as you haven't actually edited the contents of the files. Each file will need to have a checksum created for it, a checksum is basically a unique id each file has automatically based on it's total byte size. So, by comparing the checksums of the files in your plugins directory to those of the files on LEX it should be possible to see which mods and plugins a user has installed... But that is assuming that all the files are stored on the LEX. Any custom plugins, or files not within the LEX wouldn't be found by the system.... Unless the authors of these other mod databases were willing to share their data as well, or maybe they could install this app on their site as well.

The thing is, I would be willing to build this, I am pretty sure I could build this, but I'm not sure really if I would see it through. I do this kind of stuff professionally, all day, every day, and in my off hours I don't always feel like programming :P I have a deep love for SC4, but I also would love to find a modern game to replace it with. Building something like this would be a pretty big project, and I would hate to think of spending countless hours of my life building it only for SC4 to fade in the shadow of it's successor. Like so many I  had hoped for SC13 to replace it, but it honestly didn't come close. Now there is the new Cities: Skylines coming out and while it looks promising Paradox has been known to drop the ball just as bad.

So anyways, I would like to get some discussion going about this if anyone is interested. Basically what you guys think, and if you think there are any serious problems to this idea. To the owner/admin of the LEX, if you happen to be reading this, I wouldn't imagine you just giving me access to the database or anything, but it would make my life a million times easier if you could provide me with just a static copy of the database. What is it, MySQL? I notice that LEX is PHP. The system I am talking about would be mostly done in Javascript so it could live anywhere, but the whole database interaction part would likely be done in PHP.

Alright, well, thanks for reading, let me go fill out this ridiculous verification system below now :) Cya!

Durfsurn

This is an interesting take on the dependancy issue. From what I gather you need a database of all plugins currently on the LEX (or otherwise) to build a program to reference what is in ones plugins folder, to scan that, and then find all the missing dependancies. You would have to make sure the database has entries for all the .dats, .sc4... whatever's because .exe's install lots of things not in raw form in a .zip. With the mad advancements with the dependacy tracking this could come to life. It would need intergration with the LEX for downloads for other dependancies but you could have an option like with the current dep. tracker, to package it all in one and credit the DL numbers to each page. I would talk to CasperVg who I believe is at the forefront of LEX development.

Other than that I'm not sure how much I can help. This does look like a promising venture though. I'm not an admin or anything here so anything I say may be wrong (or I interpreted it wrong) but that's just my two cents.

Good luck,
Billy

memo

#2
You, Sir, have my attention!


Being a web-app noob, I can't say much more though, so let's see what Casper has to say.


Edit: Just one thought – instead of identifying files by checksum, identifying by TGIs might work out better, as the important part is the existence of a dependent TGI, not that the object referenced by a particular TGI is unchanged, i.e. identical to the version on the LEX. This would allow users to tweak properties, replace textures, scale models etc., which I think is more or less common. Of course, this is only a minor aspect compared to the question how everything else would work.

catty

Quote from: memo on October 21, 2014, 11:27:42 PM
...identifying by TGIs might work out better, as the important part is the existence of a dependent TGI, not that the object referenced by a particular TGI is unchanged, i.e. identical to the version on the LEX....

This is what the SC4DataNode look at in your plugin folder

http://community.simtropolis.com/files/file/27675-sc4datanode/

QuoteThe program supports four main Tasks
1. Audit/Review of Loading Sequence, file redundancies and Overrides
2. Dependency verification (as many as possible)
3. Audit/Review of
a. SC4 file integrity (.dat etc) and
b. TGI file content integrity (Exemplars etc) to the Property Level
4. Exploration - a really good informative display of Exemplar Property Values and file contents so that one can learn something of how SC4 works.

If CasperVG doesn't spot this topic I'll point it out to him, but I think he's quite busy with RL stuff

-catty
I meant," said Ipslore bitterly, "what is there in this world that truly makes living worthwhile?" DEATH thought about it. "CATS," he said eventually, "CATS ARE NICE.

MandelSoft

There is only one thing that can spoil the party greatly: what to do with dependencies hosted on other sites, like the STEX or PLEX? This is also a limit to the current dependency tracker. It's something to think about...
Lurk mode: ACTIVE