Author Topic: MAPVIEW upgrade  (Read 177531 times)

Offline hellrazor

  • Commander
  • *****
  • Posts: 1985
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: MAPVIEW upgrade
« Reply #480 on: February 20, 2020, 04:49:36 am »
holy serious RouteView shenanigans batman!

good job on the build, though. :)


here is the core function that draws the gridlines in RouteView ->

MapView/Forms/Observers/RouteView/RoutePanel.cs
DrawGridLines()

if you want to play with it idk.


note: HalfWidth and HalfHeight are (non-trivially) variables used to translate between cartesian and isometric coordinates ... but offhand i don't have a clue what's going on




EDIT: It might be the PixelOffsetMode on line #138

Code: [Select]
    _graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;

ie, try a different mode ... like none or half ...

I think it has to do with the size of the window Routeview is drawn in.
I will have to run some tests while actually making some maps.
then i will see what issues come up.

In any case dude!!
You made me extremly happyQ!!!!!

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #481 on: February 21, 2020, 12:21:18 am »

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #482 on: February 22, 2020, 01:04:55 pm »
2020 feb 22

https://github.com/kevL/OpenXCOM.Tools/blob/master/Distribution/README.md

have at it. Let me know if i goofed ...

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10464
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: MAPVIEW upgrade
« Reply #483 on: February 23, 2020, 02:47:20 pm »
The coordinates are now displayed starting with 0; thank you!

Is there anything else new to check?

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #484 on: February 23, 2020, 03:25:17 pm »
MainView|Edit|Options|Global|IgnoreRecordsExceeded = true

(default is false, you'll want it true i believe)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10464
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: MAPVIEW upgrade
« Reply #485 on: February 23, 2020, 06:44:27 pm »
Ah, right. Works perfectly. Thanks again!

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #486 on: November 26, 2020, 12:58:03 am »
heh - partids detected in the Mapfile that exceed the bounds of the allocated terrainset
« Last Edit: November 26, 2020, 11:25:43 am by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #487 on: December 07, 2020, 12:17:14 am »
2020 dec 7

https://github.com/kevL/OpenXCOM.Tools/tree/master/Distribution

Please read the changes, back up your files, and report bugs.


found a bug re. tilepart deletion in TopView, pls wait ...

gtg!

found another one wrt/ tile placement at the top of the set ... looks tricky atm. pls wait

done, take 3 : https://www.youtube.com/watch?v=nzpnWuk3RjU
« Last Edit: December 07, 2020, 11:52:03 pm by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #488 on: July 02, 2021, 08:42:45 pm »
helloo,

Can someone who owns both UFO and TFTD tell me if the files CURSOR.PCK and CURSOR.TAB are *identical* in both games' UFOGRAPH folders?

if not, id appreciate a link to TFTD's cursor.pck/tab files ...


I want to put in a user-pref for which spriteset to use, in Mv2

all i could find on Ufopaedia.org is
https://www.ufopaedia.org/index.php/CURSOR.PCK
https://www.ufopaedia.org/index.php/Image_Formats#PCK


EDIT; I think i got it covered ...
« Last Edit: July 13, 2021, 06:44:13 am by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: [NEW request] Import from mod rule file
« Reply #489 on: July 13, 2021, 06:43:27 am »
from an old post

Hi Kevl,
i wish a new  import function in mapview to select a mod rule file and automatically load tilesets with ufo, terrain and craft maps (or 3 different actions to do it).

Code: [Select]
ufos:
  - type: STR_SURVEY_SHIP
    sprite: 1
    battlescapeTerrainData:
      name: UFO02
      mapDataSets:
        - BLANKS
        - UEXT2
        - UEXT3
        - UINT1
        - UINT2
        - UINT3
      mapBlocks:
        - name: UFO02
          width: 10
          length: 10
        - name: UFO02bl1
          width: 10
          length: 10
        - name: UFO02bl2
          width: 10
          length: 10
        - name: UFO02bl3
          width: 10
          length: 10
....

the rule file would enhance the maptilesets

Code: [Select]
#----- tftdShips --------------------------------------------------------------#
#----- USO --------------------------------------------------------------------#
  - type: UFO02
    terrains:
      - UEXT2
      - UEXT3
      - UINT1
      - UINT2
      - UINT3
    category: USO
    group: tftdShips_TWoTS
  - type: UFO02l1
    terrains:
      - UEXT2
      - UEXT3
      - UINT1
      - UINT2
      - UINT3
    category: USO
    group: tftdShips_TWoTS
...

When import a rule file you could create a new group name by path segment.

the RulesetConverter.exe ought handle this. It outputs any terrains found in a specified .RUL file to a .TPL (template) file -- converting the metadata from OxC-format to MapView2 format. Look in the latter and copy what you want into your settings/MapTilesets.yml ...


EDIT: oh wait, that's "ufos" -- will look into it ... (and "crafts")

edit2: ok, next release (or currently on Github), user can select "terrains", "crafts", or "ufos" and the RulesetConverter should parse the data out to Mapview2 metadata format. I've been jabbing away at ver4 code lately ...
« Last Edit: July 14, 2021, 06:37:20 pm by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #490 on: August 24, 2021, 07:43:42 am »
time to unleash this. I put a whackload of manhours in (again :)_~

There's a few minor fixes, but I wasn't keeping track ... there's a lot of
underlying code changes so things could screw up. Perhaps a couple of minor
enhancements i forget.

oh, PckView ought handle LOFTEMPS.DAT

So, for the time, consider this BETA version! Ie. if you back up your stuff
(MAPS,ROUTES,TERRAIN folders) and aren't afraid of glitches etc.

Paranoid usage: backup your current installation of Mapview2 by appending an
underscore to the label of its root folder. Unzip this version alongside it.
Copy your current MapTilesets.yml file into /settings. There are some
MapOptions.cfg changes that might bork on first run ... just keep yer eye on the
ball and things should be ok.


Pls report any weirdness (after trying to resolve it on your end ;),

on the other hand if you're happy with your current version of Mapview2 then
just hold tight


https://github.com/kevL/OpenXCOM.Tools/tree/master/Distribution

Offline Grober Nitho

  • Squaddie
  • *
  • Posts: 3
    • MSN Messenger - tappancs83@gmail.com
    • View Profile
    • Email
Re: MAPVIEW upgrade
« Reply #491 on: August 25, 2021, 05:06:36 pm »
time to unleash this. I put a whackload of manhours in (again :)_~

There's a few minor fixes, but I wasn't keeping track ... there's a lot of
underlying code changes so things could screw up. Perhaps a couple of minor
enhancements i forget.

oh, PckView ought handle LOFTEMPS.DAT

Thank you, I'm downloaded, will trying today. I hope will good and usefull.

Working without problem, thank you again. This version is wonderfull.
« Last Edit: August 26, 2021, 01:21:51 pm by Grober Nitho »

Offline Alex_D

  • Colonel
  • ****
  • Posts: 420
    • View Profile
Re: MAPVIEW upgrade
« Reply #492 on: August 25, 2021, 05:30:27 pm »
Hi kevL.

I have a question, please forgive me if it was answered before.

One of my problems with maps in general is when I want to re-arrange the terrain orders without altering their index position on the map.

For example I want to switch positions 'JUNGLE' first and 'ROAD' second. And I want the Map program to perform the terrain position swap while retaining the overall indexes.

Is this sort of function implemented by Map View 2 ?

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #493 on: August 26, 2021, 01:37:51 am »
One of my problems with maps in general is when I want to re-arrange the terrain orders without altering their index position on the map.

For example I want to switch positions 'JUNGLE' first and 'ROAD' second. And I want the Map program to perform the terrain position swap while retaining the overall indexes.

Is this sort of function implemented by Map View 2 ?

good question,

unfortunately there's no automatic way to do that.

note it should be half-possible with Edit|Tilepart Substitution. But since the max #id is capped at the max terrainset #id, it's /not/ possible to shift one terrain's #ids up out of the way of all terrains' #ids, to free them for use by the terrain that's being shifted ... (without doing that, the #ids of the 2 terrains would become mixed together)

I'll think about writing an Edit|swap terrains ... it's not immediately obvious how, though, what with 3+ terrains each having different total parts ... hm,
« Last Edit: August 26, 2021, 01:40:06 am by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 408
  • pitchforks and torches
    • View Profile
Re: MAPVIEW upgrade
« Reply #494 on: October 05, 2021, 03:09:09 am »
@Alex_D

Mapview2 4.0.1.0

- Edit|Terrain Swap [Ctrl+W] opens a dialog box for rearranging the order of
  terrains in the current Map's terrainset without the tileset going all wtf.
- fix obscure bug in the TilesetEditor: if button at the bottom was clicked to
  apply allocated terrains to all tilesets that share Map+Path, and such a
  tileset shared the same Category-label as the current tileset, but is in a
  different Group, said tileset failed to update its metadata. Fixed.
- when the button at the bottom of the TilesetEditor is clicked to apply
  allocated terrains to all tilesets that share Map+Path, show an infobox with
  how many tilesets got updated. (It was irksome to click it and nothing seemed
  to happen.)

+ slight refactors to TilesetEditor and TilepartSubstitution etc.

| I'll think about writing an Edit|swap terrains ... it's not immediately obvious how, though, what with 3+ terrains each having different total parts ... hm,

it factored down to this little ditty:

Code: [Select]
for (int i = 0; i != _terCount; ++i) // subtract part-ids until the terrain becomes the 'first' terrain ->
{
    if (order0 == i) break;
    part.SetId -= _partCounts[i];
}

for (int i = 0; i != _terCount; ++i) // add part-ids until the terrain goes to its 'final' position in the terrainset.
{
    if (order1 == i) break;
    part.SetId += partCounts[i];
}

Beta. Take the necessary precautions: Backup your stuff, tks -- this can seriously screw up .MAPs if it goes wrong.
« Last Edit: October 05, 2021, 03:16:43 am by kevL »