Forums Gallery Downloads LOGIN |REGISTER

Stance 0 (Stand) has not been initialized via Script Table

Please use this forum for questions on C++, Lua, XML, and any other languages used in CryENGINE development.


 

User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Stance 0 (Stand) has not been initialized via Script Table

Postby Swanton007 » 16.05.2012, 23:43

Hey guys, I recently followed JustMakeGames.com's tutorial on a custom character. I opened up the scripts.pak file and extracted the player.lua file to: game/scripts/scripts/entities/actor/
I changed lines 36,37,39 to match my character object file. When I launched my cryengine 3 sdk and tried to play the game the first person eyes (Camera) didn't move, there were no physics and changing view port did not do anything. (Basically its like the editor but you cant move unless you exit the play game.

I tried moving the player.lua file into the pak (and editing the one inside the pak file) when I try to run the game doing this it crashes.

Additionally If I don't delete the player.lua file inside the pack file the agent spawns instead of my player. Im sure somebody has figured this out. Please tell me what you did to get rid of the "Error: Stance 0 (Stand) has not been initialized via script table" message.

Thanks :)

PS OP was about the character not showing up and the agent showing up over it, please take this into consideration when reading some posts bellow this one that was edited
Last edited by Swanton007 on 20.05.2012, 05:14, edited 2 times in total.
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
the_grim
Superstar Dolphin
Superstar Dolphin
 
Posts: 9884
Member since: 16.08.2004, 10:46
Location: Finland
Likes: 189

Re: Setting a actor as the default playable character

Postby the_grim » 17.05.2012, 10:11

Hi,

There's already a Player.lua file inside Scripts.pak, you should extract this file to your Scripts\Entities\Actor folder. The file has quite a lot of content the engine needs, I don't think it's a good idea to write your own from scratch.

After you've copied the existing player.lua, it's easy to modify it to change the character model to be used. There's a line that specifies "ClientFileModel", you can simply change the filepath to point to your own CDF (character definition file). ;)
User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Re: Setting a actor as the default playable character

Postby Swanton007 » 17.05.2012, 23:22

Did that already, wondering if anything else after that has to be done?
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
the_grim
Superstar Dolphin
Superstar Dolphin
 
Posts: 9884
Member since: 16.08.2004, 10:46
Location: Finland
Likes: 189

Re: Setting a actor as the default playable character

Postby the_grim » 18.05.2012, 07:27

Nope, provided your character file is valid, changing the filepath in player.lua is all you need.
User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Re: Setting a actor as the default playable character

Postby Swanton007 » 18.05.2012, 20:00

Got it to work, I had to delete the one that is in the .pak file. Its giving me a error for the stance. Im guessing thats because I didn't set up an animation graph. ON TO ANIMATION GRAPHING. :P

Thanks, Swanton007
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Re: Setting a actor as the default playable character

Postby Swanton007 » 19.05.2012, 05:24

Ok, now getting a totally different problem:

I changed the custom character to the cryengine 3 humanoid that comes with cryengine 3. I'm sure this is a noob problem but I'm getting the following error:

Warning] Stance 0 (Stand) has not been initialized via script table.

How do I set up this "Script Table" the only one I found so far is for AI, and that is confusing me...
Any help?
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby Swanton007 » 22.05.2012, 00:08

Bumping, need answers ASAP.

Thanks :)
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby Swanton007 » 23.05.2012, 22:32

I hate to do this but bump....
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
the_grim
Superstar Dolphin
Superstar Dolphin
 
Posts: 9884
Member since: 16.08.2004, 10:46
Location: Finland
Likes: 189

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby the_grim » 24.05.2012, 09:16

Does the problem manifest in the game, preventing you to do something you need, or is it only a warning in the console?
User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby Swanton007 » 24.05.2012, 16:51

It stops all gameplay. The player doesn't spawn. If I'm in the air and I go in game the mesh doesn't appear, I don't fall. Basically when I play, the screen stays the same exept I can't move. So yes it is a critical error. I will try to make a video of the error when I get home.
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
the_grim
Superstar Dolphin
Superstar Dolphin
 
Posts: 9884
Member since: 16.08.2004, 10:46
Location: Finland
Likes: 189

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby the_grim » 24.05.2012, 17:43

From my experiments with editing the player scripts, that sounds like the character doesn't have any animations (the player can't move without a walking animation) and it could even be that the character doesn't have a proper skeleton (AFAIK a physics skeleton is needed for collision and physics). Either there's something wrong with your filepath - since the mesh doesn't appear at all - or the humanoid character uses a different set of animations.

Doing a quick search now (something you could do as well, just a heads-up :P) I realized I was wrong earlier leading you to believe player.lua is the only file you need to modify - you character also needs a .chrparams file which registers the animations that character can use! Sorry about that... :unsure: I explain the procedure of changing the player model in a bit more detail here: viewtopic.php?p=915871#p915871

You can read more about character scripts (including the .chrparams file) and animations here: http://freesdk.crydev.net/display/SDKDO ... ion+Assets


It's strange though, since you'd think the Humanoid character already has a valid .chrparams file. Try duplicating the skeleton_character.chrparams as per the instructions in the thread above, and see if that fixes your issue. ;)
User avatar
Ilsamir Lord
Producer
Producer
 
Posts: 1091
Member since: 17.12.2007, 04:08
Location: Australia
Likes: 5

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby Ilsamir Lord » 27.06.2012, 08:01

I'm receiving the same warning, but in a different situation, so I thought I'd enquire here as well.

I've added a stance to IActor.h, and incorporated this new stance into my code in PlayerInput.cpp. Now, however, I'm receiving an error in-game when I try to perform my action (and, of course, my animation, which I've linked to my new action through Animation Graph, does not play):

Code: Select all
[Warning] Stance 17 (myStance) has not been initialized via script table.

Ignore the number (17), by the way; I've added a bunch of new ones, but only referenced one of them in code. I've added my new stance to the player.lua and the BasicActor.lua, but I'm pretty much flying blind here! Any ideas :)?
User avatar
Swanton007
Developer
Developer
 
Posts: 342
Member since: 19.08.2011, 07:44
Likes: 126

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby Swanton007 » 27.06.2012, 09:24

What worked for me was completely putting the player.lua in a new path in game/scripts/entities/actors and not game/scripts/scripts/entities/actor like it was found in the pak file.
Facebook | IndieDB | Steam
Skype: Swanton0014
User avatar
Ilsamir Lord
Producer
Producer
 
Posts: 1091
Member since: 17.12.2007, 04:08
Location: Australia
Likes: 5

Re: Stance 0 (Stand) has not been initialized via Script Tab

Postby Ilsamir Lord » 27.06.2012, 09:34

Swanton007 wrote:What worked for me was completely putting the player.lua in a new path in game/scripts/entities/actors and not game/scripts/scripts/entities/actor like it was found in the pak file.

Thank you, I think I had that problem earlier in the process. My problem is something to do with the content of the player.lua (or that something is missing from it), so I'm really wondering how to fix that warning.


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community