GrogHeads Forum

Grog Friends and Affiliates => General Staff Support Forum => Army Editor Tech Support => Topic started by: Bletchley_Geek on August 15, 2018, 04:20:40 PM

Title: Accuracy Editor Requests and Comments
Post by: Bletchley_Geek on August 15, 2018, 04:20:40 PM
Thank you very much for the opportunity of taking an early look at the Army Editor.

I am opening a thread with some comments on the Accuracy Editor:


Can't wait to play the battles.

Edit: just found the option to do so
Title: Re: Accuracy Editor Requests and Comments
Post by: Dr D Ezra Sidran on August 16, 2018, 05:13:27 AM
I think those are very good comments and I agree. Andy came up with the idea for the accuracy curve and being able to input from a CSV file is major plus.

Again, thanks to Andy, we have added digital pen support for the Map Editor (this will be the next module released for beta-test). Perhaps it can be added for drawing the Accuracy curve. However, a lot of people don't have digital pens (in fact I had to borrow one from an artist friend just for testing).
Title: Re: Accuracy Editor Requests and Comments
Post by: Andy ONeill on August 16, 2018, 05:40:57 AM
Plan A was to allow users to draw a curve.
I built a small utility to explore the practicality.
I found it surprisingly difficult to draw a decent curve with a mouse.
In the end I used that to get me started with curves and edited in the app.
We can consider polishing up my utility a bit and offering that separately.

The various files are txt so you could build them in excel or whatever and paste into a txt file.
I don't envisage people using custom curves per unit.

I can fairly easily calculate the range each percentage translates into and add that in the mouseover stuff.
Title: Re: Accuracy Editor Requests and Comments
Post by: Bletchley_Geek on August 20, 2018, 08:00:39 AM
Thanks for the answers guys.

Am I correct understanding that if I drop new data files in the directory where the premade curves are available, the editor will just load them?

Regarding tracing the curve: with a Surface stylus or a good gaming mouse that allows to adjust sensitivity it is quite easy :)
Title: Re: Accuracy Editor Requests and Comments
Post by: Mickey3D on August 26, 2018, 03:22:19 PM
Editor is crashing with the following error in the Windows event log:

Quote
Application : GSBPArmyEditor.exe
Version du Framework : v4.0.30319
Description : le processus a t arrt en raison d'une exception non gre.
Informations sur l'exception : System.IndexOutOfRangeException
    UILib.ArrayToPointCollectionConverter.Convert(System.Object, System.Type, System.Object, System.Globalization.CultureInfo)
    System.Windows.Data.BindingExpression.TransferValue(System.Object, Boolean)
    System.Windows.Data.BindingExpression.Activate(System.Object)
    System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt)
    System.Windows.Data.BindingExpression.AttachOverride(System.Windows.DependencyObject, System.Windows.DependencyProperty)
    System.Windows.Data.BindingExpressionBase.OnAttach(System.Windows.DependencyObject, System.Windows.DependencyProperty)
    System.Windows.StyleHelper.GetInstanceValue(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElement, System.Windows.FrameworkContentElement, Int32, System.Windows.DependencyProperty, Int32, System.Windows.EffectiveValueEntry ByRef)
    System.Windows.FrameworkTemplate.ReceivePropertySet(System.Object, System.Xaml.XamlMember, System.Object, System.Windows.DependencyObject)
    System.Windows.FrameworkTemplate+<>c__DisplayClass45_0.<LoadOptimizedTemplateContent>b__3(System.Object, System.Windows.Markup.XamlSetValueEventArgs)
    System.Xaml.XamlObjectWriter.OnSetValue(System.Object, System.Xaml.XamlMember, System.Object)
    System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(MS.Internal.Xaml.Context.ObjectWriterContext, System.Xaml.XamlMember, System.Object, Boolean)
    System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(MS.Internal.Xaml.Context.ObjectWriterContext)
    System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(MS.Internal.Xaml.Context.ObjectWriterContext)
    System.Xaml.XamlObjectWriter.WriteEndObject()
    System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)

Informations sur l'exception : System.Windows.Markup.XamlParseException
    System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
    System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)
    System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter)
    System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector, System.Collections.Generic.List`1<System.Windows.DependencyObject>, System.Windows.UncommonField`1<System.Collections.Hashtable>)
    System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject, System.Collections.Generic.List`1<System.Windows.DependencyObject>)
    System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElementFactory, Int32, System.Collections.Specialized.HybridDictionary, System.Windows.FrameworkTemplate)
    System.Windows.FrameworkTemplate.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.FrameworkElement)
    System.Windows.FrameworkElement.ApplyTemplate()
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.StackPanel.StackMeasureHelper(System.Windows.Controls.IStackMeasure, System.Windows.Controls.IStackMeasureScrollData, System.Windows.Size)
    System.Windows.Controls.StackPanel.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
    System.Windows.Controls.ItemsPresenter.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
    System.Windows.Controls.ScrollContentPresenter.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
    System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
    System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.ScrollViewer.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Decorator.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Decorator.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Controls.Primitives.PopupRoot.MeasureOverride(System.Windows.Size)
    System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
    System.Windows.UIElement.Measure(System.Windows.Size)
    System.Windows.Interop.HwndSource.SetLayoutSize()
    System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
    System.Windows.Controls.Primitives.Popup.SetRootVisualToPopupRoot()
    System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean)
    System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
    System.Windows.DependencyObject.InvalidateProperty(System.Windows.DependencyProperty, Boolean)
    System.Windows.Data.BindingExpressionBase.Invalidate(Boolean)
    System.Windows.Data.BindingExpression.TransferValue(System.Object, Boolean)
    MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean, Boolean, Boolean)
    MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32, System.ComponentModel.ICollectionView, System.Object, Boolean)
    MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyProperty, Boolean)
    System.Windows.Data.BindingExpression.HandlePropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.Data.BindingExpression.OnPropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependentList.InvalidateDependents(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
    System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
    System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
    MS.Internal.Data.PropertyPathWorker.SetValue(System.Object, System.Object)
    System.Windows.Data.BindingExpression.UpdateSource(System.Object)

Informations sur l'exception : System.NullReferenceException
    System.Windows.Controls.Primitives.Popup.OnWindowResize(System.Object, System.Windows.AutoResizedEventArgs)
    System.Windows.Interop.HwndSource.Resize(System.Windows.Size)
    System.Windows.Interop.HwndSource.OnLayoutUpdated(System.Object, System.EventArgs)
    System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
    System.Windows.ContextLayoutManager.UpdateLayout()
    System.Windows.ContextLayoutManager.UpdateLayoutCallback(System.Object)
    System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
    System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)
    System.Windows.Media.MediaContext.RenderMessageHandler(System.Object)
    System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
    System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
    System.Windows.Threading.DispatcherOperation.InvokeImpl()
    MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
    System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
    System.Windows.Threading.DispatcherOperation.Invoke()
    System.Windows.Threading.Dispatcher.ProcessQueue()
    System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
    System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
    System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
    System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
    MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
    MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
    System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
    System.Windows.Application.RunDispatcher(System.Object)
    System.Windows.Application.RunInternal(System.Windows.Window)
    ArmyEditor.App.Main()

It happens when I do the following:

- Open army file BigArmy.xml (attached)
- I click on the Accurcy list box of the "1234" unit

Note that I have a test.txt custom accuracy file (attached). It is a copy of Pistol.txt that I have modified using the accuracy editor.


Title: Re: Accuracy Editor Requests and Comments
Post by: Andy ONeill on August 27, 2018, 02:10:16 AM
Any txt files in that accuracies folder will indeed be picked up and used by the army editor.

Looking at Test.txt. it has 99 lines in it.
Files should have 100 lines.

As it tries to work with the hundredth line, there is none and it crashes.

I've made a change so it should be less prone to crashing in this instance.
You will also see a message when you run the app which tells you about any problem file.

I copied pistol.txt and edited the file in the app.
When I hit save I still have 100 lines as expected.
Not sure how you ended up with 99 lines in test.txt.
Title: Re: Accuracy Editor Requests and Comments
Post by: Mickey3D on August 27, 2018, 12:45:54 PM
Quote
Looking at Test.txt. it has 99 lines in it.

I have edited it manually, I'm afraid I removed a line inadvertently.  :-[