Jump to content

Problem with Strategraph Tutorial: I know the what, just not the how


Recommended Posts

the  problem I'm running into is the Strategraph tutorial. I used wilson as my anime BANKarrow-10x10.png for the animations of my creature, and i have this error,

 

"Could not find anim [run] in BANKarrow-10x10.png [wilson]"

 

I get that I need to change that to something else. But what should I change it too? Anyone with a strategraph? 

 

The creature does spawn up, but since the game can't find the available file, the game gets rid of him.

 

So I know the problem, Just unsure how to fix it. If anyone has a suggestion, or needs the actual file, please send 

 

me a privet message, and ill send you the file, or reply to this post. 

Link to comment
Share on other sites

It can't find the animation "run" in wilsons anim files. That's probably because it is called something different. The SGWilson may yield the proper name?

I thought about that, going to give it a try. I had thought that wilsons scripts where all the default scripts for human like characters. So I assumed all I needed was his bank for animations, But I wanted to ask before I did that, in case there was a better answer. I'll edit this reply if it works. 

 

You know, I thought while going through these tutorials, I'm betting these are all just "new guy" mistakes, that a majority of people must make, I should compile a list of things that have gone wrong, if anything for a resource for people to look at when their mods don't work. I think I make about every mistake there is. I've gained some experiance over the last few months from these errors, I literally feel I could go back, compile the list, and suddenly, when "newmodder156" asks why the "make a charecter/tool,hat" mod doesnt work, he can look at my list and go, 

"nope...still lost." BUT at least the answer would more then likely be there. 

Link to comment
Share on other sites

Ok before I do this, I wanted to go ahead and ask I see a prefab called playercommon.lua and in the DS anime folder there are a ton of player zip files for certain actions, Am I supposed to use one of those? and if yes or no? why or why not?

-----EDITED-----

 

Ok mind you the artwork is very alpha, but I messed something up trying to build the strategraph, and now the entire creature crashes, if anyone would like to take a stab at it, please do, and let me know what the error was. 

Basically it should be in modmain.lua, or the strategraph. My inexperience doesn't quite know which, or where,

 

I do know that I have a null value somewhere (think it's returning my character as not being there in calling the simpostinit. Before screwing with the strategraph it seemed to be at least loading. Now I'm unsure what to do. 

 

The file are below 

 

 

=====edited=====

changed out the zip file back to the original issue. K'nuckles spawns, but there the strategraph doesnt fire off.

Link to comment
Share on other sites

@RedRock911,

 

player_common.lua is the prefab that creates the base character prefab with functionality that is common to all characters.  The animation zip files contain the bajillion different animations that player characters use. The run animation specifically is in anim/player_basic.zip.  You'll notice that player_basic.lua adds this zip as an asset, along with all of the other common animation zips.

Link to comment
Share on other sites

@RedRock911,

 

player_common.lua is the prefab that creates the base character prefab with functionality that is common to all characters.  The animation zip files contain the bajillion different animations that player characters use. The run animation specifically is in anim/player_basic.zip.  You'll notice that player_basic.lua adds this zip as an asset, along with all of the other common animation zips.

 

Thank corrosive! i'm going to try and fix it myself. but if you can, can you take a look at the zip above and see what the heck I just did? 

Link to comment
Share on other sites

@RedRock911,

 

It can't find the animation because you haven't added any animation assets that actually have animations in them. It's not as easy as just adding in player_basic.zip(which contains the run animation you would want.)  The animation in player_basic.zip is actually a combination of the "run_pre", "run_loop", and "run_pst" animations (start, loop, end).  Your current stategraph only has one generic run state that tells it to play an animation named "run".  You can see how that won't work.

 

Here's one way to add some basic functionality:

-- Note that you don't need to use GLOBAL.CommonStates or GLOBAL.CommonHandlers because -- stategraph files already run in global contextstates = {}CommonStates.AddRunStates(states)CommonStates.AddIdle(states, "idle")event_handlers = {    CommonHandlers.OnStep(),    CommonHandlers.OnLocomote(true),    CommonHandlers.OnSleep(),    CommonHandlers.OnFreeze(),    CommonHandlers.OnAttack(),    CommonHandlers.OnAttacked(),    CommonHandlers.OnDeath(),}return StateGraph("knuckles", states, event_handlers, "idle", {})

There's a starting point, at least.  You still need to add quite a bit of functionality. 

 

Oh, and before you stab yourself in the eyeball with a rusty spork, you are going to want to add this to init_prefab:

inst.Transform:SetFourFaced()
Link to comment
Share on other sites

I think I put the script in the wrong place, But i'm doing my own detective work on it now.

I feel like im about to ask where do babies come from,

 

Hey guys....what's Sublime

 

--edited

had my personal stratograph named incorrectly 

 

-- Note that you don't need to use GLOBAL.CommonStates or GLOBAL.CommonHandlers because
-- stategraph files already run in global context
 
states = {}
CommonStates.AddRunStates(states)
CommonStates.AddIdle(states, "idle")
 
event_handlers = {
    CommonHandlers.OnStep(),
    CommonHandlers.OnLocomote(true),
    CommonHandlers.OnSleep(),
    CommonHandlers.OnFreeze(),
    CommonHandlers.OnAttack(),
    CommonHandlers.OnAttacked(),
    CommonHandlers.OnDeath(),
}
return StateGraph("knuckles", states, event_handlers, "idle", {})

 

Go it working, Thank you guys! 

 

 

Link to comment
Share on other sites

Ahhhh.....probably why I couldnt find anything on it.

 

That's one of the reasons that I advocate against trying to use the cookie cutter approach to modding by using templates :p  Learning is a lot harder when you don't actually know what's going on and you just plug a few variables into holes.

Link to comment
Share on other sites

That's one of the reasons that I advocate against trying to use the cookie cutter approach to modding by using templates :p Learning is a lot harder when you don't actually know what's going on and you just plug a few variables into holes.

As I'm learning, it mostly takes the same amount of time too. You can spend a week, learning to do it yourself, or a week of trying to figure out where your cut and paste went wrong.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...