Jump to content
  • The forum downloads section will be removed on Jan 1st 2023. Players may still download mods that are currently hosted, but new submissions are no longer being accepted. Mod makers are advised to relocate their mods to alternative hosting solutions.

Smashtemplate 1.1.0


1 Screenshot

About This File

This is a template fighter for the Smashup mod for Don't Starve Together! 

Smashup mod can be found here: https://steamcommunity.com/sharedfiles/filedetails/?id=2701285237

Download and follow the guide in MODDING_GUIDE_README.lua

Follow along with video tutorials: https://youtube.com/playlist?list=PL0je6QsFGE5DhpTPLc-w7wIWysRgfAyEL

 


What's New in Version 1.1.0   See changelog

Released

A lot of small tweaks have been made to all character stategraphs since the launch of smashup, and this update catches smashtemplate up to speed now that things have settled down.

These changes were mostly improvements on controls and updates to the buffer system, as well as fixing some of the grabbing bugs.

If you're using a stategraph from the previous version and you don't want to start over, you might want to make the list of changes below to your own stategraph. Your character should still work without the changes, but controls may feel a bit wonky.

Don't forget to ask if you have questions! I'd be happy to help anyone interested in making a custom character.

Stategraph Changes:

Spoiler

	Find the state named "grabbed" and paste this code into it, right ABOVE the "onexit =" line
	timeline =
	{
		TimeEvent(90*FRAMES, function(inst)
			inst.sg:GoToState("rebound", 10)
		end),
	},
	
	
	In the "grabbing" state (different than the one above) find this line: 
		EventHandler("on_hitted", function(inst)
	Replace it with this:
		EventHandler("on_punished", function(inst)
	In that same state, add this line anywhere after the "onenter=function()" line:
		inst.Physics:Stop()
	
	In the "block_stop" state, Paste the following code in the line above "timeline ="
	onupdate = function(inst)
		--HOTFIX
    end,
	
	
	in the "grab_ledge" state, add this state tag to the table of tags underneath the name. Don't forget to include a comma between tags
		"no_air_transition"
	
	
	In the "cstick_side", "cstick_up" and "cstick_down" event handlers, add the following line
		local tiltstick = inst.components.stats.tiltstick
	And also in those event handlers, for every line that put you into a smash attack like this...
		inst.sg:GoToState("fsmash_start")
	Replace each of those lines with this block of code, respective to their direction:
		if tiltstick == "smash" then
			inst.sg:GoToState("fsmash_start")
		else
			inst.sg:GoToState("ftilt")
		end
	
	in the state  name = "ll_medium_getup"   add the following state tag to the "tags" table
		"can_grab_ledge"
	The tags should now look like this:
		tags = {"busy", "can_grab_ledge"}, 
	Do the same for the "run_stop" state, adding "can_grab_ledge" to the tags
	
	
	In the state  name = "dash_start",  Add the following block of code to the "events" section:
		EventHandler("cstick_side", function(inst, data)   
			inst.components.locomotor:FaceDirection(data.key)
			inst.sg:GoToState("fsmash_start")
		end), 
	
	
	In the state  name = "ledge_drop",  Add the following state tag to the "tags" table (don't forget to seperate them with a comma)
		"no_fastfalling"
		
	
	In the state  name = "thrown",   Add the following block of code underneath the onenter fn:
		timeline =
        {
			TimeEvent(30*FRAMES, function(inst) 
				inst.sg:RemoveStateTag("busy")
			end),
        },
	
	
	Find the following block of code in the "throwattack" eventhandler (around line 430):
		if data.key == "backward" or data.key == "diagonalb" then 
			inst.sg:GoToState("bair")
		elseif data.key == "forward" or data.key == "diagonalf" then
			inst.sg:GoToState("fair")
	
	Replace it with this:
		if data.key == "backward" then 
			inst.sg:GoToState("bair")
		elseif data.key == "diagonalb" then 
			if inst.components.stats.tapjump then
				inst.sg:GoToState("bair")
			else
				inst.sg:GoToState("uair")
			end
		elseif data.key == "forward" then 
			inst.sg:GoToState("fair")
		elseif data.key == "diagonalf" then
			if inst.components.stats.tapjump then
				inst.sg:GoToState("fair")
			else
				inst.sg:GoToState("uair")
			end
			
			
	Find the following line (it appears twice):
		if is_attacking or is_busy then return end
	Replace both lines with this:
		if is_busy then return end
		
		
	
	Find the following:
		EventHandler("cstick_up", function(inst)
	Replace with this:
		EventHandler("cstick_up", function(inst, data)
	And do the same to the "cstick_down"  event handler
		
	Add the following line into the "cstick_up" event handler
		if data and data.key == "backward" and not (is_busy or airial) then
			inst.components.locomotor:TurnAround()
		end
	And add the same thing to the "cstick_down"  event handler

	
	Find the following line of code:
		elseif not inst.sg:HasStateTag("busy") or can_attack then
	Add this block of code above it:
		elseif inst.sg:HasStateTag("can_usmash") and inst.components.stats.tapjump and (data.key == "up" or data.key == "diagonalf" or data.key == "diagonalb") then
			inst.sg:GoToState("uptilt")

	
	Find the following line:
		if (inst.sg:HasStateTag("can_usmash") or can_ood) or not is_busy and not airial then
	Replace it with this:
		if (inst.sg:HasStateTag("can_usmash") or can_ood) and inst.components.stats.tapjump or not is_busy and not airial then
	
	
	Find the following line:
		if can_oos or (data.key == "block" and not airial) then
	Add this line directly underneath it:
		if data.key2 == "backward" then inst.components.locomotor:TurnAround() end
	
	
	Just replace the entirtey of the old  EventHandler("jump", function(inst, data)   section with the new one.
	There were a lot of changes to it. 

 

 

  • Like 4
  • Health 2
  • GL Happy 1
  • Potato Cup 1
 Share


User Feedback

Recommended Comments

Oh my, didn't expect something like custom characters. This is gonna be fun to tinker with

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...