OpenXcom Forum

Modding => Tools => Topic started by: Finnik on October 14, 2021, 03:53:20 pm

Title: World Editor request
Post by: Finnik 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 (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/globe_FTA.rul)
https://github.com/723Studio/X-Com-From-the-Ashes/blob/197d086090f4fcacab4df316d4065b95bc102e2e/Ruleset/regions_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:
(https://user-images.githubusercontent.com/45336117/135695676-8788382c-5362-46d4-934e-712a444360b6.png)

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 (https://openxcom.org/forum/index.php/topic,8711.0.html))?
Title: Re: World Editor request
Post by: Yankes 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.
Title: Re: World Editor request
Post by: Finnik on October 15, 2021, 09:20:15 pm
What if i define 2 polygons with different terrain overlapping?
Title: Re: World Editor request
Post by: Yankes on October 17, 2021, 02:10:00 pm
You should not do this as it will generate problems, they should not overlap.
Title: Re: World Editor request
Post by: Finnik 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.
Title: Re: World Editor request
Post by: Yankes 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.
Title: Re: World Editor request
Post by: Finnik 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.
Title: Re: World Editor request
Post by: bohemond 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!
Title: Re: World Editor request
Post by: Finnik 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.
Title: Re: World Editor request
Post by: Yankes 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.
Title: Re: World Editor request
Post by: ohartenstein23 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.
Title: Re: World Editor request
Post by: efrenespartano 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.
Title: Re: World Editor request
Post by: Finnik 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 =)
Title: Re: World Editor request
Post by: bohemond 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.
Title: Re: World Editor request
Post by: kevL on October 27, 2021, 10:24:22 pm
+1 no rush, the world turns :.)
Title: Re: World Editor request
Post by: Finnik on October 29, 2021, 01:16:39 am
Sure, dude, take your time, enjoy the process
Title: Re: World Editor request
Post by: bohemond on November 21, 2021, 05:13:45 pm
I've released the first version. It's not anywhere complete, but I've decided to go with it for now as it was taking too long already.

https://openxcom.org/forum/index.php/topic,10258.0.html

Finnik, drop any suggestions and complaints over there.