{"id":11496,"date":"2008-07-15T13:40:34","date_gmt":"2008-07-15T11:40:34","guid":{"rendered":"https:\/\/worldofpadman.net\/?p=11496"},"modified":"2020-06-26T11:16:37","modified_gmt":"2020-06-26T09:16:37","slug":"start-modding-world-of-padman","status":"publish","type":"post","link":"https:\/\/worldofpadman.net\/en\/tutorials\/start-modding-world-of-padman\/","title":{"rendered":"Start modding World of Padman"},"content":{"rendered":"<p>This tutorial will show you where to get required files and how to create a basic mod for World of Padman. This is a very basic tutorial and should also only give you a first orientation regarding the source code and its concept.<\/p>\n<h2>Preface<\/h2>\n<p>Before you consider starting a mod, you need a few things. A solid understanding of <a title=\"Wikipedia about C (programming language)\" href=\"https:\/\/en.wikipedia.org\/wiki\/C_(programming_language)\" target=\"_blank\" rel=\"noopener noreferrer\">C<\/a>, as that&#8217;s what World of Padman is written in. This is quite cumbersome and you are furthermore limited by the <a href=\"https:\/\/ioquake3.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">ioquake3<\/a> engine, unless you want to create a stand alone game. Basically all tutorials for Quake 3 Arena mods also apply to WoP. A few filenames might have changed, some functions have been removed, renamed or edited. WoP&#8217;s source code is licensed under the <a title=\"Wikipedia about the GPL\" href=\"https:\/\/en.wikipedia.org\/wiki\/GNU_General_Public_License\" target=\"_blank\" rel=\"noopener noreferrer\">GPL<\/a>, so if you plan on releasing your mod to the public, you have to include its source code as well.<\/p>\n<p>Like Quake 3, WoP is separated into the engine (e.g. wop.exe) and the game code (e.g. qagame.qvm). The engine provides basic functionality like network and file access as well as drawing the graphics on a client. The game code is usually created in the Quake Virtual Machine (QVM) format, which can be loaded on any platform (Windows, Linux, macOS) which the engine supports. The game code itself is separated into the user interface <em>q3_ui<\/em>, the client game code <em>cgame<\/em>, and the server game code <em>qagame<\/em>.<br \/>\nYou can create server side only mods if you only edit <em>qagame<\/em>.<\/p>\n<h2>Getting the files<\/h2>\n<p>Earlier releases of WoP had separated downloads for engine and game code, but are now released as a bundle. You can download the latest version of the source code of World of Padman at <a title=\"WoP source at SourceForge\" href=\"https:\/\/sourceforge.net\/projects\/worldofpadman\/files\/src\/\" target=\"_blank\" rel=\"noopener noreferrer\">SourceForge<\/a> or <a href=\"https:\/\/www.moddb.com\/games\/world-of-padman\/downloads\/world-of-padman-v16-source-code\" target=\"_blank\" rel=\"noopener noreferrer\">ModDB<\/a>. The code is also always included in the official installations under <em>XTRAS\/editing files\/<\/em>.<\/p>\n<h2>Compiling<\/h2>\n<p>After extracting the downloaded source code you should create a file called <em>Makefile.local<\/em> in the same folder as <em>Makefile<\/em>.<\/p>\n<pre>BUILD_GAME_QVM = 1\r\nBUILD_GAME_SO = 0\r\nBUILD_MISSIONPACK = 0\r\n\r\nBUILD_SERVER = 0\r\nBUILD_CLIENT = 0\r\nBUILD_CLIENT_SMP = 0<\/pre>\n<p>This way running <em>make<\/em> will only build the game code QVMs and no shared libs or even the client and dedicated server engine. On an *nix system it should be sufficient to just run <em>make<\/em> now. The resulting QVMs will be created in e.g. <em>build\/release-linux-i386\/baseq3\/vm\/<\/em>.<\/p>\n<p>Windows users can either use <a href=\"http:\/\/www.mingw.org\/wiki\/MSYS\" target=\"_blank\" rel=\"noopener noreferrer\">MinGW<\/a> or use the provided batch files (e.g. <em>code\\game\\game.bat<\/em>). <em>misc\\recompile_win.bat<\/em> is a batch file that creates all three QVM files in one go. When using batch files, the compiled QVMs will be stored inside <em>wop\\vm\\<\/em> on the drive where you extracted the source code (e.g. <em>C:\\World of Padman\\wop\\vm\\<\/em>).<\/p>\n<h2>Testing<\/h2>\n<p>You should copy the new created QVM files into a folder for your mod inside your home path, e.g. <em>~\/.padman\/mymod\/vm\/<\/em> on Linux or <em>C:\\Users\\MyUserName\\AppData\\Roaming\\Padman\\wop\\mymod\\vm\\<\/em> on Windows. To test your mod in game, run WoP with these additional commands:<\/p>\n<pre>wop +set fs_game &quot;mymod&quot; +set sv_pure &quot;0&quot;<\/pre>\n<p>Where &#8220;mymod&#8221; is the folder where you copied your mod. Running the game &#8220;unpure&#8221; causes the engine to load your QVM files even though they are not packed as a PK3 file.<\/p>\n<h2>Releasing<\/h2>\n<p>If you want to release your mod, you will at least need to pack <em>vm\/*.qvm<\/em> into a ZIP archive, then change its extension to &#8220;.pk3&#8221; instead of &#8220;.zip&#8221;. You should also include a readme file as well as your modified source code, maybe as a separate download or diff.<\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you where to get required files and how to create a basic mod for World of Padman. This is a very basic tutorial and should also only give you a first orientation regarding the source code and its concept. Preface Before you consider starting a mod, you need a few things. [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121,19],"tags":[],"class_list":["post-11496","post","type-post","status-publish","format-standard","hentry","category-other","category-tutorials"],"_links":{"self":[{"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/posts\/11496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/comments?post=11496"}],"version-history":[{"count":10,"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/posts\/11496\/revisions"}],"predecessor-version":[{"id":11510,"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/posts\/11496\/revisions\/11510"}],"wp:attachment":[{"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/media?parent=11496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/categories?post=11496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/worldofpadman.net\/en\/wp-json\/wp\/v2\/tags?post=11496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}