08-07-2020, 01:24 PM
made small program
to help a friend
it is for a case when you have
a.txt like that
and wishing to relocate everything to some other position together, and probably rotating it around some sort of center.
More detailed description:
It makes coordinates relative to some center
rotates around of it, if you write degrees for angles more than 0 in program
and then shifts the location of those objects to some position elsewhere
after that, it creates new file b.txt where the changed file is written
or you can rewrite the existing one.
download
github
P.S. so basically this program fastly changes "pos = ..." and "rotate = ...." strings in a file.
some people who change things in solar systems, perhaps need it to move multiple stuff around.
P.P.S. I didn't test it. so not exactly sure if it rotates properly. Yeah I tried to rotate but, not sure if it would correspond well with "rotate = " game parameter.
to help a friend
it is for a case when you have
[Object]
nickname = BW15_05
ids_name = 514512
pos = -16750, -200, 32153
archetype = space_port_dmg
ids_info = 514513
base = BW15_05_Base
dock_with = BW15_05_Base
reputation = fc_brigands_grp
behavior = NOTHING
voice = atc_leg_m01_ga
space_costume = li_rockford_head, gallia_male_brigands_body
difficulty_level = 17
loadout = space_port_dmg_ga_01
pilot = pilot_solar_easy
;
[Object]
nickname = BW15_05_1
pos = -16715, -125, 32153
rotate = 0, 0, 45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_2
pos = -16785, -125, 32153
rotate = 0, 0, -45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_3
pos = -16750, -344, 32153
archetype = dsy_mod_disc_s
parent = BW15_05
;
[Object]
nickname = BW15_05_4
pos = -16750, -420, 32153
rotate = 90, 0, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_5
pos = -16750, -420, 32153
rotate = 90, 90, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_6
pos = -16750, -420, 32153
rotate = 90, 45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_7
pos = -16750, -420, 32153
rotate = 90, -45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_8
pos = -16750, -500, 32153
archetype = dsy_mod_disc_s
parent = BW15_05
;
nickname = BW15_05
ids_name = 514512
pos = -16750, -200, 32153
archetype = space_port_dmg
ids_info = 514513
base = BW15_05_Base
dock_with = BW15_05_Base
reputation = fc_brigands_grp
behavior = NOTHING
voice = atc_leg_m01_ga
space_costume = li_rockford_head, gallia_male_brigands_body
difficulty_level = 17
loadout = space_port_dmg_ga_01
pilot = pilot_solar_easy
;
[Object]
nickname = BW15_05_1
pos = -16715, -125, 32153
rotate = 0, 0, 45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_2
pos = -16785, -125, 32153
rotate = 0, 0, -45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_3
pos = -16750, -344, 32153
archetype = dsy_mod_disc_s
parent = BW15_05
;
[Object]
nickname = BW15_05_4
pos = -16750, -420, 32153
rotate = 90, 0, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_5
pos = -16750, -420, 32153
rotate = 90, 90, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_6
pos = -16750, -420, 32153
rotate = 90, 45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_7
pos = -16750, -420, 32153
rotate = 90, -45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_8
pos = -16750, -500, 32153
archetype = dsy_mod_disc_s
parent = BW15_05
;
and wishing to relocate everything to some other position together, and probably rotating it around some sort of center.
[Object]
nickname = BW15_05
ids_name = 514512
pos = 6000, 0, 400
rotate = 0, 0, 0
archetype = space_port_dmg
ids_info = 514513
base = BW15_05_Base
dock_with = BW15_05_Base
reputation = fc_brigands_grp
behavior = NOTHING
voice = atc_leg_m01_ga
space_costume = li_rockford_head, gallia_male_brigands_body
difficulty_level = 17
loadout = space_port_dmg_ga_01
pilot = pilot_solar_easy
;
[Object]
nickname = BW15_05_1
pos = 6035, 75, 400
rotate = 0, 0, 45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_2
pos = 5965, 75, 400
rotate = 0, 0, -45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_3
pos = 6000, -144, 400
rotate = 0, 0, 0
archetype = dsy_mod_disc_s
parent = BW15_05
;
[Object]
nickname = BW15_05_4
pos = 6000, -220, 400
rotate = 90, 0, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_5
pos = 6000, -220, 400
rotate = 90, 90, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_6
pos = 6000, -220, 400
rotate = 90, 45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_7
pos = 6000, -220, 400
rotate = 90, -45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_8
pos = 6000, -300, 400
rotate = 0, 0, 0
archetype = dsy_mod_disc_s
parent = BW15_05
nickname = BW15_05
ids_name = 514512
pos = 6000, 0, 400
rotate = 0, 0, 0
archetype = space_port_dmg
ids_info = 514513
base = BW15_05_Base
dock_with = BW15_05_Base
reputation = fc_brigands_grp
behavior = NOTHING
voice = atc_leg_m01_ga
space_costume = li_rockford_head, gallia_male_brigands_body
difficulty_level = 17
loadout = space_port_dmg_ga_01
pilot = pilot_solar_easy
;
[Object]
nickname = BW15_05_1
pos = 6035, 75, 400
rotate = 0, 0, 45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_2
pos = 5965, 75, 400
rotate = 0, 0, -45
archetype = space_tankl4
parent = BW15_05
;
[Object]
nickname = BW15_05_3
pos = 6000, -144, 400
rotate = 0, 0, 0
archetype = dsy_mod_disc_s
parent = BW15_05
;
[Object]
nickname = BW15_05_4
pos = 6000, -220, 400
rotate = 90, 0, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_5
pos = 6000, -220, 400
rotate = 90, 90, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_6
pos = 6000, -220, 400
rotate = 90, 45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_7
pos = 6000, -220, 400
rotate = 90, -45, 0
archetype = space_tanks4x4
parent = BW15_05
;
[Object]
nickname = BW15_05_8
pos = 6000, -300, 400
rotate = 0, 0, 0
archetype = dsy_mod_disc_s
parent = BW15_05
It makes coordinates relative to some center
rotates around of it, if you write degrees for angles more than 0 in program
and then shifts the location of those objects to some position elsewhere
after that, it creates new file b.txt where the changed file is written
or you can rewrite the existing one.
download
github
P.S. so basically this program fastly changes "pos = ..." and "rotate = ...." strings in a file.
some people who change things in solar systems, perhaps need it to move multiple stuff around.
P.P.S. I didn't test it. so not exactly sure if it rotates properly. Yeah I tried to rotate but, not sure if it would correspond well with "rotate = " game parameter.