[OPTing] OPTech v2

Need help editing the game? Check for help here!
Post Reply

Re: [OPTing] OPTech v2

User avatar
Darksaber
Vice Admiral
Posts: 10932
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Apr 25, 2020 3:18 am

Crash report

Code: Select all

---------------------------
Press Ctrl+C to copy the text
---------------------------
System.ArgumentException: Width and Height must be non-negative.
   at System.Windows.Rect..ctor(Double x, Double y, Double width, Double height)
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.ViewFinderSelectionConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyPropertyKey key, Object value)
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.UpdateViewport()
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.UpdateView(ZoomboxView view, Boolean allowAnimation, Boolean allowStackAddition, Int32 stackIndex)
   at Xceed.Wpf.Toolkit.Zoombox.Zoombox.OnSizeChanged(Object sender, SizeChangedEventArgs 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.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)
   at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   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.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)
---------------------------
OK
---------------------------
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sat Apr 25, 2020 7:21 am

And something else:
As it's my understanding it is now possible to use 32bit textures in XWA right?

However, I can't create an 32bit OPT in OPTech, because it'll still demand textures to be 256 colors and won't create the OPT otherwise.
Could you lift that barrier?

Also, would it be possible to enable PNG support in OPTech? IIRC you can use pngs in OPT Editor...
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2662
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Apr 25, 2020 11:56 am

The crash was in Xceed.Wpf.Toolkit. It has been fixed in v3.6. I've updated OPTech to use the latest version v3.8. I think this should fix the crash.
Please redonwload OPTech.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2662
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Apr 25, 2020 11:59 am

OPTech wasn't designed to support 32-bit OPTs and PNG files.
Adding these features needs some refactoring and rewriting all the code related to textures reading and writing, the code related to the texture parts of OPT writing and importing.
So this will take some time to add these features.

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sat Apr 25, 2020 12:55 pm

That sounds scary!
If it's too much of a hassle and too big a risk, leave it, I'll find another way :)
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
Darksaber
Vice Admiral
Posts: 10932
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Apr 25, 2020 4:00 pm

Thanks Jeremy

GT you can always swap out the 256 textures for 32bit PNG's in XWA Opt Editor after you opted the craft in Optech, I' know it a lot of messing about but it's and answer, and to be honest its not that difficult :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sun Apr 26, 2020 11:20 pm

Thought about that, too but I don't really bother with the numbers until the very end. I usually name the meshes according to what they are - MainHull, MainEngine, HyperEngine, SmallTurret, etc. That makes identifying and sorting them way easier.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

Bman
Lieutenant
Posts: 887
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Apr 27, 2020 6:42 am

I noticed that too, moving the individual meshes up or down in the list in XWAOptEditor is a lot easier to do than in Optech. Probably good practice too is to put all rotating pilot/s-foils meshes "last" in the list of any model, that way when substituted by other models using "objects hook" method, it may not conflict as much if they don't have same number of meshes and their corresponding index order dosen't cause rotation on the wrong hull meshes, as dictated by the original model's .ini files. Easier to fix rotarty mesh issues at end of a mesh list.
Last edited by Bman on Tue Apr 28, 2020 11:05 pm, edited 1 time in total.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Mon Apr 27, 2020 7:31 am

Maybe a common ground would be to display a sequencial number before the actual mesh name. That way everyone can keep their preferred naming habits but you still have a way of orientation. Kinda like this
1 MyMainHull
2 MyShieldgenerator
3 MyReallyBigGun
4 MeshX

And so on

On another note, there seems to be a bug with either the scaling function or the model dimension function, as their values differ:
Scaling Window:
Scaling1.jpg
Model Dimensions:
Scaling2.jpg
Craft Library:
Scaling3.jpg

Also, the model dimensions window sometimes displays inccorrect height of the entire OPT but only a part of it.
For Example, here's the dimensions of the Warhammer Heavy Cruiser. Left is the incorrect values. Right the correct after I merged all meshes together.
DisplayHeight.jpg
My first thought that it might substract periphery meshes like ANTENNA or SHIELDGEN but if you look at the model, those don't make a difference of 400 meters....
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Mon Apr 27, 2020 8:23 am

The issue I see here is that if I use such a function(which doesn't even exist yet :D) I'd lose the custom naming for all meshes, not only the ones that were impacted by moving or merging.

Maybe make the sequencial Number displaying in the mesh list a separate request. That way I could keep my precious names but still have the orientation I crave XD

@Jeremy, just to clarify, my idea here is to display the mesh number in the list, before the actual mesh name. The leading zeroes probably won't work, I added those for ease to read.
sequentialnumber.jpg
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
Darksaber
Vice Admiral
Posts: 10932
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Apr 27, 2020 9:11 am

No you wouldn't, because you would still be able to name your meshes as you want, the only time it would reset the names is if you where to click on Fix/Mesh Numbering, then and only then if it was possible to do this you would loose your names, but it would be your choice!

We are talking about Optech here NOT XwA Opt Editor

Look forget it, I'll delete my posts, you just don't seem to get what I'm suggesting

And please DO NOT change anything, Keep Optech as it is!
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Mon Apr 27, 2020 9:31 am

Lol, calm down mate. I perfectly undestand what you mean, it just seems we have different styles of making our OPTs. Therefore I clarified my idea not as an alternative but an addition.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Mon May 25, 2020 9:26 pm

Hey Jeremy, I seem to be having a few problems with the scaling functions in the current versoin:
I have a ship, which I want to scale down from 600m to 400m.

1) The scaling tool and the dimensions dialogue show different values:
Scaling1.jpg
Scaling2.jpg
2) Now trying to scale the model down using the various functions, doesn't work too well:
- Using the scale fields in the geometries window and entering 66 in each of them does seem to scale down the ship according to the Graphical window. However checking the sizes in either of the aforementioned dialogues shows no difference. Saving the OPT or (for testing) merging all the meshes and recalculating hitzones doesn't fix it.
- Using the scale OPT function does seem to scale the individual meshes, but it retains their position utterly tearing the shpi apart. This may be useful for scaling individual meshes but not for scaling the whole model.

Could you please take a look at this?
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2662
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue May 26, 2020 1:51 pm

EDIT: link removed

I've fixed the model dimensions dialog. Now the scale opt dialog and the dimension dialog show the same values.

I've improved the scale opt function.
Last edited by JeremyaFr on Wed May 27, 2020 12:41 pm, edited 1 time in total.

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Tue May 26, 2020 8:56 pm

YES! That did it! Thank you Jeremy!
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2662
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed May 27, 2020 12:42 pm

UPDATE

Hello,
I've merged the changes from the WIP version into the stable version.

User avatar
Darksaber
Vice Admiral
Posts: 10932
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Tue Jun 09, 2020 12:27 pm

Hi Jeremy, is it possible to change the text in the texture box from grey to black please

The grey on a purple background and it's a little hard to see sometime, changing it to black would be a great help

Thanks you
Texture.jpg
You do not have the required permissions to view the files attached to this post.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Tue Jun 09, 2020 12:45 pm

Could also make the background white. I often run into trouble seeing the border of the texture currently selected.
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4801
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Tue Jun 09, 2020 12:49 pm

Is there ways to alter the background colour of the opt viewing section? On this or the explorer.
Black is ok but a green screen option for example would be a great help
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
Darksaber
Vice Admiral
Posts: 10932
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Tue Jun 09, 2020 1:36 pm

Here we go hijacking my request again, nothing is mentioned for weeks but as soon as I ask for something everyone else piles on top again! :kopfwand:

I'm fine with a white background for the text box

But Ace really a green background, Jeremy if you can add a color change to the background PLEASE make it optional and add it to the Option/Colour section on the main menu, sorry but I'm NOT working with a permanent Green Background

Ace can I ask why you want a green background? Is it so you can snapshot an image of the opt and then remove the background?

Could I offer an alternative suggestion if that's what Ace is trying to achieve, it's not a request for Optech but for XWA Opt Editor, since that can handle 32bit alpha textures, would it be possible to add taking a snapshot of the image in the view window and saving it with a transparent background?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2662
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jun 09, 2020 1:44 pm

Hello,
Here is a WIP version:

EDIT: link removed

I've changed the foreground and background color for the list boxes.
I've added a color picker to select the background color of the render screen. Black is the default color.
Last edited by JeremyaFr on Tue Jun 09, 2020 4:39 pm, edited 1 time in total.

User avatar
Vince T

Fleet Admiral (Administrator)
Posts: 12940
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Tue Jun 09, 2020 2:46 pm

Great work Jeremy, all works fine. The new lists are lightyears better!

As for the background, adding the color picker was a good idea. I don't really see the necessity for a greenscreen mode, as there's no Anti Aliasing blurring out the edges of the models and I think there's rarely, if ever, a case where you have OPTs with pure black (#000000) textures. Still a nice thing to play with. :)
Your ship, Captain. I need a drink. - Vince Trageton

My Steam Workshop

User avatar
Darksaber
Vice Admiral
Posts: 10932
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Tue Jun 09, 2020 2:59 pm

Thanks Jeremy, that'll do just fine :) at least now I don't have to squint to see it lol

Color picker lol Meh! Thanks :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4801
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Tue Jun 09, 2020 3:19 pm

Darksaber wrote:
Tue Jun 09, 2020 1:36 pm
Ace can I ask why you want a green background? Is it so you can snapshot an image of the opt and then remove the background?

Could I offer an alternative suggestion if that's what Ace is trying to achieve, it's not a request for Optech but for XWA Opt Editor, since that can handle 32bit alpha textures, would it be possible to add taking a snapshot of the image in the view window and saving it with a transparent background?
Yes it was XWA Opt Explorer mainly and Xwa Opt Editor I was thinking of. Was on a phone with a small screen.
Yes an option to save a snapshot with a transparent background would be most useful. At the very least different colour backgrounds.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2662
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jun 09, 2020 4:40 pm

UPDATE

Hello,
I've merged the changes from the WIP into the stable version.

Post Reply