|
Post by oaktree on Sept 18, 2018 7:36:53 GMT -6
I'll just say that the way that the game determines turret positions appears to be more complex than just that. If you want to handle most reasonable or especially all possible turret configurations, you're going to need to determine where the game draws turrets in most reasonable or all possible configurations. There is at least one position for A turret and are at least two positions for Y turret that aren't used in (AB | ABL | ABQ) & (AY | ALY | AQY | ALQY) & (ABY | AXY | ABXY | ABLY | ABQY | ALXY | AQXY | ABLXY | ABQXY | ABLQXY).
If you intend to have your editor set up to allow users to match the profile to the deck plan, I would suggest placing the bow to the left/right rather than to the top/bottom, as you then will not need to worry about rotations or mental gymnastics to get it into the right orientation to line up with the side view in 'normal' orientation.
As to the relative positions of the deck plan and profile, the USN's ONI ship recognition drawings appear to have placed the side view above the deck plan while American drafting convention places the top view above the front and side views.
A lot of people also use "V" turret rather than "X" in order to get a weight saving - and it's available earlier than superimposed "X" as well in the tech tree. And in the default views "V" installations also end up imposed over the rear superstructure and make things look a little odd. (I think historically "V" turret went away due to how much deck space it made unusable between it and "Y" turret. Deck space is at a premium on ships in that period for non-combat things like boat or later seaplane storage.)
|
|
|
Post by aeson on Sept 18, 2018 7:54:51 GMT -6
I'm pretty sure you can't use it on battleships and battlecruisers unless X is available. It is available earlier than X turret on light cruisers, though.
|
|
|
Post by Capsized on Sept 18, 2018 8:07:08 GMT -6
I like a lot the look of a V+Y ship. I like Q turrets too, but they are less effective. The current turret logic of Draftnought starts there: github.com/Duehok/Draftnought-dev/blob/master/model/shipdata.py#L127The last change comment on this file is "turret position logic less bugged", and it's very probably not bug free. I'll revisit it once the editor is useable. In a few minutes I should be done with the grids to help align top and side views, which will make it easier to find the cases where things go wrong. Then the last feature is remembering the scale and zoom of the side view for the recent files (I'll go mad if i have to redo the alignment each time i open a file).
|
|
|
Post by Capsized on Sept 18, 2018 15:07:07 GMT -6
And that's it, I have something useable. For now, only in pure python, so if you know how to run a python script you're good to go (start with main.py). if not, wait for a day or two until I manage to make an .exe. github.com/Duehok/Draftnought/archive/master.zipUndocumented feature: you can scroll the side view with the mouse wheel, and pan it with the left button. Once I have an exe I'll edit the first post with all the info. There is still some work: the interface has to be rearranged a bit, I need to add some explanations, etc... EDIT: I left a bug that prevent it from running if you have never ran it before, so it does not work. EDIT2: solved.
|
|
|
Post by Capsized on Sept 19, 2018 13:31:06 GMT -6
I edited the first post. A compiled and executable version has been released. Links deleted because they are outdated, see first post of the thread for up to date links. via Imgflip Meme Generator
|
|
|
Post by dorn on Sept 19, 2018 14:22:56 GMT -6
Nice. Is it possible to add scaling? See picture below. Edit: Scaling is possible for the picture. But the "window" for the picture remains smalls as it is zoomed in. Is it possible to enlarge upper windows or have ability to use scaling on drawings?
|
|
|
Post by Capsized on Sept 19, 2018 14:39:56 GMT -6
The top view can be scaled with the mouse wheel.
I'll have to do something for discoverability. The mouse cursor shows that you can pan, but the scroll possibilities are absolutely not apparent.
EDIT: What I understand from what you say, is that if you get the side view picture aligned with the top view, the side view picture no longer fits in the canvas which is too low. That makes sense because i tested with a battlecruiser which would not have this problem. I'll have to think about how I can solve this problem intelligently. The "dumb but quick" way is to just double the height of the top canvas.
I really, really, don't want to add pan and scale in the top view drawing. This code is quite "brittle" (touch anything, everything breaks). The display is supposed to scale so that any ship fits exactly.
EDIT2: I'll have something for the side view zoom and resize, it needs more tests before being uploaded. Here is what i wrote on the top of the side view code a few days ago: "TODO:debug the initial height calculations", so I knew (and forgot) that it was bad
|
|
|
Post by Capsized on Sept 20, 2018 13:42:42 GMT -6
New release. Deck torpedo mounts are shown Default side view zoom is better for shorter ships Side view can accomodate the full height of a zoomed-in picture Another reorganisation of the interface Saving files is easier Error messages are more informative Errors are more often survivable Harder to overwrite valid files with garbage (might still be possible) Links: see first post via Imgflip Meme Generator
|
|
|
Post by dorn on Sept 20, 2018 13:53:34 GMT -6
The top view can be scaled with the mouse wheel. I'll have to do something for discoverability. The mouse cursor shows that you can pan, but the scroll possibilities are absolutely not apparent. EDIT: What I understand from what you say, is that if you get the side view picture aligned with the top view, the side view picture no longer fits in the canvas which is too low. That makes sense because i tested with a battlecruiser which would not have this problem. I'll have to think about how I can solve this problem intelligently. The "dumb but quick" way is to just double the height of the top canvas. I really, really, don't want to add pan and scale in the top view drawing. This code is quite "brittle" (touch anything, everything breaks). The display is supposed to scale so that any ship fits exactly. EDIT2: I'll have something for the side view zoom and resize, it needs more tests before being uploaded. Here is what i wrote on the top of the side view code a few days ago: "TODO:debug the initial height calculations", so I knew (and forgot) that it was bad Yes, Double the height of the top canvas will help a lot.
|
|
|
Post by Capsized on Sept 20, 2018 13:56:09 GMT -6
Now it scales with zoom so the full picture's height will be displayed... Unless there's a bug somewhere.
|
|
|
Post by dorn on Sept 20, 2018 13:57:46 GMT -6
Perfect. Thanks a lot, it works well.
|
|
|
Post by bcoopactual on Sept 20, 2018 17:08:03 GMT -6
Looks great. Bravo Zulu.
|
|
|
Post by davedave on Sept 21, 2018 12:04:28 GMT -6
Can I just add a "Thank you very much" to this thread?
Awesome work, mate.
|
|
|
Post by garrisonchisholm on Sept 23, 2018 7:53:05 GMT -6
Just for my information, would this process be 'faster' than the in-game editor, or simply better/easier/more detailed?...
|
|
|
Post by Capsized on Sept 23, 2018 11:24:28 GMT -6
The aim is to make it easier and faster to get more details than with the in-game editor. If you're happy with three squares for the superstructure of a battlecruiser, the in-game editor is unbeattable. I decided to make this tool when trying to draw an hexagon on top of an octogon that fits neatly between two turrets, with three sides of the hexagon exactly on top of three sides of the octogon. That's undoable ingame so I decided to choose that as my next hobby project after a few ragequits. Finally and unexpectedly, you can draw asymmetrical superstructure with this tool and the game is OK with them. That's not possible ingame.
I just uploaded a small update: - casemates are displayed as something that might look like a casemate if you squint at it very hard; at least they are no longer turrets. - the positions of points placed by clicking are now rounded, so there is some kind of very basic "snap to grid"
In the enxt release: zoom and pan for top view. I did not want to do it, but it's just too useful. Bonus: that will make resizing the window possible. But that will take some work, so not before a few days.
|
|