NPCMaxwell Posted June 19, 2024 Share Posted June 19, 2024 (edited) So the SG animations replacing works well for my custom character so far, but I fear I am not too sure how to find the SG equivalent to all of the animations I want to edit in one scml file. For example I am a huge fan of the charlie_stage, but my character requires lots of adjustments (it's fun to do, I don't mind the work). So far I've successfully replaced all animations defined in the acting_talk state and the acting_idle state besides those two last animations from the player_acting folder. So does ANYONE happen to know where I can find "ref_idle" and "x1" in the SG? I have also done a search via Notepad++ in the other files from the scripts folder, but it stays a riddle to me where those two are defined. I only saw that the player_acting.zip is obviously been loaded as assests in player_common but I don't dare to touch this file. (unless I have to? Would need some insurance first.) For reference I mean this: which "1x" is the character doing funny arm animations while talking for stageplay (soliquolies?) and ref_idle is the character in front, side, back view. Could THIS thing in SGWilson may have something to do with "x1", if yes how would I have to replace it since so far I always called my replacment animation tall_originalnameinspriterfile but I don't dare to just try out by replacing something I can't even identify with tall_1. (state acting_action) Spoiler State{ name = "acting_action", tags = { "talking", "acting" }, onenter = function(inst, data) local loop = false if data.animtype == "loop" then loop = true inst.sg.statemem.loop = true end if data.animtype == "hold" then inst.sg.statemem.hold = true end if type(data.anim) == "table" then for i,animation in ipairs(data.anim)do inst.sg.statemem.queue = true if i == 1 then if #data.anim == 1 and loop then inst.AnimState:PlayAnimation(animation, true) else inst.AnimState:PlayAnimation(animation, false) end elseif i == #data.anim then inst.AnimState:PushAnimation(animation, loop) else inst.AnimState:PushAnimation(animation, false) end end else inst.AnimState:PlayAnimation(data.anim, loop) end if data.line then DoTalkSound(inst) end end, events = { EventHandler("donetalking", function(inst) StopTalkSound(inst) if not inst.sg.statemem.loop and not inst.sg.statemem.hold then inst.sg:GoToState("acting_idle") end end), EventHandler("animover", function(inst) if not inst.sg.statemem.loop and not inst.sg.statemem.hold then if not inst.sg.statemem.queue then inst.sg:GoToState("acting_idle") end end end), EventHandler("animqueueover", function(inst) if not inst.sg.statemem.loop and not inst.sg.statemem.hold then if inst.sg.statemem.queue then inst.sg:GoToState("acting_idle") end end end), }, onexit = function(inst) StopTalkSound(inst) end, }, EDIT: Neither can I figure out how to e.g. replace the animations that say animation_camerarotation. That would for example be all the hit variations in player_actions.scml / zip (hit_back, hit_goo_back, hit_up, etc.). I doubt it would be a good idea if I somehow disabled rotation stuff for my character, so I would love to keep those animations, too and just edit them a little bit. But for this I would have to find out where they are defined. (once again I can only find their standard front-view animations in SGWilson) Edited June 19, 2024 by NPCMaxwell Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/ Share on other sites More sharing options...
Rickzzs Posted June 20, 2024 Share Posted June 20, 2024 Replacing animations requires a technique of AnimState proxy, instead of SG. If you hack SG, you'll find every occurrences. The technique can be found in https://steamcommunity.com/sharedfiles/filedetails/?id=3045668614 In brief, local old=inst.AnimState inst.AnimState={} local fn=function(t,key) local oldfn=old[key] --here hack every Animation related functions. If key=='PlayAnimation' then if a=='acting1' then a='my acting1' end end return function(x,a,b,c,...) return oldfn(old,a,b,c,...) end end setmetatable(inst.AnimState,{__index=fn}) Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727176 Share on other sites More sharing options...
NPCMaxwell Posted June 20, 2024 Author Share Posted June 20, 2024 (edited) 10 hours ago, Rickzzs said: Replacing animations requires a technique of AnimState proxy, instead of SG. If you hack SG, you'll find every occurrences. The technique can be found in https://steamcommunity.com/sharedfiles/filedetails/?id=3045668614 In brief, local old=inst.AnimState inst.AnimState={} local fn=function(t,key) local oldfn=old[key] --here hack every Animation related functions. If key=='PlayAnimation' then if a=='acting1' then a='my acting1' end end return function(x,a,b,c,...) return oldfn(old,a,b,c,...) end end setmetatable(inst.AnimState,{__index=fn}) The problem kind of is, that I can't even find the "x1" acting animations in the first place. I have already replaced everything in SG that I was able to identify. (character is placed on charlie-stage and idles version 1 and version 2, character is placed on charlie-stage and talks version1 and version 2. But this is outside the actual soliquolies. I suppose if I knew where those are written down (I truly could not find anything that made sense to me in SG) I may understand a little the example you have been giving me here, but sadly I don't since I can't "decipher" it. Anyway, I will say thank you nevertheless, because your approach would certainly help me, if I wasn't too confused to find the basics first. I suppose I will just continue to instead replace what I can directly find written in the SG like in the other tutorial I got from another user before which had been working fine for me so far. And then, when I am done, I will just have to live with my character looking weird during the rest of the animations, but that should be ok since they are less often used anyway. Maybe I will ask again at the end with the specific animations I couldn't replace but until then I will try not to pay attention to any weird appearance of my character when doing them. EDIT: I found a file called "Play_the_doll.lua" and "play_generalscripts.lua" which is probably what I have been looking for in terms of editing charlie_stage character animations, but I will not do anything with those for now. I will just maybe keep in mind that those files may useful. Edited June 20, 2024 by NPCMaxwell Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727243 Share on other sites More sharing options...
Rickzzs Posted June 20, 2024 Share Posted June 20, 2024 Not all animations are used in game, that's all. Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727273 Share on other sites More sharing options...
NPCMaxwell Posted June 20, 2024 Author Share Posted June 20, 2024 (edited) 10 minutes ago, Rickzzs said: Not all animations are used in game, that's all. Oh ok.....so the game may "automatically" know how my custom animations will look like in side-view? For example if I made a custom version of Maxwell-hiding-a-card-in-his-sleeve (I think it's called Idle2_w/maxwell or similar), then the game will magically know how it will look when the character is seen from the side or the back when doing the animation? I haven't tried this out yet, since so far I only dared to replace animations that I thought would only be seen in frontview) Edited June 20, 2024 by NPCMaxwell Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727276 Share on other sites More sharing options...
Rickzzs Posted June 20, 2024 Share Posted June 20, 2024 2 hours ago, NPCMaxwell said: Oh ok.....so the game may "automatically" know how my custom animations will look like in side-view? For example if I made a custom version of Maxwell-hiding-a-card-in-his-sleeve (I think it's called Idle2_w/maxwell or similar), then the game will magically know how it will look when the character is seen from the side or the back when doing the animation? I haven't tried this out yet, since so far I only dared to replace animations that I thought would only be seen in frontview) They have different names in Spriter, like '_side' is the custom suffix of side animation. That naming rule may come from ktools. Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727337 Share on other sites More sharing options...
NPCMaxwell Posted June 20, 2024 Author Share Posted June 20, 2024 30 minutes ago, Rickzzs said: They have different names in Spriter, like '_side' is the custom suffix of side animation. That naming rule may come from ktools. Yes I have seen those animations with _side and_up and _back, and I also have edited them in the spriter file, but sadly I can't seem to find them inside the stategraph (or anywhere else) to replace them. I have searched the whole scripts folder via notepads++ ctrl+f search in find in files function. It's ok, for now this isn't a priority, it just came into my mind remembering that the camera ingame can be turned / characters will also do some animations in sideview and so far I only found tutorials for non-rotated camera view / non-side view. Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727345 Share on other sites More sharing options...
Rickzzs Posted June 21, 2024 Share Posted June 21, 2024 19 hours ago, NPCMaxwell said: Yes I have seen those animations with _side and_up and _back, and I also have edited them in the spriter file, but sadly I can't seem to find them inside the stategraph (or anywhere else) to replace them. I have searched the whole scripts folder via notepads++ ctrl+f search in find in files function. It's ok, for now this isn't a priority, it just came into my mind remembering that the camera ingame can be turned / characters will also do some animations in sideview and so far I only found tutorials for non-rotated camera view / non-side view. They are recognized by camera rotation, for example, 90 degree goes to _side. 1 Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727820 Share on other sites More sharing options...
NPCMaxwell Posted June 21, 2024 Author Share Posted June 21, 2024 8 minutes ago, Rickzzs said: They are recognized by camera rotation, for example, 90 degree goes to _side. Ah thanks! Now I get it I think. So if I load my edited animation zip into my modmains with all animation renamed to tall_(standardanimationnameinspriter) they will play the tall one. This is good as it saves me lots of trouble / a big headache I would have had otherwise. Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1727825 Share on other sites More sharing options...
NPCMaxwell Posted June 30, 2024 Author Share Posted June 30, 2024 I can confirm now that it is indeed as Rickzzs said, it is enough to replace the "main" animation in the stategraph, and the camera will automatically use the side, up, down versions of the animations of how you have them in the edited spriter file. I have also found files in the data folder that are related to the Stageplay and solicolies, but I have noticed the moment a custom character "wants" to do a soliquoly, they will simply do an idle animation until the birds complain it's "improvising" and leave. So instead I will probably do the same as with other in-game situations that I put me in front of a problem, I will probably make him "refuse" to use the Charlie Stage / soliquolies. Maybe making him explain that he would need his assistent [that is charlie] to perform. Not sure yet. I also found an own file for the /emotes things you can put as command in the chats, and since they are not listed seperately in the SG either, I will see if I will even edit them, or just ask players to please avoid the /emotes function with my custom Maxwell, simply because the animations would look too weird on him [and there is no real in-game usage for them either, if you ask me.] Link to comment https://forums.kleientertainment.com/forums/topic/157326-replacing-less-obvious-animations-with-custom-ones-eg-from-player_actingscml-or-backside-view-animations/#findComment-1730981 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now