Jump to content
  • 0

Act Editor Replace Color for all layers


gekigengar

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   2
  • Joined:  08/30/13
  • Last Seen:  

I need help for this Act Editor.

Hello, I want to be able to tint the entire mob layer color without having to go frame by frame.

Currently, CTRL-SHIFT-W (Replace color script) does just that, but only for that 1 single frame.

I wanted to replace color for the entire frame in the sprite for a quick mob tinting. (For all animation, and all frames).

Any help?

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 1

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

Copy and paste this file to Scripts > Open scripts folder (name it "SetColor.cs"):

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 GrfToWpfBridge;
using TokeiLibrary;
using TokeiLibrary.WPF;
using Action = GRF.FileFormats.ActFormat.Action;
using Frame = GRF.FileFormats.ActFormat.Frame;
using Point = System.Windows.Point;

namespace Scripts {
    public class Script : IActScript {
		public object DisplayName {
			get { return "Change all layer color"; }
		}
		
		public string Group {
			get { return "Scripts"; }
		}
		
		public string InputGesture {
			get { return null; }
		}
		
		public string Image {
			get { return null; }
		}
		
		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			if (act == null) return;
			
			var frame = act[selectedActionIndex, selectedFrameIndex];
			
			GrfColor startColor;
			
			if (frame.Layers.Count == 0) {
				startColor = GrfColor.White;
			}
			else {
				startColor = act[selectedActionIndex, selectedFrameIndex, 0].Color;
			}
			
			ColorPicker.PickerDialog picker = new ColorPicker.PickerDialog(startColor.ToColor(), ColorPicker.Core.ColorMode.Hue);
			picker.Owner = WpfUtilities.TopWindow;
			picker.ShowDialog();
			
			if (picker.DialogResult) {
				try {
					act.Commands.Begin();
					GrfColor newColor = picker.PickerControl.SelectedColor.ToGrfColor();
					act.Commands.SetColor(newColor);
				}
				catch (Exception err) {
					act.Commands.CancelEdit();
					ErrorHandler.HandleException(err, ErrorLevel.Warning);
				}
				finally {
					act.Commands.End();
					act.InvalidateVisual();
				}
			}
		}
		
		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			return act != null;
		}
	}
}

Then you can use Scripts > Change all layer color. I really should update Act Editor @@...

Edited by Tokei
  • Upvote 2
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   30
  • Joined:  04/03/17
  • Last Seen:  

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 GrfToWpfBridge;
using TokeiLibrary;
using TokeiLibrary.WPF;
using Action = GRF.FileFormats.ActFormat.Action;
using Frame = GRF.FileFormats.ActFormat.Frame;
using Point = System.Windows.Point;

namespace Scripts {
    public class Script : IActScript {
		public object DisplayName {
			get { return "MyCustomScript"; }
		}
		
		public string Group {
			get { return "Scripts"; }
		}
		
		public string InputGesture {
			get { return null; }
		}
		
		public string Image {
			get { return null; }
		}
		
		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			if (act == null) return;
			
			try {
				act.Commands.Begin();
				act.Commands.Backup(_ => {
					act.SetColor("#99F80909");
				}, "MyCustomScript", true);
			}
			catch (Exception err) {
				act.Commands.CancelEdit();
				ErrorHandler.HandleException(err, ErrorLevel.Warning);
			}
			finally {
				act.Commands.End();
				act.InvalidateVisual();
				act.InvalidateSpriteVisual();
			}
		}
		
		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			return act != null;
		}
	}
}

use Scripts, line 49 is act.SetColor("#99F80909"); Change it any way.

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   2
  • Joined:  08/30/13
  • Last Seen:  

On 8/6/2017 at 5:16 PM, Kinx said:

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 GrfToWpfBridge;
using TokeiLibrary;
using TokeiLibrary.WPF;
using Action = GRF.FileFormats.ActFormat.Action;
using Frame = GRF.FileFormats.ActFormat.Frame;
using Point = System.Windows.Point;

namespace Scripts {
    public class Script : IActScript {
		public object DisplayName {
			get { return "MyCustomScript"; }
		}
		
		public string Group {
			get { return "Scripts"; }
		}
		
		public string InputGesture {
			get { return null; }
		}
		
		public string Image {
			get { return null; }
		}
		
		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			if (act == null) return;
			
			try {
				act.Commands.Begin();
				act.Commands.Backup(_ => {
					act.SetColor("#99F80909");
				}, "MyCustomScript", true);
			}
			catch (Exception err) {
				act.Commands.CancelEdit();
				ErrorHandler.HandleException(err, ErrorLevel.Warning);
			}
			finally {
				act.Commands.End();
				act.InvalidateVisual();
				act.InvalidateSpriteVisual();
			}
		}
		
		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			return act != null;
		}
	}
}

use Scripts, line 49 is act.SetColor("#99F80909"); Change it any way.

Thank you so much!

It works brilliantly!

Saves a ton of time tinting sprites :wub:

Any way I can use the color picker for this though? Instead of defining the color string in the script itself.

On 8/8/2017 at 1:56 AM, Tokei said:

Copy and paste this file to Scripts > Open scripts folder (name it "SetColor.cs"):


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 GrfToWpfBridge;
using TokeiLibrary;
using TokeiLibrary.WPF;
using Action = GRF.FileFormats.ActFormat.Action;
using Frame = GRF.FileFormats.ActFormat.Frame;
using Point = System.Windows.Point;

namespace Scripts {
    public class Script : IActScript {
		public object DisplayName {
			get { return "Change all layer color"; }
		}
		
		public string Group {
			get { return "Scripts"; }
		}
		
		public string InputGesture {
			get { return null; }
		}
		
		public string Image {
			get { return null; }
		}
		
		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			if (act == null) return;
			
			var frame = act[selectedActionIndex, selectedFrameIndex];
			
			GrfColor startColor;
			
			if (frame.Layers.Count == 0) {
				startColor = GrfColor.White;
			}
			else {
				startColor = act[selectedActionIndex, selectedFrameIndex, 0].Color;
			}
			
			ColorPicker.PickerDialog picker = new ColorPicker.PickerDialog(startColor.ToColor(), ColorPicker.Core.ColorMode.Hue);
			picker.Owner = WpfUtilities.TopWindow;
			picker.ShowDialog();
			
			if (picker.DialogResult) {
				try {
					act.Commands.Begin();
					GrfColor newColor = picker.PickerControl.SelectedColor.ToGrfColor();
					act.Commands.SetColor(newColor);
				}
				catch (Exception err) {
					act.Commands.CancelEdit();
					ErrorHandler.HandleException(err, ErrorLevel.Warning);
				}
				finally {
					act.Commands.End();
					act.InvalidateVisual();
				}
			}
		}
		
		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			return act != null;
		}
	}
}

Then you can use Scripts > Change all layer color. I really should update Act Editor @@...

Thanks a lot Tokei!

For both the answer and for developing Act Editor!

Oh, meanwhile, if you are planning to update it..

There are a lot of bugs in the Palette Editor.

Sometimes selecting a gradient palette, and pasting ARGB color does not update the palette. (Unless I first move the color picker around)

And the Undo tends to revert to the wrong colors.

I also have a suggestion for the ability to assign which area of the sprite will use which part of the palette.

(Sometimes I need a quick fix to those pesky nose color palettes!)

This might not be the place to report bugs, but I am not sure where to report.

Other than that, thanks a lot :D

------------------------------------------------------

EDIT: Edited the script, added the ability to preview the color in editor following the examples from other scripts.

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 GrfToWpfBridge;
using TokeiLibrary;
using TokeiLibrary.WPF;
using Action = GRF.FileFormats.ActFormat.Action;
using Frame = GRF.FileFormats.ActFormat.Frame;
using Point = System.Windows.Point;

namespace Scripts {
    public class Script : IActScript {
		public object DisplayName {
			get { return "Fill Color"; }
		}
		
		public string Group {
			get { return "Scripts"; }
		}
		
		public string InputGesture {
			get { return "Ctrl-Shift-N"; }
		}
		
		public string Image {
			get { return "pal.png"; }
		}
		
		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			if (act == null) return;
			
			var frame = act[selectedActionIndex, selectedFrameIndex];
			
			GrfColor startColor;
			
			if (frame.Layers.Count == 0) {
				startColor = GrfColor.White;
			}
			else {
				startColor = act[selectedActionIndex, selectedFrameIndex, 0].Color;
			}
			
			ColorPicker.PickerDialog picker = new ColorPicker.PickerDialog(startColor.ToColor(), ColorPicker.Core.ColorMode.Hue);
			picker.Owner = WpfUtilities.TopWindow;
			
			picker.PickerControl.PreviewColorChanged += (s, color) => _previewUpdate(act, color.ToGrfColor());
			picker.PickerControl.ColorChanged += (s, color) => _previewUpdate(act, color.ToGrfColor());
				
			picker.ShowDialog();
			
			act.Commands.SetColor(startColor);
			
			if (picker.DialogResult) {
				try {
					act.Commands.Begin();
					GrfColor newColor = picker.PickerControl.SelectedColor.ToGrfColor();
					act.Commands.SetColor(newColor);
				}
				catch (Exception err) {
					act.Commands.CancelEdit();
					ErrorHandler.HandleException(err, ErrorLevel.Warning);
				}
				finally {
					act.Commands.End();
					act.InvalidateVisual();
				}
			}
		}
		
		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
			return act != null;
		}
		
		private void _previewUpdate(Act act, GrfColor color) {
			act.Commands.SetColor(color);
			
			act.InvalidateVisual();
		}
	}
}

I hope I am doing this right, just sharing for people who is looking for the same script :D

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   26
  • Joined:  05/13/16
  • Last Seen:  

@Tokei Sorry for reviving this old thread, but there is a similar problem to this.

 

Moving a sprite moves the sprites X Y coordinates in a single frame only... Is there a option/script to move it in all frames at once?

In my case, it's a falcon that should be placed higher.

 

Thank you in advance.

Edited by Chuu
Link to comment
Share on other sites

  • 0

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

Have you tried holding down alt + moving the image? I reallyyy need to remake that software.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   26
  • Joined:  05/13/16
  • Last Seen:  

Yes I've tried it after your reply, but sadly it doesn't change the effect. Still just one frame is touched.

I think your software is fine, there are just some scripts missing that target all frames at once.

Frame 0:  Moved Y by +100

JI7Ucro.png

 

Frame 1:

4CGlIPB.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   26
  • Joined:  05/13/16
  • Last Seen:  

@Tokeiburu

Is there a script out yet to move everything at once? X_X

Link to comment
Share on other sites

  • 0

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

On 1/16/2018 at 6:49 AM, Chuu said:

@Tokeiburu

Is there a script out yet to move everything at once? X_X

Well, I've updated the version to 1.1.0, the Alt-Move should now work. Bunch of other changes as well, looks like I forgot to push the updates for this software (I got pretty busy!).

Although I'll just mention that this was always possible via scripting:

Script > Script Runner... > 

act[selectedActionIndex].Translate(0, -100);

or

// Translates by 100 up for the whole act file
act.Translate(0, -100);

 

Edited by Tokei
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   26
  • Joined:  05/13/16
  • Last Seen:  

Thank you so much, it does work flawless. So many people appreciate your hard work, keep it up!

 

Link to comment
Share on other sites

  • 0

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

@Tokei hello 

I want a script to move the y-100 head.

A19B48A1-032D-4917-8AD8-8F0C5C6137D6.jpeg

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  33
  • Reputation:   3
  • Joined:  09/16/15
  • Last Seen:  

Hello is there a script to replace all images at once? E.g. replace image 1-6 with image0001.bmp to image0006.bmp. I'm trying to recolor a bunch of items

Link to comment
Share on other sites

  • 0

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

On 9/5/2020 at 12:06 PM, boeyskie said:

Hello is there a script to replace all images at once? E.g. replace image 1-6 with image0001.bmp to image0006.bmp. I'm trying to recolor a bunch of items

Right-click the sprite you want to start at and use "Replace..."

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  01/14/23
  • Last Seen:  

On 1/22/2018 at 9:24 AM, Tokei said:

Well, I've updated the version to 1.1.0, the Alt-Move should now work. Bunch of other changes as well, looks like I forgot to push the updates for this software (I got pretty busy!).

Although I'll just mention that this was always possible via scripting:

Script > Script Runner... > 

act[selectedActionIndex].Translate(0, -100);

or

// Translates by 100 up for the whole act file
act.Translate(0, -100);

 

Hello, sorry for commenting on an old forum post.

I would like to ask, do you know how to set each frame to have the same x and y position? For example, I want frame 1 to 7 to be (2 , -82).

Link to comment
Share on other sites

  • 0

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

8 hours ago, Lazarack said:

Hello, sorry for commenting on an old forum post.

I would like to ask, do you know how to set each frame to have the same x and y position? For example, I want frame 1 to 7 to be (2 , -82).

Heya,

You're right, this is definitely the wrong thread ;P. There are many ways of doing this, so here goes.

for (int aid = 0; aid <= 7; aid++) {
	var action = act[aid];
	
	for (int fid = 0; fid < action.Frames.Count; fid++) {
		var frame = action[fid];
		
		for (int lid = 0; lid < frame.Layers.Count; lid++) {
			var layer = frame[lid];
			
			layer.OffsetX = 2;
			layer.OffsetY = -82;
		}
	}
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  01/14/23
  • Last Seen:  

On 11/6/2023 at 2:11 AM, Tokei said:

Heya,

You're right, this is definitely the wrong thread ;P. There are many ways of doing this, so here goes.

for (int aid = 0; aid <= 7; aid++) {
	var action = act[aid];
	
	for (int fid = 0; fid < action.Frames.Count; fid++) {
		var frame = action[fid];
		
		for (int lid = 0; lid < frame.Layers.Count; lid++) {
			var layer = frame[lid];
			
			layer.OffsetX = 2;
			layer.OffsetY = -82;
		}
	}
}

 

Thank you very much, it works. That's very helpful, thank you so much, I appreciate your help a lot. 😄

Link to comment
Share on other sites

  • 0

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

HOW TO FIX THIS

 

--------------          Message          --------------
Compiler executable file csc.exe cannot be found.
--------------        Stack trace        --------------
   at GrfToWpfBridge.Application.DefaultErrorHandler._reportAnyManagedExceptions(String message, Exception exception, ErrorLevel errorLevel)
   at GrfToWpfBridge.Application.DefaultErrorHandler.Handle(Exception exception, ErrorLevel errorLevel)
   at ActEditor.Core.ScriptLoader._addFromScript(String script, String localCopy, List`1 toAdd)
   at ActEditor.Core.ScriptLoader.AddScriptsToMenu(ActEditorWindow actEditor, Menu menu, DockPanel dockPanel)
   at ActEditor.Core.ActEditorWindow.<>c__DisplayClass1e.<.ctor>b__1(Object , RoutedEventArgs )
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
   at System.Windows.Interop.HwndSource.Resize(Size newSize)
   at System.Windows.Interop.HwndSource.OnLayoutUpdated(Object obj, EventArgs args)
   at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at System.Windows.Window.SetRootVisual()
   at System.Windows.Window.SetRootVisualAndUpdateSTC()
   at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   at System.Windows.Window.CreateSourceWindowDuringShow()
   at System.Windows.Window.SafeCreateWindowDuringShow()
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at ActEditor.GRFEditorMain.Main(String[] args)

--------------         Exception         --------------
System.InvalidOperationException: Compiler executable file csc.exe cannot be found.
   at System.CodeDom.Compiler.RedistVersionInfo.GetCompilerPath(IDictionary`2 provOptions, String compilerExecutable)
   at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames)
   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames)
   at ActEditor.Core.ScriptLoader.Compile(String scriptPath, String& dll)
   at ActEditor.Core.ScriptLoader._addFromScript(String script, String localCopy, List`1 toAdd)
 

Link to comment
Share on other sites

  • 0

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

1 hour ago, Ckenny said:

HOW TO FIX THIS

 

--------------          Message          --------------
Compiler executable file csc.exe cannot be found.
--------------        Stack trace        --------------

That's a wrong thread if I've ever seen one. That being said, csc.exe is the .net compiler. If you get that error, you have to install the ".net 3.5 framework".

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