Jump to content
  • 0

How do i add an image to every frame in ACT Editor?


nekolino

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  12/25/20
  • Last Seen:  

How do i add an image to every frame in ACT Editor?

The only way i could find is to change manually one by one.
It would take ages for me to finish every .act that i want to replace ?
Example:
[img]https://prnt.sc/24v1w1d[/img]

 

Is it possible to add that "fisico" image to every frame without having to do it manually?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  05/18/22
  • Last Seen:  

On 12/27/2021 at 1:24 PM, nekolino said:

How do i add an image to every frame in ACT Editor?

The only way i could find is to change manually one by one.
It would take ages for me to finish every .act that i want to replace ?
Example:
[img]https://prnt.sc/24v1w1d[/img]

 

Is it possible to add that "fisico" image to every frame without having to do it manually?

++++

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  08/31/17
  • Last Seen:  

I am also curious about this. I am trying to modify some monsters to have this image added to every frame/action. Is there a script to simplify this process? @Tokei

image_051.bmp

Edited by xAnimosity
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  10/07/19
  • Last Seen:  

On 12/25/2022 at 6:33 PM, xAnimosity said:

I am also curious about this. I am trying to modify some monsters to have this image added to every frame/action. Is there a script to simplify this process? @Tokei

image_051.bmp

have you succeed? I have the same need, Im trying to create a script and set in every action and frame in a exact offset... but my coding skills are nearly zero :/

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

On 12/23/2023 at 10:10 PM, satsuma said:

have you succeed? I have the same need, Im trying to create a script and set in every action and frame in a exact offset... but my coding skills are nearly zero 😕

 

On 12/27/2021 at 6:24 PM, nekolino said:

How do i add an image to every frame in ACT Editor?

The only way i could find is to change manually one by one.
It would take ages for me to finish every .act that i want to replace ?
Example:
[img]https://prnt.sc/24v1w1d[/img]

 

Is it possible to add that "fisico" image to every frame without having to do it manually?

Best I can offer for right now.

Export example video.


Export code.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ErrorManager;
using GRF.FileFormats.ActFormat;
using GRF.FileFormats.SprFormat;
using GRF.FileFormats.PalFormat;
using GRF.Image;
using GRF.Image.Decoders;
using GRF.Graphics;
using GRF.Core;
using GRF.IO;
using GRF.System;
using GrfToWpfBridge;
using TokeiLibrary;
using TokeiLibrary.WPF;
using Utilities;
using Utilities.Extension;
using Action = GRF.FileFormats.ActFormat.Action;
using Frame = GRF.FileFormats.ActFormat.Frame;
using Point = System.Windows.Point;

namespace Scripts {
    public class Script : IActScript {
		public const int Magnify = 2;
		
		public object DisplayName {
			get { return "Export"; }
		}
		
		public string Group {
			get { return "Custom"; }
		}
		
		public string InputGesture {
			get { return "{Scrips.Export}" ; }
		}
		
		public string Image {
			get { return "scale.png"; }
		}
		
		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			// Script for extraction
			string basepath = @"C:\GRFsprites";
			var name = act.LoadedPath;
			var outputFolder = GrfPath.Combine(basepath, Path.GetFileNameWithoutExtension(name));
			
			if (Directory.Exists(outputFolder)) {				
				var files = Directory.GetFiles(outputFolder);
				
				if (files.Length > 0) {
					if (!ErrorHandler.YesNoRequest("Do you want to replace the existing extracted files?", "Possible overwrite"))
						return;
				}
			}

			for (int i = 0; i < act.Sprite.Images.Count; i++) {
				var image = act.Sprite.Images[i].Copy();
				var ext = ".bmp";

				if (image.GrfImageType == GrfImageType.Bgra32) {
					ext = ".png";
				}

				var output = GrfPath.Combine(basepath, Path.GetFileNameWithoutExtension(name), String.Format("{0:0000}", i) + ext);
				GrfPath.CreateDirectoryFromFile(output);
				image.Save(output);
			}

			Utilities.Services.OpeningService.OpenFolder(GrfPath.Combine(basepath, Path.GetFileNameWithoutExtension(name)));
		}
		
		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			return true;
		}
	}
}

 

  • MVP 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
Answer this question...

×   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...