Hey so I'm still testing the random battle model feature and it doesn't seem to be working. This is my latest script:
<?xml version="1.0"?>
<ModInfo>
<Author>cmh175</Author>
<Version>1.07</Version>
<Description>Random Battle Model Generator Test</Description>
<Conditional Folder="Sweeper1">
<RuntimeVar Var="CounterRnd:IrosTestChangeModel:10" Values="0" ApplyTo="battle.lgp\cvaa" />
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="0,1,5" />
</Conditional>
<Conditional Folder="Sweeper2">
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="2,4,6,8" ApplyTo="battle.lgp\cvaa" />
</Conditional>
<Conditional Folder="OriginalSweeper">
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="3,7,9" ApplyTo="battle.lgp\cvaa" />
</Conditional>
</ModInfo>
My directories are Random Battle Model Generator\Sweeper1\battle.lgp, so I'm sure everything is correct. I also tried CounterAdv instead but it still failed.
~In case I was battling the wrong enemy (Sweeper is in the first bombing mission yes?) I just tried another using two Cloud models (rtaa) and now it just crashes the second the battle begins. I'm not sure why the first one doesn't work and just loads from the lgp (if it's even the right enemy I'm fighting) while the Cloud one just crashes the game, but either way it seems like something isn't working right.
What debug output do you get when running the game?
Also, you may well not need an 'OriginalSweeper' folder. If that just contains the original unmodified game files - then it shouldn't be necessary. If none of the mod folders activate, then the wrapper will automatically fall back to letting the game read from the actual LGP files like normal.
Oh, and these lines:
<Conditional Folder="Sweeper2">
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="2,4,6,8" ApplyTo="battle.lgp\cvaa" />
</Conditional>
Look wrong. What that's saying is that, in the 'Sweeper2' folder, activate file 'battle.lgp\cvaa' when the counter is one of these values. But none of the
other files in that folder will ever get activated!
You probably want to use 'ApplyTo' only on the very first variable that applies CounterRnd - basically just as a trigger to say 'if it's accessing this file, then it's time to update the counters'. For the other folders, you don't really care what file the game is accessing - just check the counter to see if it's allowed or not.
Also, on your first folder:
<Conditional Folder="Sweeper1">
<RuntimeVar Var="CounterRnd:IrosTestChangeModel:10" Values="0" ApplyTo="battle.lgp\cvaa" />
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="0,1,5" />
</Conditional>
The first RuntimeVar line applies to battle.lgp\cvaa, the second line applies to all the other files. What if the random counter ends up set to 5? All the
other files will activate, but the game
won't read from battle.lgp\cvaa in the Sweeper1 folder, because you've said that's only activate when the counter = 0...
So, try something like this:
<Conditional Folder="Sweeper1">
<RuntimeVar Var="CounterRnd:IrosTestChangeModel:10" Values="0,1,5" ApplyTo="battle.lgp\cvaa" /> <!-- When game tries to access this file, set the counter to a random value < 10. If it's 0/1/5, then use the file from this folder.
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="0,1,5" /> <!-- For all other files, just check the counter, against the same values of 0/1/5 -->
</Conditional>
<Conditional Folder="Sweeper2">
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="2,4,6,8" /> <!-- No ApplyTo tag: rule applies to ALL files in this folder -->
</Conditional>
<Conditional Folder="OriginalSweeper">
<RuntimeVar Var="Counter:IrosTestChangeModel:10" Values="3,7,9" /> <!-- No ApplyTo tag: rule applies to ALL files in this folder. Although you may not need this folder at all. -->
</Conditional>