aliens

Author Topic: Next Time I'm Driving...  (Read 2388 times)

Offline Charly1

  • Captain
  • ***
  • Posts: 69
    • View Profile
Next Time I'm Driving...
« on: October 13, 2022, 02:25:29 am »
Lol...

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Next Time I'm Driving...
« Reply #1 on: October 13, 2022, 11:44:38 am »
This has been reported several times, and I checked it just as many times, and never managed to find the issue. Sorry!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Next Time I'm Driving...
« Reply #2 on: October 13, 2022, 12:11:17 pm »
Can we at least have a save?

FFS do I have to repeat it every frikkin time?

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: Next Time I'm Driving...
« Reply #3 on: October 13, 2022, 04:02:55 pm »
@Meridian: XCF 2.5 (though I don't think there's much of a difference), test4.sav is right before landing, test5.sav is the Hummer surfacing from below the ice.
« Last Edit: October 13, 2022, 04:15:48 pm by Juku121 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Next Time I'm Driving...
« Reply #4 on: October 13, 2022, 06:48:44 pm »
Code: [Select]
  - name: POLAR
    mapDataSets:
      - BLANKS
      - POLAR
    civilianTypes:
      - STR_MALE_CIVILIAN_POLARNIK
      - STR_FEMALE_CIVILIAN_POLARNIK
    script: POLAR
    mapBlocks: &AnchorVanillaPolar
      - name: POLAR00
        width: 10
        length: 10
        groups: [0, 1, 2, 3, 4]
      - name: POLAR01
        width: 10
        length: 10
        groups: [0, 1, 2, 3, 4]
      - name: POLAR02
        width: 10
        length: 10
        groups: [0, 1, 2, 3, 4]

Problem:

POLAR00, POLAR01 and POLAR02 are used both as landing zone blocks and road blocks.

What happens:

The map script first places a craft.
Then it places a road... which depending on RNG can go through the craft (since the craft IS on a road block as well).
Then the map script replaces the block below the craft with a random road-crossing block (POLAR08 in our case), since it detects it is different from the direction of the currently being placed road (because the old block has both directions, it is always "different").

Possible solutions:

(recommended) Solution 1/ don't use the same blocks as landing zone and roads

(maybe) Solution 2/ don't use blocks which are obviously not roads as roads (e.g. in this case water block POLAR08)

(not recommended) Solution 3/ place the roads first, place the craft afterwards

More advice (don't try to break the engine too much)

1/ none of these polar blocks are actual (visual) roads... I assume same goes for many other terrains... why put `addLine` commands into the map script if you don't have road blocks?

2/ the distinction between NS and EW roads is also there for a reason... the same block should not be both NS and EW (or even a crossing at the same time) unless there's a very good reason to do so

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Next Time I'm Driving...
« Reply #5 on: October 13, 2022, 09:51:39 pm »
Thanks, I get it now. I didn't know that it's not allowed to mix group 1 and group 2/3/4.

The reason for addLine is that most missions in XCF use the same script, taking the terrain from the globe texture. And this script must contain roads. So for POLAR, I simply assigned all 10x10 blocks to be used for roads - else the map generation would crash on POLAR.
« Last Edit: October 13, 2022, 09:53:42 pm by Solarius Scorch »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Next Time I'm Driving...
« Reply #6 on: October 13, 2022, 09:55:21 pm »
ok, then solution 1 is probably the best...

...remove groups 2, 3 and 4 from POLAR00, POLAR01 and POLAR02... leave only groups 0 and 1

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Next Time I'm Driving...
« Reply #7 on: October 13, 2022, 10:00:48 pm »
ok, then solution 1 is probably the best...

...remove groups 2, 3 and 4 from POLAR00, POLAR01 and POLAR02... leave only groups 0 and 1

This is what I did, thank you!

A few more terrains have the same arrangement... But these mapblocks don't have water or other such obstacles, so hopefully it'll be okay. (I'm lazy.)

Offline Charly1

  • Captain
  • ***
  • Posts: 69
    • View Profile
Re: Next Time I'm Driving...
« Reply #8 on: October 14, 2022, 03:04:05 am »
Can we at least have a save?

FFS do I have to repeat it every frikkin time?

Sorry... I just thought it was funny.

Did not keep a save. It was a strategically advantageous position against the zombie hordes.