Skip to content

Commit

Permalink
Adjusted some code to point to the base package's new location. The e…
Browse files Browse the repository at this point in the history
…ngine still can't read game content properly!

- Changed the file/folder names/paths constants to be more organized, and to more obviously distinguish those that are paths from the root and those that aren't.
  • Loading branch information
Espyo committed Oct 25, 2024
1 parent a141faa commit e52b943
Show file tree
Hide file tree
Showing 53 changed files with 444 additions and 341 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ allegro.log
*.o
*.d
*.aps
Game_data/Areas/*/*test*
Game_data/Base/Areas/*/*test*
User_data/*
/pikifen
/pikifen_shortcut
Expand Down
2 changes: 1 addition & 1 deletion Manual/content/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h2 id="overview">Overview</h2>

<p>If you haven't already, you should read the included <code>README.txt</code> file first, as it explains some things about the engine.</p>
<p><i>Pikifen</i> is a game engine that allows you to play a <i>Pikmin</i>-like game. You control a leader, and can order Pikmin to follow you, carry objects, fight enemies, take down obstacles, and more. Since the engine was designed with flexibility in mind, you are encouraged to create your own Pikmin types, hazards, leaders, areas, enemies, and so on. Depending on the mechanics that are implemented or missing, some things might work, some might not, and some might be working incorrectly.</p>
<p>In order to play a game on the engine, there must be data for that game in the engine's <code>Game_data</code> folder. Luckily, the engine comes with some demo content that can be played right off the bat, although you can also download or create any fan-made content and place it in the game data folder.</p>
<p>In order to play a game on the engine, there must be a package of data for that game in the engine's <code>Game_data</code> folder. Luckily, the engine comes with some base content that can be played right off the bat, although you can also download or create any fan-made content and place their packages it in the game data folder.</p>
<p>Upon running the engine, it will read the information in the game data folder and instantly boot up the game. Because the engine is still in development, the concept of a "game" isn't much more than "a collection of areas, enemies, and Pikmin". The main menu will be the same all the time, regardless of game, and choosing the "Play" option will prompt you on which available area you wish to play.</p>
<p>To note is that some downloaded content might depend on other content. For instance, if an area has an enemy called "Green_Bulborb", but you do not have any "Green_Bulborb" enemy in your game data, the area will not load properly.</p>

Expand Down
2 changes: 1 addition & 1 deletion Manual/content/animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h2 id="necessary">Necessary animations</h2>

<h2 id="special">Special animations</h2>

<p>The folder <code>Game_data/Animations</code> contains a list of custom animations that aren't necessarily bound to an object. These can include animations expected by the engine, like the status effects or liquids.</p>
<p>The folder <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Animations</code> contains a list of custom animations that aren't necessarily bound to an object. These can include animations expected by the engine, like the status effects or liquids.</p>

<h2 id="controls">Controls</h2>

Expand Down
6 changes: 3 additions & 3 deletions Manual/content/area.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h3 id="sector-texture">Sector texture</h3>
<dt><b>Click the texture button in the "Appearance" section of the panel.</b></dt>
<dd>This button will allow you to set the sector's texture.</dd>
<dt><b>Choose a texture from the suggestions list, or browse for a new one.</b></dt>
<dd>Most likely, only the grassy texture will be available in the list. The game's textures can be found in the <code>Game_data/Graphics/Textures</code> folder. Click on "Browse..." to browse for the file to use. Let's pick <code>Stone.jpg</code>.</dd>
<dd>Most likely, only the grassy texture will be available in the list. Textures can be found in the <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Graphics/Textures</code> folder. Click on "Browse..." to browse for the file to use. Let's pick <code>Stone.jpg</code>.</dd>
</dl>

<h3 id="sector-height">Sector height</h3>
Expand Down Expand Up @@ -368,7 +368,7 @@ <h3 id="tree-shadows">Tree shadows</h3>
<dt><b>Press the "+" button in the panel to place a new tree shadow where you click.</b></dt>
<dd>Click more or less in the center of the area, since this will also be the center of our tree shadow.</dd>
<dt><b>Set its texture in the "Bitmap" textbox.</b></dt>
<dd>Write down the <a href="glossary.html#file-name">file name</a> of the texture, which must be in the <code>Game_data/Graphics/Textures</code> folder. Until you give a valid texture, it will just be a black-and-violet pattern. Try using <code>Tree_shadow.png</code>, which should come with the engine. Alternatively, use the "..." button to browse for a texture which, once more, needs to be in the textures folder.</dd>
<dd>Write down the <a href="glossary.html#file-name">file name</a> of the texture, which must be in the <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Graphics/Textures</code> folder. Until you give a valid texture, it will just be a black-and-violet pattern. Try using <code>Tree_shadow.png</code>, which should come with the engine. Alternatively, use the "..." button to browse for a texture which, once more, needs to be in the textures folder.</dd>
<dt><b>Use the handles around the tree shadow to move it (center handle), rotate it (large circle around it), or scale it (edge and corner handles).</b></dt>
<dd>Use these to make the shadows cover the terrain, the outer rim, and even a bit of the void, just so the player cannot see when the shadow texture ends, even as it sways left and right. To scale the width and height independently, uncheck the "Keep aspect ratio" option. Alternatively, you can use the panel widgets to set these properties.</dd>
<dt><b>Notes:</b></dt>
Expand Down Expand Up @@ -428,7 +428,7 @@ <h3 id="background">Area background</h3>

<p>If instead of a black void, you want the area to have a background, like the steel plates at the background of sublevel 1 of the <a href="https://www.pikminwiki.com/Secret_Testing_Range">Secret Testing Range</a>, or if you just want the background to be a color that isn't black, you can.</p>

<p>In the area information panel, you can set the background's information here. Write the background's texture <a href="glossary.html#file-name">file name</a>, which must be a file in the <code>Game_data/Images/Textures</code> folder. Alternatively, use "..." to pick a file from that folder. This texture will be tiled across the background, and you can change how far away the texture is (which affects the scrolling when you move the camera around), as well as how zoomed in it is. You will not be able to see the background in the area editor.</p>
<p>In the area information panel, you can set the background's information here. Write the background's texture <a href="glossary.html#file-name">file name</a>, which must be a file in the <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Graphics/Textures</code> folder. Alternatively, use "..." to pick a file from that folder. This texture will be tiled across the background, and you can change how far away the texture is (which affects the scrolling when you move the camera around), as well as how zoomed in it is. You will not be able to see the background in the area editor.</p>

<h3 id="weather">Subtitle, weather, and more</h3>

Expand Down
2 changes: 1 addition & 1 deletion Manual/content/events_and_actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ <h3 id="actions-obtain-info">Obtaining information</h3>
<li><code><b>id</b></code>: The object's numeric ID. The first object that spawns in the area has ID 0, the second has ID 1, etc.</li>
<li><code><b>latched_pikmin</b></code>: How many Pikmin are currently latched on to it.</li>
<li><code><b>latched_pikmin_weight</b></code>: Total weight of the Pikmin that are currently latched on to it.</li>
<li><code><b>mob_category</b></code>: Category of the mob. This is the same name as the corresponding folder in <code>Game_data/Types</code>. Only available for certain events.</li>
<li><code><b>mob_category</b></code>: Category of the mob. This is the same name as the corresponding folder in <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Types</code>. Only available for certain events.</li>
<li><code><b>mob_type</b></code>: Type of the mob. This is the name defined in the <code>name</code> property of the object type's <code>Data.txt</code> file. Only available for certain events.</li>
<li><code><b>state</b></code>: Name of the current script state.</li>
<li><code><b>weight</b></code>: Current weight on top of it.</li>
Expand Down
6 changes: 3 additions & 3 deletions Manual/content/gui.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<body onload="setup('GUI', ['Making content'], ['making.html']);">
<div id="content">

<p>All menus and HUDs in <i>Pikifen</i> can be customized. Most of them only allow you to change the position and size of the different items, but some may allow for more in-depth customizations. Each menu or HUD has its own <a href="making.html#data-file">data file</a>, located in <code>Game_data/GUI</code>.</p>
<p>All menus and HUDs in <i>Pikifen</i> can be customized. Most of them only allow you to change the position and size of the different items, but some may allow for more in-depth customizations. Each menu or HUD has its own <a href="making.html#data-file">data file</a>, located in <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/GUI</code>.</p>

<p>To change the position and size of elements, you can just use the GUI editor, accessible from the main menu. To change other things, you will need to edit the data files by hand.</p>

Expand Down Expand Up @@ -302,7 +302,7 @@ <h3 id="main-menu">Main menu</h3>
<li><code>pikmin_sway_max_speed</code>: Each Pikmin's swaying speed is random. This is the maximum speed, in radians per second (the Y part is ignored when swaying).</li>
<li><code>pikmin_sway_min_speed</code>: Same as above, but the minimum speed.</li>
<li><code>pikmin_size</code>: Pikmin size, in screen dimension percentage. For instance, <code>3 2</code> means each Pikmin cannot be any larger than 3% of the screen width nor 2% of the screen height.</li>
<li><code>pikmin_types</code>: This block specifies the types of Pikmin you'll encounter in the title logo. Except every type is simply defined by the image of its flower. In this block, every line is a type, in the format <code>character = image</code>, where <code>character</code> is a text character representing this Pikmin type in the logo map (see below), and <code>image</code> is the <a href="glossary.html#file-name">file name</a> of the image in the <code>/Game_data/Graphics</code> folder.</li>
<li><code>pikmin_types</code>: This block specifies the types of Pikmin you'll encounter in the title logo. Except every type is simply defined by the image of its flower. In this block, every line is a type, in the format <code>character = image</code>, where <code>character</code> is a text character representing this Pikmin type in the logo map (see below), and <code>image</code> is the <a href="glossary.html#file-name">file name</a> of the image in the <code>/Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Graphics</code> folder.</li>
<li><code>map</code>: A representation of the logo. The Pikmin are organized in a grid, and that grid is spread to fit in the limits specified above. Every line in this block represents a line in the grid, with every character matching a cell in that line. A character represents a Pikmin type or a blank space, if it's a character specified in the <code>pikmin_types</code> block or a dot (<code>.</code>), respectively.</li>
</ul>
<li><b>Icons to the left:</b> Use this to indicate whether the icon on each button should be on the left side (<code>true</code>) or the right side (<code>false</code>).</li>
Expand Down Expand Up @@ -538,7 +538,7 @@ <h3 id="pause-menu-help">Pause menu &ndash; help page</h3>
<li><code>list_scroll</code>: Scrollbar for the list.</li>
<li><code>tooltip</code>: Tooltip of the selected tidbit or menu item.</li>
</ul>
<li><b>Tidbits:</b> Tidbits of information in the help page are specified in the <code>tidbits</code> block. There are four blocks inside, each one named after the corresponding category, in all lowercase. Inside each of those blocks is the list of items, one item per line. Each line follows the format <code>Tidbit name;Tidbit information text;Tidbit image</code>. The information text can make use of <a href="misc_features.html#markup">markup</a>. The image has to be the <a href="glossary.html#file-name">file name</a> of the file in the <code>Game_data/Graphics</code> folder.</li>
<li><b>Tidbits:</b> Tidbits of information in the help page are specified in the <code>tidbits</code> block. There are four blocks inside, each one named after the corresponding category, in all lowercase. Inside each of those blocks is the list of items, one item per line. Each line follows the format <code>Tidbit name;Tidbit information text;Tidbit image</code>. The information text can make use of <a href="misc_features.html#markup">markup</a>. The image has to be the <a href="glossary.html#file-name">file name</a> of the file in the <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Graphics</code> folder.</li>
</ul>

<h3 id="pause-menu-mission">Pause menu &ndash; mission page</h3>
Expand Down
6 changes: 3 additions & 3 deletions Manual/content/hazard.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2 id="intro">Introduction</h2>

<p>Pikmin can be vulnerable or invulnerable to a certain hazard. If they are invulnerable, they will be completely invulnerable to any attack hitboxes that use that property, and will act as if it doesn't exist. If not, it will suffer from some <b>status effect</b>. Being on fire, flailing on the surface of the water, or choking on poison are all status effects. Before you implement hazards, you should have some status effects, otherwise the hazards will be pointless if they can't cause problems. Please read the <a href="status.html">status effects guide</a> for information on how to declare status effects.</p>

<p>The folder <code>Game_data/Hazards</code> contains one <a href="making.html#data-file">data file</a> for every hazard that exists, and that file contains its properties. Each file can have whatever name you want.</p>
<p>The folder <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Hazards</code> contains one <a href="making.html#data-file">data file</a> for every hazard that exists, and that file contains its properties. Each file can have whatever name you want.</p>

<h2 id="basics">Basics</h2>

Expand Down Expand Up @@ -65,7 +65,7 @@ <h2 id="liquid">Water and other liquids</h2>

<p>As stated at the start of the page, a hazard is an abstract danger. This means that a body of water is not a hazard, but the concept of "water" is. The thing is, hazards like water and other liquids (e.g. acid or lava) are meant to be used in sectors and have a liquid appearance, with an animated water surface. Simply stating that a water hazard applies the "drowning" effect to non-Blue Pikmin, and having a sector use the "water" hazard is not enough. How can the engine know what color the water is, how opaque it is, and what its surface animation is? For this, we'll need a different file.</p>

<p>Open the <code>Game_data/Liquids</code> folder. This contains data about all liquids. Liquids will bridge the gap between a water body sector and the water hazard, for instance. Much like the files in <code>Game_data/Hazards</code>, this folder contains <a href="making.html#data-file">data file</a>, one for each liquid defined. Again, its file name can be whatever you want.</p>
<p>Open the <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Liquids</code> folder. This contains data about all liquids. Liquids will bridge the gap between a water body sector and the water hazard, for instance. Much like the files in <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Hazards</code>, this folder contains <a href="making.html#data-file">data file</a>, one for each liquid defined. Again, its file name can be whatever you want.</p>

<p>Each liquid has the following properties:</p>

Expand All @@ -80,7 +80,7 @@ <h3 id="liquid-mandatory">Mandatory</h3>
<table class="props-t props-t-m">
<tr>
<td>animation</td>
<td>Animation <a href="making.html#data-file">data file</a> in <code>Game_data/Animations</code>. The water's surface will have this animated texture on it. <b>Note</b>: Since the sprites used for the animation are tiled over and over across the water's surface, you will not be able to have multiple frames of animation in the same image file. When <a href="animation.html">making its animation</a>, make sure to have each frame on its own file.</td>
<td>Animation <a href="making.html#data-file">data file</a> in <code>Game_data/&lt;<a href="making.html#packages">package</a>&gt;/Animations</code>. The water's surface will have this animated texture on it. <b>Note</b>: Since the sprites used for the animation are tiled over and over across the water's surface, you will not be able to have multiple frames of animation in the same image file. When <a href="animation.html">making its animation</a>, make sure to have each frame on its own file.</td>
<td>File name</td>
</tr>
</table>
Expand Down
Loading

0 comments on commit e52b943

Please sign in to comment.