-
Notifications
You must be signed in to change notification settings - Fork 2
Issue 1 add new animations #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Issue 1 add new animations #5
Conversation
…, Revised Combat, and Universal Expanded Layout
…xpanded Layout Sheet
…parate on Universal Layout
|
Hi, thanks for working on this!
Adding the file
|
|
Yeah I made a mistake with updating those hair files. I was just testing the expanded layout command. Anyway, I'll go set up the original "sit" error I was getting and drop that in. And yeah, I can create a new issue for spellcast. I did run into a MAJOR issue with spellcast recently. I separated a lot of assets at once (33 facial expressions) and forgot to rename cast to spellcast, so I had some complications in regenerating the list. I ended up renaming the main cast.png file to spellcast.png and then regenerating the colors that way, but it was a pain because I had dozens of files/directories like that. Thankfully I figured out how to use mmv which solved the problem. |
|
@bluecarrot16 So here's the error I'm getting with sit: This goes for all directions and I get a huge wall of this. I'm only showing the basics. |
|
Hmm, are you sure you don't have uncommitted changes? Looks like it's working as I expect... When I checkout this branch and run: mkdir tmp_hair
lpctools arrange separate --layout universal-expanded --input tests/arrange_files/hair/hair_page2.png --output-dir tmp_hair
ls -1 tmp_hair
backslash.png
cast.png
climb.png
combat_idle.png
emote.png
halfslash.png
hurt.png
idle.png
jump.png
run.png
shoot.png
sit.png
slash.png
thrust.png
walk.pngHere's what Comparing to the current version in the generator, seems like this is the desired behavior? I see that in the past you had defined separate animations for "sit-ground", "sit-cross" and "sit-chair"; this would be fine too, it would just need to be used consistently. The hangup is perhaps that the lpctools arrange separate --from universal-expanded --to sit cast thrust ...etc... --input tests/arrange_files/hair/hair_page2.png --output-dir tmp_hair Does that make sense? Anyway the current situation seems simpler to me. Someone can always define layouts "sit-ground", "sit-cross", etc. like this: 'sit-ground': SpritesheetLayout.from_rows([
[ ('sit' , 'n' , 0) ] ,
[ ('sit' , 'w' , 0) ] ,
[ ('sit' , 's' , 0) ] ,
[ ('sit' , 'e' , 0) ] ,
]),
'sit-cross': SpritesheetLayout.from_rows([
[ ('sit' , 'n' , 1) ] ,
[ ('sit' , 'w' , 1) ] ,
[ ('sit' , 's' , 1) ] ,
[ ('sit' , 'e' , 1) ] ,
]),or in {
"frame_size": [64, 64],
"size": [1, 4],
"rows": [
[{"name": "sit", "direction": "n", "frame": 0}],
[{"name": "sit", "direction": "w", "frame": 0}],
[{"name": "sit", "direction": "s", "frame": 0}],
[{"name": "sit", "direction": "e", "frame": 0}],
]
} |
|
Well, if you check the source code: I was simply saying that I had to comment out the format you had already and set it up this way in order to fix it. If you're fine with this, then we can keep this as is (or even remove the comments). My comment on the sit was that the reason why I commented it out was because I couldn't get around that error. Even when I tried to use sit-ground, sit-cross, sit-chair in the layout, I still couldn't get it to work, so I went to comment out the old method and switched to use |
|
Hmm, it looks like the way you defined the Lines 557 to 560 in a0da01f
but then I had a layout called "sit" which referred to separately-named animations "sit-ground", "sit-cross", and "sit-chair": Lines 668 to 673 in a0da01f
(I forgot that I had added that long ago...) Internally, if you look at the code for
But anyway, yeah I suppose I prefer the current behavior...? Unless you can think of a good reason why they should be separate... |
I did try this at one point, but it didn't work, so I gave up on it. The current method works fine and I see no reason to go out of our way to make this separate. Far as I am concerned, it makes sense to just call it "sit" with 3 frames. I'll go ahead and revert the three hair images I converted and make sure the pytest works. MAYBE I'll implement a new test for the new layout as well, though I'm not quite sure how to do that just yet... |
|
I'll resume working on this in the next couple of days. Sorry for the delay. |
…nded Layouts (Ran Exports to Generate New Layout Sheets)
|
@bluecarrot16 Okay, please check this over again. I added a couple of tests with my new expanded view and made sure the only existing broken tests are ones that are ALREADY broken. This is test_unpack and test_convert_layout. From what I'm seeing, the issues here are that for some reason, the grab files do not match for test_unpack, and the universal PNG is for some reason not matching. I thought about trying to regenerate the files, but I assume this is just an issue with pillow. The new tests I created are just clones of your existing ones but with the expanded sheet instead. |

I kept trying to fix the export but it wasn't working correctly, though now thinking it over, maybe its actually lines 553-556 I needed to update to make "sit" work with the existing structure of sit. Originally I set up emote as a similar structure, but because that was a new sheet, I didn't think it mattered much to drop that format.
When I left it at "from_rows" I could not get "sit" to split the spritesheets out. I thought the fix needed to be done in the layout/universal-expanded.json, but thinking it over, it might have needed to actually be in arrange.py lines 553-556. If that's the case let me know, I can fix that.
Anyway, here's the commands I ran to generate assets for all frames on the ULPC now:
Only notable issue is that "separate" turns "spellcast" into "cast". In the ULPC we use "spellcast" now. I thought about changing this in here, but didn't want to change things too much.
No grab/carry yet, but I want to do those soon-ish. (I might do a different grab because I doubt we'll get OGA-BY support from Daneeklu, I can probably use hand frames from another asset to make this line up and still look good, while keeping the basic structure here). I also want to make a "lift" animation, too.
Otherwise, I'll probably use the existing format for the most part and just keep a simple grab/carry that only changes the arms while keeping the legs the same.
EDIT:
Nvm, I tried setting up the sit section in lines 553-555 to work with this format and it didn't work, so I have no idea how to make it work with the
from_rowsformat.