aliens

Author Topic: Globe Editor  (Read 3372 times)

Offline bohemond

  • Sergeant
  • **
  • Posts: 36
    • View Profile
Globe Editor
« on: November 21, 2021, 05:11:06 pm »
A tool to edit the Globe rules.

Supports:
  • Polygons
  • Textures
  • Areas
  • MissionZones
  • Countries
  • Borders
  • Loading background image

So far the polygon editing is just barebones, you can create triangles and that's pretty much it.
I have included some simple tools like splitting a triangle and Delaunay optimization to make the process a little less painful, but it's still not great.
I have found that creating the inside with big triangles and then making a triangle strip on the coastline works best. You can then split the inside into smaller triangles and optimize.
Also be aware that editing around the prime meridian is sometimes a little funny.

Controls not documented anywhere in the program:
Arrows, Mouse middle button: Scroll around
Numpad +, Numpad -, Mouse wheel : Zoom

As far as saving and loading the globe file, I strongly recommend creating a file just for the globe data.
All in all:

BACKUP YOUR FILES!

I'm welcoming any suggestions for new features and improvements and also the inevitable bug reports.

The program is in VB.net in the ol' windows forms

Sources: https://github.com/bohemond-of-antioch/OpenXcom-GlobeEditor
Releases: https://github.com/bohemond-of-antioch/OpenXcom-GlobeEditor/releases

I'm releasing this under Creative Commons Zero.
« Last Edit: December 12, 2021, 08:06:25 pm by bohemond »

Offline Buscher

  • Colonel
  • ****
  • Posts: 118
    • View Profile
Re: Globe Editor
« Reply #1 on: November 21, 2021, 07:54:02 pm »
It runs in Wine (wine-6.20 (Staging)) but I keep getting an empty view in the main window. No idea if I am doing something wrong or if it's a Linux issue.
My approach was to load the globe.rul in Openxcom/standard/xcom1.
It does save fine as I got a new file out of it. But maybe you want to save it similar to the vanilla globe.rul. Creating new vertexes and importing background works too. So not sure if it might be an import thing. Loading from a rul file I have created with this tool works fine.
Also it would be nice to save project data (chosen background, etc.)

Spoiler:
vanilla
Code: [Select]
  polylines:
...
    - [351.25, -41.625, 353.875, -41.625, 352.375, -37]
vs
Globe editor
Code: [Select]
  polylines:
...
    - - 351.25
      - -41.625
      - 353.875
      - -41.625
      - 352.375
      - -37
« Last Edit: November 21, 2021, 07:58:33 pm by Buscher »

Offline bohemond

  • Sergeant
  • **
  • Posts: 36
    • View Profile
Re: Globe Editor
« Reply #2 on: November 21, 2021, 08:49:27 pm »
The standard globe.rul uses
    data: GEODATA/WORLD.DAT
which is not supported. Only the polygons in yaml work at the moment. I didn't want to get into loading the binary world data, although I could just steal it from OpenXCom source, I guess...

The polylines/borders are not supported either.

I've already thought about storing some metadata to keep the source yaml file more intact upon saving.

Not sure about the project file as there is really not much to save. Just the background for now, but I might do it if there more features are requested.

Offline efrenespartano

  • Commander
  • *****
  • Posts: 703
  • I know a lot about the law and other lawyerings.
    • View Profile
    • Email
Re: Globe Editor
« Reply #3 on: November 22, 2021, 12:03:07 am »
A BLESSING! A BLESSING FROM THE LORD!

Bohemond be praised!

Thank you so much for this! I've been waiting to see this released. I'm still messing around, but finally i can make my alien world with improved accuracy having a background! Got a few suggestions, hope they are doable:

Im a laptop user, i don't have + nor - tabs, could be possible to have zoom by scrolling with the mouse middle button ? It's also a bit more intuitive.

Also, having the option to change the color of the texture polygons and the number would be great, to have more than the starting 12.

I look forward to see further development of your new tool! Specially the countries, borders and cities.
« Last Edit: November 26, 2021, 07:43:37 pm by efrenespartano »

Offline bohemond

  • Sergeant
  • **
  • Posts: 36
    • View Profile
Re: Globe Editor
« Reply #4 on: November 23, 2021, 05:46:55 pm »
Ah, I did not think of the textures, so it seems Buscher's idea of saving a project will come sooner than I anticipated.

I keep forgetting about the mouse wheel as well as I don't use it at all. I will add that.

Offline Finnik

  • Colonel
  • ****
  • Posts: 389
  • Finnik#0257
    • View Profile
Re: Globe Editor
« Reply #5 on: November 27, 2021, 10:25:19 pm »
Sorry, I disappeared for a while due to IRL problems. First, your tool is great and I am going to prefer it among everything we have so far.
If you don't mind, I will post some suggestions here, that could be some improvement to the product:
1/ floating point data for x y w h corrections of background instead of integer for precise adjustment
2/ option to display grid. Your meridian and equator lines are very useful for background adjustment, but grid would allow even more precise control
3/ indexes for textures in toolbox
4/ option to show indexes of texture on map directly for people who define colors poorly.
5/ option to define texture colors. Some textures are identical in color. For me personally, it is hard to recognize all that green colors and stop putting northern forests or swamps in jungles  :-\
6/ I have exception on using areas tool, probably something is bad with my data https://github.com/723Studio/X-Com-From-the-Ashes/blob/master/Ruleset/geosphere.rul
7/ Custom textures. For instance, I have 15 textures, but I can see only 14 in texture tool.
8/ Not sure, but it seems I can't see point-like missionZones
9/ Right click option does not work for rectangles
10/ Support of making rectangles?

Could be nice if we would share different maps that can be used as background here =) For mine you need to apply correction: X -180, Y -91, W 360, H 182
« Last Edit: November 27, 2021, 11:22:10 pm by Finnik »

Offline efrenespartano

  • Commander
  • *****
  • Posts: 703
  • I know a lot about the law and other lawyerings.
    • View Profile
    • Email
Re: Globe Editor
« Reply #6 on: December 07, 2021, 01:07:29 pm »
I've sucessfully managed to complete my alien world! :D The option of having a background below made this possible.

I got a few requests/suggestions, hope they are doable:

1.- A globe preview: I had a bit of hard time figuring out how was the globe going meanwhile i was modelling it. I managed to get a look at it by loading it directly on the mod, but i have to admit i would prefer to have a sphere preview of it directly in the tool (like the actual game, i mean). Less clicks here, less mess in the mod folders there. Something like you can switch between the "flat" view with the background or the "spherical" view to see if everything is in order.

2.- I support my friend Finnik's 3 and 4 points on the previous post. I messed up the textures more than once and i just noticed it when i loaded the globe on the game.

3.- A more detailed description to the area tool. Is this intended for regions?

3b.- A regions tool. Geez, i'm suffering trying to make custom regions.

Anyway, im building a shrine for your, bohemond!  ;D It took me a while to get used to the basic commands of the tool, but after a couple of tries i felt comfortable. My initial attempt had few polygons, but after i understood how to use the tool, i greatly increased the poly count to get smoother landmases. Your tool is superb. Keep up with the awesome work, your tools ease our lives.  ;D

P.S. Somehow, i managed to load the ruleset generated by your tool on the old globe editor made by Falko. They seem pretty compatible, im using it to make the countries meanwhile you add the option on your project.

Offline bohemond

  • Sergeant
  • **
  • Posts: 36
    • View Profile
Re: Globe Editor
« Reply #7 on: December 08, 2021, 04:22:21 pm »
Both of you bring good suggestions, I should have thought of some of these myself.

I have a problem with just a few:
- Rectangles. I suppose you mean polygons with four vertices. I'd like to avoid supporting these as much as possible, it just makes everything so much more complicated. But I agree that at least the split action (right click) should work on them.
- Globe preview. I think I can manage, as long as it stays as a preview (no editing) and you're not too picky about the precision of the rendering.

Regions/Areas/MissionZones
I thought these already worked pretty well (although I found some bugs).
I guess the naming could be better, I modelled it after the yaml content. Basically a Region is defined by its name, areas and missionZones. I didn't intend to include editing of the other properties (cost, regionWeight, etc.), but it's possible of course.
Then you just drag the boxes by the sides, yeah, I think this UI needs to be improved.
I will also add support for point-like missionZones.

Offline bohemond

  • Sergeant
  • **
  • Posts: 36
    • View Profile
Re: Globe Editor
« Reply #8 on: December 09, 2021, 04:39:23 pm »
Released a new version: Projects

Adds support for projects: saving globe metadata, background metadata and defining textures.
Background now works with floating-point numbers.
Mousewheel zoom.

I'm releasing the projects feature so you can already comment on it. The rest of the features will take longer I think.

Offline efrenespartano

  • Commander
  • *****
  • Posts: 703
  • I know a lot about the law and other lawyerings.
    • View Profile
    • Email
Re: Globe Editor
« Reply #9 on: December 11, 2021, 10:17:06 pm »
Thanks for the quick update, mate! :D

Also, thank you for taking in consideration our feedback, looking forward for more updates on your godly tool.

Offline bohemond

  • Sergeant
  • **
  • Posts: 36
    • View Profile
Re: Globe Editor
« Reply #10 on: December 12, 2021, 08:04:45 pm »
Next release is up, with most of the suggested features implemented:

Countries
Borders
Spherical Globe Preview
Texture Indexes
Grid
Point-Like mission zones

Also includes a whole lot of bugfixes.

Offline efrenespartano

  • Commander
  • *****
  • Posts: 703
  • I know a lot about the law and other lawyerings.
    • View Profile
    • Email
Re: Globe Editor
« Reply #11 on: December 19, 2021, 04:55:50 am »
Wonderful update! I appreciate a lot the fact you put hints about the keyboard shortcuts required to do stuff on the different sections of the tool.

And the sphere preview is gorgeous, i was super happy to see the world in there (even when i actually have it done and working in game).

Im still learning how to use the regions and countries tool, but i have the feeling it will be easier to employ once im get used to them.

P.S: big kudos on the small icon of the .exe, i loved it! :D