<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://eternity.youfailit.net/index.php?action=history&amp;feed=atom&amp;title=ACS_libraries</id>
	<title>ACS libraries - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://eternity.youfailit.net/index.php?action=history&amp;feed=atom&amp;title=ACS_libraries"/>
	<link rel="alternate" type="text/html" href="https://eternity.youfailit.net/index.php?title=ACS_libraries&amp;action=history"/>
	<updated>2026-10-10T07:27:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://eternity.youfailit.net/index.php?title=ACS_libraries&amp;diff=4006&amp;oldid=prev</id>
		<title>Printz: Updated a few links.</title>
		<link rel="alternate" type="text/html" href="https://eternity.youfailit.net/index.php?title=ACS_libraries&amp;diff=4006&amp;oldid=prev"/>
		<updated>2017-04-08T10:54:23Z</updated>

		<summary type="html">&lt;p&gt;Updated a few links.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:54, 8 April 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;This page contains text copied from the ZDoom wiki&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;This page contains text copied from the ZDoom wiki&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A library is a standalone [[ACS]] script defining common &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/del&gt;scripts&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/del&gt;, [[functions]], and [[constants]] which can be used from other ACS scripts.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A library is a standalone [[ACS]] script defining common scripts, [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ACS_built-in_functions|&lt;/ins&gt;functions]], and [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ACS constants|&lt;/ins&gt;constants]] which can be used from other ACS scripts.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;They are distinct from the standard &amp;#039;&amp;#039;&amp;#039;#include&amp;#039;&amp;#039;&amp;#039; directives ACS offers in that the included script is not compiled into the resulting binary.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;They are distinct from the standard &amp;#039;&amp;#039;&amp;#039;#include&amp;#039;&amp;#039;&amp;#039; directives ACS offers in that the included script is not compiled into the resulting binary.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Printz</name></author>
	</entry>
	<entry>
		<id>https://eternity.youfailit.net/index.php?title=ACS_libraries&amp;diff=4005&amp;oldid=prev</id>
		<title>Printz: Created page with &quot;&#039;&#039;This page contains text copied from the ZDoom wiki&#039;&#039;  A library is a standalone ACS script defining common scripts, functions, and constants which can be use...&quot;</title>
		<link rel="alternate" type="text/html" href="https://eternity.youfailit.net/index.php?title=ACS_libraries&amp;diff=4005&amp;oldid=prev"/>
		<updated>2017-04-08T09:59:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;This page contains text copied from the ZDoom wiki&amp;#039;&amp;#039;  A library is a standalone &lt;a href=&quot;/wiki/ACS&quot; class=&quot;mw-redirect&quot; title=&quot;ACS&quot;&gt;ACS&lt;/a&gt; script defining common &lt;a href=&quot;/index.php?title=Scripts&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Scripts (page does not exist)&quot;&gt;scripts&lt;/a&gt;, &lt;a href=&quot;/index.php?title=Functions&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Functions (page does not exist)&quot;&gt;functions&lt;/a&gt;, and &lt;a href=&quot;/index.php?title=Constants&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Constants (page does not exist)&quot;&gt;constants&lt;/a&gt; which can be use...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;This page contains text copied from the ZDoom wiki&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
A library is a standalone [[ACS]] script defining common [[scripts]], [[functions]], and [[constants]] which can be used from other ACS scripts.&lt;br /&gt;
They are distinct from the standard &amp;#039;&amp;#039;&amp;#039;#include&amp;#039;&amp;#039;&amp;#039; directives ACS offers in that the included script is not compiled into the resulting binary.&lt;br /&gt;
&lt;br /&gt;
Using libraries can help save space in your scripts (which is useful if you use a script editor with limited length, such as some old tools), as well as reducing code duplication and copy-paste errors.&lt;br /&gt;
Any changes in libraries will be reflected automatically across all scripts which use them.&lt;br /&gt;
&lt;br /&gt;
The most common application of libraries are in large scale projects in which multiple maps share ACS, as well as auxiliary gameplay mods including their own ACS using [[LOADACS]].&lt;br /&gt;
&lt;br /&gt;
== Creating libraries ==&lt;br /&gt;
An otherwise standard ACS script is marked as a library using the &amp;#039;&amp;#039;&amp;#039;#library&amp;#039;&amp;#039;&amp;#039; [[ACS directives|directive]], which should be first statement in the script:&lt;br /&gt;
&lt;br /&gt;
 #library &amp;quot;LIBNAME&amp;quot;&lt;br /&gt;
 #include &amp;quot;zcommon.acs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The name given to the &amp;#039;&amp;#039;&amp;#039;#library&amp;#039;&amp;#039;&amp;#039; directive specifies the name of the library, constrained by standard WAD lump name limitations.&lt;br /&gt;
Once [[ACC|compiled]], the binary lump should be placed in the ACS library [[namespace]] with the same name as given in the &amp;#039;&amp;#039;&amp;#039;#library&amp;#039;&amp;#039;&amp;#039; directive.&lt;br /&gt;
Modern resource editors, such as [https://doomwiki.org/wiki/SLADE SLADE], can automate this process.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; When using [[LOADACS]], [[Script_types#ENTER|enter]] and [[Script_types#OPEN|open]] scripts in your library will execute on every map (as per the rules of their respective script types).&lt;br /&gt;
&lt;br /&gt;
== Importing libraries ==&lt;br /&gt;
Scripts can import libraries by using the &amp;#039;&amp;#039;&amp;#039;#import&amp;#039;&amp;#039;&amp;#039; directive:&lt;br /&gt;
&lt;br /&gt;
 #import &amp;quot;libname.acs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The path given to the &amp;#039;&amp;#039;&amp;#039;#import&amp;#039;&amp;#039;&amp;#039; directive specifies the &amp;#039;&amp;#039;uncompiled&amp;#039;&amp;#039; source of the library (as opposed to the compiled binary). The path may be either absolute or relative (e.g. &amp;quot;/doom/levels/mymaps/foomap/lumps/lib/foolib.acs&amp;quot;).&lt;br /&gt;
The following script elements are imported from the library:&lt;br /&gt;
&lt;br /&gt;
* [[Scripts]], both [[named script|named]] and numbered&lt;br /&gt;
* [[Functions]]&lt;br /&gt;
* [[Constants]] declared with the &amp;#039;&amp;#039;&amp;#039;#libdefine&amp;#039;&amp;#039;&amp;#039; directive&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; When [[ACC]] scans imported libraries, all &amp;#039;&amp;#039;&amp;#039;#include&amp;#039;&amp;#039;&amp;#039; directives are ignored in the library and those files are not scanned.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;#039;&amp;#039;Needs an Eternity-specific example. You can view the ZDoom example on [https://zdoom.org/wiki/Libraries their wiki page].&amp;#039;&amp;#039;&lt;br /&gt;
[[Category:ACS]][[Category:Editing reference]]&lt;/div&gt;</summary>
		<author><name>Printz</name></author>
	</entry>
</feed>