Author Topic: Map script commands  (Read 2263 times)

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Map script commands
« on: April 11, 2018, 08:59:28 am »

I'm educating myself on how map scripts work by looking at existing ones in combination with the ruleset references on the wiki. It's going well but some of the parameters aren't well explained.

Using the alien base script from vanilla as an example, I'd really appreciate it if someone who groks these things could explain how the 'size' and 'freqs' parameters work?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Map script commands
« Reply #1 on: April 11, 2018, 01:36:03 pm »
The 'size' parameter picks how big a mapblock to use and can be either a single number, e.g. size: 2 means to use 20x20 blocks, or a list of [width, length, height].  The 'freqs' parameter is a list of weights for the 'blocks:' part of a command; it allows you to set the relative frequency for each of those blocks to be chosen for a command.  blocks: [2, 3] with freqs: [1, 2] means pick block number 2 one out of three times and pick block 3 two out of three times.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Map script commands
« Reply #2 on: April 12, 2018, 12:27:42 am »
https://openxcom.org/forum/index.php/topic,3138.0.html

should address most of your questions