• Welcome to SC4 Devotion Forum Archives.

DATpacking the Network Addon Mod, the Official Way!

Started by LucarioBoricua, December 10, 2021, 06:57:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LucarioBoricua

 :sunny: Hello to all my fellow Mayors and Devotees of SimCity 4!! :sunny:


Today I'll be explaining how to DATpack the Network Addon Mod with an official step-by-step guide. Over the years, the NAM has become both one of the largest mods for SimCity 4 and arguably the most important and widespread of them all. As such, it has an enormous impact on gameplay outcomes, gameplay options, and yes, a detrimental effect on the game's performance! DATpacking the NAM has essentially become a necessity to improve the game's performance by reducing the number of individual files the game must load from the Plugins folder, reducing the game's start-up time, first city loading time, menu loading time, and the transition time between the data views.


A. Necessary Files and Requirements


Latest version of the Network Addon Mod, at the time of this writing, Version 42 is the one available and officially supported. This tutorial is applicable to all the Java installer versions of the NAM (version 37 onwards).

https://www.sc4devotion.com/csxlex/lex_filedesc.php?lotGET=851




Select a DATpacking program of your choice (use only 1):



1. Wouannagaine's SC4 DATPacker, NHP Productions: the simpler of the DATpacking programs and the basis of this tutorial. Downloading requires an account in the SC4 Devotion Lot Exchange (LEX). This version works well only on Windows operating systems. Link provided below.

https://www.sc4devotion.com/csxlex/lex_filedesc.php?lotGET=26



2. Memo's JDATpacker: the other major DATpacking program, this Java-based application provides cross-platform support, and as such, is the version recommended for Mac and Linux players. Downloading requires an account in the SC4 Devotion Lot Exchange (LEX). Link to program and to support thread provided below.

https://www.sc4devotion.com/csxlex/lex_filedesc.php?lotGET=3140

https://www.sc4devotion.com/forums/index.php?topic=16500.0



If you are new to DATpacking mods and custom content for SimCity 4, make sure to follow the ReadMe files to set up the DATpacking application before proceeding with this tutorial.


The next posts will contain the tutorial proper:

LucarioBoricua

B. File Organization before DATpacking


Make sure to follow the file organization provided here, which ensures the different components of the mod load in the correct order. This also allows auxiliary NAM support programs, such as the Traffic Simulator Configuration Tool, as well as patch files, to load correctly.


1. Create a temporary Plugins folder for use with DATpacking. To do so, first re-name your gameplay Plugins to something else, and then create a new folder named Plugins. This helps keeps your files organize and facilitates selecting folders during the packing process.


2. Install the Network Addon Mod. Make sure to carefully select any and all options you want (and de-select those you don't!).





3. Let the installation run until reaching completion. The installation will appear on a folder named Network Addon Mod.






4. Create a second folder which specifies that the files are DATpacked. I named mine "NAM 42 RHD US - DATPacked", as I keep more than one packed installation available, depending on what I need to do. Typical players will only need 1 packed version in most cases.







5. Open your NAM installation folder, and then open the 2 Additional Network Features folder. You'll see several folders containing the various families of NAM features. Right-click on each folder and add the number 2 before its name, and do this for all the folders found here.







6. Once done re-naming the folders inside 2 Additional Network Features, select them all and move them (cut, then paste) to the root Plugins folder.









7. After moving the now numbered folders, delete the now-empty 2 Additional Network Features folder.


LucarioBoricua

C. The DATpacking Process


Note: This part was written based on Wouannagaine's SC4 DATpacker:



8. Open your DATpacking program and wait for it to load:





9. Once loaded, you should see a list of the folders contained within your default Plugins folder. The program will pack all the relevant files contained within a particular selected folder.

 



10. Select the numbered files forming part of the NAM installation, in this case we'll do so for files going from number 1 Core to number 8 Texture and Drive Side Support. Do not select 9 Traffic Simulator if you intend to modify these files through the Traffic Simulator Configuration Tool. Once selected, click on Start, and the program will DATpack the contents following the parameters specified.







11. Check that all the correct files were packed by opening the Plugins_Compressed folder (or any other target directory, if different). For a full standard NAM installation, you should have 11 files with the number 2, and all the numbers going from 1 to 8.




LucarioBoricua

D. File Organization After DATpacking

12. Move the packed files from Plugins_Compressed to your destination file for the DATpacked NAM. Do this as a cut and paste operation.









13. Now go back to the root Plugins folder, and search for the folders which weren't packed. Following this procedure, they would be 9 Traffic Simulator and z_NAM Controller. Move them to your DATpacked NAM folder:







14. Your DATpacked NAM should look this way. Make sure no files are missing:





15. Delete the unpacked folders remaining in the root Plugins directory, except for your original NAM installation files. It is strongly advised to keep the latter in a back-up location, ideally in a different drive to the one containing your SimCity 4 installation.





16. Move the original NAM installation files to your back-up location of choice. These backed-up files can be used if you ever have problems with the NAM installation, want to modify it, or if there were issues with the DATpacked files.





17. (Optional) Re-name your DATpacked NAM folder to Network Addon Mod. This step is recommended if you intend to use the Traffic Simulator Configuration Tool, which will automatically search for your Network Addon Mod installation folder.





18. (Required) Once all the files are ready and re-organized, copy your DATpacked NAM to your gameplay Plugins folder, and then change the names of the respective Plugins folders. Your gameplay Plugins should revert to Plugins, and your DATpacking Plugins folder should use a different name.

Make sure there are no other NAM installation files in your gameplay Plugins, otherwise you won't get the loading time benefits and will get duplicate entries in the transportation menus in-game.


LucarioBoricua

#4
E. Final Remarks on the Subject



In the past, the NAM Team advised against DATpacking for two reasons:

1. When the Network Addon Mod adopted the modular distribution (NAM 21 to 30), DATpacking was a new advancement in SimCity 4 modding, and unfortunately coincided with some bugs associated to this file architecture, among them the infamous "red arrow" bug. On top of this, a common error which occurred frequently at this time, and which all users should avoid, was not deleting the DATpacked files of older versions when updating to the new version. Make sure to delete the DATpacked NAM files before installing the next version. This avoids carrying old bugs into the new installation, in addition to the duplicate menu items and wasting space in Plugins.

2. When the Network Addon Mod was monolithic and installed with the NSIS .exe installer (NAM 31 to 36), the mod was substantially smaller and thus didn't have as many individual files. Performance gains from DATpacking were not as significant, but between the late NSIS-era installer days (NAM 36) and today (NAM 42), with large size increases of the mod observed in NAM 37, 40 and 42. Additionally, the more frequent incidence of critical bugs meant that technical support provided by the NAM team required preserving the installer's provided file architecture to ensure correct loading order of the patches.


The file architecture of the Java installer's output (applicable since NAM 37) includes numerous sub-folders and loose files. This is preferable for development, testing and de-bugging purposes. The downside is the number of files grows too much and the game spends a lot more time loading them. This is further aggravated by the ever-growing number of mods and custom content players have at their disposal, which can result in unbearably long loading times for the game, the cities and the menus. Additionally, Mac installations are limited in the number of custom files they can load from Plugins, making it a necessity to pack the files to stay below the limit.

DATPacking is still recommended for players with the latest hardware, especially solid-state drives (SSDs). Even if these shorten considerably the game's loading times, it's still possible to get performance gains by providing fewer files for the game to load.



When requesting technical support for DATpacked NAM installations, make sure that there are no duplicate files (DATpacked and unpacked alike) and that you're following the recommended file architecture for DATpacking the mod.



;D  And finally, please enjoy the shortened loading times with your DATpacked NAM, make use of that saved time to use more of our latest transportation goodies!!  :clap: