Page 1 of 1

How to copy rules from 1 meta to another

Posted: December 13th, 2016, 3:27 pm
by Dmdtt
couple things to note,

-ALWAYS make backups of all metas you mess with before attempting this.
I take absolutely zero responsibility for any lost metas because someone skips this step. while learning how to edit a meta in notepad there is a very high probability of corrupting a meta file. so save a separate copy of a meta before you even open it in notepad.

-Every Rule ends with a line that says its stateName, you can use this pattern to determine start/end of each rule
-make sure no extra spaces added when copy/pasting
-make note of how many rules are in the final state of the meta before editing
-update rule count near top of meta when finished


personally what I do is create a rule ingame I can easily search in the .met file with chatmessage ^^SeachForThis
then place it above the rules I want to copy from 1 meta to the other.

next open up the .met in notepad and find that rule by searching for ^^SearchForThis then locate where that particular rule ends and begin highlighting from directly below that point scrolling down until you find the StateName of the last rule you want to copy over. select copy

next open second meta and place those rules into the same place in the second meta that they were located in the first meta. make sure this state actually exists in second meta before pasting the rules.

and finally update the rule count near top of the meta it will be

1
CondAct
5
CType
AType
CData
AData
State
n
n
n
n
n
355 <this line containes #of rules

update that to account for all added rules. then save the meta and load it in game

once loaded check to make sure the final state of the meta has the same number of rules as before, if there are any missing you did not properly update the rule count in the .met, add one at a time then save and load in game again until all lines show up.

Re: How to copy rules from 1 meta to another

Posted: December 14th, 2016, 4:43 pm
by Almedes
You can also look at this post for more on the anatomy of a meta file: viewtopic.php?f=24&t=453&p=2696#p2696