<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TTW &#8211; Pre Alpha</title>
	<atom:link href="http://twistedtimesworld.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://twistedtimesworld.com</link>
	<description>Website-Build in Progress. </description>
	<lastBuildDate>Sat, 30 Jul 2022 21:09:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.4</generator>
	<item>
		<title>[TUT] Unreal Engine &#8211; Add Modules</title>
		<link>http://twistedtimesworld.com/tut-unreal-engine-add-modules/</link>
		
		<dc:creator><![CDATA[mariofunderburk]]></dc:creator>
		<pubDate>Wed, 30 Sep 2020 01:42:56 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://twistedtimesworld.com/?p=1981</guid>

					<description><![CDATA[[Summary] Modules and Gameplay Modules in Unreal Engine are powerful features; they allow programmers to independently develop and inherit functionality as well as doing so in a self-encapsulated manner. In this brief post, we&#8217;ll go over how to add and register a module to your Project. [Warnings / Architecture] There are a few gotchas&#8217; within &#8230; <a href="http://twistedtimesworld.com/tut-unreal-engine-add-modules/" class="more-link">Continue reading<span class="screen-reader-text"> "[TUT] Unreal Engine &#8211; Add Modules"</span></a>]]></description>
										<content:encoded><![CDATA[
<p>[Summary]</p>



<p><a rel="noreferrer noopener" href="https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/ModuleFiles/index.html" target="_blank">Modules </a>and <a rel="noreferrer noopener" href="https://docs.unrealengine.com/en-US/Programming/Modules/Gameplay/index.html" target="_blank">Gameplay Modules</a> in Unreal Engine are powerful features; they allow programmers to independently develop and inherit functionality as well as doing so in a self-encapsulated manner. In this brief post, we&#8217;ll go over how to add and register a module to your Project. </p>



<p>[Warnings / Architecture]</p>



<p>There are a few gotchas&#8217; within Modules. </p>



<ul><li>Modules are one-way relationship only. Unlike having Class A reference B and have B reference A be &#8220;okay,&#8221; Modules are treated as a self-governing box. If we had Module B referencing A, upon loading, B would not be able to load until A has been fully loaded. If A was referencing B, that would mean that B would then have to load beforehand and so on&#8230; You can see where I&#8217;m going with this. </li><li>Modules are rather Rigid by design. Say you have two systems, C and D, and each has four &#8220;layers&#8221; of headers: 1 to 4. D1 includes C1, C2 -&gt; D1, and so forth. Within a single module, this is possible. you can even, half-way through design, throw system E, F, G, etc into the mix while taking care of circular dependencies.  Nevertheless, Modules cannot &#8220;talk&#8221; to each other. You can create Module &#8220;0&#8221; to have interfaces for both A and B to use, and then establish a mediator-based communication. From an inheritance PoV, however, this means that both A and B &#8220;inherit&#8221; from &#8220;0.&#8221;</li><li>Within Unreal Engine 4&#8217;s Module system, only what you manually export gets actually exported. Some exceptions apply.</li></ul>



<p>[Rundown ]</p>



<p>To create a module, you need at least 3 files: a .h + .cpp pair for the Module class, and a .Build.cs configuration file. Say that you wish to create the module called &#8220;Elephant&#8221;:</p>



<p>Elephant.h</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
#pragma once
#include &quot;CoreMinimal.h&quot;
#include &quot;Modules/ModuleManager.h&quot;

class FElephant: public IModuleInterface
{
public:

    /** IModuleInterface implementation */
    virtual void StartupModule() override;
    virtual void ShutdownModule() override;
};
</pre></div>


<p>Elephant.cpp</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
#include &quot;Elephant.h&quot;
#define LOCTEXT_NAMESPACE &quot;FElephant&quot;

void FElephant::StartupModule()
{
    // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin/.uproject file per-module
}

void FElephant::ShutdownModule()
{
    // This function may be called during shutdown to clean up your module.  For modules that support dynamic reloading,
    // we call this function before unloading the module.
}

#undef LOCTEXT_NAMESPACE
	
IMPLEMENT_MODULE(FElephant, Elephant)
</pre></div>


<p>Elephant.Build.cs</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
using UnrealBuildTool;

public class Elephant : ModuleRules
{
    public Elephant(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        //Unity controls how Actions are built. 
        bUseUnity = false;
		
        PublicIncludePaths.AddRange(
            new string&#91;] {
                // ... add public include paths required here ...
            }
        );
			
		
        PublicDependencyModuleNames.AddRange(
            new string&#91;]
            {
                &quot;Core&quot;,
                // ... add other public dependencies that you statically link with here ...
            }
        );
			
		
        PrivateDependencyModuleNames.AddRange(
            new string&#91;]
            {
                &quot;CoreUObject&quot;,
                &quot;Engine&quot;,
                &quot;Slate&quot;,
                &quot;SlateCore&quot;,
                // ... add private dependencies that you statically link with here ...	
            }
        );
    }
}
</pre></div>


<p>Now, we must make sure that we&#8217;re adding it to what we need: potential modules and main Project Module</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
//inside the module that will be using the &quot;Elephant&quot; Module in Public/Private dependencies, depending on your needs.
			
		
        PublicDependencyModuleNames.AddRange(
            new string&#91;]
            {
                &quot;Core&quot;,
                &quot;Elephant&quot;
                // ... add other public dependencies that you statically link with here ...
            }
        );

</pre></div>


<p>And more importantly, we MUST register it for our Plugin/Project to actually use it! </p>



<p>In the Modules part, add the entry</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
	&quot;Modules&quot;: &#91;
		{
			&quot;Name&quot;: &quot;Elephant&quot;,
			&quot;Type&quot;: &quot;Runtime&quot;,
			&quot;LoadingPhase&quot;: &quot;Default&quot;
		}, 
                //Other modules if necessary
          ]
</pre></div>


<p>For Plugins, you must input this in YourPluginName.uplugin. For GameModules, it will go in your YourProjectName.uproject. You must add them to this list in order to get it loaded!</p>



<p>[Exporting]</p>



<p>What can be exported:</p>



<ul><li>Global Functions/Variables</li><li>UStruct structs</li><li>UClass classes</li></ul>



<p>What is exported automatically:</p>



<ul><li>UEnum enumerators</li><li>Delegates</li></ul>



<p>Examples of Exported classes:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: cpp; title: ; notranslate">
UENUM(BlueprintType)
enum class EMyClass : uint8 { MyType = 0, MyPC, MyCar };

DECLARE_DELEGATE_OneParam(FMyDelegate, bool);

USTRUCT() 
struct ELEPHANT_API FMyStruct { GENERATED_BODY() }; 

UCLASS()
class ELEPHANT_API AMyActor : public AActor { GENERATED_BODY() };
</pre></div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[TUT] Unreal Engine &#8211; Core Redirectors</title>
		<link>http://twistedtimesworld.com/tut-unreal-engine-core-redirectors/</link>
		
		<dc:creator><![CDATA[mariofunderburk]]></dc:creator>
		<pubDate>Tue, 29 Sep 2020 23:01:33 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://twistedtimesworld.com/?p=1974</guid>

					<description><![CDATA[[Redirectors Simplified] Explained on this link, Core redirects serve as a way to update In-Editor assets for changes in Source code; changes relating to Class Name/Property Name/Function Name/Module_API changes. This post aims to further explain how they work and how to use them. [Where to put them] For changes to Game Modules, they go in &#8230; <a href="http://twistedtimesworld.com/tut-unreal-engine-core-redirectors/" class="more-link">Continue reading<span class="screen-reader-text"> "[TUT] Unreal Engine &#8211; Core Redirectors"</span></a>]]></description>
										<content:encoded><![CDATA[
<p>[Redirectors Simplified]</p>



<p>Explained on <a rel="noreferrer noopener" href="https://docs.unrealengine.com/en-US/Programming/Assets/CoreRedirects/index.html" target="_blank">this link</a>, Core redirects serve as a way to update In-Editor assets for changes in Source code; changes relating to Class Name/Property Name/Function Name/Module_API changes. This post aims to further explain how they work and how to use them. </p>



<p>[Where to put them]</p>



<ul><li>For changes to Game Modules, they go in Project/Config/DefaultEngine.ini</li><li>For changes to Project-only Plugins, they go in Project/Plugins/Config/DefaultYourPluginName.ini</li><li>For changes to Engine-level Plugins, they go in /PluginDirectory/BaseYourPluginName.ini</li></ul>



<p>[Rundown]</p>



<p>Extending from UE4&#8217;s docs, you can also visit the following links:</p>



<ul><li><a rel="noreferrer noopener" href="https://unrealingens.wordpress.com/2018/05/08/quick-tip-fixing-parentless-blueprints-with-coreredirects/" target="_blank">Fixing Parentless Blueprints with Core-Redirects</a></li><li><a href="https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/24493-migrate-code-based-blueprint" target="_blank" rel="noreferrer noopener">Unreal Forum Post: Migrate Code Based Blueprint</a></li></ul>



<p>In this post&#8217;s examples, we&#8217;ll include 3 types of Redirectors: Enums, Structs, and a UClass. An important detail in general, is that there can only be one Class Name, meaning that you cannot have UMyClass and AMyClass. </p>



<p>First, we open with </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&#91;CoreRedirects] 
</pre></div>


<p>Second, we go, line by line. Template Example:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&#91;CoreRedirects] 
+RedirectType=(OldName=&quot;/Script/ModuleName.ClassName&quot;,NewName=&quot;/Script/ModuleName.ClassName&quot;, MatchSubstring=true)
</pre></div>


<p>In a single redirect, you can update both the class name and Module name. Say that you had class AMyActor in ModuleA, and you&#8217;ve renamed it to AMyBicycle in ModuleB. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
+RedirectType=(OldName=&quot;/Script/ModuleA.MyActor&quot;,NewName=&quot;/Script/ModuleB.MyBicycle&quot;, MatchSubstring=true)
</pre></div>


<p>Notes: Enumerators require EPrefix. Structs and UClasses, however, do not require it. </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
.../Script/ModuleName.EClassName //For enumerators
.../Script/ModuleName.ClassName //For UStruct/UClasses
</pre></div>


<p>RedirectorType Name Examples:</p>



<ul><li>Enumerator Redirect Name = EnumRedirects</li><li>Struct Redirect Name = StructRedirects</li><li>UClass Redirect Name = ClassRedirects</li></ul>



<p>Once you&#8217;ve saved your .ini, Launch the Editor. Note that Core Redirectors are a  heavy on Launch, so make sure to solve redirectors as quickly as possible. To address the redirectors, you must Load the Assets, Compile them (Where available), and resave them. Once all potential assets have been fixed, you may remove the Redirects from the configuration file. </p>



<p>Added, from @Hojo. A working example on redirecting a Blueprint Enum to a C++ UEnum.</p>



<p>+EnumRedirects=(OldName=&#8221;OverlayState&#8221;,NewName=&#8221;/Script/Module.EOverlayState&#8221;,OverrideClassName=&#8221;/Script/CoreUObject.Enum&#8221;,ValueChanges=((&#8220;NewEnumerator0&#8243;,&#8221;Default&#8221;),(&#8220;NewEnumerator2&#8243;,&#8221;UnarmedPosing&#8221;),(&#8220;NewEnumerator6&#8243;,&#8221;Firearm&#8221;)))</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
