Author Topic: MAPVIEW upgrade  (Read 50567 times)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 7977
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: MAPVIEW upgrade
« Reply #285 on: October 05, 2018, 07:06:32 pm »
Dear kevL!

Another request (if you like and have time). Can make 2D pictures from the top? I think its very helpfull for base shape!

Thank you!

You mean, minimap rendering?
Yeah, could be useful.

Offline Biggieboy

  • Captain
  • ***
  • Posts: 197
    • View Profile
Re: MAPVIEW upgrade
« Reply #286 on: October 05, 2018, 07:52:05 pm »
You mean, minimap rendering?
Yeah, could be useful.

I need for the facilities base shape (its very hard to draw for me). but yes, its good for minimap too.

Offline kevL

  • Captain
  • ***
  • Posts: 170
    • View Profile
Re: MAPVIEW upgrade
« Reply #287 on: October 05, 2018, 10:50:57 pm »
Quote
minimap rendering

i like the idea... plate's full for forseable future tho...

Offline kevL

  • Captain
  • ***
  • Posts: 170
    • View Profile
Re: MAPVIEW upgrade
« Reply #288 on: October 19, 2018, 02:18:39 am »
@luke83 [op]

Hello,

Any of you excellent Coders want to try your luck at making a few Upgrades to MAPVIEW? I downloaded the source out of curiosity but have no clue where to start :P

I PM Daishiva but since i have not heard from him in over a year i guess LIFE has gotten in the way of the last upgrade i asked for :-[

My Suggestions for Upgrading Mapview:
1) Fix existing Bugs EG: the PATHS can only be modified by Notepad as doing it by the program wipes everything.

paths, a monster - I rewrote it from scratch. Ie, PathsEditor is gone, replaced by right-click on the maptree. The dataset is stored in a Yaml file and this is the reason that Mapview2 has the "2" (ie, is NOT backward compatible.)

Quote
2) Specify Default Node type was added last time By Daishiva at my request , we need a extra Option to tell it to AUTOLINK to previous Node in both directions ( this will save alot of time)

auto-link seems to work fine in 2 ...

Quote
3) Extra Visual clues as to what Unit type a NODE will be spawning ( Just some letters added to the Green box to represent a Class would be helpful)

not done. There are still the 2 small, side-by-side ImportanceMeters tho, (showing spawn priority and patrol priority iirc)

Quote
4)Move Node Option, There is nothing worse than realising you have fully setup a NODE 1 block to the right of the desired location, a tick box to Drag and drop node at a new location and Keep all current LINK nodes would be awesome

yeh really. Done: drag&drop routenodes.

Quote
5) Numbered Grids ( around the images) i hate goign cross eyed tryign to work out if i am in the right Row or not , a simply Number system down the side on ALL screens could be useful.

good idea -- is not done like that in 2, but i went to some length to ensure that x/y/z coords print accurately on relevant viewers.

Quote
6) AUTO-Link : Not sure HOW you will handle this but this would save alot of headaches if i only needed to clean up a few LINKS instead of manually modding every one of them.

there's auto-link, and checks to ensure that node coordinates are within bounds of the (currently displayed) Map ...

Quote
7) RMP Statistics = Would be great if there was a option somewhere to do a count of all Spawn Ranks per level and a overview of spawn Ranks across the entire map set, just Pop open a new window to display this when requested.

that's actually a fair idea ... not done tho.

Quote
8) Some kind of import Wizard for the PAths , Mapedit page as i have Lots of differnt , half finished maps to import and its very time cinsuming to do them one by one. It would be good if it was clever , and noticed if i selected a Map without a ROute file, that it could ask if i want to make a empty file for it. ALso if you can improve the way the Map tree is controlled ( and allow Drag and Drop to change the sequence) that would be great.

no Wizards, sry (although an empty Routes file ought be written on SaveAs ... if there aren't any route nodes) And, to change the order of the maptree, I guess you'd have to change the order of the Yaml-nodes in your favorite text editor ( read: is not native )*

Quote
This is a Fantastic program it just needs some work to make it easier for people like me to make LOTS of new map types, Any part time coders for OXC want to take a look ?

uh, there's a Search function?


96.78325% of the credit goes to Ben/Daishiva (and others)

caveat. Atm am up to my eyeballs in other projects. but some month, day, year will be back to hacking my way through OxC again,



*edit oh wait, I think the maptree is sorted alphanumeric -- so.
« Last Edit: October 19, 2018, 02:30:09 am by kevL »

Offline luke83

  • Commander
  • *****
  • Posts: 1269
    • View Profile
    • openxcommods
Re: MAPVIEW upgrade
« Reply #289 on: October 19, 2018, 12:31:00 pm »
New version works well, great job. I did notice one thing today though, Crt+Z is not UNDO as i was hoping, it was the shortcut to change map dimensions, not sure if there was an undo button on the control bar somewhere that i may of missed.

Offline Biggieboy

  • Captain
  • ***
  • Posts: 197
    • View Profile
Re: MAPVIEW upgrade
« Reply #290 on: October 19, 2018, 12:33:05 pm »
New version works well, great job. I did notice one thing today though, Crt+Z is not UNDO as i was hoping, it was the shortcut to change map dimensions, not sure if there was an undo button on the control bar somewhere that i may of missed.

Yepp, i realy like too Undo!


Offline davide

  • Colonel
  • ****
  • Posts: 562
    • View Profile
[REQUEST] load maps/tileset from mod folder
« Reply #292 on: October 24, 2018, 08:59:32 am »
It requires looking for the definitions of ufo / craft / terrain in rule files
It is difficult, I known :-\

Offline davide

  • Colonel
  • ****
  • Posts: 562
    • View Profile
Re: MAPVIEW upgrade
« Reply #293 on: October 27, 2018, 09:50:28 pm »
I cannot load maps from mod folder.

Before i tried from UI by context menu.
After a tried to update MapTilesets.yml by notepad++

The issue is that basepath attribute was not used

Code: [Select]
#----- XenoOperations ----------------------------------------------------------#
#----- craft ------------------------------------------------------------------#
  - type: XOPSNEWSKYWARDEN
    terrains:
      - XOPSTRANSPORT2
      - XOPSTRANSPORT3
    category: craft
    group: ufoXenoOperations
    basepath: C:\Users\davide\Documents\OpenXcom\mods\XenoOperations
  - type: XOPSHURRICANE
    terrains:
      - XOPSTRANSPORT2
    category: craft
    group: ufoXenoOperations
    basepath: C:\Users\davide\Documents\OpenXcom\mods\XenoOperations
  - type: XOPSARCANGEL
    terrains:
      - XOPSTRANSPORT3
    category: craft
    group: ufoXenoOperations
    basepath: C:\Users\davide\Documents\OpenXcom\mods\XenoOperations

but I got the error.

To force the map load I have to change MapResources.yml:

Code: [Select]
ufo: C:\Users\davide\Documents\OpenXcom\mods\XenoOperations


« Last Edit: October 27, 2018, 09:56:05 pm by davide »

Offline luke83

  • Commander
  • *****
  • Posts: 1269
    • View Profile
    • openxcommods
Re: MAPVIEW upgrade
« Reply #294 on: October 27, 2018, 11:33:36 pm »
Anyone else having issues with autolink not working all the time?  Not sure if its because this map is very different in sizing (its one of the unused maps from the original game) or if its just a random bug....you can see in the screen shot, only SOME autolinked, others did not.

Offline kevL

  • Captain
  • ***
  • Posts: 170
    • View Profile
Re: MAPVIEW upgrade
« Reply #295 on: October 27, 2018, 11:47:16 pm »
@davide

in MapTilesets.yml
Code: [Select]
#----- ufo_test ---------------------------------------------------------------#
#----- area51 -----------------------------------------------------------------#
  - type: AREA51BASE00_T # .MAP and .RMP files renamed w/ "_T" to not conflict with already existing "AREA51BASE00" type (from my regular UFO folders - ie, "_T" is for test)
    terrains:
      - AREA51W # these terrains are in the TERRAIN folder under the Configurator's basepath
      - AREA51X
      - AREA51Y
      - AREA51Z
    category: area51
    group: ufo_test
    basepath: C:\0xC_kL\editors\t # and this is where the new .MAP and .RMP files reside

I think i see what you're saying though; it would be nice to be able to configure a different sprites directory ... that is, different than the one expected in the Configurator basepath

--- please do not double-post unless it can't be helped ---


Anyone else having issues with autolink not working all the time?  Not sure if its because this map is very different in sizing (its one of the unused maps from the original game) or if its just a random bug....you can see in the screen shot, only SOME autolinked, others did not.

it's possibly a bug. I'd need a testcase w/ MAP RMP MCD PCK TAB files. And directions to replicate ...

The only reason auto-link should fail is if the link slots (on one or the other or both nodes) are already full, and if so it ought show a message to that effect
« Last Edit: October 29, 2018, 12:52:52 am by Solarius Scorch »

Offline davide

  • Colonel
  • ****
  • Posts: 562
    • View Profile
Re: MAPVIEW upgrade
« Reply #296 on: October 28, 2018, 12:08:54 am »
...
I think i see what you're saying though; it would be nice to be able to configure a different sprites directory ... that is, different than the one expected in the Configurator basepath

moreover, if the sprites are not in the module-name/TERRAIN folder, it should be useful to look them up automatically in the ufo / tftd TERRAIN folder by group prefix.

Often the mods define maps that use both the standard pck and their own

 ::)

« Last Edit: October 28, 2018, 12:13:41 am by davide »

Offline kevL

  • Captain
  • ***
  • Posts: 170
    • View Profile
Re: MAPVIEW upgrade
« Reply #297 on: October 28, 2018, 12:19:07 am »
ah ..........

Offline luke83

  • Commander
  • *****
  • Posts: 1269
    • View Profile
    • openxcommods
Re: MAPVIEW upgrade
« Reply #298 on: October 28, 2018, 12:22:15 am »
it's possibly a bug. I'd need a testcase w/ MAP RMP MCD PCK TAB files. And directions to replicate ...

The only reason auto-link should fail is if the link slots (on one or the other or both nodes) are already full, and if so it ought show a message to that effect


I have attached the Zip file for this, MAP-5 is the resized version that i will be playing with, it is made from map3 & 4. Was just going to get it to a point where i could see if i can bring it into OXC to see what issues arise (not sure if anyone else has every tried to bring these old maps into the game yet).
« Last Edit: October 28, 2018, 12:48:01 am by luke83 »

Offline kevL

  • Captain
  • ***
  • Posts: 170
    • View Profile
Re: MAPVIEW upgrade
« Reply #299 on: October 28, 2018, 01:03:26 am »
strange, the nodes already present connected np. So i made a dozen new nodes all over Map5, different levels, across the entire map, OneWay, TwoWay, post-create connect, new-node connect, even tried to make it duplicate already existing connections ...

no glitches.


idk,
make sure there's an origin node selected before doing link or createnode+link
and remember that each time opening Mv2, the dropdown defaults to DontConnect ...

But if you can set me up with a consistent, reliable bug (or at least something with a decent probability) I'll check it out again,


----
note to self, implement

a) user-chosen MapTilesets.yml (so user has less chance of overwriting a config : please note that each time MapTilesets is saved a backup is made w/ extension .old -- you have *one* and only *one chance* to recover an accidental overwrite of MapTilesets.yml (!)

b) user-chosen Configurator basepath(s) for sprites ...
« Last Edit: October 28, 2018, 01:24:20 am by kevL »