SC4 Devotion Forum Archives

SC4Evermore Welcome Portal => LEX File Exchange Discussion => LEX Development Centre => Topic started by: CasperVg on June 12, 2014, 11:10:27 AM

Title: LEX Dependency Tracker Instructions
Post by: CasperVg on June 12, 2014, 11:10:27 AM
The much-delayed mini-tutorial on creating LEX Dependency Tracker lists is finally here! In case you don't know what I'm talking about - it's this section of the LEX Upload and LEX Edit forms:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FkriqTLV.png&hash=b3214df7c52c87440f21b5e3c8de0de6132332b8)

Basically, it works like this:

Dependencies on the SC4D LEX:
Add the LotID of the dependency to the list. The LotID is the number after ?lotGET=XXX in a LEX url.

Add this:

LOTID$


So, for example, if you want to add Vnaoned's Saint Croix Church (
http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2985 ) to your list of dependencies..

Add this:

2985$


The dollar-sign is used as a separator between each entry, much like a comma would be in a sentence.

Pretty simple, right? The LEX software will do all the hard work for you (fetching the lot name, author, upload dates, and so on).

If you do not want the dependency tracker to recursively add the dependencies from the file that you listed as a dependency, prefix the LEX identifier with an underscore (_). So, it would look like this:


_2985$


If you want to add a comment describing why this file was included as a dependency, or which files specifically need to be installed (e.g. only the .SC4Model files), you can suffix the identifier with a number sign/hash sign/hashmark (#) and the comment to be displayed, for example:


2985#Only the .SC4Model files are required!


Dependencies that are not on the SC4D LEX
The process is a little more complicated for dependencies that are not on the LEX. Because we don't have direct access to those files, we don't know the filenames automatically, nor the actual links. So you have to add both as an entry.


LOTNAME@LINK_TO_DEPENDENCY$


Where LOTNAME is the name of the dependency, and LINK_TO_DEPENDENCY is a hyperlink to the dependency download page.

For example, if you want to add Pitt Street Apartments (which is on the STEX) as a dependency, add this to the dependency tracker line:


Pitt Street Apartments@http://community.simtropolis.com/files/file/28893-pitt-street-apartments/$


If you want to add a comment describing why this file was included as a dependency, or which files specifically need to be installed (e.g. only the .SC4Model files), you can suffix the name of the offsite file with a number sign/hash sign/hashmark (#) and the comment to be displayed. The comment may not contain any '@' signs, as that would interfere with the link. For example:


Pitt Street Apartments#Only the .SC4Model files are required!@http://community.simtropolis.com/files/file/28893-pitt-street-apartments/$



What if my lot has no dependencies at all?
Then it's really simple. Either add "NONE" to the dependency list, or leave it blank.

How about a real life example?
Okay, sure. Let's take the ITC Embassy (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2223). That lot has 7 dependencies, 6 on the LEX and 1 on CapitalSim.


All this condenses into the following LEX Dependency Tracker list:

101$403$1180$746$556$443$2324#Needed for queries$Embajada Official de Atlantis#You only need the .SC4Model file!@http://descargas.capitalsim.net/?sitio=csc&descarga=925

Which looks like this in the form field:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F5uWzEj6.png&hash=699c70bba5d0c803bdbcc068193b09c2b419e87b)

and like this in the Dependency Tracker:
(https://i.imgur.com/bWeYhwc.png)




I hope this tutorial has been helpful. Feel free to ask question if something is not clear enough :)
Title: Re: LEX Dependency Tracker Instructions
Post by: JoeST on June 13, 2014, 09:29:32 AM
is there a reason this has to be $-separated and all on a single line? would it not be more sensible to make it a multiline field where each line is either number or text@link?
Title: Re: LEX Dependency Tracker Instructions
Post by: CasperVg on June 13, 2014, 09:41:42 AM
No particular reason. It just turned out to be a bit easier to explode() the list on '$' than on newlines, which could be \n, \r\n, etc. Since $ cannot appear in URLs, it seemed like a good choice at the time
Title: Re: LEX Dependency Tracker Instructions
Post by: vortext on June 13, 2014, 10:05:40 AM
Nicely presented mini tutorial, good work Casper!  &apls
Title: Re: LEX Dependency Tracker Instructions
Post by: CasperVg on September 15, 2018, 12:37:51 AM
Some extra functionality was added to the Dependency Tracker today, allowing you to specify that certain dependencies should not be recursively analysed (so their dependencies are not added to your list) and allowing you to add some comments as to why a certain file is included in the dependency list, or to specify what exactly is needed (e.g. only .SC4Model files or a specific .dat file).

The tutorial has been updated to add these changes.
Title: Re: LEX Dependency Tracker Instructions
Post by: matias93 on September 15, 2018, 07:17:35 AM
Wow, great addition!  &apls
Would it be possible to implement, for end-users, a manual system to mark third-party files as already downloaded? That would come in handy when checking dependencies while downloading them from different sites.
Another cool feature would be the option to wipe clean the list of downloaded files, in case one has lost their old files or is trying to rebuild their own library.
Title: Re: LEX Dependency Tracker Instructions
Post by: Simmer2 on September 15, 2018, 09:25:04 AM
Thank you Casper &apls

The reason I asked that question over at Discord is because I use the non seasonal modded props from Girafe's uploads therefore the recursive dependency was really not necessary.
The underscore trick does the...trick! :D

Simmer2
Title: Re: LEX Dependency Tracker Instructions
Post by: Tyberius06 on September 15, 2018, 10:48:32 AM
Thank you very much Casper! It's amazing!  &apls &apls &apls

- Tyberius
Title: Re: LEX Dependency Tracker Instructions
Post by: mattb325 on September 17, 2018, 01:46:21 PM
Nice one! :thumbsup: