TEMPEST.114 Posted February 22, 2023 Posted February 22, 2023 (edited) I don't know if it's because you moved 'mapResource' out from the root or you're not searching in that folder, but there is no apparent way to get hold of the blue/red/neutral briefing images - as you claim should be available from env.mission i.e. pictureFileNameN : table : Neutral coalition briefing images pictureFileNameB : table : Blue coalition briefing images pictureFileNameR : table : Red coalition briefing images env.mission gives the DICTIONARY KEYS but there is no way to use them to get the corresponding 'item' from the mapResource file. I don't even know why you're using a dictionary for filenames anyway as it's not like they are localised in any way. This is either a crazy but broken design idea, or it's a bug. But file names shouldn't be localised or need a 'dictionary' key. e.g. There is no way to resolve these keys... Edited February 22, 2023 by Elphaba
TEMPEST.114 Posted February 25, 2023 Author Posted February 25, 2023 so, in 'me_mission.lua' There is this function that's loading them and putting them into a table: function fixBriefingPictures() mission.pictureFileNameR = mission.pictureFileNameR or {}; if 'string' == base.type(mission.pictureFileNameR) then local name = mission.pictureFileNameR; mission.pictureFileNameR = {}; if name ~= '' then table.insert(mission.pictureFileNameR, name); end; end; mission.pictureFileNameB = mission.pictureFileNameB or {}; if 'string' == base.type(mission.pictureFileNameB) then local name = mission.pictureFileNameB; mission.pictureFileNameB = {}; if name ~= '' then table.insert(mission.pictureFileNameB, name); end; end; if mission.version < 8 then for i = 1, #mission.pictureFileNameR do local curId = mod_dictionary.getNewResourceId("ImageBriefing") local filename = "l10n/DEFAULT/"..mission.pictureFileNameR[i] --base.print("-------curId, v, filename=",curId,mission.pictureFileNameR[i], filename) mod_dictionary.fixValueToResource(curId, mission.pictureFileNameR[i], filename) mission.pictureFileNameR[i] = curId end for i = 1, #mission.pictureFileNameB do local curId = mod_dictionary.getNewResourceId("ImageBriefing") local filename = "l10n/DEFAULT/"..mission.pictureFileNameB[i] --base.print("----d---curId, v, filename=",curId,mission.pictureFileNameB[i], filename) mod_dictionary.fixValueToResource(curId, mission.pictureFileNameB[i], filename) mission.pictureFileNameB[i] = curId end end end I think the 'bug' is here. There's still NO NEED to obfuscate / localise the image file names like this.
Recommended Posts