New actors.static Object Shift Utility -- Beta now available
#1

If you want to enlarge an existing map it is likely that you would need to change all of the coordinates in actors.static by a set x,y adjustment to get all of the scenery objects back into the correct place.

So what I am hoping someone can create is a simple utility to read all the out*.txt files and add a set x y adjustment to the coordinates.

The new set of out*.txt files can then be processed with the existing actors tools to create the new actors.static file.

The same utility could be used to apply coordinate corrections to scenery template actors.static files to set the real map coordinates before pasting the out*.txt files from the template set into the master map files.

All the utility would have to do would be to take a set of out*.txt files as input.
Allow the user to input an x y correction.
And apply the x y correction to each line of the out*.txt file.

Sounds easy? --- It always sounds easy. :lol:

Similarly, if you want to extract a small map from an existing one, perhaps to make an online map, you can use actors_cutter.exe to extract the out*.txt files for the objects, but you then need to correct the coordinates so that the objects relate to the new map origin. This tool would do that as well.
Reply
#2

This tool definetely should be a piece of cake Big Grin
Reply
#3

Is there any progress on this?

Since I'm expanding my Battle of Britain map to include a bit more of France, I'd like an easy way of updating the position of the objects in my actors.static. I can't select and move them all at the same time because it crashes FMB, and I don't fancy the alternative - carefully studying the position of objects relative to textures in my Battle of Britain map and then moving small groups in my new extended map..

!
Reply
#4

Manual method which should work is to load the outbuildings.txt into a spreadsheet and use this to make the coordinate corrections.
I've experimented a little with this but haven't taken it far enough to prove the method yet.

Be a lot easier if we had a small programme which would do it automatically.
Reply
#5

I think too it would be very useful to have such a tool. Notice there are a couple of tools for mission building which can do coordinate change for STATIC objects, like the group cloner, or Quick Object tool.
Reply
#6

Well this method seems to work, but needs more testing.
I've done this working with TextPad and Excel 2007

1. Import outBuildings.txt into Excel as *.txt file type.

Choose Delimited and Space for the import options to get the data sorted in columns.

2. The coordinate data is in columns E F and G. Add three new columns H I J for the new coordinates and enter formulas to make the correction. Note, I am assuming that you already know how to use a spreadsheet.

3. Copy and paste H I J columns and use option to paste value only. This gets rid of the formula.

4. Delete obsolete coordinate columns. You now have a new outBuildings.txt to save.

5. Save As/Other Format -- Choose Unicode text as type.

6. You can now view the new file in TextPad or similar text editor and continue to process using Actors Tools.
Reply
#7

Well, perhaps it's better to write a small tool to shift coordinates... And perhaps merge this tool with actors cutter... And perhaps add a GUI to that tool... Me thinks... :wink:
Reply
#8

Can anyone paste a part of the text file (or the whole thing if possible) in question? I may be able to write a small app to do it (command line is all you are going to get, btw Tongue) but I'd need a sample to get the text properly formatted
Reply
#9

Here is a section of a typical outBuildings.txt file

[Buildings]
548_bld House$FurnitureTreeLine 1 3125.02 3163.32 106.31
549_bld House$FurnitureTreeLine 1 3127.02 3142.82 89.12
550_bld House$Urban_01 1 3030.24 3175.64 356.83
551_bld House$Misc_03 1 3032.52 3140.61 269.09
552_bld House$Fence_02 1 3033.49 3146.32 179.54
553_bld House$Fence_02 1 3031.28 3148.58 87.93
554_bld House$Fence_02 1 3013.96 3141.08 357.31
555_bld House$Fence_02 1 3021.71 3148.14 87.93
556_bld House$Hay_03 1 3016.65 3145.76 177.21
557_bld House$FurnitureTreeLine 1 3084.90 3178.51 298.11
558_bld House$FurnitureTreeLine 1 3069.18 3180.11 193.50
559_bld House$FurnitureTreeLine 1 3049.71 3118.32 181.16
560_bld House$FurnitureTreeLine 1 3014.99 3172.01 10.11
561_bld House$FurnitureTreeLine 1 3069.84 3154.79 268.88
562_bld House$ToiletS_01 1 3062.40 3189.26 269.00
563_bld House$Misc_04 1 3027.09 3146.26 177.21
564_bld House$ToiletS_01 1 3023.06 3147.08 178.38
565_bld House$RuralS_03 1 3016.78 3131.23 87.48
566_bld House$Urban_09 1 3032.34 3160.82 356.59
567_bld House$ToiletS_01 1 3023.59 3159.48 357.30
568_bld House$Urban_06 1 3030.26 3188.64 177.47
569_bld House$Misc_04 1 3061.34 3180.95 265.82
570_bld House$Urban_01 1 3051.64 3189.89 176.78
571_bld House$Fence_02 1 3023.46 3190.32 269.33
572_bld House$ToiletS_01 1 3020.71 3189.26 178.55
573_bld House$RuralS_02 1 3000.59 3037.99 1.41
574_bld House$RuralS_09 1 3071.24 3089.11 268.40
575_bld House$Misc_03 1 3062.56 3093.96 179.72
576_bld House$Misc_02 1 3050.38 3032.81 179.72
577_bld House$ToiletS_01 1 3046.63 3032.71 178.30
578_bld House$Urban_06 1 3040.84 3031.49 178.14
579_bld House$Misc_03 1 3064.52 3079.62 179.72
580_bld House$Misc_02 1 3058.21 3080.38 178.30
581_bld House$Urban_10 1 3027.02 3030.33 178.88
582_bld House$RuralS_10 1 3047.42 3078.84 178.88
583_bld House$RuralS_07 1 3049.68 3092.59 179.16
584_bld House$Fence_02 1 3005.09 3073.77 91.97
585_bld House$Fence_02 1 3007.28 3076.02 0.09
586_bld House$Fence_02 1 3003.88 3078.31 90.70
587_bld House$RuralS_01 1 3001.74 3051.96 1.97
588_bld House$Misc_05 1 3003.38 3057.18 183.50
589_bld House$Misc_03 1 3003.24 3047.12 180.88
590_bld House$Misc_02 1 3003.31 3046.74 180.88
591_bld House$FurnitureTreeLine 1 3088.84 3094.41 249.93
592_bld House$FurnitureTreeLine 1 3090.49 3065.02 339.93
593_bld House$FurnitureTreeLine 1 3047.21 3053.91 219.94
594_bld House$ToiletS_01 1 3098.74 3041.49 93.43
595_bld House$RuralS_02 1 3099.63 3032.24 91.41
596_bld House$FurnitureTreeLine 1 3072.78 3016.85 259.93
597_bld House$FurnitureTreeLine 1 3032.84 3013.46 244.97
598_bld House$Hay_03 1 2801.56 3185.54 271.17
599_bld House$Misc_04 1 2801.99 3194.23 270.55
600_bld House$Urban_05 1 2801.78 3028.86 359.04
601_bld House$Misc_04 1 2872.06 3135.86 270.20
602_bld House$Hay_03 1 2872.14 3141.95 270.19
603_bld House$FurnitureTreeLine 1 2803.14 3139.98 60.91
604_bld House$FurnitureTreeLine 1 2808.64 3115.73 0.27
605_bld House$FurnitureTreeLine 1 2880.37 3193.39 44.72
606_bld House$FurnitureTreeLine 1 2891.74 3163.04 184.89
607_bld House$FurnitureTreeLine 1 2900.52 3130.70 149.65
608_bld House$Urban_08 1 2899.87 3099.32 157.85
609_bld House$Urban_08 1 2807.78 3186.82 90.27
610_bld House$Urban_07 1 2818.09 3160.23 271.06
611_bld House$RuralS_08 1 2823.81 3186.20 91.42
612_bld House$WellS_01 1 2884.93 3185.58 250.83
613_bld House$Fence_01 1 2830.02 3177.79 270.90
614_bld House$Urban_09 1 2835.64 3185.39 90.39
615_bld House$Urban_01 1 2856.81 3183.14 91.11
616_bld House$RuralS_03 1 2872.02 3155.86 268.91
617_bld House$Urban_01 1 2853.43 3158.48 269.52
618_bld House$Urban_08 1 2838.28 3159.73 270.51
619_bld House$Misc_03 1 2839.65 3147.89 270.63
620_bld House$Urban_06 1 2835.65 3140.61 359.44
621_bld House$Misc_02 1 2854.24 3147.82 270.63
622_bld House$ToiletS_01 1 2853.96 3143.42 269.01
623_bld House$Misc_05 1 2848.15 3156.08 271.53
624_bld House$Misc_03 1 2855.65 3193.73 91.14
625_bld House$Urban_09 1 2887.90 3142.86 269.01
626_bld House$Urban_02 1 2904.93 3087.01 339.03
627_bld House$FurnitureTreeLine 1 2844.37 3094.73 249.93
628_bld House$FurnitureTreeLine 1 2849.87 3082.67 9.91
629_bld House$FurnitureTreeLine 1 2881.84 3060.79 9.91
630_bld House$FurnitureTreeLine 1 2854.64 3051.08 99.92
631_bld House$FurnitureTreeLine 1 2803.42 3089.95 191.98
632_bld House$Urban_10 1 2815.28 3049.51 270.34
633_bld House$Misc_04 1 2814.88 3036.26 270.05
634_bld House$RuralS_08 1 2913.06 3181.73 53.84
635_bld House$RuralS_03 1 2949.12 3155.98 234.39
636_bld House$FurnitureTreeLine 1 2987.78 3139.48 61.14
637_bld House$FurnitureTreeLine 1 2988.15 3169.45 18.55
638_bld House$FurnitureTreeLine 1 2974.46 3165.64 65.39
639_bld House$FurnitureTreeLine 1 2909.43 3170.51 123.50
640_bld House$FurnitureTreeLine 1 2933.68 3139.08 305.52

Each line is an object. Last three numbers are the coordinates.
Not sure what the first number is. Always 1 in this example. Could just be the quantity or maybe its to do with object orientation relative to a vertical axis? I'm just guessing here.

The existing actors cutter has a text error in the on screen instructions.
It should request the lowerleft x,y coords first and upper right second.

When merging outbuildings.txt files the object ref numbers at the start of each line are likely to become non unique.

If LSA is considering some sort of GUI interface then maybe it could also incorporate the AutoPop utility? I am using actorscutter to process the template files for AutoPop to ensure there are no objects outside of the designated template zone.
Reply
#10

564_bld House$ToiletS_01 1 3023.06 3147.08 178.38
567_bld Piles$ ShitL02 2 3021. etc.
568_furniture
Reply
#11

Why not? The cutter is pretty simple program. The would-be shifter is much simpler. No problems to incorporate both in one GUI. The populator is still unknown for me though, but I do belive there's nothing special...
Reply
#12

ash those co-rdinates and lines of text look like the mission files.....

when objects are placed in the mission in the FMB.....the last set of numbers denotes the angle of rotation....the 1 means live object......if changed to a 0 it starts the mission as destroyed

and if you do editing in the text mission file ...... and have some of the object numbers duplicated (the first number in the line)...when you reload the mission into the FMB it sorts them out and gives new numbes....having the same number doesn't overwrite
Reply
#13

ok small update, i finally got the thing started (lol, it had been a while since i last coded anything, and god I hate coding). so basically i've got the thing at 70% or so, with a bit of luck it'll make a big jump to 100% soon if the formatted text is always the same, ie:
Code:
XXX_BUILDING  House$ITEM  NUMBER_ZERO/ONE  COORD_X  COORD_Y  COORD_Z

In any case if it wasn't always like that i can expand it afterwards
Reply
#14

quick update... :lol:

hopefully 99% done yay
Reply
#15

Remember - you have to process outChiefsRoad.txt, outNStationary.txt and outWing.txt as well.
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)