Apex Skill Previewer Plugin

This plugin is created to help assist developers with creating abilities under a framework thats been already created and makes it easier for them to be able to view abilities without having to join a roblox experience/ play test.

Documentation

Skill Creation
Creating a new skill is as simple as cloning the example skill and renaming it, this is demonstrated below.

Client Replication
Due to thhe nature of this plugin the replication is not actually client sided but simulates what a client would behave as. when put in an actual game is made so that it can act as a client without having to change any code. to replicate effects from the server to the client you use the following code. (In the server module under the skill folder).

self.Replication:Replicate({
	
	Attack = self,
	Action = "test",
	Data = {}
})

this code will go the the client module under the skills folder and run the action function within the source code, the information sent to the function would be the replication class i.e the client attack class and the data sent via the server. this client fuction will look something like this.

["test"] = function(self, Data)
		
	print("test client")
end,

Performing Skills
Inorder to perform a skill you will need a valid dummy within the preview dummies folder inside the workspace (this folder will automatically be created upon startup of the plugin), to create a valid dummy you should click the add character button on the plugin widget. (the latest dummy created will be marked as last active character) once done you can select the skill you would like to perform and simply click the play button. (having multiple dummies selected works the same way)

Stopping Skills
When a skill is active you can no longer run other skills on that dummy inorder to destroy an attack class for a skill you simply destroy the class within the skill by using the following methods

self:Destroy(Callback)
self:AddFor(Time, Callback)

if you fair to remember to do this you can just click the stop button and it will destroy the active dummies attack class.

Cleanup
Cleanup is very simple within the game and garbage collecting as there is a trove within the attack class and the replication class allowing for easy cleaning up of connections and objects within the skill, the clean up is initiated upon destroction of the class and can be referenced by the following

self._trove

for more information ont he mnethods within trove visit the trove documentation

Loops
Dummies with skills active skills can be put on loop by selecting the repeat button and an interval can be set for when the dummy will repeat the skill, this saves and conmtinuesd when you leave and rejoin the experience when the plugin is reopened. you can end the loop by unchecking the loop button, while a dummy is looping a skill you cannot play another skill on it till the loop is turned off and the class is destroyed.

Server
return {
	
	["Began"] = function(self)
		
		print("test server")		
		
		self:Replicate({
			
			Attack = self,
			Action = "test",
			Data = {}
		})
		self:AddFor(5)
	end,
}

Client
return {
	
	["test"] = function(self, Data)
		
		print("test client")
	end,
}
External Media

Grab Skills
Within this framework its easy to perform grab skills its as simple as running the creategrab meta method, the good thing about this method is the dummy cleans up with the class and you get returned the dummy instance to use within your free will, it is auto welded and the parameters for the function is offset and then destruction time, none of these are coimpulsory parameters.

return {
	
	["Began"] = function(self)
		
		print("test server")		
		
		local GrabbedVictom = self:CreateGrab(CFrame.new(0, 0, -2.5) * CFrame.fromOrientation(0, math.rad(180), 0))
		self:AddFor(5)
	end,
}
External Media

Playing Animations
If you havent read this post properly you may come to notice that playing animations does not work the normal roblox way via loading animations to the animator or humanoid, this is due to animations not working while the game is not in a running state, to counter this i have created my own aniamtion module that works, and to use it its as simple as

return {
	
	["Began"] = function(self)
		
		print("test server")	
		
		local AnimationInstance = script.Animation
		self.Animation:PlayAnimation(AnimationInstance)
		self:AddFor(5)
	end,
}

Plugin In Practical Use (Credits to xMoviee)


more features such as animationevent compatibility and the ability to change animation speed is coming within the next couple mini updates.

if i have missed anything out of this documentation or you have questions they can be asked or you can dm me on discord: .apexsage

4 Likes