Author Topic: change the world  (Read 10709 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
change the world
« on: March 27, 2021, 02:48:12 pm »
I have three goals:
- modify the landmass so it matches a 70m sea level rise (see picture attached).
- add an urban texture (replacing a forest texture I guess, since there is an overabundance of them and I don't have a forest terrain); it is going to be used in small polygons representing mega-cities.
- adding some minimal improvements to make it look less blocky.

I'm not sure about the proper way to proceed.

I started tinkering with World Edit (by volutar), editing the included world.dat... is it how it's done?
There is a ruleset file with polylines: does it mean I have to change one by one these values, to match the modified polygons of my world.dat?

I tired to search the forum and I read some topics about globe editing, but the discussion was in general too advanced, I need a more "for dummies" introduction about this.

Any modder did this and wants to share the general steps?

Thanks
« Last Edit: March 27, 2021, 02:54:36 pm by robin »

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: change the world
« Reply #1 on: March 28, 2021, 12:36:12 am »
Did you try the World Editor/Change the World on Falko's yet?

When using this drop list "I want to edit" on the left side you can go down to import/export. There you can export the code for a rul file so you don't have to deal with the world.dat. When you go to the dropbox again you can click on terrain. In the middile it will say "no edit". Click on that. Now when you click inside one of the polygons you get the polygon points which you can drag around with left-click.

You can select which terrain you want to "draw with" with the dropbox in the middle when edit mode is on. Once you chose a "color" (f. ex. "Terrain - 9") you can click inside the polygons to change the terrain. To get a better idea what the terrain indices mean you can check the "textures:" section inside openxcom/standard/xcom1/globe.rul. I think that the ids are the same. For the urban texture you probably only need to change the name of one of the ids inside the "textures:" section to URBAN (see terrains.rul for details).

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: change the world
« Reply #2 on: March 28, 2021, 01:20:31 am »
Thanks. The problem with Falko's tool is that I haven't found a way to put the image as a background, like I can do with World Edit, which is quite useful to have when you edit the polygons.
I'm probably still going to use Falko's to edit the other parts of the globe, like cities.

Anyway, I had missed the "data" entry for the globe, so I couldn't understand the polygons vs world.dat thing.

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: change the world
« Reply #3 on: March 28, 2021, 01:22:36 pm »
Now I spent my morning to figure out how to do that what you can see in the attachment. The code is running in your browser so it should be possible and I even found a (hacky) way.

It works in Vivaldi. So what you gotta do is to open the world editor. Hit F12 to get to the web developer tools. Go to the console.
Paste the following and press enter

Spoiler:
      marsterra = new OpenLayers.Layer.Image('marsterra', 'https://openxcom.org/forum/index.php?action=dlattach;topic=9554.0;attach=53436;image', new OpenLayers.Bounds(-180, -88.759, 180, 88.759), new OpenLayers.Size(288, 144),
                {wrapDateLine: true, attribution: "<a href='http://quanto.deviantart.com/art/Terraformed-Mars-53595798'>Provided by Quanto</a>"});
   map.addLayer(marsterra);

On the right side of the map there is a white plus with a dark blue background. Click on that and select marsterra. And now you should be able to trace your map with the world builder.
« Last Edit: March 28, 2021, 01:25:39 pm by Buscher »

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: change the world
« Reply #4 on: March 28, 2021, 02:10:12 pm »
Man, this is so cool! I was looking for a way to load background, but I failed both for World Edit and Falko's tool. I will try it)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: change the world
« Reply #5 on: March 28, 2021, 05:01:02 pm »
I really recommend worlddat - it's easy and fun to use. Falko's tool works, but is... neither.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: change the world
« Reply #6 on: March 28, 2021, 06:18:25 pm »
I failed for World Edit [...]
That's strange. I had an issue with a png, but two other jpg images loaded fine.
Maybe your images had the wrong resolution? As far as I understand, the width should be twice the height.
« Last Edit: March 28, 2021, 06:20:46 pm by robin »

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: change the world
« Reply #7 on: March 28, 2021, 06:34:01 pm »
That's strange. I had an issue with a png, but two other jpg images loaded fine.
Maybe your images had the wrong resolution? As far as I understand, the width should be twice the height.

Is there a working link? The download on the ufopaedia doesn't exist anymore.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: change the world
« Reply #8 on: March 28, 2021, 09:42:42 pm »
The link works for me. At the bottom of the page.
« Last Edit: March 28, 2021, 09:50:28 pm by robin »

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: change the world
« Reply #9 on: March 28, 2021, 10:15:12 pm »
Hmm, interesting. I got HTTPS Everywhere running for Firefox and it will lead to an error page if the volutar page is accessed via HTTPS. Accessing it with HTTP-only will result in the download.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: change the world
« Reply #10 on: March 29, 2021, 12:47:04 am »
I think Volutar closed his server that was distributing his tools. For MCDEdit it was impossible to load from his link and I added mine (for dropbox, I hope he would not mind).

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: change the world
« Reply #11 on: March 29, 2021, 02:27:46 pm »
As Buscher already noted, the problem is that his server (volutar.eu5.org) has no ssl certificate, hence any request starting with `https://` will fail.

The downloads (and thus server) are not offline, i could easily download both worlddat and mcdedit from the links (http://volutar.eu5.org/worlddat.zip and http://volutar.eu5.org/_mcdedit117j.7z) on the ufopaedia pages.

If you are unable to download chances are your browser is (forcefully?) trying to connect over `https://` instead of `http://`.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: change the world
« Reply #12 on: March 30, 2021, 02:15:42 am »
Now I spent my morning to figure out how to do that what you can see in the attachment. The code is running in your browser so it should be possible and I even found a (hacky) way.

It works in Vivaldi. So what you gotta do is to open the world editor. Hit F12 to get to the web developer tools. Go to the console.
Paste the following and press enter

Spoiler:
      marsterra = new OpenLayers.Layer.Image('marsterra', 'https://openxcom.org/forum/index.php?action=dlattach;topic=9554.0;attach=53436;image', new OpenLayers.Bounds(-180, -88.759, 180, 88.759), new OpenLayers.Size(288, 144),
                {wrapDateLine: true, attribution: "<a href='http://quanto.deviantart.com/art/Terraformed-Mars-53595798'>Provided by Quanto</a>"});
   map.addLayer(marsterra);

On the right side of the map there is a white plus with a dark blue background. Click on that and select marsterra. And now you should be able to trace your map with the world builder.

Is it possible to do that with Chrome or Firefox browsers?

Btw, can I make non-vanilla texture with Falko's tool?

@robin - how did you prepared the map? i am looking for the background for Falko's tool wit geographic features (mountains, forests etc)
« Last Edit: March 30, 2021, 03:28:21 am by Finnik »

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: change the world
« Reply #13 on: March 30, 2021, 07:53:47 pm »
It works with Firefox (just had a small problem with copy and paste that's why I switched to Vivaldi) and it should work for Chrome. Vivaldi is a Chromium, so it's nearly identical for this purpose.

What's possible is that when you copy from the spoiler that you will end up with 3 lines instead of 2.

This is the first command
Code: [Select]
var myImage = new OpenLayers.Layer.Image('myImage', 'https://openxcom.org/forum/index.php?action=dlattach;topic=9554.0;attach=53436;image', new OpenLayers.Bounds(-180, -88.759, 180, 88.759), new OpenLayers.Size(288, 144),);
The link to the openxcom forum is the link to the image.

and this is the second
Code: [Select]
map.addLayer(myImage);

Note: I have changed the name from marsterra to myImage.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: change the world
« Reply #14 on: March 30, 2021, 09:46:37 pm »
@robin - how did you prepared the map? i am looking for the background for Falko's tool wit geographic features (mountains, forests etc)
I'm not sure I understand the question?
For editing the landmass, I'm probably going to use volutar's word dat editor, because it seems more practical; this tool has a button to add a background image.
Although I still a haven't figured out how to add/replace a texture with a custom texture... I need to understand that before doing anything.