<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Hero Fighter Empire - Forums - Tutorials]]></title>
		<link>https://hf-empire.com/forum/</link>
		<description><![CDATA[Hero Fighter Empire - Forums - https://hf-empire.com/forum]]></description>
		<pubDate>Fri, 17 Apr 2026 08:12:02 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[A practical guide to Story Editing in using Hero Fighter Workshop]]></title>
			<link>https://hf-empire.com/forum/showthread.php?tid=485</link>
			<pubDate>Sun, 07 Dec 2025 11:08:36 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://hf-empire.com/forum/member.php?action=profile&uid=92">nikhil</a>]]></dc:creator>
			<guid isPermaLink="false">https://hf-empire.com/forum/showthread.php?tid=485</guid>
			<description><![CDATA[Hey everyone, Nikhil here.<br />
<br />
I know a lot of you are trying to mod your own campaigns and getting stuck because the file structure is... unique. It’s basically the game's internal memory dumped into an XML format, so it’s not exactly user-friendly.<br />
<br />
I’m going to break down Stage 1 (story01) to explain what’s actually happening under the hood. If you can understand this file, you can pretty much build anything.<br />
<br />
The Basics (The Tags)<br />
Before we look at the code, here is a quick cheat sheet for the tags you’ll see most often. The engine reads these sequentially.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;bar&gt;</code></pre>This represents a "Section" or a "Scene" of the stage. The game plays one bar at a time. It won't move to the next bar until the current one is finished (usually when all enemies are dead or a cutscene ends).<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;drama&gt;</code></pre> Triggers "Cutscene Mode." It disables player controls and executes a script.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;obj&gt;</code></pre> Gameplay objects. This is how you spawn enemies, items, or allies during actual combat.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;a&gt;</code></pre> Action. Used inside cutscenes to make things happen (move, talk, animate).<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;c&gt;</code></pre> Command State. This overrides the AI.<br />
<ul class="mycode_list"><li>-2: Stop/Idle.<br />
</li>
<li>-3: Move to specific coordinates.<br />
</li>
</ul>
<hr class="mycode_hr" />
1. Stage Setup<br />
At the top of the file, you’ll see the first &lt;bar&gt;. This initializes the map.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">XML

&lt;bar&gt;
    &lt;bg&gt;
        &lt;bgid&gt;story01&lt;/bgid&gt; 
        &lt;x&gt;1700&lt;/x&gt;
        &lt;z&gt;800&lt;/z&gt;
    &lt;/bg&gt;
    &lt;left&gt;0&lt;/left&gt;
    &lt;right&gt;9000&lt;/right&gt;
    &lt;effect&gt;showTitle&lt;/effect&gt;
&lt;/bar&gt;</code></pre><br />
Important: The x and z here are for the camera, not the player. If you set these to 0, the camera might start off the map (since the map art usually starts around x=1000 or x=2000).<br />
<br />
2. Cutscene Logic (&lt;drama&gt;)<br />
This is the part that usually trips people up. The nesting here is strict.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">XML

&lt;drama&gt;
    &lt;state&gt;start&lt;/state&gt;
    
    &lt;o&gt;
        &lt;s&gt;drew&lt;/s&gt;
        &lt;id&gt;drew&lt;/id&gt;
        &lt;x&gt;390&lt;/x&gt; &lt;z&gt;980&lt;/z&gt;
    &lt;/o&gt;

    &lt;a&gt;
        &lt;a&gt;
            &lt;id&gt;z_villager01&lt;/id&gt;
            &lt;ac&gt;drama_lie2&lt;/ac&gt; 
        &lt;/a&gt;
    &lt;/a&gt;
    
    &lt;a&gt;
        &lt;t&gt;
            &lt;s&gt;lucas&lt;/s&gt;
            &lt;en&gt;It's been over a month now...&lt;/en&gt;
            &lt;i&gt;10&lt;/i&gt; 
        &lt;/t&gt;
    &lt;/a&gt;
&lt;/drama&gt;</code></pre><br />
Two things to note here:<br />
<br />
Nesting: The outer &lt;a&gt; tags define the sequence. The inner tags define what happens during that step. If you put multiple actions inside one outer &lt;a&gt;, they happen simultaneously.<br />
<br />
&lt;s&gt; vs &lt;id&gt;: &lt;s&gt; is just a nickname for the script to use. &lt;id&gt; is the actual character being loaded.<br />
<br />
3. Combat Spawns (&lt;obj&gt;)<br />
Once the &lt;drama&gt; block ends, we usually switch to gameplay.<br />
<br />
XML<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;bar&gt;
    &lt;left&gt;0&lt;/left&gt; &lt;right&gt;6000&lt;/right&gt;
    
    &lt;obj&gt;
        &lt;id&gt;z_bandit01&lt;/id&gt;
        &lt;times&gt;2&lt;/times&gt;
        &lt;ratio&gt;1&lt;/ratio&gt;
    &lt;/obj&gt;
    
    &lt;obj&gt;
        &lt;id&gt;z_villager01&lt;/id&gt;
        &lt;times&gt;10&lt;/times&gt;
        &lt;toHire/&gt;
        &lt;x&gt;1400&lt;/x&gt;
        &lt;z&gt;800&lt;/z&gt;
    &lt;/obj&gt;
&lt;/bar&gt;</code></pre><br />
If you use &lt;toHire/&gt;, make sure you specify the x and z coordinates. If you don't, they default to 0,0, and you'll never see them.<br />
<br />
4. Movement Logic (The &lt;c&gt; tag)<br />
In the ending cutscene of Stage 1, you see Giggs running away. That uses the &lt;c&gt;-3 command.<br />
<br />
XML<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;o&gt;
    &lt;id&gt;giggs&lt;/id&gt;
    &lt;c&gt;-3&lt;/c&gt;
    &lt;x&gt;22000&lt;/x&gt;
    &lt;z&gt;810&lt;/z&gt;
&lt;/o&gt;</code></pre><br />
Common Validator Error: If you set &lt;c&gt;-3 but forget the &lt;x&gt; or &lt;z&gt;, the game crashes because the character tries to run to a null location.<br />
<br />
Common Pitfalls<br />
Here are the most common mistakes people make:<br />
<br />
The &lt;hide&gt; tags: You’ll see these at the start of the file wrapping z_infantry01. This is commented-out code. If you edit anything inside &lt;hide&gt;...&lt;/hide&gt;, it won't show up in the game.<br />
<br />
Deleting Line IDs (&lt;i&gt;): Inside the dialogue &lt;t&gt; tags, there is a number like &lt;i&gt;10&lt;/i&gt;. Do not delete this. The game uses it for syncing and lookups.<br />
<br />
Boss Groups: If you look at the Giggs fight, his minions have &lt;bossGrp&gt;1&lt;/bossGrp&gt;. This links them to Giggs' HP bar. If you don't link them, the stage might not end correctly when the boss dies.<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://hf-empire.com/forum/images/attachtypes/xml.gif" title="XML File" border="0" alt=".xml" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=168" target="_blank" title="">219 - Data.Global_story01_xml.xml</a> (Size: 22.64 KB / Downloads: 129)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[Hey everyone, Nikhil here.<br />
<br />
I know a lot of you are trying to mod your own campaigns and getting stuck because the file structure is... unique. It’s basically the game's internal memory dumped into an XML format, so it’s not exactly user-friendly.<br />
<br />
I’m going to break down Stage 1 (story01) to explain what’s actually happening under the hood. If you can understand this file, you can pretty much build anything.<br />
<br />
The Basics (The Tags)<br />
Before we look at the code, here is a quick cheat sheet for the tags you’ll see most often. The engine reads these sequentially.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;bar&gt;</code></pre>This represents a "Section" or a "Scene" of the stage. The game plays one bar at a time. It won't move to the next bar until the current one is finished (usually when all enemies are dead or a cutscene ends).<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;drama&gt;</code></pre> Triggers "Cutscene Mode." It disables player controls and executes a script.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;obj&gt;</code></pre> Gameplay objects. This is how you spawn enemies, items, or allies during actual combat.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;a&gt;</code></pre> Action. Used inside cutscenes to make things happen (move, talk, animate).<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;c&gt;</code></pre> Command State. This overrides the AI.<br />
<ul class="mycode_list"><li>-2: Stop/Idle.<br />
</li>
<li>-3: Move to specific coordinates.<br />
</li>
</ul>
<hr class="mycode_hr" />
1. Stage Setup<br />
At the top of the file, you’ll see the first &lt;bar&gt;. This initializes the map.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">XML

&lt;bar&gt;
    &lt;bg&gt;
        &lt;bgid&gt;story01&lt;/bgid&gt; 
        &lt;x&gt;1700&lt;/x&gt;
        &lt;z&gt;800&lt;/z&gt;
    &lt;/bg&gt;
    &lt;left&gt;0&lt;/left&gt;
    &lt;right&gt;9000&lt;/right&gt;
    &lt;effect&gt;showTitle&lt;/effect&gt;
&lt;/bar&gt;</code></pre><br />
Important: The x and z here are for the camera, not the player. If you set these to 0, the camera might start off the map (since the map art usually starts around x=1000 or x=2000).<br />
<br />
2. Cutscene Logic (&lt;drama&gt;)<br />
This is the part that usually trips people up. The nesting here is strict.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">XML

&lt;drama&gt;
    &lt;state&gt;start&lt;/state&gt;
    
    &lt;o&gt;
        &lt;s&gt;drew&lt;/s&gt;
        &lt;id&gt;drew&lt;/id&gt;
        &lt;x&gt;390&lt;/x&gt; &lt;z&gt;980&lt;/z&gt;
    &lt;/o&gt;

    &lt;a&gt;
        &lt;a&gt;
            &lt;id&gt;z_villager01&lt;/id&gt;
            &lt;ac&gt;drama_lie2&lt;/ac&gt; 
        &lt;/a&gt;
    &lt;/a&gt;
    
    &lt;a&gt;
        &lt;t&gt;
            &lt;s&gt;lucas&lt;/s&gt;
            &lt;en&gt;It's been over a month now...&lt;/en&gt;
            &lt;i&gt;10&lt;/i&gt; 
        &lt;/t&gt;
    &lt;/a&gt;
&lt;/drama&gt;</code></pre><br />
Two things to note here:<br />
<br />
Nesting: The outer &lt;a&gt; tags define the sequence. The inner tags define what happens during that step. If you put multiple actions inside one outer &lt;a&gt;, they happen simultaneously.<br />
<br />
&lt;s&gt; vs &lt;id&gt;: &lt;s&gt; is just a nickname for the script to use. &lt;id&gt; is the actual character being loaded.<br />
<br />
3. Combat Spawns (&lt;obj&gt;)<br />
Once the &lt;drama&gt; block ends, we usually switch to gameplay.<br />
<br />
XML<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;bar&gt;
    &lt;left&gt;0&lt;/left&gt; &lt;right&gt;6000&lt;/right&gt;
    
    &lt;obj&gt;
        &lt;id&gt;z_bandit01&lt;/id&gt;
        &lt;times&gt;2&lt;/times&gt;
        &lt;ratio&gt;1&lt;/ratio&gt;
    &lt;/obj&gt;
    
    &lt;obj&gt;
        &lt;id&gt;z_villager01&lt;/id&gt;
        &lt;times&gt;10&lt;/times&gt;
        &lt;toHire/&gt;
        &lt;x&gt;1400&lt;/x&gt;
        &lt;z&gt;800&lt;/z&gt;
    &lt;/obj&gt;
&lt;/bar&gt;</code></pre><br />
If you use &lt;toHire/&gt;, make sure you specify the x and z coordinates. If you don't, they default to 0,0, and you'll never see them.<br />
<br />
4. Movement Logic (The &lt;c&gt; tag)<br />
In the ending cutscene of Stage 1, you see Giggs running away. That uses the &lt;c&gt;-3 command.<br />
<br />
XML<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;o&gt;
    &lt;id&gt;giggs&lt;/id&gt;
    &lt;c&gt;-3&lt;/c&gt;
    &lt;x&gt;22000&lt;/x&gt;
    &lt;z&gt;810&lt;/z&gt;
&lt;/o&gt;</code></pre><br />
Common Validator Error: If you set &lt;c&gt;-3 but forget the &lt;x&gt; or &lt;z&gt;, the game crashes because the character tries to run to a null location.<br />
<br />
Common Pitfalls<br />
Here are the most common mistakes people make:<br />
<br />
The &lt;hide&gt; tags: You’ll see these at the start of the file wrapping z_infantry01. This is commented-out code. If you edit anything inside &lt;hide&gt;...&lt;/hide&gt;, it won't show up in the game.<br />
<br />
Deleting Line IDs (&lt;i&gt;): Inside the dialogue &lt;t&gt; tags, there is a number like &lt;i&gt;10&lt;/i&gt;. Do not delete this. The game uses it for syncing and lookups.<br />
<br />
Boss Groups: If you look at the Giggs fight, his minions have &lt;bossGrp&gt;1&lt;/bossGrp&gt;. This links them to Giggs' HP bar. If you don't link them, the stage might not end correctly when the boss dies.<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://hf-empire.com/forum/images/attachtypes/xml.gif" title="XML File" border="0" alt=".xml" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=168" target="_blank" title="">219 - Data.Global_story01_xml.xml</a> (Size: 22.64 KB / Downloads: 129)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
	</channel>
</rss>