• 📚 A new project from the admin: Check out PictureBooks.io, an AI storyteller that lets you create personalized picture books for kids in seconds. Give it a try and let me know what you think!

Editting 1,000's of units in a scenario in bulk

kiwitt

Modern Earth Modder
Joined
Jan 11, 2006
Messages
5,634
Location
Auckland, NZ (GMT+12)
Using Notepad++ I could change
Code:
		Level=1, Experience=0
to
Code:
		Level=2, Experience=2
for my over 2,000 units

What editor can I use to select this
Code:
		Level=2, Experience=2
		FacingDirection=4
and change it to this
Code:
		Level=2, Experience=2
		PromotionType=PROMOTION_COMBAT1
		FacingDirection=4
in my scenario file.

Currently going through each unit and manually adding
Code:
		PromotionType=PROMOTION_COMBAT1
I have already made an error before and had to revert to a backup and start again, because I got a corrupt scenario file.
 
I use WordPad and I don't know if maps will let you do it, but I know in XML a trick is to just put stuff on the same line and use a ReplaceAll.

As in Replace All

Level=2, Experience=2

with

Level=2, Experience=2 PromotionType=PROMOTION_COMBAT1

In XML this works because tags are delineated by <> so you can do things like

replace all

<bPlayable>1</bPlayable>

with

<iMinEra>0</iMinEra><iMaxEra>7</iMaxEra><bPlayable>1</bPlayable>

but perhaps maps use the invisible end of line.
 
I tried that and it worked on the find field in XMLeditor, but not on the replace with field.

I try wordpad or.
 
Back
Top Bottom