Explanation: What is global_classnames.sqf (UPDATE: File no longer used in 2.1.0+)

Status
Not open for further replies.

Buttface

OpenDayZ Rockstar!
NOTICE: The global_classnames.sqf file no longer exists in DZAI 2.1.0 onwards. It is now integrated with dzai_config.sqf.

Where it is:


For those who do not know, the file I'm referring to is in DZAI\init\world_classname_configs\global_classnames.sqf

What it is:

This file is the foundation of the all the classnames used by DZAI to generate AI equipment and loot. All classnames in this file exist in just about every DayZ mod out there, so there is little chance of invalid or banned classnames being loaded (the chance is still there, just minimized).

What is its purpose:

For example, if I dumped all of the classnames (weapons, skins, etc.) from every DayZ mod into this file, DZAI would be theoretically compatible with every DayZ mod with just this single file, but DZAI's classname verification script would have to examine every classname and throw out the unusable ones. Basically a waste of processing time during server startup, and DZAI just became unusable if you ever happened to disable the classname verification process.

The solution? Keep a foundation of classnames that are most compatible with every single DayZ mod and load additional classnames specific to each DayZ mod (ie: Epoch, Overwatch, etc.) as they are needed.

Why other classname config files are needed:

If you check out the world_classname_configs folder, you'll see other subfolders named according to different maps, such as Chernarus, Taviana, Lingor, etc. Because DayZ Epoch is a mod that is cross-compatible with almost every Arma2 map, it gets its own folder.

Ignoring the Epoch folder for a moment, each folder named after a map contains one or more config files for different DayZ mods that DZAI supports. If DZAI detects the mod on loading, it will read the config files specific to that DayZ mod. Now you have the best of both worlds - cross-compatibility with every DayZ mod and specialized support for mod-specific classnames.

These config files hold additional classnames for things such as more AI-usable weapons, skins, loot, etc. This organizational method lets you install DZAI into multiple servers by using an existing DZAI installation - you can just copy the DZAI folder from one dayz_server.pbo to another and it will work, no need to download it again and reconfigure unless you want to.


What this means to you as the server admin:

All of these benefits also have a small cost - whenever you want to remove classnames, there are two files that you may have to edit: global_classnames.sqf (the primary config file) and the secondary config file specific to your map/mod.

For example:

  • DayZ Epoch: \default\global_classnames.sqf and \epoch\dayz_epoch.sqf
  • DayZ Overwatch: \default\global_classnames.sqf and \chernarus\dayz_overwatch.sqf
  • DayZ Namalsk: \default\global_classnames.sqf and \namalsk\default.sqf
  • DayZ mod: \default\global_classnames.sqf and \chernarus\default.sqf
Therefore, if you want AI to only use a certain type of skin, you will need to ensure that both files are edited to remove the unwanted skin classnames.

You may also notice the function DZAI_append called in several of these config files. What this function does is add ("append") additional classnames to an existing classname table - not replace them. If you only edit the classnames inside a DZAI_append call, you're only changing what is added to the classnames in global_classnames.sqf, not redefining the entire array.

For example, if in dayz_epoch.sqf I have this (HYPOTHETICAL SCENARIO):

Code:
DZAI_BanditTypes = [BanditTypes ,["Survivor","Bandit","Hero"]] call DZAI_append;

If I want to use Bandit skins only and nothing else, I would not simply delete Survivor and Hero because I may still have classnames in global_classnames.sqf that are being loaded. I have two options here:

1. Edit both global_classnames.sqf and dayz_epoch.sqf to remove the unwanted classnames.
2. Redefine DZAI_BanditTypes completely in dayz_epoch.sqf like this:


Code:
DZAI_BanditTypes = ["Bandit"];

This would completely overwrite the value of DZAI_BanditTypes in global_classnames.sqf as opposed to adding onto it, thereby saving me the effort of editing two files.
 
The file path and the name of default_classnames.sqf will change in the upcoming update.

Old: DZAI\init\world_classname_configs\default\default_classnames.sqf

New: DZAI\init\world_classname_configs\global_classnames.sqf

Hopefully this will make the process feel more intuitive since the global classnames file won't be hidden away in a folder like the other map/mod classname config files.
 
Status
Not open for further replies.
Back
Top