"sectionmodify" - the new method in v1.4
"sectionmodify" is the new "enhanced" method I've been hinting at lately. It's similar to "sectionreplace", but doesn't have any <dest> tags. Instead of simple search/replace operations, FLMM will parse the standard INI key/value pairs from inside the <section> and <source> tags.
What does this mean? For one thing, finding the correct sections is much easier. For instance, if one of Freelancer's INI files contains:
[ship
price = 10000
nickname = IG-2000
then
<section>
[ship
nickname = IG-2000
</section>
will actually find that correct section (it searches for keys, the compares the values). For the <source> tag, the values of keys in the INI files to be modified don't matter! For instance, if the original data is
[BeamSpear
tip_length = 5
nickname = Li_laser_01_beam
tail_length = 60
head_width = 2
core_width = 2
tip_color = 0, 0, 0
[BeamSpear
...
and the contents of <section> is
[BeamSpear
nickname = Li_laser_01_beam
and the contents of <source> is
flash_size = 4
tip_length = 2500
tail_length = 2500
head_width = 4
core_width = 2
core_color = 234, 234, 149
outter_color = 245, 245, 165
tail_color = 15, 80, 210
head_brightness = 1
trail_brightness = 1
head_texture = star
trail_texture = wide
then the resulting output is
[BeamSpear
tip_length = 2500
nickname = Li_laser_01_beam
tail_length = 2500
head_width = 4
core_width = 2
tip_color = 0, 0, 0
flash_size = 4
core_color = 234, 234, 149
outter_color = 245, 245, 165
tail_color = 15, 80, 210
head_brightness = 1
trail_brightness = 1
head_texture = star
trail_texture = wide
Make sense? Scripts that use this new method will work with basically any INI file, no matter how much the file has been modified .
Edited by - IGx89 on 5/21/2005 4:52:18 PM
What does this mean? For one thing, finding the correct sections is much easier. For instance, if one of Freelancer's INI files contains:
[ship
price = 10000
nickname = IG-2000
then
<section>
[ship
nickname = IG-2000
</section>
will actually find that correct section (it searches for keys, the compares the values). For the <source> tag, the values of keys in the INI files to be modified don't matter! For instance, if the original data is
[BeamSpear
tip_length = 5
nickname = Li_laser_01_beam
tail_length = 60
head_width = 2
core_width = 2
tip_color = 0, 0, 0
[BeamSpear
...
and the contents of <section> is
[BeamSpear
nickname = Li_laser_01_beam
and the contents of <source> is
flash_size = 4
tip_length = 2500
tail_length = 2500
head_width = 4
core_width = 2
core_color = 234, 234, 149
outter_color = 245, 245, 165
tail_color = 15, 80, 210
head_brightness = 1
trail_brightness = 1
head_texture = star
trail_texture = wide
then the resulting output is
[BeamSpear
tip_length = 2500
nickname = Li_laser_01_beam
tail_length = 2500
head_width = 4
core_width = 2
tip_color = 0, 0, 0
flash_size = 4
core_color = 234, 234, 149
outter_color = 245, 245, 165
tail_color = 15, 80, 210
head_brightness = 1
trail_brightness = 1
head_texture = star
trail_texture = wide
Make sense? Scripts that use this new method will work with basically any INI file, no matter how much the file has been modified .
Edited by - IGx89 on 5/21/2005 4:52:18 PM