Jump to content

A more friendly Str Editor


Tokei

Recommended Posts


  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

On 4/6/2023 at 3:59 AM, Tokei said:

Heya,

It took me a while to figure out what you were trying to do. You're trying to edit the client aura effect using the NEMO/WARP patch for more aura options, instead of creating custom hat effects from the guide. That's why you don't see a STR file in your folder. Those are two completely different features and you can't really mix them. Now I can't help you if you're going with the first option since those effects are read directly by the client and therefore do not have STR files. You also can't edit them at all besides changing the BMP file.

The guide you're following provided you with a zip in step 4 which contains what you actually need for making custom hat effects (not auras).

So assuming you've followed the previous steps in the guide, and you defined your new hat effect as this...

	HAT_EF_Angelic_Aura = 181
	//...
	[HatEFID.HAT_EF_Angelic_Aura] = {
		resourceFileName = "effect\\angelic_aura\\angelic_aura.str",
		hatEffectPos = -6,
		hatEffectPosX = 0,
		isIgnoreRiding = true,
		isAdjustPositionWhenShrinkState = true,
		isAdjustSizeWhenShrinkState = true
	}

You now have two methods when creating a new hat effect: change the textures or customize it. If you're only going to change the textures, which is what most people end up doing, then it's fairly easy. Duplicate the aura from the example in step 4, then overwrite the textures with your own and that's pretty much it.

If you want to do more edits and more "fancy" stuff with your auras, then here's an example below:

  • Open an existing STR file (arcana_aura.str, from your guide's example).
  • Do whatever changes you want in the STR. I'm adding a second layer that I duplicated and then used a random texture I found somewhere.
  • Save the file to wherever you want, as long as it matches with your resourceFileName.
  • (I'm ignoring the particle effect on top that they're showing you in the guide, that part is up to you.)

kRAH8lI.gif

Thank you @Tokei for the guide.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  01/06/21
  • Last Seen:  

On 4/5/2023 at 10:59 PM, Tokei said:

Heya,

It took me a while to figure out what you were trying to do. You're trying to edit the client aura effect using the NEMO/WARP patch for more aura options, instead of creating custom hat effects from the guide. That's why you don't see a STR file in your folder. Those are two completely different features and you can't really mix them. Now I can't help you if you're going with the first option since those effects are read directly by the client and therefore do not have STR files. You also can't edit them at all besides changing the BMP file.

The guide you're following provided you with a zip in step 4 which contains what you actually need for making custom hat effects (not auras).

So assuming you've followed the previous steps in the guide, and you defined your new hat effect as this...

	HAT_EF_Angelic_Aura = 181
	//...
	[HatEFID.HAT_EF_Angelic_Aura] = {
		resourceFileName = "effect\\angelic_aura\\angelic_aura.str",
		hatEffectPos = -6,
		hatEffectPosX = 0,
		isIgnoreRiding = true,
		isAdjustPositionWhenShrinkState = true,
		isAdjustSizeWhenShrinkState = true
	}

You now have two methods when creating a new hat effect: change the textures or customize it. If you're only going to change the textures, which is what most people end up doing, then it's fairly easy. Duplicate the aura from the example in step 4, then overwrite the textures with your own and that's pretty much it.

If you want to do more edits and more "fancy" stuff with your auras, then here's an example below:

  • Open an existing STR file (arcana_aura.str, from your guide's example).
  • Do whatever changes you want in the STR. I'm adding a second layer that I duplicated and then used a random texture I found somewhere.
  • Save the file to wherever you want, as long as it matches with your resourceFileName.
  • (I'm ignoring the particle effect on top that they're showing you in the guide, that part is up to you.)

kRAH8lI.gif

This tool is super useful and so was the guide, I hope you won't mind asking for a clarification on it.

If I understand right, in order to add new effects without just replacing things that already exist in the client, one has to edit skilleffectinfo.lub and effectid.lub with the new files. My issue is that these don't seem to want to play when made to trigger on the user, is there perhaps another step to it?

I guess what I'm asking is how one would go about adding the new effect in a way that it can be called on self skills, or what it could be that stops it from being so.

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   64
  • Joined:  11/21/18
  • Last Seen:  

Took me some time to figure it out how to use, I made this Video guide.
Hope it will help many people out there!

Thanks Tokei!!

Your app is perfect! you are no doubt a genius.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  02/23/23
  • Last Seen:  

This is an amazing tool! Thanks man!

But I ran into a problem 😞  I open my files, edit them and when I want to save them as GIF, even without background opacity, my GIF appears with white and gray squares (like a fake PNG file).

image.png.4afab54348067f143d557cd56b8adf31.png

image.gif.cced1cf8be9f4e4e3316827572b8d9ab.gif

Is it a bug? What can I do to solve this @Tokei

Thanks!!

Edited by Mr Vislumbre
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  662
  • Reputation:   671
  • Joined:  11/12/12
  • Last Seen:  

On 6/22/2023 at 5:11 PM, Mr Vislumbre said:

This is an amazing tool! Thanks man!

But I ran into a problem 😞  I open my files, edit them and when I want to save them as GIF, even without background opacity, my GIF appears with white and gray squares (like a fake PNG file).

image.png.4afab54348067f143d557cd56b8adf31.png

image.gif.cced1cf8be9f4e4e3316827572b8d9ab.gif

Is it a bug? What can I do to solve this @Tokei

Thanks!!

Well your links are not uploaded properly, so I can't see. Though, the gif format doesn't allow transparency. Most people will simply pick a black background as it is what would yield the best results.

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  10/08/17
  • Last Seen:  

Hello, I know this might not be related to STR Editor but maybe there is something that can be done on the str to fix it.

Right now I'm adding a custom animation for a custom skill on my local server, I'm using `SkillEffectInfoList.lub` to render the groundEffect. The problem is that it is being rendered on top everything, I don't know if there is something I can do about it or if anyone has any alternative to achieve this.

Here is a short gif:

image.gif.b8ffb4cd80e46beac835e342a7c5e5ef.gif

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  662
  • Reputation:   671
  • Joined:  11/12/12
  • Last Seen:  

On 7/2/2023 at 4:40 PM, Lemon123 said:

Hello, I know this might not be related to STR Editor but maybe there is something that can be done on the str to fix it.

Right now I'm adding a custom animation for a custom skill on my local server, I'm using `SkillEffectInfoList.lub` to render the groundEffect. The problem is that it is being rendered on top everything, I don't know if there is something I can do about it or if anyone has any alternative to achieve this.

Heya,

There isn't anything you can do from the STR file itself. I remember ez2streffect.bson allowing you to change that behavior, but I believe you can't add custom skills in there. So that won't do.

Your atlernative is to use hat effects, with "isRenderBeforeCharacter = true" (mini-guide below). Though that requires a lot more source edits on your end since there is currently no support for that behavior (and it's not that well known apparently?). To be clear, yes this can be used on a targeted cell and not only on top of your character. It creates a dummy hidden NPC on the cell and then show a hat effect on that NPC instead. Here's the end result:

image.png.a2ea0cd1cee4aa5a0e6c6d3c03224273.png

Mini-guide:

  • Add the effect via data\luafiles514\lua files\hateffectinfo\hateffectinfo.lub using a "reasonable" ID (some IDs just don't work, who knows why). For example:
    	[100] = {
    		resourceFileName = "new_earthdrive\\new_earthdrive_bottom\\new_earthdrive_bottom.str",
    		hatEffectPos = -4,
    		hatEffectPosX = 0,
    		isRenderBeforeCharacter = true,
    		isIgnoreRiding = true,
    		isAdjustPositionWhenShrinkState = false,
    		isAdjustSizeWhenShrinkState = false
    	},
  • Apply these changes:

    diff --git a/db/re/skill_db.yml b/db/re/skill_db.yml
    index cfd23900c..fbb59d834 100644
    --- a/db/re/skill_db.yml
    +++ b/db/re/skill_db.yml
    @@ -46484,3 +46484,11 @@ Body:
         Duration1: 10000
         Cooldown: 60000
         Status: Emergency_Move
    +  - Id: 10100
    +    Name: NPC_HATEFFECT_POS
    +    Description: Hateffect Pos
    +    MaxLevel: 1
    +    TargetType: Self
    +    DamageFlags:
    +      NoDamage: true
    +
    diff --git a/src/map/clif.cpp b/src/map/clif.cpp
    index 991b5b1b8..1540d9083 100644
    --- a/src/map/clif.cpp
    +++ b/src/map/clif.cpp
    @@ -5449,6 +5449,26 @@ void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit,
     	if (bl->type == BL_PC)
     		fd = ((TBL_PC*)bl)->fd;
     
    +	if (unit->group->skill_id == NPC_HATEFFECT_POS) {
    +		// Comment below if you want the effect to show up after using @refresh (not default behavior for skills, that's only the case for ground units)
    +		if (target == SELF) {
    +			return;
    +		}
    +
    +		struct npc_data npc;
    +
    +		memset(&npc, 0, sizeof(struct npc_data));
    +	
    +		npc.bl = unit->bl;
    +		npc.bl.type = BL_NPC;
    +		npc.name[0] = '\0';
    +		npc.vd.class_ = 139;
    +	
    +		clif_set_unit_idle(&npc.bl, false, target, bl);
    +		clif_hat_effects2(bl, &unit->bl, unit->group->skill_lv, true, target);
    +		return;
    +	}
    +
     	if (unit->group->state.guildaura)
     		return;
     
    @@ -5564,6 +5584,14 @@ void clif_skill_delunit(struct skill_unit *unit)
     
     	nullpo_retv(unit);
     
    +	if (unit->group && unit->group->skill_id == NPC_HATEFFECT_POS) {
    +		WBUFW(buf, 0) = 0x80;
    +		WBUFL(buf, 2) = unit->bl.id;
    +		WBUFB(buf, 6) = CLR_OUTSIGHT;
    +		clif_send(buf, packet_len(0x80), &unit->bl, ALL_SAMEMAP);
    +		return;
    +	}
    +
     	WBUFW(buf, 0)=0x120;
     	WBUFL(buf, 2)=unit->bl.id;
     	clif_send(buf,packet_len(0x120),&unit->bl,AREA);
    @@ -21218,6 +21246,25 @@ void clif_hat_effects( map_session_data* sd, struct block_list* bl, enum send_ta
     #endif
     }
     
    +/// Send hat effects to the client (ZC_HAT_EFFECT).
    +/// 0A3B <Length>.W <AID>.L <Status>.B { <HatEffectId>.W }
    +void clif_hat_effects2(struct block_list* src, struct block_list* effect_bl, uint16 effect_id, bool enable, enum send_target target) {
    +#if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
    +	unsigned char buf[13];
    +
    +	if (!effect_bl || !src)
    +		return;
    +
    +	WBUFW(buf, 0) = 0xa3b;
    +	WBUFW(buf, 2) = 13;
    +	WBUFL(buf, 4) = effect_bl->id;
    +	WBUFB(buf, 8) = enable;
    +	WBUFL(buf, 9) = effect_id;
    +
    +	clif_send(buf, 13, src, target);
    +#endif
    +}
    +
     void clif_hat_effect_single( map_session_data* sd, uint16 effectId, bool enable ){
     #if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
     	nullpo_retv( sd );
    diff --git a/src/map/clif.hpp b/src/map/clif.hpp
    index 1bf10b262..c8f47b049 100644
    --- a/src/map/clif.hpp
    +++ b/src/map/clif.hpp
    @@ -802,6 +802,7 @@ void clif_item_repaireffect(map_session_data *sd, int idx, int flag);
     void clif_item_damaged(map_session_data* sd, unsigned short position);
     void clif_item_refine_list(map_session_data *sd);
     void clif_hat_effects( map_session_data* sd, struct block_list* bl, enum send_target target );
    +void clif_hat_effects2(struct block_list* src, struct block_list* effect_bl, uint16 effect_id, bool enable, enum send_target target);
     void clif_hat_effect_single( map_session_data* sd, uint16 effectId, bool enable );
     
     void clif_item_skill(map_session_data *sd,uint16 skill_id,uint16 skill_lv);
    diff --git a/src/map/script.cpp b/src/map/script.cpp
    index 027587945..a261e64ec 100644
    --- a/src/map/script.cpp
    +++ b/src/map/script.cpp
    @@ -26896,6 +26896,36 @@ BUILDIN_FUNC(getfamerank) {
     	return SCRIPT_CMD_SUCCESS;
     }
     
    +BUILDIN_FUNC(showhateffectpos) {
    +	int hat_effect_id = script_getnum(st, 2);
    +	int x = script_getnum(st, 3);
    +	int y = script_getnum(st, 4);
    +	int duration = script_getnum(st, 5);
    +	struct block_list* bl;
    +
    +	if (script_hasdata(st, 6)) {
    +		bl = map_id2bl(script_getnum(st, 6));
    +	}
    +	else {
    +		bl = map_id2bl(st->oid);
    +	}
    +
    +	if (!bl) {
    +		return SCRIPT_CMD_FAILURE;
    +	}
    +
    +	std::shared_ptr<s_skill_unit_group> group = skill_unitsetting(bl, NPC_HATEFFECT_POS, hat_effect_id, x, y, duration);
    +	
    +	if (group != NULL) {
    +		script_pushint(st, group->group_id);
    +	}
    +	else {
    +		script_pushint(st, -1);
    +	}
    +
    +	return SCRIPT_CMD_SUCCESS;
    +}
    +
     BUILDIN_FUNC(isdead) {
     	map_session_data *sd;
     
    @@ -27680,6 +27710,7 @@ struct script_function buildin_func[] = {
     	BUILDIN_DEF(getfame, "?"),
     	BUILDIN_DEF(getfamerank, "?"),
     	BUILDIN_DEF(isdead, "?"),
    +	BUILDIN_DEF(showhateffectpos, "iiii?"),
     	BUILDIN_DEF(macro_detector, "?"),
     
     #include <custom/script_def.inc>
    diff --git a/src/map/skill.cpp b/src/map/skill.cpp
    index 611aff452..c9a695768 100755
    --- a/src/map/skill.cpp
    +++ b/src/map/skill.cpp
    @@ -15058,6 +15058,12 @@ std::shared_ptr<s_skill_unit_group> skill_unitsetting(struct block_list *src, ui
     	case WH_FLAMETRAP:
     		limit += 3000 * (sd ? pc_checkskill(sd, WH_ADVANCED_TRAP) : 5);
     		break;
    +	case NPC_HATEFFECT_POS:
    +		limit = flag;
    +		interval = flag + 1000;
    +		flag = 0;
    +		val2 = skill_lv;
    +		break;
     	}
     
     	// Init skill unit group
    @@ -15702,6 +15708,9 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
     
     		case UNT_DUMMYSKILL:
     			switch (sg->skill_id) {
    +				case NPC_HATEFFECT_POS:
    +					// don't do anything for this skill
    +					break;
     				case SG_SUN_WARM: //SG skills [Komurka]
     				case SG_MOON_WARM:
     				case SG_STAR_WARM: {
    @@ -20500,6 +20509,9 @@ int skill_delunit(struct skill_unit* unit)
     					tsc->getSCE(SC__MANHOLE)->val4 = 0; // Remove the Unit ID
     			}
     			break;
    +		case NPC_HATEFFECT_POS:
    +			clif_hat_effects2(&unit->bl, &unit->bl, unit->group->skill_lv, false, ALL_SAMEMAP);
    +			break;
     	}
     
     	clif_skill_delunit(unit);
    @@ -20734,6 +20746,9 @@ int skill_delunitgroup_(std::shared_ptr<s_skill_unit_group> group, const char* f
     				}
     			}
     			break;
    +		case NPC_HATEFFECT_POS:
    +			clif_hat_effects2(&group->unit->bl, &group->unit->bl, group->skill_lv, false, ALL_SAMEMAP);
    +			break;
     	}
     
     	if (src->type==BL_PC && group->state.ammo_consume)
    diff --git a/src/map/skill.hpp b/src/map/skill.hpp
    index c22e0ad70..04dc782d9 100644
    --- a/src/map/skill.hpp
    +++ b/src/map/skill.hpp
    @@ -2494,6 +2494,8 @@ enum e_skill {
     	ABR_NET_REPAIR,
     	ABR_NET_SUPPORT,
     	ABR_INFINITY_BUSTER,
    +
    +	NPC_HATEFFECT_POS = 10100,
     };
     
     /// The client view ids for land skills.
  • Call the effect from the source with something like this (100 being your effect ID):

    	case NPC_CUSTOM_SKILL:
    		// skill related stuff...
    		skill_unitsetting(src, NPC_HATEFFECT_POS, 100, x, y, 2000);
    		break;

    or if you want to test first with the script command

    .@effect_id = 100;
    .@x = 152;
    .@y = 187;
    .@duration = 2000;
    showhateffectpos .@effect_id, .@x, .@y, .@duration;
  • The downside of this method is that the hat effects always loop. So you have to know in advance the duration of the effect. You also probably want to add some empty frames at the end of your STR animation for some buffer and prevent the loop from showing up at all.

Best solution I can think of, goodluck!

hateffectpos.diff

Edited by Tokei
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  10/08/17
  • Last Seen:  

Thank you for your answer. Yes I realized that sadly the way SkillEffectInfoList.lub works is different, it's just an effect being placed on the screen, like some kind of overlay. If you rotate the camera it stays the same, unlike ground skills like Heavens Drive where there is an actual unit placed in the ground and if you rotate the camera you can see the back of that unit.

I thought of your approach with a fake npc but I realized it was way too much and that I should keep things simpler. For now I will stick with some 3rd job animation. Thanks anyway, I'm sure that will help other people with the same problem.

On a side note: newer clients (2019 and onwards) seem to use a new way of rendering ground skill effects, if you look inside the .exe file you will find that they have references to all these new str files for skills. And if you look in the grf you will find them divided by "ground" or "bottom" strs and normal str.

For example look at "new_earthdrive": 

  • new_earthdrive_bottom.str: it's the one you show in the image above. It's placed "below" players.
  • new_earthdrive.str: it's some rocks shown on top of the _bottom.str
  • new_earthdrive_target: it's shown on the target hit by the skill.

I have no proof but from what I investigated it seems that before 2019 they hardcoded all ground effects because they needed to be actually placed on the ground and had to take into account a lot of things (just like rendering a character sprite), you can have people in front, behind, camera rotations, etc. And they put into .str the ones that are rendered as overlays, for example Magnus Exorcismus: the "angel" thing shown on top is a .str file, but the ground placement is hardcoded

But after 2019 it seems they are moving towards .str files for everything, even for ground placements.

So if you are a user looking to add a custom ground skill and you don't use 3rd/4th jobs then you can simply replace one of the 3rd/4th job skills str files and use clif_skill_poseffect to tell the client to render that skill instead. For example if you use Earth Drive then:

  • new_earthdrive_bottom.str: this is shown below players.
  • new_earthdrive.str: this is shown on top of players, like an overlay
  • new_earthdrive_target: this is shown on targets hit by the skill but I'm not sure if this would work with clif_skill_poseffect

 

Sadly I'm using pre 2019 clients. From what I tested newer clients had way worse performance (even with the vsync and sleep thing fixed), it sucks. Also a lot of changes that I would need to patch to make it work for a pre-renewal server.

Edited by Lemon123
Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  3
  • Reputation:   0
  • Joined:  10/17/23
  • Last Seen:  

Hi!

I would like to ask you some questions, if you do not mind.

I asked people the following question, after realizing the STR custom skill effect i made is too big:

"Is anyone aware of STR editor script that can shrink MULTIPLE sprite/layer done within the file? (Tokei's editor says "click" on help button to see the scripts, in which... i was not able to find it, and so did some other ppl lol) "

I was not able to get answer in rAthena and translation discord.. mind if you can provide me script or answer for it?

Thanks in advance!

 

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  662
  • Reputation:   671
  • Joined:  11/12/12
  • Last Seen:  

10 hours ago, BlackMore said:

Hi!

I would like to ask you some questions, if you do not mind.

I asked people the following question, after realizing the STR custom skill effect i made is too big:

"Is anyone aware of STR editor script that can shrink MULTIPLE sprite/layer done within the file? (Tokei's editor says "click" on help button to see the scripts, in which... i was not able to find it, and so did some other ppl lol) "

I was not able to get answer in rAthena and translation discord.. mind if you can provide me script or answer for it?

Thanks in advance!

The script engine was never finished. It does work, but there is no documentation for it so it's not like anyone can use it. It was meant for myself for some testing. Though, you can use this:

var scale = 0.5f;
var centerOffset = new GRF.Graphics.Point(319f, 291f);

for (int i = 1; i < str.Layers.Count; i++) {
	var layer = str.Layers[i];
	
	for (int k = 0; k < layer.KeyFrames.Count; k++) {
		var keyFrame = layer.KeyFrames[k];
		
		keyFrame.Scale(scale);
		
		// The offset shown is not the real XY value. The center is rebased by the centerOffset, so some math is needed
		var center = keyFrame.Offset - centerOffset;
		center = scale * center;
		keyFrame.Offset = center + centerOffset;
	}
}

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  3
  • Reputation:   0
  • Joined:  10/17/23
  • Last Seen:  

18 hours ago, Tokei said:

The script engine was never finished. It does work, but there is no documentation for it so it's not like anyone can use it. It was meant for myself for some testing. Though, you can use this:

var scale = 0.5f;
var centerOffset = new GRF.Graphics.Point(319f, 291f);

for (int i = 1; i < str.Layers.Count; i++) {
	var layer = str.Layers[i];
	
	for (int k = 0; k < layer.KeyFrames.Count; k++) {
		var keyFrame = layer.KeyFrames[k];
		
		keyFrame.Scale(scale);
		
		// The offset shown is not the real XY value. The center is rebased by the centerOffset, so some math is needed
		var center = keyFrame.Offset - centerOffset;
		center = scale * center;
		keyFrame.Offset = center + centerOffset;
	}
}

 

Thank you for the answer-- however, I have encountered an issue.

The script runner + editor says they cannot find meta-data files such as :

TokeiLibrary.dll
ICSharpCode.AvalonEdit.dll
GRF.dll
OpenTK.dll
Utilities.dll
ColorPicker.dll
GrfToWpfBridge.dll
OpenTK.GLControl.cll
Gif.Components.dll

Anything I am missing out? 

P.S 1 Figured out the issue. instead of directly opening the str file, if i open up exe directly THEN do it, above issue does not happen. Your script also solved my problem. TYVM!

error.PNG

Edited by BlackMore
listing missing stuff
Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  03/15/22
  • Last Seen:  

On 6/24/2023 at 9:23 AM, Tokei said:

Well your links are not uploaded properly, so I can't see. Though, the gif format doesn't allow transparency. Most people will simply pick a black background as it is what would yield the best results.

 

Hi Tokei... I have the same need and I wonder if it's possible to find a workaround? My client requires me to export an effect and convert it as a standard SPR/ACT sprite file for an NPC.

I have a few suggestions:

1. Export as APNG (to allow transparency)

The idea here is to export an animation that can be opened in Aseprite (it accepts APNG) and then mass export the frames as PNGs and send throw them back into ACT Editor.

2. Export frames as seen in the view UI (allow me to export them as PNGs for transparency so they can be added as sprites).

Cuts option 1 pipeline steps by a lot and sprite can be manually assembled in ACT editor.

 

Images below show the fake transparent bg extracted from a GIF file. But also happens with APNG extensions.

Screenshot 2024-04-18 170853.png

Screenshot 2024-04-18 170134.png

Screenshot 2024-04-18 170907.png

Edited by annicellin
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  662
  • Reputation:   671
  • Joined:  11/12/12
  • Last Seen:  

1 hour ago, annicellin said:

 

Hi Tokei... I have the same need and I wonder if it's possible to find a workaround? My client requires me to export an effect and convert it as a standard SPR/ACT sprite file for an NPC.

I have a few suggestions:

1. Export as APNG (to allow transparency)

2. Export frames as seen in the view UI (allow me to export them as PNGs for transparency so they can be added as sprites).

Hmm, there is an approximation that can be done which will probably be good enough. The point 2 is misleading; what is seen in the UI is a blend of the background + layers. You can't separate them as it's already a final image, if that makes sense. But you could in theory extract a transparency value by using a black and white background version of the composite image. Then do some math magic and approximate the bgra values.

I've added the option in 1.1.0, though it's a bit awkward to use (found in File > Export as PNG...).

 

  • Upvote 1
  • MVP 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  03/15/22
  • Last Seen:  

On 4/18/2024 at 8:42 PM, Tokei said:

Hmm, there is an approximation that can be done which will probably be good enough. The point 2 is misleading; what is seen in the UI is a blend of the background + layers. You can't separate them as it's already a final image, if that makes sense. But you could in theory extract a transparency value by using a black and white background version of the composite image. Then do some math magic and approximate the bgra values.

I've added the option in 1.1.0, though it's a bit awkward to use (found in File > Export as PNG...).

 

Hey I just want to mention that I'm grateful for your quick response and thanks for the feature! It worked out fantastically. And yeah the Export is a bit wonky but usually the second time I export it all frames export nicely, usually the first frame is the one that is messed up.

 

Again thank you for your work! It's deeply appreciated. 😄

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.05
  • Content Count:  8
  • Reputation:   1
  • Joined:  03/18/24
  • Last Seen:  

On 2/2/2022 at 12:46 AM, Tokei said:

Heya,

I've been working on a tool for a few weeks now and I believe it is in a ready enough state to be shown. This software is meant to edit str files, which are mostly used to display skill animations in-game. There may still be bugs left in the tool; reporting them here would be appreciated. You can download the software here:

9P2Fiqp.png

Generic

  • Ctrl-Z/Ctrl-Y to undo and redo an action.
  • You can edit most shortcuts via File > Settings > Shortcuts.

Transformations for the preview panel (same shortcuts as Act Editor)

  • Translate: Left Mouse Button on the selected frame.
  • Rotate: Shift-Left Mouse Button on the selected frame.
  • Preview panel move: Right Mouse Button.
  • Horizontal/vertical scaling: Ctrl-Shift-Left Mouse Button.
  • Uniform scaling: Ctrl-Alt-Left Mouse Button.
  • Unbound scaling: Ctrl-Left Mouse Button.

Transformations for the edition panel

  • Each layer can have multiple textures. To add a new one, click the texture combo box and select "Add new...". It will bring you to where the file is currently loaded from. While you can browse elsewhere, the textures must be in the same folder as your str file will be in.
  • You can edit textures more rapidly with the gear button next to it.
  • You can edit some fields by clicking the text before them. If you hold down the Left Mouse Button on this field (P1XY), you will be able to move it freely without moving the entire texture. This is especially handy when dealing with angles as those can give you unwanted results if you are editing them via the preview panel.
    j8t2nI5.png
  • The FPS property can be changed and saved. However, the client appears to completely ignore it and runs your animations at 60 FPS regardless.
  • Editing an interpolated key frame will automatically create a new key frame on the timeline.

Timeline panel

  • A dot represents an existing key frame. An arrow represents an interpolated animation from the left key frame to the right key frame.
    YkAl7cE.png
  • You can right-click a key frame to bring up options:
    25Jud9s.png
  • You can also copy the frame and move it elsewhere. The texture indexes are not re-adjusted. It copies the key frame as is.
  • You can select multiple key frames by holding down the Left Shift key and holding down the Left Mouse Button.
    hbHLl0j.png
  • The traditional windows shortcuts can also be used for selection. These include:
    • Arrow Key: move to the desired next frame.
    • Ctrl-Arrow Key: move to the next key frame block in the wanted direction.
    • Shift-Arrow Key: move to the next key frame for selection.
    • Ctrl-Shift-Arrow Key: move to the next frame block while selecting what's inbetween.
    • Double-Left Mouse Button: selects an entire frame and its interpolated section.
    • Ctrl-A: selects the entire layer.
  • You can move a key frame by selecting the key frame, clicking on the dot and then moving the key frame to the desired location.
    R5RaRLH.png
  • The operation above can also be done by selecting multiple rows at the same time.
  • You can do a quick preview of the animation by moving the timeline selector.
    pvVaYnP.png
  • You can move a layer up and down by holding down the Left Mouse Button and moving it where you want it to.
    jXazejd.png
  • Right-clicking a layer also brings up more options.
    bNfdNCE.png

And I believe that's it! The next "feature" I wanted to implement was editing multiple frames at the same time, but unfortunately this project needs a small break from my end...! Hopefully some of you may have an use for it.

Edit: I am most certainly not an animator and I do not know the real needs of those who will actually use the software. That is why it's being posted as a work in progress rather than a finished tool. If you have requests, feel free to post them below and I'll add as much as I can.

Thank you so much for this! Great work Tokei!! ❤️

  • Like 1
Link to comment
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.

×
×
  • Create New...