FAForever / FAForeverMapEditor

A community-made map editor for the game Supreme Commander Forged Alliance
MIT License
3 stars 2 forks source link

Editor defaults multiple instances of custom unit names to UNIT_XXXX #17

Open UnsilentMarLo opened 9 months ago

UnsilentMarLo commented 9 months ago

Campaign missions use named units for specific script actions, opening a map with unit names that have multiple instances ie 4x "Commander" in each players group, will default all but 1 instance of this custom name to UNIT_XXXX

This will result in mappers being unable to edit missions that have multiple unit name instances without breaking the maps save.lua

it also hinders an efficient workflow as mappers wont be able to copy paste units with names.

['Player1'] =  
{
    ['Units'] = GROUP {
        Units = {
            ['Commander'] = {
                type = 'uel0001',
            },
        },
    },
},
['Player2'] =  
{
    ['Units'] = GROUP {
        Units = {
            ['Commander'] = {
                type = 'uel0001',
            },
        },
    },
},

After saving with the FAF Editor:

['Player1'] =  
{
    ['Units'] = GROUP {
        Units = {
            ['Commander'] = {
                type = 'uel0001',
            },
        },
    },
},
['Player2'] =  
{
    ['Units'] = GROUP {
        Units = {
            ['UNIT_2393'] = {
                type = 'uel0001',
            },
        },
    },
},