Author Topic: World Editor request  (Read 9649 times)

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
World Editor request
« on: October 14, 2021, 03:53:20 pm »
I am pretty new to the world editing, but it seems to be the most painful part in the modding. AFAIK, there is only 2 options - Use Volutar editor (sorry, cant find the link to it), or use Falco's tool (https://openxcom.org/forum/index.php/topic,2835.0.html). There are not compatible, as Volutart's editor changes binary data file, and Falco is using ruleset as data format.

I want to make globe a bit more precise to real maps, so I was needed to use background image under data layer. I failed to load background to Volutar's editor, so I chose Falco's tool. It is fun to use, but it is far from perfect. First, it looks like it uses old data format, current OXCE `region` and `globe` data is recommended to store. Again, I am not an expert, but I came to this:
https://github.com/723Studio/X-Com-From-the-Ashes/blob/197d086090f4fcacab4df316d4065b95bc102e2e/Ruleset/globe_FTA.rul
https://github.com/723Studio/X-Com-From-the-Ashes/blob/197d086090f4fcacab4df316d4065b95bc102e2e/Ruleset/regions_FTA.rul

As it has big difference to Falco's export/import format, working brings a lot of pain.

Another problem is that Falco's tool is using cylindrical projection, so the closer you are to the pole, the bigger errors you can make. This makes it's snapping fails, and brings gaps on the game's globe, that are not editable in web:
Spoiler:

Another issue - it is not very precise when it comes to mission zones rectangles, it is very hard to work with small zones.

How do you think, is it worth making the globe editor as part of game engine, like marvelous Ohartenstein's Map Editor (https://openxcom.org/forum/index.php/topic,8711.0.html)?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: World Editor request
« Reply #1 on: October 15, 2021, 04:24:04 pm »
I think solution for holes in use only polygon that have only overlapping vertices, and never edges with vertices.
With this even projection is wrong edges will be correctly transformed.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: World Editor request
« Reply #2 on: October 15, 2021, 09:20:15 pm »
What if i define 2 polygons with different terrain overlapping?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: World Editor request
« Reply #3 on: October 17, 2021, 02:10:00 pm »
You should not do this as it will generate problems, they should not overlap.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: World Editor request
« Reply #4 on: October 17, 2021, 02:46:49 pm »
use only polygon that have only overlapping vertices, and never edges with vertices.

Then I do not understand this.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: World Editor request
« Reply #5 on: October 17, 2021, 03:29:14 pm »
In attachment there is two cases, second will be bugged as smaller triangle edge could overlap or be separated from big one based on projection.

Because 2 points always lay on one line independent of what projections you use and will be always correct but if you have 3 points it will only overlap with line in specific projections.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: World Editor request
« Reply #6 on: October 18, 2021, 01:41:13 am »
In attachment there is two cases, second will be bugged as smaller triangle edge could overlap or be separated from big one based on projection.

Because 2 points always lay on one line independent of what projections you use and will be always correct but if you have 3 points it will only overlap with line in specific projections.

Ok, I see. Thank you!

Still, having the option to edit globe and region data directly in game using globe would be awesome and extremely handy tool. Map Editor by ohartenstein23 showed to my, how enjoyable is it to make content directly in the game. Now, map making for me is very same as actually playing the game.

@Yankes, how do you think, how hard is it to make globe and region editor? Or at least only region editing, as making new mission zones for yet another mission is a daily modding pain.

Offline bohemond

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: World Editor request
« Reply #7 on: October 18, 2021, 11:38:09 am »
I've made a globe editor for myself, for basically the same reasons as you.
It does its job but it's not feature complete at all at the moment. It's also quite cumbersome to use. I can polish it up some and release it, if you think it will be useful for you.

It loads globe from a .rul file in the 'new' format. It won't work with anything else.
It can't do cities, borders and countries as I haven't needed those, but it shouldn't be too hard to add that. I can also add a feature to add underlying image to trace if that's what you need.

Of course, editing globe in-game would be quite handy!

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: World Editor request
« Reply #8 on: October 18, 2021, 12:35:49 pm »
I've made a globe editor for myself, for basically the same reasons as you.
It does its job but it's not feature complete at all at the moment. It's also quite cumbersome to use. I can polish it up some and release it, if you think it will be useful for you.

It loads globe from a .rul file in the 'new' format. It won't work with anything else.
It can't do cities, borders and countries as I haven't needed those, but it shouldn't be too hard to add that. I can also add a feature to add underlying image to trace if that's what you need.

Of course, editing globe in-game would be quite handy!

Wow, that would be awesome! Please, do release it, I want to try it!
I don't need countries, borders or cities, tho I need globe data, region rectangles and mission zones. And underlying image would be extremely handy. Basically, this is it.
And I am sure It's not only me, who will use it. People still work on hybriding the globe, for example.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: World Editor request
« Reply #9 on: October 18, 2021, 04:25:26 pm »
Ok, I see. Thank you!

Still, having the option to edit globe and region data directly in game using globe would be awesome and extremely handy tool. Map Editor by ohartenstein23 showed to my, how enjoyable is it to make content directly in the game. Now, map making for me is very same as actually playing the game.

@Yankes, how do you think, how hard is it to make globe and region editor? Or at least only region editing, as making new mission zones for yet another mission is a daily modding pain.
Its hard to make any usable UI for this, as you need very precisely handle each polygon, much easier would be fix existing editors than creating one from scratch when you need even handle all mouse complex actions.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: World Editor request
« Reply #10 on: October 18, 2021, 04:27:42 pm »
I considered making an editor for globe data, but given how little time I've had to finish the map editor, it's not going to happen anytime soon.

Offline efrenespartano

  • Commander
  • *****
  • Posts: 765
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: World Editor request
« Reply #11 on: October 19, 2021, 12:38:27 am »
I've made a globe editor for myself, for basically the same reasons as you.
It does its job but it's not feature complete at all at the moment. It's also quite cumbersome to use. I can polish it up some and release it, if you think it will be useful for you.

It loads globe from a .rul file in the 'new' format. It won't work with anything else.
It can't do cities, borders and countries as I haven't needed those, but it shouldn't be too hard to add that. I can also add a feature to add underlying image to trace if that's what you need.

Of course, editing globe in-game would be quite handy!

I like volutar's tool because it's more intuitive than falko's tool. Buuuut i would kill for having a good editor with support for .png backgrounds! That would help to make accurate worlds, using a map as basis.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: World Editor request
« Reply #12 on: October 26, 2021, 10:05:34 pm »
I've made a globe editor for myself, for basically the same reasons as you.
It does its job but it's not feature complete at all at the moment. It's also quite cumbersome to use. I can polish it up some and release it, if you think it will be useful for you.

It loads globe from a .rul file in the 'new' format. It won't work with anything else.
It can't do cities, borders and countries as I haven't needed those, but it shouldn't be too hard to add that. I can also add a feature to add underlying image to trace if that's what you need.

Of course, editing globe in-game would be quite handy!

Any update? I am very hyped for new world editor =)

Offline bohemond

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: World Editor request
« Reply #13 on: October 27, 2021, 04:16:38 pm »
It's in worse shape than I realized. There's a lot of things to implement before it's really useful, but I'm working on it.

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: World Editor request
« Reply #14 on: October 27, 2021, 10:24:22 pm »
+1 no rush, the world turns :.)