https://wiki.eduke32.com/w/index.php?title=Packaging_mods&feed=atom&action=historyPackaging mods - Revision history2024-03-28T20:35:14ZRevision history for this page on the wikiMediaWiki 1.42.0-alphahttps://wiki.eduke32.com/w/index.php?title=Packaging_mods&diff=13938&oldid=prevRob Anybody: /* DEF entrypoint */2020-07-30T16:53:36Z<p><span dir="auto"><span class="autocomment">DEF entrypoint</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:53, 30 July 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l47">Line 47:</td>
<td colspan="2" class="diff-lineno">Line 47:</td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div> setdefname mymod.def</div></td><td class="diff-marker"></td><td style="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;"><div> setdefname mymod.def</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><br></td><td class="diff-marker"></td><td style="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;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="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;"><div>The [[setdefname]] command tells <del style="font-weight: bold; text-decoration: none;">Eduke32 </del>where to find your DEF file.</div></td><td class="diff-marker" data-marker="+"></td><td style="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;"><div>The [[setdefname]] command tells <ins style="font-weight: bold; text-decoration: none;">EDuke32 </ins>where to find your DEF file.</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div>Note that you could name it whatever you like or put it in a subdirectory</div></td><td class="diff-marker"></td><td style="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;"><div>Note that you could name it whatever you like or put it in a subdirectory</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div>and adjust the line above as necessary.</div></td><td class="diff-marker"></td><td style="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;"><div>and adjust the line above as necessary.</div></td></tr>
</table>Rob Anybodyhttps://wiki.eduke32.com/w/index.php?title=Packaging_mods&diff=13937&oldid=prevRob Anybody: /* DEF entrypoint */2020-07-30T03:38:58Z<p><span dir="auto"><span class="autocomment">DEF entrypoint</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:38, 29 July 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l47">Line 47:</td>
<td colspan="2" class="diff-lineno">Line 47:</td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div> setdefname mymod.def</div></td><td class="diff-marker"></td><td style="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;"><div> setdefname mymod.def</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><br></td><td class="diff-marker"></td><td style="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;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="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;"><div>The [setdefname] command tells Eduke32 where to find your DEF file.</div></td><td class="diff-marker" data-marker="+"></td><td style="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;"><div>The <ins style="font-weight: bold; text-decoration: none;">[</ins>[setdefname<ins style="font-weight: bold; text-decoration: none;">]</ins>] command tells Eduke32 where to find your DEF file.</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div>Note that you could name it whatever you like or put it in a subdirectory</div></td><td class="diff-marker"></td><td style="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;"><div>Note that you could name it whatever you like or put it in a subdirectory</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div>and adjust the line above as necessary.</div></td><td class="diff-marker"></td><td style="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;"><div>and adjust the line above as necessary.</div></td></tr>
</table>Rob Anybodyhttps://wiki.eduke32.com/w/index.php?title=Packaging_mods&diff=13936&oldid=prevRob Anybody: /* CON entrypoint */2020-07-30T03:38:35Z<p><span dir="auto"><span class="autocomment">CON entrypoint</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:38, 29 July 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l36">Line 36:</td>
<td colspan="2" class="diff-lineno">Line 36:</td></tr>
<tr><td class="diff-marker"></td><td style="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;"><br></td><td class="diff-marker"></td><td style="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;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div>The ''game.con'' here refers to a file in ''duke3d.grp'', not a part of your mod.</div></td><td class="diff-marker"></td><td style="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;"><div>The ''game.con'' here refers to a file in ''duke3d.grp'', not a part of your mod.</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="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;"><div><del style="font-weight: bold; text-decoration: none;">Eduke32 </del>will automatically load ''eduke.con'' if present, or ''game.con'' if not.</div></td><td class="diff-marker" data-marker="+"></td><td style="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;"><div><ins style="font-weight: bold; text-decoration: none;">EDuke32 </ins>will automatically load ''eduke.con'' if present, or ''game.con'' if not.</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><div>Since ''eduke.con'' is loaded in this case, we must load ''game.con'' ourselves.</div></td><td class="diff-marker"></td><td style="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;"><div>Since ''eduke.con'' is loaded in this case, we must load ''game.con'' ourselves.</div></td></tr>
<tr><td class="diff-marker"></td><td style="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;"><br></td><td class="diff-marker"></td><td style="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;"><br></td></tr>
</table>Rob Anybodyhttps://wiki.eduke32.com/w/index.php?title=Packaging_mods&diff=13935&oldid=prevRob Anybody: Create tutorial on packaging mods2020-07-30T03:03:23Z<p>Create tutorial on packaging mods</p>
<p><b>New page</b></p><div><div class="floatright">__TOC__</div><br />
<br />
==Intro==<br />
<br />
This guide outlines a scheme for packaging mods,<br />
including directory structure, essential files, useful CON commands,<br />
instructions on launching packaged and unpacked mods,<br />
and tips for working with version control.<br />
<br />
This guide assumes you are modding for EDuke32 on Windows;<br />
you may need to make adjustments for other games<br />
or operating systems.<br />
<br />
==Unpackaged mods==<br />
<br />
It's possible to test your mod without ever packaging it,<br />
by placing your files in a subdirectory alongside the EDuke32 executable.<br />
<br />
===Mod directory===<br />
<br />
First, create a new subdirectory alongside the EDuke32 executable,<br />
and name it ''mymod''.<br />
<br />
All of your mod's files will live here, including<br />
CON scripts, DEF files, maps, graphical and audio assets, and so on.<br />
You can name and organize these in subdirectories as you please,<br />
with only the following exception.<br />
<br />
===CON entrypoint===<br />
<br />
Next, create a CON script named ''eduke.con''<br />
directly inside of the ''mymod'' directory<br />
and add the following line:<br />
<br />
include game.con<br />
<br />
The ''game.con'' here refers to a file in ''duke3d.grp'', not a part of your mod.<br />
Eduke32 will automatically load ''eduke.con'' if present, or ''game.con'' if not.<br />
Since ''eduke.con'' is loaded in this case, we must load ''game.con'' ourselves.<br />
<br />
===DEF entrypoint===<br />
<br />
Now, create a file called ''mymod.def'' and leave it blank for now.<br />
This will contain any [[DEF_Language]] instructions your mod needs.<br />
In ''eduke.con'', add the following line:<br />
<br />
setdefname mymod.def<br />
<br />
The [setdefname] command tells Eduke32 where to find your DEF file.<br />
Note that you could name it whatever you like or put it in a subdirectory<br />
and adjust the line above as necessary.<br />
<br />
===Episodes and levels===<br />
<br />
Finally, fire up Mapster32, create a quick map,<br />
and save it in ''mymod'' as ''mymap01.map''.<br />
Add the following to ''eduke.con'':<br />
<br />
definevolumename 0 Episode One<br />
definelevelname 0 0 mymap01.map 01:02 02:03 My Map One<br />
<br />
The [[definevolumename]] command<br />
registers "Episode One" as the name of your first episode.<br />
The [[definelevelname]] command registers<br />
the path to the first map of the first episode,<br />
as well as target completion times and the name of the map.<br />
<br />
Again, you could name the map whatever you like,<br />
or put it in a subdirectory,<br />
and adjust the line above as necessary.<br />
<br />
===Testing your mod===<br />
<br />
To launch the mod in its unpackaged form,<br />
simply run the following command:<br />
<br />
eduke32 -j mymod<br />
<br />
If you're not comfortable working from the command line,<br />
create a shortcut to eduke32.exe, right click it, select ''Properties'',<br />
and edit the ''Target'' field to add ''-j'' at the end:<br />
<br />
C:\path\to\eduke32.exe -j<br />
<br />
You can now drag your ''mymod'' folder onto the shortcut to launch it.<br />
If you want the shortcut to be a dedicated launcher for your mod<br />
instead of having to drag the folder onto it,<br />
add ''mymod'' after the ''-j''.<br />
<br />
==Packaging mods==<br />
<br />
===The easy way===<br />
<br />
To package your mod, simply zip up the contents of ''mymod''<br />
using a tool like [https://www.7-zip.org/ 7-Zip].<br />
Be sure to zip up the contents rather than the directory itself;<br />
the zip file should not include a directory called ''mymod''.<br />
<br />
To test the packaged mod, simply drag the zip file onto the EDuke32 executable.<br />
<br />
===The Git way===<br />
<br />
Explaining version control is outside the scope of this tutorial,<br />
but if you're already using [https://git-scm.com/ Git], you can use<br />
[https://git-scm.com/docs/git-archive git-archive] to package your mod:<br />
<br />
# after committing everything...<br />
git archive HEAD -o ../mymod.zip<br />
<br />
This will keep Git's dotfiles from getting packaged,<br />
as well as anything listed in ''.gitignore''<br />
or having the ''export-ignore'' attribute.</div>Rob Anybody