Tokei

Script Editors: Act Editor

Recommended Posts

@Tokei hello

how can i change soul linker into paladin, 

i want to create custom weapon for Paladin, but because of soul linker i'm not able to create proper act for paladin. 

Share this post


Link to post
Share on other sites

Hello .. is it possible to put an item that appears in front of the head and put it behind the head?

Edited by adrianorj

Share this post


Link to post
Share on other sites

It depends what you're doing. If it's headgear, then no that's not possible. You'd have to do a garment sprite but that's a whole different category.

Share this post


Link to post
Share on other sites

@Tokei There's one issue and a suggestion I would like to talk about:

• First one, when a Headgear has animation on its static pose, the GIF output is totally misaligned regarding the head, body and the headgear itself.
• Secondly, I would like couple shortcuts for next frame/previous frame, so it would make it easy to edit every frame sequentially, any shortcut would do.

Thank you very much for the tool again!

Share this post


Link to post
Share on other sites
On 5/22/2018 at 2:28 PM, Haziel said:

@Tokei There's one issue and a suggestion I would like to talk about:

• First one, when a Headgear has animation on its static pose, the GIF output is totally misaligned regarding the head, body and the headgear itself.
• Secondly, I would like couple shortcuts for next frame/previous frame, so it would make it easy to edit every frame sequentially, any shortcut would do.

Thank you very much for the tool again!

Updated to 1.1.3 ( http://www.mediafire.com/file/uoymx2vni249mlu ) :

  • Fixed the gif issue.
  • Added tabs.
  • Added next/previous frame shortcuts (ctrl-right, ctrl-left).
  • Allowed all shortcuts to be modified from Tools > Settings > Shortcuts.

Share this post


Link to post
Share on other sites
4 hours ago, Tokei said:

Updated to 1.1.3 ( http://www.mediafire.com/file/uoymx2vni249mlu ) :

  • Fixed the gif issue.
  • Added tabs.
  • Added next/previous frame shortcuts (ctrl-right, ctrl-left).
  • Allowed all shortcuts to be modified from Tools > Settings > Shortcuts.

Awesome, awesome update.
Thank you very much for your awesome work, @Tokei!

Share this post


Link to post
Share on other sites

@Tokei Will it be possible to save a .spr file with the head reference as well as the other? Like how it can be saved by a gif?

Share this post


Link to post
Share on other sites

I've spent an hour trying to figure out how to use this but no luck.

I edited a hairstyle, making the hair longer. This ofc means the new sprite file is taller by 5-10 pixels. So I replace the sprite and that makes the head float above the body because position is relative to the bottom of the image. So I position it and figure out I need exactly 5 pixels for that particular sprite (this varies for each of them). Now, how do I tell the software that I want this sprite, in ALL places it is being used, to be moved 5 pixels down? I tried the anchor stuff but it seems to alter the position for one specific use of that sprite only which is useless. There are like a hundred uses for some sprites so manually moving each doesn't seem viable. What am I doing wrong ?

 I want the sprite itself moved by -5, not the  animation frames individually. How do I do that, this can't possible be this difficult?

Share this post


Link to post
Share on other sites

@Seravy


Scripts > Script Runner:

foreach (var action in act) {
	foreach (var frame in action) {
		foreach (var layer in frame){
			layer.OffsetY += 50;
		}		
	}
}

Enjoy.

Share this post


Link to post
Share on other sites

Thanks! Where do I specify which sprite I want to move? There are 14 of them in a hairstyle and each of them changes by a different amount. Like, if I made the front side of the hair then only sprites 0,1,2, 9 and 10 are different.

Share this post


Link to post
Share on other sites
On 2/13/2019 at 7:07 PM, Seravy said:

Thanks! Where do I specify which sprite I want to move? There are 14 of them in a hairstyle and each of them changes by a different amount. Like, if I made the front side of the hair then only sprites 0,1,2, 9 and 10 are different.

Heya,

There are no built-in tool for what you want to do, so you have to write it yourself from the script tool. The property you're looking for in your case is "SpriteIndex":

foreach (var action in act) {
	foreach (var frame in action) {
		foreach (var layer in frame){
			if (layer.SpriteIndex == 0 || 
				layer.SpriteIndex == 1 || 
				layer.SpriteIndex == 2 ||
				layer.SpriteIndex == 9) {
				layer.OffsetY += 10;
			}
		}		
	}
}

// or
act.AllLayers(layer => {
	if (layer.SpriteIndex == 0 || 
		layer.SpriteIndex == 1 || 
		layer.SpriteIndex == 2 ||
		layer.SpriteIndex == 9) {
		layer.OffsetY += 10;
	}
});

// or
foreach (var layer in act.GetAllLayers()) {
	if (layer.SpriteIndex == 0 || 
		layer.SpriteIndex == 1 || 
		layer.SpriteIndex == 2 ||
		layer.SpriteIndex == 9) {
		layer.OffsetY += 10;
	}
}

 

Share this post


Link to post
Share on other sites

omg, thanks, I'll use that next time, for the current one I already had to do it manually.

This should totally be a default feature, isn't replacing images a very common thing to do? I can already rightclick and have "find all usages" so why can't I have basic operations performed on that list?

 

Is there some script or function I can use to automatically crop all the images while preserving the correct positioning?

I edited hairstyles assuming it doesn't matter but it does seem to position the character's head wrong (unless that's an actual bug, I doubt) on the ALT-G screen. Not a major problem but if there is an easy solution, I might as well do it.

Edit : The above script (the first one) doesn't seem to work correctly when I need to change the X position. Animation frames where the sprite appears mirrored get moved to the wrong direction.

Edited by Seravy

Share this post


Link to post
Share on other sites
Posted (edited)

This program is incredibly helpful, and super well made. Thanks so much!

 

Out of curiosity, how would I write a script to add a sprite (in this case, this : 7688d8a349499b6bb3f947d04b368e65.png ) to every single frame/action, and as the first sprite?

Edited by dazzlingend

Share this post


Link to post
Share on other sites

hi do you have shrink script?  really i want to make certain mobs smaller @Tokei

 

Share this post


Link to post
Share on other sites
1 hour ago, zecabaleiro said:

@Haziel @Tokei Could someone tell me what is the parameter of the "mirror" option?
Parameter Example: int x = -12;

It's just "Mirror":

act[0, 0, 0].Mirror = true;

 

Share this post


Link to post
Share on other sites
5 minutes ago, Tokei said:

It's just "Mirror":

act[0, 0, 0].Mirror = true;

 

@Tokei Thank you from the heart. one last question.. I made changes to the left side frame as print.. is there how I copy this to the rest? copy up, left, right etc

8uoXDT4.png

Share this post


Link to post
Share on other sites

Hmm, I'm not sure I understand what you mean. What do you want to copy to the other actions?

Share this post


Link to post
Share on other sites
6 minutes ago, Tokei said:

Hmm, I'm not sure I understand what you mean. What do you want to copy to the other actions?

There were modifications in X, some is 2, others are 3 and some are 0. So I don't have the same work again.. I would like to know if there is a "ctrl + v" to paste to the rest.
I want to copy the correction from image 1 to the rest.

Corrected form:
1r1Jj5v.png

Uncorrected:
6xn5o5G.png

Share this post


Link to post
Share on other sites

Hmm, well you can copy the action with Alt-C and Alt-V. Or you can use Animation > Rotation copy from bottom left to bottom, depending on how you work with the file.

  • Love 1

Share this post


Link to post
Share on other sites
37 minutes ago, zecabaleiro said:

There were modifications in X, some is 2, others are 3 and some are 0. So I don't have the same work again.. I would like to know if there is a "ctrl + v" to paste to the rest.
I want to copy the correction from image 1 to the rest.

Corrected form:
1r1Jj5v.png

Uncorrected:
6xn5o5G.png

ALT + T

  • Love 1

Share this post


Link to post
Share on other sites

Amazing tool, every success for the creator, I do not know how to thank for it.. ❤️

Share this post


Link to post
Share on other sites

hello @Tokei can you add replace all sprites cause im having hard time replacing it one by one especially with job sprites with 99 images 😅

rpZrcBG.png

Share this post


Link to post
Share on other sites
26 minutes ago, AshiHanna said:

hello @Tokei can you add replace all sprites cause im having hard time replacing it one by one especially with job sprites with 99 images 😅

rpZrcBG.png

Just create a new file. Save only the sprite empty in your job class.spr (leave the act as it is). Now click add images to add all your job sprite and tada 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...