FLMM v1.44 help needed - re: numTimes usage
-
The options section at the top identifies which option there is and which choices you can make within that option. If there were more options they would automatically be identified with consecutive numbers.
You can have as many choices within an option as you like, the user can select only one of them.
So, by choosing 1:0 the section identified in the data tag as being 1:0 would be activated. By choosing 1:1 the section identified in the data tag as being 1:1 would be activated. If the data line is identified with a 1:0, 1:1, 1:2, … etc. that section would be activated if any of those choices were true.
If you look at the disco mod script you can see that one of the options is the type uniform Trent will wear. That option has 39 choices.
Having multiple choices in a script is not new. What’s the problem for me in this case is that in this instance the command is not activated correctly either way. If I choose 1:0 BOTH choices are activated, if I choose 1:1 neither choice is activated.
-
Oh, I see what you’re saying. Yeah, I tried that too but option 1:1 for some reason NEVER gets applied when numTimes is being used.
-
Been a long time since I’ve scripted with FLMM, but maybe if you aren’t modifying this file in other areas of the script with choices - do this instead.
Do a file with the complete edits, so option 1 and 2 included and use copy file to place it. Then all you need to do is one sectionmodify with numtimes to comment out the option 2 stuff.
Am I making sense here? lol
-
I tried that even though I suspected that wasn’t the answer. And I was right. Having the space there has never been an issue before.
It’s starting to look as if you can have numTimes or options, but not both. I wonder if there’s a limit to the number of switches you can apply. -
Zyos wrote:
Been a long time since I’ve scripted with FLMM, but maybe if you aren’t modifying this file in other areas of the script with choices - do this instead.Do a file with the complete edits, so option 1 and 2 included and use copy file to place it. Then all you need to do is one sectionmodify with numtimes to comment out the option 2 stuff.
Am I making sense here? lol
Yes…
except as I’m looking at it further, that would require combining numTimes with options= and we’re back where we started. In other words, how do we tell the script WHEN to comment out the option 2 stuff? We’d need to use options=“1:0” again. And that doesn’t work.Just out of curiosity though, sectionmodify to comment something out? I thought sectionmodify looked at the existing key and compared the <source> value to see if they’re the same and then applied any changes. ie. if the key is radius = 1000 and you want to section modify it to 1500 you’d have radius = 1500 in your <source> section.
So, how does it work when it’s trying to compare a radius = key to a <source> value of ;radius =. Won’t it just append the commented keys to the existing section and really change nothing?
Although, I suppose it could be radius = ; <value>instead of ;radius = <value>(off to check it out)</value></value>
-
Out of curiosity again…
I tried using numInstances again.<data file=“data\equipment\market_misc.ini” method=“sectionappend” numtimes=“-1”>[BaseGood]
<source>
MarketGood = missile01_mark01_rtc_ammo, 1, -1, 1, 1, 0, 1, 1
MarketGood = nomad_gun01_mark01, 6, -1, 0, 0, 0, 0.00744</data><data file=“data\equipment\market_misc.ini” method=“sectionappend” options=“1:1”>[BaseGood]
<source>
MarketGood = li_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = li_battleship_turret02, 0, -1, 10, 10, 0, 1
MarketGood = br_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = br_battleship_turret03, 0, -1, 10, 10, 0, 1
MarketGood = ku_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = ku_battleship_turret04, 0, -1, 10, 10, 0, 1
MarketGood = rh_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = rh_battleship_turret03, 0, -1, 10, 10, 0, 1</data>Both sections were added even when the choice was 1:0, not 1:1. But, only to the first section in the file. The first section was added to all other sections but not the second.
If 1:1 is selected the first section is not applied.
edit: fixed this little problem by changing the options defaults at the beginning of the script. But, the option is only applied to the first [Section] in the file.Still looking for a solution
-
numInstances is not an option in this case. The value for numInstances must be greater than “1” and will not apply for this edit.
Configured as displayed above it does only the first section in the file.
Configuring it thusly:
<data file=“data\equipment\market_misc.ini” method=“sectionappend” options=“1:1”>[BaseGood][BaseGood]
<source>
MarketGood = li_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = li_battleship_turret02, 0, -1, 10, 10, 0, 1
MarketGood = br_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = br_battleship_turret03, 0, -1, 10, 10, 0, 1
MarketGood = ku_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = ku_battleship_turret04, 0, -1, 10, 10, 0, 1
MarketGood = rh_battleship_flak_turret01, 0, -1, 10, 10, 0, 1
MarketGood = rh_battleship_turret03, 0, -1, 10, 10, 0, 1</data>gives an error stating that numInstances must be greater than “1”.
So, perhaps the easy way doesn’t work for this scenario.
I’ll likely have to use numTimes to apply the first section and then use “sectionappend” to enter the second section individually to each [BaseGood] section. What a hassle… I was hoping to configure it to be added automatically any time a new [BaseGood] section was added to the mod. -
Can someone check this for me?
I can’t get this to work right no matter what I do.Dependencies include FLMM 1.4b4 and JFLP 1.0
When selecting option “Yes” it seems to work fine, but when selecting option “No” it gives the error that the lines it’s looking for can’t be found.
Commenting out (or removing) the last change confirms that the first two instructions are working properly.
Any help appreciated.
R
-
Ahh, the mighty Adoxa.
Thanks for responding.v2 is great, but there are a couple of issues with writing the mod for v2.
1). It would require every user to switch to v2 and by your own admission, a number of mods out there aren’t compatible with v2, so it would require a choice on the user’s part as to which FLMM they’re going to use in order to run a mod.
2). In order to take full advantage of v2’s features I’d have to completely rewrite our mod and I have neither the ken of scripting I would need, nor the time to learn. I looked at it a couple of times about the time you went on hiatus and couldn’t figure out just what was being done. A couple attempts I made to convert didn’t work out well and I gave it up.
At any rate, the choice is to rewrite the mod to make it compatible with v2 and potentially lose playerbase when they have to switch FLMMs, or to leave it as is.
If there’s another choice I’d sure like to know what it is.
-
-
Even so, v2 is the only version I’m going to support. I’m not going to bother with workarounds for older versions when v2 has actual fixes.
-
You should not need to rewrite, only do what is necessary (adding section headers in particular). If you’d like to email me your current version (or otherwise make it available, since I’d rather not sign up to another site only to never visit again), I’d be willing to make the necessary changes. I could also comment here on those changes and the reasoning behind them.
-
-
Never mind, I signed up and got the latest. It loaded and activated (default options) without incident (after I reverted back to JFLP 1.00). There are two differences compared with 1.5 beta 1: the Malvinas & Weddel asteroid lootable zones weren’t applied with 1.5 (lines 27791 & 27901 in script.xml). So there you go, not only do you not have to do anything to support v2, it actually works better (and quicker). (I will concede, however, that other mods may need to be updated to work with v2.)
Here’s the explanation of the warnings v2 generates:
Warning: script.xml:41592: ignoring dest tags.
This should really be sectionreplace or sectionmodify.
Warning: script.xml:19187: ignoring dest tags.
This section should be removed - it’s already fixed in JFLP.
Warning: script.xml:18933: ignoring dest tags.
Warning: script.xml:16985: ignoring dest tags.
Warning: script.xml:16909: ignoring dest tags.
Warning: script.xml:7581: ignoring dest tags.
Warning: script.xml:2449: ignoring dest tags.sectionappend does what it says - appends to the section - so dest tags have no meaning.
I hope that clears up some things.
-
I’ll give it another shot. Thanks for looking at it Jason.
Rich
-
I tried applying the mod with v2d and it seems to have run the mod perfectly (so far). I’m still verifying.
Are there any plans to make an installation setup? This is just the exe for the program. I had to manually create the folder and subfolders myself.
-
There are plans, yes, but implementing them is another matter.
I think the only thing left to do is FRC-style xmldata. Given that it’s been out for a while now, additional testing probably isn’t that important. It’s updating the docs that I’m really dreading, since it’s been so long and I didn’t make any notes…
Anyone still using Win2K? I was going to use VS2010 for the release, which doesn’t (directly) support 2K.