aliens

Author Topic: MAPVIEW upgrade  (Read 259689 times)

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #345 on: January 03, 2019, 07:10:02 pm »
1) Destroyed tiles are not saved in a map, so you can go over 256, as long as the excess tiles are limited to destroyed tiles. So try putting destroyed tiles at the end of your last tileset.

not sure you mean this, but i'll try to clarify something ...

pretty sure that destroyed parts have to be kept within the Terrain that references them (eg, i don't believe it's valid to have a terrain that consists purely of destroyed parts at the end of a terrainset -- ie. MCD references need to be within their own MCD file)

I mean it doesn't *strictly* make sense to reference part#250 (or #275 ...) in an MCD that contains only 50 records.

(caveat: it may work, but that doesn't mean it strictly makes sense: because it would mean you could have a Map with a terrain that references a part that doesn't exist in the overall set)


note2: in TileView if you select a part, the titlebar ought display its MCD-ID (aka part#) -- first its position in the total terrainset ( MapID ), then its position in its own terrain ( TerrainID ).

@luke you probly know that, it's just a general note

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: MAPVIEW upgrade
« Reply #346 on: January 03, 2019, 07:31:24 pm »
note2: in TileView if you select a part, the titlebar ought display its MCD-ID (aka part#) -- first its position in the total terrainset ( MapID ), then its position in its own terrain ( TerrainID ).

@luke you probly know that, it's just a general note

Yep, i noticed it AFTER my maps were corrupted ( good news is its only 3 maps that i did before i noticed  ;))

A suggestion for a future update to help new modders (or old modders like me that forget the rules), add a message box on load that lets the modder know they have gone over the limit with set XYZ. Not desperately needed, but i know how easy messageboxes are to add in code so just thought i would mention it.


On another topic, do we have a guesstimate on when TFTD Bigobbs support will occur for PCKVIEW, i still have a few items i have not been able to steal from other Modders or Export myself. 

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #347 on: January 03, 2019, 08:07:58 pm »
Yep, i noticed it AFTER my maps were corrupted ( good news is its only 3 maps that i did before i noticed  ;))

A suggestion for a future update to help new modders (or old modders like me that forget the rules), add a message box on load that lets the modder know they have gone over the limit with set XYZ. Not desperately needed, but i know how easy messageboxes are to add in code so just thought i would mention it.

+3½


Quote
On another topic, do we have a guesstimate on when TFTD Bigobbs support will occur for PCKVIEW, i still have a few items i have not been able to steal from other Modders or Export myself.

well i just finished with this : https://github.com/kevL/yata/blob/master/UndoRedo.cs
so i should be able to make some time in the next few days and see how it goes ...

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: MAPVIEW upgrade
« Reply #348 on: January 03, 2019, 08:19:01 pm »
not sure you mean this, but i'll try to clarify something ...

pretty sure that destroyed parts have to be kept within the Terrain that references them (eg, i don't believe it's valid to have a terrain that consists purely of destroyed parts at the end of a terrainset -- ie. MCD references need to be within their own MCD file)

Yes of course, destroyed tiles must be in the same tileset as good tiles. I just didn't mention it since I thought it was kinda obvious.
In practice, the tileset with the most destroyed tiles should ideally be last.

+3½

Agreed :)

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #349 on: January 05, 2019, 10:42:20 pm »
PckView - bigob support
https://github.com/kevL/OpenXCOM.Tools/blob/master/Distribution/README.md

minimal testing -- I got it to load TFTD/UFO Bigob.Pck and output a spritesheet. Again the background color seems to get set to #255 ... so floodfill to #0 req'd after output.

On the File menu there ought be 2 Open commands: 1st for rego PCKs, 2nd for Bigob PCKs. I noticed, in my meanderings, there are 2 Bigobs (at least there is for UFO, not sure about TFTD) -- there's Bigob.PCK/TAB in the UNITS directory and Bigob.PCKs (individual sprites, no TABs) in the UFOGRAPH directory. i didn't test the latter but feel free to try ... i have no idea if they're different



EDIT:
MapView2 upgrade 2019 jan 7

    add UFO1A (small scout) to the default MapTilesets.YML ... note to those who want access to the small scout but don't want to bork their current MapTilesets config: generate a MapTilesets.TPL via the Configurator and copy type:UFO1A to their working MapTilesets.YML

    issue a warning if the quantity of allocated Terrain MCD-records exceeds 256. The warning, if applicable, is shown when the Map loads by selecting it in the MapTree or when a Map's descriptor is modified causing the Map to reload (eg. terrains have been added or removed)


EDIT2:
upgraded upgrade (see 2nd screenshot)



EDIT3:
debug from 8bbp PNG source:
Width= 32
Height= 40
PixelFormat= Format32bppArgb

debug from 8bbp BMP source:
Width= 32
Height= 40
PixelFormat= Format8bppIndexed

AAAAARGHT why does .net/gdi+ do this to me

Edit3b:
found this workaround and it seems to work
https://stackoverflow.com/questions/44835726/c-sharp-loading-an-indexed-color-image-file-correctly#answer-45100442
Quote
I had this problem too, and it seems that any paletted png image that contains transparency can't be loaded as being paletted by the .Net framework, despite the fact the .Net functions can perfectly write such a file. In contrast, it has no problems with this if the file is in gif format, or if the paletted png has no transparency.
« Last Edit: January 09, 2019, 04:42:56 am by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #350 on: January 12, 2019, 09:32:00 pm »
@note: Currently working w/Stoddard on a Linux build that overcomes the Mono/transparency issue

initial results are promising ...

is based on the original footwork by tkzv.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: MAPVIEW upgrade
« Reply #351 on: January 14, 2019, 05:58:24 am »
@note: Currently working w/Stoddard on a Linux build that overcomes the Mono/transparency issue

initial results are promising ...

is based on the original footwork by tkzv.

I am seriously looking forward to a version which can work without the transparency issue.
Fiddling around with this win 7 VM is a maze...

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #352 on: January 14, 2019, 08:17:49 am »
i believe the transparency issue is completely solved. (at least bypassed, by simply not painting sprite-pixels that're palette-id #0)

at the moment i've punted the ball to Stoddard, who is (if i understand...) trying to get either a decent multi-platform build against Mono, or a decent Windows build that runs as well as possible on Linux with the Mono libraries.


there's still stuff to puzzle through, however. like, is there going to be a different build for Windows vs [other], what .NET version is best, etc .. should the sourcecode be maintained in two different branches/repos .....

other issues are popping up, needless to say, but atm it's up to Stoddard to say whether any show-stoppers happen,


--
in other news, am sitting on a version of PckView that supports PNG in/out and also supports pck-spritesets for UFO/TFTD terrain, units, and bigobs. I want to wait till the Net vs Mono thing gets sorted out a bit better,
« Last Edit: January 14, 2019, 08:22:56 am by kevL »

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: MAPVIEW upgrade
« Reply #353 on: January 16, 2019, 10:22:53 am »
Yep, transparency done.

Binaries:
windows-built - https://lxnt.wtf/oxem/builds//MapView/MapView2_Net451_190115.7z
linux-built - https://lxnt.wtf/oxem/builds//MapView/MapView-612a2ce-2019-01-16-mono.7z

source the linux-built build is built from - https://github.com/StoddardOXC/OpenXCOM.Tools/tree/net45


I am seriously looking forward to a version which can work without the transparency issue.
Fiddling around with this win 7 VM is a maze...

Please try out the above.




EDIT:

Here's the latest build and as far as I can see it's fully usable on Linux/Mono (and should be on Mac/OSX/whateverthereisforMono)

https://lxnt.wtf/oxem/builds//MapView/MapView2_Net451_190118.7z

This needs testing. Please help.




EDIT:

Running it on Mono:

1. Get the latest from https://lxnt.wtf/oxem/#/MapView
2. Run it.
3. Tell it where the vanilla data is.
4. Close and relaunch it
5. Go to Edit->Options and set UseMono to True
(bottomost on this:

« Last Edit: January 19, 2019, 09:07:25 pm by Stoddard »

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #354 on: January 19, 2019, 11:22:12 pm »
source:
https://github.com/kevL/OpenXCOM.Tools

2019 jan 19 - build on Windows:
https://github.com/kevL/OpenXCOM.Tools/blob/master/Distribution/README.md

note: .NET 4.5.1 req'd ( older versions are available for net 3.5 )


And like Stoddard says, needs testing on Mono.



EDIT - in other news, am presently working on the ability for each terrain to hold a custom path ...
it's gonna take a while thar be dragons


EDIT2 - on case-sensitive filesystems (ie, Linux, Mac) there are some casing issues where files/directories might not be found. I'll fix these as I find them or they're reported ...

- also, i introduced a bug when cancelling the TilesetEditor : you might have to Ok a created Tileset (that you want to cancel instead), then delete it from the MapTree (if you really want it deleted). Should be fixed in next release, but until then I advise saving everything (Map,Routes,Maptree) before opening the TilesetEditor,
« Last Edit: January 22, 2019, 10:33:41 pm by kevL »

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: MAPVIEW upgrade
« Reply #355 on: January 25, 2019, 11:05:48 pm »
Hey,
 Been working on a lot of maps lately so i have some feedback for you on Mapview.

So your program lets you add new levels of terrain to either Above existing block levels or below, this is great, but it looks like the Routes are  not updated correctly when this happens as i have several map blocks where my Routes are on Levels 3 and 4 but  i have nothing on levels 1 & 2. I will try to recreate this for you tonight and see if i can find out exactly how this happens.

For pre-existing route notes, your software allows you to easily drag around to new positions (which is great), any chance of a button to move it down or up a level?

On the Topview tab, on the outside of the grid, could you add little colour line indicating where  the 10th block end in both X and Y  axis, hell you could even link this up to a filed so custom values can be set,  i am currently doing some larger map blocks and square counting is very common place especially since i am trying to copy and paste data from one mapset to another and place everything in correct locations.

To help on the same above large map blocks, it would be useful if when i am highlighting a group of parts, there was some user feedback somewhere that tells me i have 6 blocks in X and 5 blocks in Y currently selected, once again to avoid me counting square by square.

I still have months of mapbuilding in front of me so i thought i would bring this up now just in case you like any of my feedback and decide to add it :)


Also a little off topic, I see OpenApoc is coming along nicely, Could Mapview2 handle its maps?

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #356 on: January 26, 2019, 12:02:40 am »
So your program lets you add new levels of terrain to either Above existing block levels or below, this is great, but it looks like the Routes are  not updated correctly when this happens as i have several map blocks where my Routes are on Levels 3 and 4 but  i have nothing on levels 1 & 2. I will try to recreate this for you tonight and see if i can find out exactly how this happens.
hm that's not good. I'll have a look ...

offhand comment: when it happens it should happen only if adding levels to the top of the Map. Or the bottom i fergit -- but it should be only one of the two cases: top OR bottom

or, you know, it could be both it's just speculation atm.

Quote
For pre-existing route notes, your software allows you to easily drag around to new positions (which is great), any chance of a button to move it down or up a level?

On the Topview tab, on the outside of the grid, could you add little colour line indicating where  the 10th block end in both X and Y  axis, hell you could even link this up to a filed so custom values can be set,  i am currently doing some larger map blocks and square counting is very common place especially since i am trying to copy and paste data from one mapset to another and place everything in correct locations.

To help on the same above large map blocks, it would be useful if when i am highlighting a group of parts, there was some user feedback somewhere that tells me i have 6 blocks in X and 5 blocks in Y currently selected, once again to avoid me counting square by square.

added to my TODO.txt

(okay, this is an unadvertised feature: when dragging route-nodes, if the drag is started and with the mousebutton still held down, if you can also scroll your mousewheel to change level, then release the node on an empty tile on that level, it may work ... I remember testing that scenario when i was implementing node-drags just to see if my computer would explode but it didn't, so i didn't investigate further -- granted it's very awkward to try to use a mouse like that but it might well be a legitimate move)

Quote
Also a little off topic, I see OpenApoc is coming along nicely, Could Mapview2 handle its maps?

i know nothing about OpenApoc, sry. I'm an XCOM-only guy and even TFTD is substantially outside my jurisdiction,

--
but, in other news, substantial progress has been made on Custom terrain paths ... and since it relates closely to (real as well as imagined) case-sensitivity issues on Linux/Mac (with Mono) i'd like to do what I can to sort some (more) of that out before moving on ...


thanks for feedback, Luke

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: MAPVIEW upgrade
« Reply #357 on: January 26, 2019, 12:10:08 am »
Just tried the scrolling to change levels, yes its akward but it works so i can live with it, up until now i have been deleting them all and recreating them, that sucks when you just need to move them down 1 level.

Offline kevL

  • Colonel
  • ****
  • Posts: 466
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #358 on: January 26, 2019, 12:18:57 am »
y, anything's better than deleting and re-creating route nodes .........  :-\


EDIT @luke83

i couldn't get MapResize to bork ....

https://github.com/kevL/OpenXCOM.Tools/blob/master/XCom/Resources/Map/MapFileChild.cs#L427

that handles route-nodes when #levels change, so will need instructions to reproduce...
« Last Edit: January 26, 2019, 07:41:09 am by kevL »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: MAPVIEW upgrade
« Reply #359 on: January 27, 2019, 04:59:33 pm »
Yep, transparency done.

Binaries:
windows-built - https://lxnt.wtf/oxem/builds//MapView/MapView2_Net451_190115.7z
linux-built - https://lxnt.wtf/oxem/builds//MapView/MapView-612a2ce-2019-01-16-mono.7z

source the linux-built build is built from - https://github.com/StoddardOXC/OpenXCOM.Tools/tree/net45


Please try out the above.




EDIT:

Here's the latest build and as far as I can see it's fully usable on Linux/Mono (and should be on Mac/OSX/whateverthereisforMono)

https://lxnt.wtf/oxem/builds//MapView/MapView2_Net451_190118.7z

This needs testing. Please help.




EDIT:

Running it on Mono:

1. Get the latest from https://lxnt.wtf/oxem/#/MapView
2. Run it.
3. Tell it where the vanilla data is.
4. Close and relaunch it
5. Go to Edit->Options and set UseMono to True
(bottomost on this:



Confirmed. It is running and when using Mono natively under Linux, the transparency issue is gone.
The CPU load gets pretty high thou. Around 30% constantly on my X220.

Also i experienced some crashes, when trying to resize/recontainer the seperate windows with i3 windows manager.
Rescale and redraw routine seems not so good....

Also any decent keyboard shortcuts avaible?

In any case thank you all for enabling me to create maps natively under Linux :)
Let the map making maze begin. As soon as is have enough time thou ;)