Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Stance 0 (Stand) has not been initialized via Script Table
PostPosted 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.

User avatar   Superstar Dolphin Superstar DolphinMember since: 16.08.2004, 10:46Posts: 9838Location: Finland Likes: 170
 

 Post Topic: Re: Setting a actor as the default playable character
PostPosted 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   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Re: Setting a actor as the default playable character
PostPosted 17.05.2012, 23:22 
Did that already, wondering if anything else after that has to be done?


User avatar   Superstar Dolphin Superstar DolphinMember since: 16.08.2004, 10:46Posts: 9838Location: Finland Likes: 170
 

 Post Topic: Re: Setting a actor as the default playable character
PostPosted 18.05.2012, 07:27 
Nope, provided your character file is valid, changing the filepath in player.lua is all you need.
User avatar   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Re: Setting a actor as the default playable character
PostPosted 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


User avatar   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Re: Setting a actor as the default playable character
PostPosted 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?


User avatar   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 22.05.2012, 00:08 
Bumping, need answers ASAP.

Thanks :)


User avatar   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 23.05.2012, 22:32 
I hate to do this but bump....


User avatar   Superstar Dolphin Superstar DolphinMember since: 16.08.2004, 10:46Posts: 9838Location: Finland Likes: 170
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 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   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 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.


User avatar   Superstar Dolphin Superstar DolphinMember since: 16.08.2004, 10:46Posts: 9838Location: Finland Likes: 170
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 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   Uber Modder Uber ModderMember since: 17.12.2007, 04:08Posts: 1091Location: Australia Likes: 5
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 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:
[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   Trained Modder Trained ModderMember since: 19.08.2011, 07:44Posts: 301 Likes: 106
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 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.


User avatar   Uber Modder Uber ModderMember since: 17.12.2007, 04:08Posts: 1091Location: Australia Likes: 5
 

 Post Topic: Re: Stance 0 (Stand) has not been initialized via Script Tab
PostPosted 27.06.2012, 09:34 
Quote by Swanton007:
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.