Rory Noonan
Posts: 2816
Joined: 12/18/2014 From: Brooklyn, NY Status: offline
|
For the airbases I think--from memory, this was two years ago--I used an overlay and plopped down the appropriate facilities without any real regard for naming them. Then I used Lua to print the data in csv format to the console: quote:
local sideUnits = VP_GetSide({side='playerside'}).units for k,v in ipairs (sideUnits) do local unit = ScenEdit_GetUnit({guid=v.guid}) print(unit.name..','..unit.dbid..','..unit.latitude..','..unit.longitude..','..unit.guid) end Copy and paste the output into Excel and use the Data > Columns from Text, or copy into a blank .txt file in Notepad and save as .csv. From there I renamed things as necessary, e.g. from Runway (2600m) to Your Favourite Airport RWY 09/27 or Hangar (Medium) to Your Favourite Airport Hangar #12. Distinct names really help when you get damage reports, or when you're targetting multiple facilities in a single mission/manual weapon allocation. Using the data entry shortcuts, concatenation and flash-fill features of Excel I can make properly formatted names for dozens of units very, very quickly compared to manually renaming them on placement. To rename them, I would use the GUID and SetUnit: quote:
listOfUnits = {insert your list of units to change here... for k,v in ipairs (listOfUnits) do local unit = ScenEdit_SetUnit({guid=v.guid, newname=v.name}) end Latitude/Longitude co-ordinates for ships were less elegant. I just picked a spot in the middle of the Pacific (with no land around is the main idea) as my starting Lat/Lon, plopped down a few examples of the classes I wanted to add (one of each), and then exported them to CSV as above. Rather than place each unit of each class individually I flash-filled data like the DBID, then used concatenation to cut down on repetitive data entry for things like the designation and pennant number (there's no point in typing DD 101, DD 102, DD 103.. etc when you can have a spreadsheet do the work!) and joined them to the actual ship name. For lat/lon I think I just changed the number a fraction each time, so long as you're not close to land shouldn't be a problem.
_____________________________
|