Author Topic: Changelog - picture heavy  (Read 15187 times)

0 Members and 1 Guest are viewing this topic.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #165 on: August 06, 2018, 02:22:09 AM »
Army Editor

I've built a prototype installer for the Army Editor.
This needs testing and we also need an icon for the army editor before we can distribute.

This will also probably be an interim solution and only used for beta testers.
Steam will be our main distribution platform and hence we will have to conform to their requirements.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #166 on: August 08, 2018, 09:20:31 AM »
Substituted the new ico files.
The 3 apps now have arrow with different colours so they're immediately identifiable separately but of the same suite.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #167 on: August 15, 2018, 01:15:58 AM »
Army Editor Installer

There are a couple of bugs with this.
I think they're fixed now.
Ezra found a bug in the army editor to do with deleting a unit.
I can't replicate that.
Once I do and that is fixed, the army editor will be made available for beta testing.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #168 on: August 16, 2018, 05:46:07 AM »
Army Editor Big Fixes

Fixed a number of delete and insert bugs related to the lost of all units getting out of step with what you added.
Changed way attributes are copied when you paste.
This should now copy everything but those marked ( internally ) not to copy.

That way when I add another attribute to a unit then this won't recur.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #169 on: August 16, 2018, 07:32:29 AM »
Army Editor Improvements

Added metres distance for each percentage in army editor edit accuracies.
This is of course dependent on setting the range.

Show file name that will be used for save in sub menuitem from save.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #170 on: August 17, 2018, 03:50:39 AM »
Scenario editor
Remove default debug map and army load.

Map Editor
Added Exit to File menu
Completed installer project

Army Editor
Added date to version on exe.
This is in case someone finds a problem I think I fixed - so we know which version they're running.
I now have to remember to change the version each day I build the app though. :-\

Army Editor installer
Try and make the net framework requirement more sophisticated.
Not sure why it wasn't detecting .Net 4.7 wasn't installed but maybe this change will address that.
« Last Edit: August 17, 2018, 03:53:58 AM by Andy ONeill »

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #171 on: August 17, 2018, 06:56:09 AM »
Army Editor

Added two paste options to preferences.
These give you control of whether to copy the unit name for HQ and combat units when you paste.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #172 on: August 18, 2018, 06:30:30 AM »
Army Editor

Fixed issue where unit Name was blank after save. This was a bug I introduced that fixing something else.
Attempted to cope with full stop for decimal place whilst user's machine language would usually expect a comma.



Added message when saving army
Added f4 for "quick" save which saves back to whichever file you loaded or Default.xml. This is the same as File > Save
Changed the way the current file name is displayed in the file save menu
Simplified the save as - it's a given that you're saving an army file when you're in the army editor.
Set the default name of file in the menu after you choose Save As.
Put the two columns of editing controls in the edit panel in scrollviewers.
These will give scroll bars if the content cannot fit.
Admittedly, this is a somewhat quick and dirty fix but should enable the main window to at least be usable on lower res monitors.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #173 on: August 21, 2018, 02:34:10 AM »
Army Editor

Fixed a bug in ID save.
This problem was particularly apparent on delete.
When you save an army file and reloaded it, the HQ and units would load fine and it'd look all good.
Then when you delete a subordinate you'd get an error.
This was because multiple units qualified as the unit's CO.
Any armies saved prior to version 0.2018.8.21 are likely to display this problem.
You can likely fix them temporarily using renumber ID since this iterates through the unit tree and renumbers everything.
Until using the new version it will recur every time you save though.

As suggested, I've added the version number to the standard About Window so you can easily see which version you have installed.
 

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #174 on: August 23, 2018, 03:00:03 AM »
Army Editor

Add default HQ on start up.
This avoids the possibility that the user will choose to save a totally empty army file and then later get an error when they load it.
It also saves an extra key press to start a new army when you're just getting started

Prompt for Save if data is dirty.
When you close the app.
It keeps whatever you started with or loaded or last saved as an origininal version.
It then compares with what you currently have in memory.
If these are different then it shows a message box prompting you

If you choose OK then your changes are gone with the app, cancel stops the app closing and you can then save or whatever.

Ctrl+S invokes save army ( in addition to existing key combinations).
« Last Edit: August 23, 2018, 03:52:54 AM by Andy ONeill »

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #175 on: August 25, 2018, 05:37:46 AM »
Map Editor

Next up for beta testing will be the Map Editor.
This is much more complicated than the Army Editor with a lot of fiddly bits.
But...
I've added on functionality which was added to the Army Editor as a result of beta.

Ctrl+S & f4 save

Show default name in menu
Added Save as ( Could have sworn that was in there already ).
Rationalised code used for saving.

Investigated prompt for save if dirty.
This would be extremely involved for the map editor for various tedious technical reasons.
In brief - there are many different complex objects involved.
This would be quite hard to implement and likely to have many edge cases where you get false positive or negatives on differences.
Will not implement.
Until and  unless I can think of a practical way to do so.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #176 on: August 26, 2018, 08:21:13 AM »
Map Editor

Prompt user for save if closing when there are unsaved edits.
This is using an approach which isn't as reliable ( or elegant ) as the army editor.
It seems stable but the most likely failure will be over sensitivity.
Erring towards prompting unecessarilly is better than erring towards failure to spot changes.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #177 on: August 27, 2018, 02:15:39 AM »
Army Editor

Following feedback on accuracies files, I've made a couple of changes which should make the app handle accuracy txt files with less than 100 lines rather more gracefully.

If you have such a file then you will see a message on running the app.

At the risk of stating the obvious - you should fix the problem rather than ignore it and carry on.

However.
The part which draws the little graph for the accuracies combobox now gets a default value for any missing entries and should not crash.
Other parts might, but that part of the code shouldn't :^)

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #178 on: September 03, 2018, 05:17:12 AM »
All - Global error handler

I've added code which attempts to capture the details of any error.
The idea being to make it easier for beta testers to report errors with a stack trace.
You don't see any difference from the current behaviour, there's no extra form shown.
The error description and stacktrace are copied to the clipboard.
You can then just paste that into notepad or a forum post.
Testing this is kind of tricky since I needed to simulate an error.
An example of the result from this is below.

Note that this isn't always anywhere near enough to diagnose a problem and a description of what you were doing at the time you saw a problem is still invaluable.



Parameter cannot be null
Parameter name: original
GSBPArmyEditor
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at GalaSoft.MvvmLight.Helpers.WeakAction.Execute() in C:\Users\lbugn\Documents\MVVMLight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\Helpers\WeakAction.cs:line 357
   at GalaSoft.MvvmLight.CommandWpf.RelayCommand.Execute(Object parameter) in C:\Users\lbugn\Documents\MVVMLight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\Command\RelayCommand.cs:line 230
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   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.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(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.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at ArmyEditor.App.Main()


Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 268
Re: Changelog - picture heavy
« Reply #179 on: September 05, 2018, 03:43:31 AM »
Army Editor

Smoothed out the values in the accuracy .txt files.

Reload accuracies when saving a change to a file.
When you use the preferences > Accuracies to edit files and save changes.
Previously, you would have needed to close the app and re-open to pick up changes to an accuracy file.
Having said that.
Extensive changes to accuracy files should not be necessary.

Change the accuracy drop down combo to include the name of the file.
(Ezra felt a tooltip wasn't obvious enough.)
Also added a border round the little graphs.

Note that picking a curve is a one off process.
You pick the curve out the combobox and it's values are applied to the unit.
You're not setting the unit to have Muskets or Pistols, you're just copying the values.
This then allows you to edit the values for a specific unit if you really wanted to.
It also means units and accuracy files are totally separate.
Someone else you give an army file does not need the various accuracy files you used to create it.
If you wanted to, you could have a different set of files you use for different periods and switch out which you have in the Accuracies folder as you work on armies for each period.
« Last Edit: September 05, 2018, 04:18:23 AM by Andy ONeill »