However, when I create a cutscene and do not include start_position, it always starts at 0,0, not the player position. I am only able to make it start at the player position by specifying start_position = game.players["player-name"].positionstart_position :: Position (optional): If specified and type is defines.controllers.cutscene, the cutscene will start at this position. If not given the start position will be the player position.
https://lua-api.factorio.com/latest/Lua ... controller
I'm not totally sure if this is actually a bug or the wiki is wrong or I'm misunderstanding something, but regardless here are the steps to reproduce:
1. start a new game (or load a save)
2. run the following command. A cutscene should play starting at the player, then go to 30,0, then to 60,0, then end.
Code: Select all
/c game.players["PLAYER_NAME"].set_controller{
type = defines.controllers.cutscene,
waypoints = {
{
position = {30,0},
transition_time = 120,
time_to_wait = 30
},
{
position = {60,0},
transition_time = 120,
time_to_wait = 30
}
},
start_position = game.players["PLAYER_NAME"].position
}
Code: Select all
/c game.players["PLAYER_NAME"].set_controller{
type = defines.controllers.cutscene,
waypoints = {
{
position = {30,0},
transition_time = 120,
time_to_wait = 30
},
{
position = {60,0},
transition_time = 120,
time_to_wait = 30
}
}
}
Code: Select all
0.000 2020-10-24 18:27:39; Factorio 1.0.0 (build 54889, mac, steam)
0.000 Operating system: macOS 10.15.7
0.000 Program arguments: "/Users/asher/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio"
0.000 Read data path: /Users/asher/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data
0.000 Write data path: /Users/asher/Library/Application Support/factorio [58037/476282MB]
0.000 Binaries path: /Users/asher/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
0.066 System info: [CPU: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz, 4 cores, RAM: 16384 MB]
0.066 Display options: [FullScreen: 0] [VSync: 1] [UIScale: custom (75.0%)] [Native DPI: 0] [Screen: 255] [Special: lmW] [Lang: en]
0.167 Available displays: 1
0.167 [0]: Color LCD - {[0,0], 1280x800, SDL_PIXELFORMAT_ARGB8888, 60Hz, 0x4280a80(0x01)}
0.255 Initialised OpenGL:[0] Intel(R) Iris(TM) Graphics 6100; driver: 4.1 INTEL-14.7.8
0.255 [Extensions] s3tc:yes; KHR_debug:NO; ARB_clear_texture:NO, ARB_copy_image:NO
0.255 [Version] 4.1
0.255 Graphics settings preset: integrated-gpuhigh
0.255 Dedicated video memory size 1536 MB (detected from Intel(R) Iris(TM) Graphics 6100; VendorID: 0x1024500)
0.508 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 25%] [DXT: low-quality] [Color: 32bit]
0.508 [Max threads (load/render): 32/4] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Other: sTDCWT] [B:0,C:0,S:100]
0.761 [Audio] Backend:default; Depth:16, Channel:2, Frequency:44100; MixerQuality:linear
1.218 Info ModManager.cpp:253: Found duplicate mod aai-programmable-vehicles, using higher version (0.6.8 > 0.6.5).
1.259 Info ModManager.cpp:253: Found duplicate mod aai-programmable-vehicles, using higher version (0.6.13 > 0.6.8).
1.267 Info ModManager.cpp:253: Found duplicate mod aai-programmable-vehicles, using higher version (0.6.14 > 0.6.13).
1.315 Info ModManager.cpp:253: Found duplicate mod aai-signal-transmission, using higher version (0.3.18 > 0.3.13).
1.542 Info ModManager.cpp:253: Found duplicate mod CleanFloor, using higher version (1.0.0 > 0.1.0).
1.626 Info ModManager.cpp:253: Found duplicate mod Dectorio, using higher version (0.10.7 > 0.10.5).
1.659 Info ModManager.cpp:253: Found duplicate mod Dectorio, using higher version (0.10.9 > 0.10.7).
2.042 Info ModManager.cpp:253: Found duplicate mod Power Armor MK3, using higher version (0.2.20 > 0.2.18).
2.065 Info ModManager.cpp:253: Found duplicate mod RPGsystem, using higher version (0.18.49 > 0.18.47).
2.074 Info ModManager.cpp:253: Found duplicate mod RPGsystem, using higher version (1.0.50 > 0.18.49).
2.083 Error ModManager.cpp:910: Mod package read error. File /Users/asher/Library/Application Support/factorio/mods/SeaBlockPack_0.2.11.zip/info.json not found
2.169 Loading mod core 0.0.0 (data.lua)
2.367 Loading mod base 1.0.0 (data.lua)
2.872 Loading mod base 1.0.0 (data-updates.lua)
3.101 Checksum for core: 2630831588
3.101 Checksum of base: 3509992273
3.404 Prototype list checksum: 3301461508
3.526 Loading sounds...
3.871 Info PlayerData.cpp:70: Local player-data.json unavailable
3.871 Info PlayerData.cpp:73: Cloud player-data.json available, timestamp 1603588184
4.188 Initial atlas bitmap size is 16384
4.215 Created atlas bitmap 16384x16344 [none]
4.219 Created atlas bitmap 16384x13216 [none]
4.219 Created atlas bitmap 8192x4208 [decal]
4.220 Created atlas bitmap 16384x5600 [low-object, linear-minification]
4.220 Created atlas bitmap 8192x3760 [mipmap, linear-minification, linear-magnification, linear-mip-level]
4.220 Created atlas bitmap 16384x5920 [terrain, mipmap, linear-minification, linear-mip-level]
4.220 Created atlas bitmap 4096x3216 [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
4.220 Created atlas bitmap 4096x1856 [smoke, mipmap, linear-minification, linear-magnification]
4.220 Created atlas bitmap 4096x3120 [mipmap]
4.221 Created atlas bitmap 4096x2336 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
4.221 Created atlas bitmap 2048x224 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
4.221 Created atlas bitmap 8192x1428 [alpha-mask]
4.223 Created atlas bitmap 16384x4704 [shadow, linear-magnification, alpha-mask]
4.223 Created atlas bitmap 4096x1312 [shadow, mipmap, linear-magnification, alpha-mask]
4.224 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: NO/NO.
6.464 Parallel Sprite Loader initialized (threads: 3)
27.453 Sprites loaded
27.977 Generated mipmaps (4) for atlas [3] of size 16384x5600 <total: 523.03, render: 11.91, copy-to-host: 232.61, convert: 265.46, update: 12.35>
28.157 Generated mipmaps (3) for atlas [4] of size 8192x3760
28.645 Generated mipmaps (3) for atlas [5] of size 16384x5920
28.771 Generated mipmaps (3) for atlas [6] of size 4096x3216
28.810 Generated mipmaps (3) for atlas [7] of size 4096x1856
28.849 Generated mipmaps (3) for atlas [8] of size 4096x3120
28.902 Generated mipmaps (5) for atlas [9] of size 4096x2336
28.923 Generated mipmaps (3) for atlas [13] of size 4096x1312
28.926 Custom mipmaps uploaded.
29.027 Factorio initialised
43.643 Loading map /Users/asher/Library/Application Support/factorio/saves/cutscene_playground.zip: 27745092 bytes.
43.698 Loading level.dat: 68555990 bytes.
43.706 Info Scenario.cpp:187: Map version 1.0.0-0
46.309 Loading blueprint storage: Local timestamp 1603567772, Cloud timestamp 1603567771
46.839 Loading script.dat: 470 bytes.
46.846 Checksum for script /Users/asher/Library/Application Support/factorio/temp/currently-playing/control.lua: 3931528263
1003.786 Info HttpSharedState.cpp:54: Downloading https://mods.factorio.com/api/mods?page_size=max&full=True&namelist=aai-programmable-structures%2Caai-programmable-vehicles%2Caai-signal-transmission%2Caai-signals%2Caai-vehicles-chaingunner%2Caai-vehicles-flame-tank%2Caai-vehicles-flame-tumbler%2Caai-vehicles-hauler%2Caai-vehicles-laser-tank%2Caai-vehicles-miner%2Caai-zones%2CAdvanced-Electric-Revamped-v16%2CAircraft%2Calchemical-romance%2Calien-biomes%2Calien-biomes-hr-terrain%2CArmorPockets18%2CArmouredBiters%2CAtomicArtillery%2Cautobuild%2CAutoDeconstruct%2CAutomatic_Train_Painter%2CBetterBots%2CBigLab%2CBig_Brother%2CBottleneck%2CBraver_New_World%2Cbullet-trails%2CBurnysTSBC%2Ccargo-ships%2CCleanFloor%2CClockwork%2CConstruction_Drones%2CCrafting_Speed_Research%2Ccreative-mod%2CCredoTimeLapseModByMaessigcremig%2Ccutscene-creator%2CdangOreus%2Cdebugadapter%2CDectorio%2CDirt_Path%2CDiscoScience%2Cearly_construction%2CEnhanced_Map_Colors%2Ceven-distribution%2CEvoGUI%2CExplosive%20Termites%2Cfactorio-apples%2Cfactorio-chorus-fruit%2Cfactorio-ender-chest%2Cfactorio-ender-pearl%2Cfactorio-farmland%2Cfactorio-jukebox%2Cfactorio-minecart%2Cfactorio-nether%2CFactorioMaps%2CFill4Me%2Cflib%2CFNEI%2CGatlingPulseLaser%2Cgrappling-gun%2Chelmod%2Chigh-pressure-pipes%2CImproved-names%2Cinformatron%2CInlaidLampsExtended%2Cjetpack%2CKingsNuclearBots%2CKrastorio2%2CLargeLamp%2CLarger%20Inventory%2CLogisticTrainNetwork%2CMining_Drones%2CMoreSciencePacks%2CNanobots%2CNicerFuelGlow%2CNoxys_Waterfill%2COutpostPlanner%2CPlannerCore%2CPower%20Armor%20MK3%2Crailloader%2CRaiLuaLib%2CrobotMiningSite%2CRPGsystem%2CSchallArachnidPlatoon%2CSchallTankPlatoon%2CSchallTransportGroup%2CSmooth_Fluids%2CSpidertronEngineer%2CSpider_Control%2Csplatter_guard%2CSqueak%20Through%2Cstdlib%2CTapeline%2Ctextplates%2Ctrainslogisticschallenge%2CTransport_Drones%2Ctree_collision%2CVehicleSnap%2CWhereIsMyBody&version=1.0.0&lang=en
1011.859 Loading blueprint storage: Local timestamp 1603567772, Cloud timestamp 1603567771
1012.017 Loading level.dat: 1183778 bytes.
1012.018 Info Scenario.cpp:187: Map version 1.0.0-0
1012.042 Loading blueprint storage: Local timestamp 1603567772, Cloud timestamp 1603567771
1012.097 Checksum for script /Users/asher/Library/Application Support/factorio/temp/currently-playing/control.lua: 3931528263