Author Topic: deep aliens mod - im in need of help - official mod wip thread  (Read 4482 times)

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
deep aliens mod - im in need of help - official mod wip thread
« on: February 20, 2015, 03:43:48 pm »
i'm gonna use this for my go to ask questions thread for this mod so i don't spam the forums make too many new threads.


cargo ship map is working now. i fixed all the lof issues and bugs with help from you. see here: https://openxcom.org/forum/index.php/topic,3368.0.html

but i am in need of more help.

i wanna make it randomly appear on water with a custom target name as SHIPPING ROUTE which is defined in alienMissions and

i am trying to make custom terror missions that pop up on water as deep alien cargo attacks. but whenever the mission appears game inst a crashes.

here is my terrain ruleset
Code: [Select]
terrains: #  ---------- TERRAINS -------------------------------------------
  - name: CARGO
    mapDataSets:
      - BLANKS
      - SEA
      - CARGO1
      - CARGO2
      - XBITS
    civilianTypes:
      - MALE_CIVILIAN_SAILOR
      - MALE_CIVILIAN_WORKER
    script: CARGO
    mapBlocks:
      - name: CARGO00
        width: 30
        length: 70

Code: [Select]
mapScripts: #  -------- MAP SCRIPTS ----------------------------------------
  - type: CARGO
    commands:
    - type: addCraft
      rects:
        - [1,0,1,2]
    - type: addBlock
      size: [3,7]

Code: [Select]
regions: # ------------ REGIONS --------------------------------------------
  - type: STR_NORTH_ATLANTIC
    cost: 500000
    regionWeight: 5
    missionWeights:
      STR_CARGO_TERROR_MISSION: 20
    areas:
      - [305, 335, -70, -30]
      - [300, 335, -30, -10]
      - [315, 335, -10, 0]
    missionZones:
      -
        - [305, 335, -70, -30]
        - [300, 335, -30, -10]
        - [315, 335, -10, 0]
  - type: STR_SOUTH_ATLANTIC
    cost: 500000
    regionWeight: 5
    missionWeights:
      STR_CARGO_TERROR_MISSION: 20
    areas:
      - [330, 5, 0,  15]
      - [325, 5, 15, 60]
      - [5, 55, 40, 60]
    missionZones:
      -
        - [330, 5, 0,  15]
        - [325, 5, 15, 60]
        - [5, 55, 40, 60]
  - type: STR_INDIAN_OCEAN
    cost: 500000
    regionWeight: 5
    missionWeights:
      STR_CARGO_TERROR_MISSION: 20
    areas:
      - [55, 70, -15, 10]
      - [70, 90, -5, 10]
      - [55, 105, 10, 60]
    missionZones:
      -
        - [55, 70, -15, 10]
        - [70, 90, -5, 10]
        - [55, 105, 10, 60]


Code: [Select]
  - type: STR_CARGO_TERROR_MISSION
    data:
      - alienRank: 5
        lowQty: 4
        highQty: 6
        dQty: 1
        percentageOutsideUfo: 70
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
            - STR_SONIC_PULSER
          -
            - STR_BLASTA_CANNON
            - STR_SONIC_PULSER
      - alienRank: 4
        lowQty: 1
        highQty: 2
        dQty: 0
        percentageOutsideUfo: 20
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_BLASTA_CANNON
      - alienRank: 3
        lowQty: 1
        highQty: 1
        dQty: 1
        percentageOutsideUfo: 20
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_SMALL_LAUNCHER
            - STR_STUN_BOMB
            - STR_STUN_BOMB
            - STR_STUN_BOMB
      - alienRank: 2
        lowQty: 1
        highQty: 2
        dQty: 0
        percentageOutsideUfo: 20
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_BLASTA_CANNON
            - STR_SONIC_PULSER
      - alienRank: 1
        lowQty: 1
        highQty: 1
        dQty: 0
        percentageOutsideUfo: 0
        itemSets:
          -
            - STR_BLASTA_PISTOL
          -
            - STR_BLASTA_RIFLE
          -
            - STR_BLASTA_CANNON
            - STR_BLASTA_CANNON
      - alienRank: 6
        lowQty: 1
        highQty: 3
        dQty: 2
        percentageOutsideUfo: 50
        itemSets:
          -
            []
          -
            []
          -
            []
      - alienRank: 7
        lowQty: 1
        highQty: 3
        dQty: 2
        percentageOutsideUfo: 50
        itemSets:
          -
            []
          -
            []
          -
            []
    width: 30
    length: 70
    height: 4
    civilians: 16
    terrains:
      - CARGO
    briefing:
      palette: 6
      music: GMENBASE

so i have everything working now but cargo ship terror missions crash the game when they show . i know this because with mod off  game never crashes.

there must be something that i am missing .


now i am thinking maybe missions can't happen on water? so maybe i have to modify the geoscape as well so make water a new texture.

anyone has any thoughts?
« Last Edit: February 20, 2015, 03:52:40 pm by tollworkout »

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: deep aliens mod - im in need of help - official mod wip thread
« Reply #1 on: February 20, 2015, 03:51:47 pm »
try different map. there are two cargo ship maps. one of them is buggy and not used within tftd.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: deep aliens mod - im in need of help - official mod wip thread
« Reply #2 on: February 20, 2015, 03:53:46 pm »
it works in battle mode. is just can't spawn the little square target on water or not sure?!|

Is there some debug log ?? Something to point me in the right direction i wish i knew what it is i'm doing wrong.
« Last Edit: February 20, 2015, 04:12:55 pm by tollworkout »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: deep aliens mod - im in need of help - official mod wip thread
« Reply #3 on: February 20, 2015, 05:11:29 pm »
ok so i fixed the crash seems the problem was using deployment STR_CARGO_TERROR_MISSION instead of using the alien STR_DEEP_ALIEN_MISSION mission for the region mission weights. But now it never shows up :-) Damn im so close.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: deep aliens mod - im in need of help - official mod wip thread
« Reply #4 on: February 20, 2015, 06:00:50 pm »
ok so i fixed the crash seems the problem was using deployment STR_CARGO_TERROR_MISSION instead of using the alien STR_DEEP_ALIEN_MISSION mission for the region mission weights. But now it never shows up :-) Damn im so close.

You don't have any UFOs assigned to the mission (or you didn't post the alienMissions code). That's one reason why the UFO can't get generated.

Assuming that you just didn't post that code, there's another possible reason why the mission isn't generated: you've only defined missionZone 0 on the region definitions (UFO missions usually require all the types of missionZones).

It seems essentially that what you're trying to do is to add the Ship attacks from TFTD to UFO (I want to do the same for the Terrain Pack). But I'd advise you to wait until TFTD implementation is complete, since it will have features specifically designed for this, rather than trying to adapt the existing UFO ruleset.

PS - If you need definitions for all types of MissionZones to the Atlantic, Indian, etc., check the ruleset of the Terrain Pack. I've added the missionZones used in TFTD for those oceans to the pack (with a few adaptations).
« Last Edit: February 20, 2015, 06:15:55 pm by Hobbes »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: deep aliens mod - im in need of help - official mod wip thread
« Reply #5 on: February 20, 2015, 06:16:13 pm »
You don't have any UFOs assigned to the mission (or you didn't post the alienMissions code). That's one reason why the UFO can't get generated.

Assuming that you just didn't post that code, there's another possible reason why the mission isn't generated: you've only defined missionZone 0 on the region definitions (UFO missions usually require all the types of missionZones).

It seems essentially that what you're trying to do is to add the Ship attacks from TFTD to UFO (I want to do the same for the Terrain Pack). But I'd advise you to wait until TFTD implementation is complete, since it will have features specifically designed for this, rather than trying to adapt the existing UFO ruleset.


Here it is

 
Code: [Select]
- type: STR_DEEP_ALIEN_TERROR
    points: 10
    markerName: STR_CARGO_TERROR_SITE
    raceWeights:
      0:
        STR_GILLMAN: 100
      1:
        STR_GILLMAN: 100
      3:
        STR_GILLMAN: 100
      5:
        STR_GILLMAN: 40
        STR_LOBSTERMAN: 60
      7:
        STR_GILLMAN: 50
        STR_LOBSTERMAN: 50
    waves:
      - ufo: STR_CARGO_TERROR_MISSION
        count: 1
        trajectory: T0
        timer: 3500

I changed the mission to UFO now and changed regions mission type weight to

Code: [Select]
    missionWeights:
      STR_DEEP_ALIEN_TERROR: 100

weight is high to see if i can find it

and ufos

Code: [Select]
ufo:
  - type: STR_CARGO_TERROR_MISSION
    size: STR_SMALL
    damageMax: 500
    speedMax: 5000
    accel: 10
    power: 40
    range: 20
    score: 700
    reload: 16
    breakOffTime: 250
    battlescapeTerrainData:
      name: CARGO
      mapDataSets:
        - BLANKS
        - SEA
        - CARGO1
        - CARGO2
        - XBITS
      mapBlocks:
        - name: CARGO00
          width: 30
          length: 70


and trajectory

Code: [Select]
ufoTrajectories: # ---- UFO TRAJECTORIES -----------------------------------
  - id: T0
    groundTimer: 30000
    waypoints:
      - [1, 1 , 100]
      - [1, 0 , 100]

And still doesn't show up . Unless it shows up as a UFO not a terror site ?

i have a feeling is the fact that my mission zones are all on water . I was trying to make it so it spawns a terror site on water .
« Last Edit: February 20, 2015, 06:18:33 pm by tollworkout »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: deep aliens mod - im in need of help - official mod wip thread
« Reply #6 on: February 20, 2015, 06:23:20 pm »
And still doesn't show up . Unless it shows up as a UFO not a terror site ?

Yup. Currently it is not possible to add new types of terror missions, so what you're doing essentially adds a UFO mission.

Code: [Select]
ufoTrajectories: # ---- UFO TRAJECTORIES -----------------------------------
  - id: T0
    groundTimer: 30000
    waypoints:
      - [1, 1 , 100]
      - [1, 0 , 100]

This is why the UFO isn't appearing: you've defined that the UFO will be generated in MissionZone 1, but there is no MissionZone 1 defined on the regions' definitions.

I don't know if you're checked it already, otherwise I'd advise you to check this page about how alienMissions are generated: https://www.ufopaedia.org/index.php?title=Alien_Missions_in_Enemy_Unknown_(OpenXcom)
« Last Edit: February 20, 2015, 06:25:21 pm by Hobbes »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: deep aliens mod - im in need of help - official mod wip thread
« Reply #7 on: February 20, 2015, 06:28:57 pm »
Thanks for you help. That deff points me in the right direction. I'm going to read that ufopaedia link you gave me. I haven't read that one yet.