Author Topic: Issues with adding custom mapblocks to the game  (Read 3001 times)

Offline Rich

  • Sergeant
  • **
  • Posts: 20
  • Welp
    • View Profile
Issues with adding custom mapblocks to the game
« on: December 28, 2022, 01:52:08 am »
Hi!

As the title suggests, i'm having problems adding a custom mapblock to the alien base assault.
I've created a new block using MapView2, exported everything and the map generates correctly the way it's intended BUT it's not using the correct terrains i guess?

I've added the terrains used in terrains.rul file but it's still not using the right ones where it's supposed to.

What am i doing wrong here exactly?

Also, sorry if it's obvious and i can't see it, my programming knowledge it's basically zero and i'm creating something step by step without knowing a single thing about modding OpenXcom, i'm studying all from wiki+FMP files.

Thanks for the help!

Offline Rich

  • Sergeant
  • **
  • Posts: 20
  • Welp
    • View Profile
Re: Issues with adding custom mapblocks to the game
« Reply #1 on: December 28, 2022, 03:55:25 am »
Ok, long story short i broke my head on my desk to find the issue and now it's working as intended...almost.

Now only a new "model" i created can't be seen with some other pieces from another terrain file i've found online, they appear black like if it's missing the texture somehow.

Offline Chuckebaby

  • Colonel
  • ****
  • Posts: 408
  • Chrysalis are people too
    • View Profile
Re: Issues with adding custom mapblocks to the game
« Reply #2 on: December 28, 2022, 02:28:30 pm »
I saw your post yesterday but realized modding maps is a bit out of my range right now.
I'm still in the editing saved game files, rulesets, league.
However, like most things in life, figuring out on your own with hard work is totally gratifying. Frustrating... but gratifying.

Look forward to doing some of this myself one day. Great work.

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Issues with adding custom mapblocks to the game
« Reply #3 on: December 29, 2022, 04:12:57 am »
Now only a new "model" i created can't be seen with some other pieces from another terrain file i've found online, they appear black like if it's missing the texture somehow.

i assume that those black images are referenced in a .PCK file? (i haven't modded OxC for quite a while..)

if so, try opening its terrain .PCK in PckView it might give a clue idk

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Issues with adding custom mapblocks to the game
« Reply #4 on: December 29, 2022, 04:11:39 pm »
I'm just guessing, but it looks like you added some tileset in MapView to make this map, but either didn't put this new tileset in the game, or didn't reference it in the terrain.

Offline Rich

  • Sergeant
  • **
  • Posts: 20
  • Welp
    • View Profile
Re: Issues with adding custom mapblocks to the game
« Reply #5 on: December 31, 2022, 05:07:31 am »
I'm just guessing, but it looks like you added some tileset in MapView to make this map, but either didn't put this new tileset in the game, or didn't reference it in the terrain.
The tileset has been added in the terrain file, don't exactly understand what you mean with "the game" however, i'm guessing you're talking about the game folder and if so, it's right in there.

Basically i managed to fix that by "breaking" the mcd file, for some reason it doesn't use the tile i'm telling him, he basically jumps at tile like 30 steps ahead, don't know why or if i explained myself somehow.
Both mcd and pck files were created from zero, i had to grab an mcd file from another terrain and rename it, find which tile it's placing ingame and change that into the correct tile. It's a workaround, not great but for testing purposes it's working.
I've added a screeshot of the workaround, don't judge my poorly drawn table however  ;D

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Issues with adding custom mapblocks to the game
« Reply #6 on: January 03, 2023, 12:38:27 pm »
The tileset has been added in the terrain file, don't exactly understand what you mean with "the game" however, i'm guessing you're talking about the game folder and if so, it's right in there.

Obviously the files must also be there (as you're using a custom, new tileset), but I was referring to the ruleset. It's the alien base, right? So, does the alien base terrain definition (under "terrains:") reflect the full tileset list (same as in your MapView)?

Basically i managed to fix that by "breaking" the mcd file, for some reason it doesn't use the tile i'm telling him, he basically jumps at tile like 30 steps ahead, don't know why or if i explained myself somehow.

Yeah, sounds like a missing tileset all right.

I've added a screeshot of the workaround, don't judge my poorly drawn table however  ;D

It's hard to say without seeing it in-game, but I like the concept. :)

Offline Rich

  • Sergeant
  • **
  • Posts: 20
  • Welp
    • View Profile
Re: Issues with adding custom mapblocks to the game
« Reply #7 on: January 04, 2023, 10:32:27 pm »
Basically, the idea is to create a Reinforcement map where terror units (cyberdisks) are created constantly until you either kill everyone or destroy the tables or a computer, to make bases harder since in base xcom bases are kinda easy tbh.
I'm planning something like this for every terror unit, after all they're coming from somewhere right?  ;D
I'm also attaching a screenshot of the working table.

Obviously the files must also be there (as you're using a custom, new tileset), but I was referring to the ruleset. It's the alien base, right? So, does the alien base terrain definition (under "terrains:") reflect the full tileset list (same as in your MapView)?

Yes, it's in the ruleset under terrains, here's the code:
Code: [Select]
terrains:
  - name: UBASE
    music:
      - GMABASE
    mapDataSets:
      - BLANKS
      - U_BASE
      - U_WALL02
      - U_PODS
      - U_BASE2
      - U_FRN
      - U_BITS
      - U_FLOOR
      - U_CTABLE

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Issues with adding custom mapblocks to the game
« Reply #8 on: January 05, 2023, 11:13:26 am »
Yes, it's in the ruleset under terrains, here's the code:

OK, assuming that your tileset lists and your terrain files are exactly the same in MapView and the game:
Have you placed any tiles with number 254 or higher? They wouldn't be saved properly; tiles over 253 can only be dead tiles (not placed on the map directly, but spawned after some other piece is destroyed).

Anyway, I really like the idea of a Cyberdisc workshop. Cool idea.