OpenXcom Forum

Modding => Work In Progress => Topic started by: davide on May 29, 2014, 02:41:58 pm

Title: How to define new terrain
Post by: davide on May 29, 2014, 02:41:58 pm
I wish I import the TFTD terror mission.

I know the problem of incompatible palette and I would try to resolve it via programmative

therefore I need a working sample.

I think to begin this task by import Island terror mission from TFTD.
I would start the mission with the skyranger as normal terror mission

I suppose that the files involved  should are:
/MAPS
Island 00-14.MAP
/ROUTES
Island 00-14.RMP
/TERRAIN
Island 1-3.PCK
Island 1-3.TAB
Island 1-3.LBM
Island 1-4.MCD
Sea.PCK

I need help on write a correct file.rul to define the new terrain

Code: [Select]
alienDeployments:
  - type: STR_TERROR_MISSION
    terrains:
       - ISLAND
      # - URBAN
      # - URBAN2
      # - PURBAN
      # - AREAURBAN
      # - CITYURBAN
      # - DAWNURBAN
      # - PORTBAN
terrains:
- name: ISLAND
mapDataSets:
      - BLANKS
      - ISLAND1
      - ISLAND2
      - ISLAND3
      - ISLAND4 # is it correct ?
    largeBlockLimit: ?
    civilianTypes:
      - MALE_CIVILIAN
      - FEMALE_CIVILIAN
    roadTypeOdds: [?, ?]
    mapBlocks:
      - name: ISLAND00
        width: 10
        length: 10
        type: ?

?????

    - name: ISLAND14
        width: 10
        length: 10
        type: ?


Any suggestions, links to tutorial or reference or links to other post are welcome

Thank you in advance for your kindness
Title: Re: How to define new terrain
Post by: AndO3131 on May 29, 2014, 06:00:32 pm
Basic terrain will probably look like this (more details on different terrain types in TFTD https://www.ufopaedia.org/index.php?title=TERRAIN_%28TFTD%29 (https://www.ufopaedia.org/index.php?title=TERRAIN_%28TFTD%29))
Code: [Select]
terrains:
  - name: PIPES
    mapDataSets:
      - BLANKS
      - SEA
      - ISLAND1
      - ISLAND2
      - ISLAND3
    largeBlockLimit: 5
    mapBlocks:
      - name: ISLAND00
        width: 10
        length: 10
        type: 1
        subType: 0
        maxCount: 3
      - name: ISLAND01
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND02
        width: 20
        length: 20
        maxCount: 3
      - name: ISLAND03
        width: 20
        length: 20
        maxCount: 3
      - name: ISLAND04
        width: 20
        length: 20
        maxCount: 3
      - name: ISLAND05
        width: 20
        length: 20
        maxCount: 3
      - name: ISLAND06
        width: 20
        length: 20
        maxCount: 3
      - name: ISLAND07
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND08
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND09
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND10
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND11
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND12
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND13
        width: 10
        length: 10
        maxCount: 3
      - name: ISLAND14
        width: 10
        length: 10
        maxCount: 3

With ISLAND terrain you need the following files
TERRAIN/SEA.MCD, .PCK and .TAB
TERRAIN/ISLAND01.MCD, .PCK and .TAB (possibly .LBM?)
TERRAIN/ISLAND02.MCD, .PCK and .TAB (possibly .LBM?)
TERRAIN/ISLAND03.MCD, .PCK and .TAB (possibly .LBM?)
MAPS/ISLAND00.MAP - ISLAND14.MAP
Title: Re: How to define new terrain
Post by: SupSuper on May 29, 2014, 07:11:36 pm
Note that TFTD terrain uses custom generation rules, so it might not look the same in OpenXcom.
Title: Re: How to define new terrain
Post by: davide on May 29, 2014, 07:36:08 pm
Thanks

On Git server I found OpenXCom.Tools too

do dev MapView shows custom terrain from data/terrain folder ? :P

I apologize but I do not compile it at the moment :-[

bye
Title: Re: How to define new terrain
Post by: davide on May 29, 2014, 07:40:29 pm
With ISLAND terrain you need the following files
TERRAIN/SEA.MCD, .PCK and .TAB
TERRAIN/ISLAND01.MCD, .PCK and .TAB (possibly .LBM?)
TERRAIN/ISLAND02.MCD, .PCK and .TAB (possibly .LBM?)
TERRAIN/ISLAND03.MCD, .PCK and .TAB (possibly .LBM?)
MAPS/ISLAND00.MAP - ISLAND14.MAP

Thank you very much,

There is an other file: ISLAND04.MCD,  it is strange because it has a different number  :o

need I

ROUTES/Island00-Island14.RMP

too ?
Title: Re: How to define new terrain
Post by: SupSuper on May 29, 2014, 11:25:58 pm
Thanks

On Git server I found OpenXCom.Tools too

do dev MapView shows custom terrain from data/terrain folder ? :P

I apologize but I do not compile it at the moment :-[

bye
If you're talking about this one: https://openxcom.org/forum/index.php?topic=1321.0
I think it's just a fan-maintained version of MapView with fixes and stuff, I don't know of any specific OX features.
Title: Re: How to define new terrain
Post by: davide on May 30, 2014, 07:59:36 am
Hi Commander :)

I will check soon

I found this
https://openxcom.org/forum/index.php?topic=1321.msg12547#msg12547 (https://openxcom.org/forum/index.php?topic=1321.msg12547#msg12547)

and
here there is a screenshot

https://openxcommods.weebly.com/mapview_upgrade.html (https://openxcommods.weebly.com/mapview_upgrade.html)

Thanks
Title: Re: How to define new terrain
Post by: davide on May 30, 2014, 02:51:01 pm
MARS OXC appears in early state. :'(

Instead I suppose that if update file
...\OpenXCOM.Tools\MapView\bin\Debug\settings\MapEdit.dat
inserting a new sub-section of TileSet:UFO - Terrain
i could show the new terrain in MapView application

I will try Ok, MapView shows It  :D (with wrong colors of UFO palette)