If you want to help us maintaining this wiki, check out our discord server: https://discord.gg/3u69jMa 

Difference between revisions of "Create a new sciptable Class"

From SWRC Wiki
Jump to navigation Jump to search
Line 24: Line 24:


==Create a new class with APC==
==Create a new class with APC==
[[APC_-_Actor_Package_Creator]] helps you creating new classes with a few mouse clicks, unfortunately you can only save one class per package which can be annoying.
[[APC - Actor Package Creator]] helps you creating new classes with a few mouse clicks, unfortunately you can only save one class per package which can be annoying.
 
 


==Manipulating new class with Hex Editor==
==Manipulating new class with Hex Editor==

Revision as of 10:57, 30 November 2017

Creating new scriptable classes can be a little bit tricky sometimes. There a few methods to do so.


Creating a new class inside UnrealED

This is the common way of creating a new class. Open up UnrealED and look at the Actors browser. Pick a class where you would like to create a subclass.

Onces you found your parent class, mark it and place it in an empty BSP geometry eg. room.

Unrealed newclass.PNG

So I selected DMGame class and placed it in my room. The placed actor and the one in the list need to be marked/selected. Next on top bar, go to "Class" and select "New From Selection".

Now enter a name for your new subclass and package name.


Important!: If you don't place the parent actor in a BSP geometry and instead directly click on "New From Selection", you will be able to create a subclass, but it won't have a script to edit.


Anyway of you want to create multiple classes for one package, repeat the steps above and just change the name of the class but keep the package name. Before starting scripting after creating new classes, you should close UnrealED and save new packages first.

Also note that on some classes (mainly native classes), you won't be a to create sub classes. (Security) See below for bypassing this issue.


Create a new class with APC

APC - Actor Package Creator helps you creating new classes with a few mouse clicks, unfortunately you can only save one class per package which can be annoying.

Manipulating new class with Hex Editor

Imagine you want to create a new scriptable class for something where you shouldn't be able to (Native Classes) and you can't use any tools right now. There is a trick with changing names of classes with hex editor. Create a new sub class and save it. Open up the package with any hex editor and search for the class name. Replace the name with new desired class name and save it. Try to load it up and see if it worked.

Hex class.PNG

In this example, I opened up MoverProperties package and could be able to change the name of class to new one.


Creating new class with UCC

s