Sim City 4 Devotion Forums

SimCity 4 Devotion Welcome Portal => LEX File Exchange Discussion => LEX Development Centre => Topic started by: CasperVg on June 12, 2014, 01:10:27 PM

Title: LEX Dependency Tracker Instructions
Post by: CasperVg on June 12, 2014, 01:10:27 PM
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:

(http://i.imgur.com/kriqTLV.png)

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:
Code: [Select]
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:
Code: [Select]
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:

Code: [Select]
_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:

Code: [Select]
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.

Code: [Select]
[email protected]_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:

Code: [Select]
Pitt Street [email protected]://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:

Code: [Select]
Pitt Street Apartments#Only the .SC4Model files are [email protected]://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 [email protected]://descargas.capitalsim.net/?sitio=csc&descarga=925

Which looks like this in the form field:
(http://i.imgur.com/5uWzEj6.png)

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, 11: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 [email protected]?
Title: Re: LEX Dependency Tracker Instructions
Post by: CasperVg on June 13, 2014, 11: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, 12:05:40 PM
Nicely presented mini tutorial, good work Casper!  &apls
Title: Re: LEX Dependency Tracker Instructions
Post by: CasperVg on September 15, 2018, 02: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, 09: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, 11: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, 12:48:32 PM
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, 03:46:21 PM
Nice one! :thumbsup: