A Hat in Time Guide

SebGoP222's Guide on Scooter Status Effects for A Hat in Time

SebGoP222’s Guide on Scooter Status Effects

Overview

This is my First Guide I’ve ever madeDISCLAIMER… If you don’t know how to make a sprint flair, check out this guide: https://steamcommunity.com/sharedfiles/filedetails/?id=1625899368 it’s really important to know how to make one in order for your scooter status effect to work.You need blender for this tutorial, come on now it’s free: https://store.steampowered.com/app/365670/Blender/ You also need Notepad ++ for this, it’s also free: https://notepad-plus-plus.org/ or you can just use the default notepad in Windows 10, or whatever fits best youI’ve been making Scooter Status Effects for a decent amount of time now, and recently I wanted to share how I make my Scooter Status Effects so everyone can make their own. In this guide you will learn how to make your very own Scooter Status Effect.

The Basics.

In order to make your Scooter Status Effect, you first need to make a Sprint hat flair, if you don’t know how to make a flair, then check out this guide: [link] then come back once to this guide once you’ve made your sprint flair. If you made a flair before, then continue on with this guide.

The First Step, making your new mod.

You should know this by now, create a new mod in your mod manager and name it whatever you like, it should be something like this:

Next thing you should do is create your Classes and Content folders in your mod folder…

The Classes folder is where you should put your put your scripts in
And the Content folder is where your Scooter Status Effect Model and your flair goes.

But wait, we don’t have our model yet, so where do we go? Well let’s discuss this in the next Step…

The Second Step, Finding your model of choice.

If you don’t know where to get your models, then visit The Model Resource, you will find plenty of things you can use for your new mod, its recommended for people that are just getting into modding.

For our example, we will use this piano found on the website

Next you should open blender if you have it, then you want to click File, then from there you should see an import button, that how we are going to get our model in blender:

You should also know what file format your model is using so you can see if you can import it or not.

The one that is named piano is an OBJ for example, so we need to import it in as an obj file.

Once you get that done, it should look like thi… oh no, it’s way to big

If this ends up big for you, then you should scale it down a bit… I guess

Okay now you’re wondering where is the material for it, if you are using blender 2.8 and above, then press Z and you should get something like this:

Now you should click on material preview so you can see it in its full beauty.

Next you should create a new Armature, so it can be a skeletal mesh, (The scooter model is actually a skeletal mesh, so it’s very important you get it down.) It should be like this:

What you should do next is first delete the camera and light in your collection (Since we don’t need them.), next select the newly created armature FIRST, Hold SHIFT and then select the piano, now press CTRL P and you get something like this:

Set the parent to “With Automatic Weights.” this will allow for the editor to see it as a SkeletalMesh.
And now the Piano is grouped together with the armature

With your SkeletalMesh almost ready, you just need to do one more thing, and that’s to export it as a FBX

Now this is important, on the right, you’ll see geometry, set the smoothing to edge and in armature, toggle off add leaf bones. This is so the editor will not have any trouble reading our newly created fbx.

Now that we have our model done, we can now move on to the 3rd step.

The Third Step, using the Hat in time editor, The halfway point.

With our piano now done, we now need to import it into the editor. In your mod manager, click launch the editor like usual. In your content browser, click import on your content browser, find where you put your fbx in

Once you clicked that, now you gotta place it in whatever new package you like. You can name it whatever you want.

Now you have your skeletalMesh in the editor.

Now the next thing you want to do is important. Click on socket manager and create a new socket, this is the important part, name it “Driver”, this is where Hat kid will sit when you create a new scooter. Next you wanna create another socket, this time name it “Horn”, this were the particle effect will go when you honk your horn in the scooter.

With your sockets in hand, there is also one more important thing you need to know, The red arrow on your Driver socket is the direction Hat kid is facing

As you can see, it’s not in the right direction, to fix this, we need to go back into the socket manager, click on the Driver socket, now find the Relative Rotation, once you found it, change the Yaw value to 90, this will rotate 90 degrees. (Note this also applies to the Horn socket, so do the same thing for it.)

Once you have this done, move your Driver socket to where your seat is on your model.

If you need help adjusting it, on Preview Skel Mesh, insert this SkeletalMesh’HatInTime_Characters_HatKid.models.HatKidGreg’ , You can use this as your guide to how hat kid should fit in the Scooter Status Effect Model (Note its not exactly perfect, as hat kid is not in the scooter sitting animation, so you gotta use her legs as a reference). For the Horn socket, move it to wherever you like, on the front or the back. It should be something like this now:

Your Scooter Status Effect Model is now complete, what you should do next is save it to your New Mod’s content folder you created earlier.

You’ve finally completed your mesh, now there only one more thing to do, it is the Scripting

The Fourth Step, Coding the Scooter Status Effect, The EndGame.

If you made it this far, congratulations, you’re almost done with your mod. Now here comes the hardest part, the code. First thing you want to do is create a new .uc file and name it whatever you want
(Ex: SebGoP222_StatusEffect_yourmodname) Now go back to your Sprint Flair code, after “CosmeticItemName = Yourname” press enter (Which will create a new line, and paste this line of code.)

StatusEffectOverride = class’SebGoP222_StatusEffect_yourmodname’
ClassOverride = class’SebGoP222_StatusEffect_yourmodname’

It should be something like this:

With this now go back to your “SebGoP222_StatusEffect_yourmodname” and Copy & Paste this whole line of code

class SebGoP222_StatusEffect_yourmodname extends Hat_StatusEffect_BadgeScooter;
defaultproperties
{
ScooterMesh = SkeletalMesh’Jojo_testing_guide.GiornosPianoexampke’;
}
static function SkeletalMeshComponent CreateScooterMesh(Actor InActor, SkeletalMeshComponent InComponent)
{
local SkeletalMeshComponent SkeletalMeshComponent;
SkeletalMeshComponent = new class’SkeletalMeshComponent’;
SkeletalMeshComponent.SetSkeletalMesh(default.ScooterMesh);
SkeletalMeshComponent.SetAnimTreeTemplate(default.ScooterAnimTree);
if (default.ScooterPhysics != None)
SkeletalMeshComponent.SetPhysicsAsset(default.ScooterPhysics);
SkeletalMeshComponent.SetTranslation(default.ScooterTranslation);
SkeletalMeshComponent.SetLightEnvironment(InComponent.LightEnvironment);
if (default.ScooterPhysicsAssetInstance)
SkeletalMeshComponent.SetHasPhysicsAssetInstance(true);
InActor.AttachComponent(SkeletalMeshComponent);
SkeletalMeshComponent.AttachComponentToSocket(InComponent, ‘Driver’);
return SkeletalMeshComponent;
}
function float GetSpeed()
{
return 800;
}

With this down, there are a few things you need to change. One of them is the “ ScooterMesh = SkeletalMesh’Jojo_testing_guide.GiornosPianoexampke’; ”, change the “SkeletalMesh’Jojo_testing_guide.GiornosPianoexampke” to your new skeletalmesh.

An optional thing you should also know is the
“ function float GetSpeed()
{
return 800;
} ”

The “800” part you can change it to any number, example if you want your scooter to go 2X faster than the normal scooter, you should put in “1600” or 3X faster then “2400”.

A completely optional line of code you could put in after your ScooterMesh line is this:

ExplodeSound =
HonkSound =
OnSitInVehicleSound =

This pretty much changes some of your Scooter Status Effect’s sound it makes. Here’s an example:

Guess what, your finally complete with your coding, what’s left to do is compile the scripts and cook the mod. It’s also a good way of finding out if you made any coding mistakes.

The Conclusion.

In conclusion, you now know how to make your own Scooter Status Effects, if you have any questions, please let me know in the comment section or visit the Hat in Time Discord for any help.

You can find my newly created Piano here: [link]

SteamSolo.com