View Single Post
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,262

Old June 12th, 2006, 07:28 PM
Thanks for the detailed explanation. It helped greatly in my understanding of what you're trying to accomplish!

The key here is that this is an option that applies to ALL members of the squad. As such, I think the most intuitive way of solving this is to have that option selectable on the parent unit and then automatically inherited downward. Using "mirror" should work fine. So I think you had this working exactly as it should at one point already.

The only gotcha was that you didn't want the option appearing on the parent within printouts. That's pretty easily fixed. Simply create a DIFFERENT option for using by the parent unit. This option is designated as "design only" so that it doesn't get shown within any output. You can assign it a cost of zero, since the cost only applies on the child units. And then you can mirror this different option easily from the current options that are attached to the children. The net result is ease of selection for the user with appropriate visual feedback during roster creation and no extraneous material within roster output.

For the situation with overriding special weapons, I think the easiest way to do that is to use the same approach outlined above, but with one key adjustment. Define a tag to indicate that a special weapon has been selected. Have that tag assigned to the current unit by all special weapon options. Then, for the mirrored option on the child units, use a "Live" tag expression that checks whether the tag is assigned - the option is only "live" if the tag is NOT assigned. The net result is that the mirrored option appears whenever the child unit does NOT have a special weapon (and it's suppressed if the unit does).

The only detail you have to worry about for this is the evaluation sequence. The special weapons options must have an earlier priority than the mirrored options with the "live" tagexpr so that the tag depended upon is assigned before it is tested.

Hope this helps,
Rob


At 09:35 AM 6/6/2006, you wrote:

Quote:
OK, I've been having trouble wrapping my brain around this description.

Yeah, its been a hoot to try to figure out; I'm sure my explenation helped [img]./modules/mdforum/images/smiles/icon_biggrin.gif[/img] .

If I understand correctly, you want to allow the user to make a change to the squad (parent) unit and have that change ripple down through all of the child units. HOWEVER, you then want the user to be able to modify each of the child units, changing out the option that rippled downward. In effect, you want the ripple to NOT be persistent. For example, selecting the missile launcher option on the parent would cause child unit A to synchronize with the parent and automatically select the missile launcher. The user could then go into child unit A and pick a flame thrower.



That's part of it, but with an extra bit: if the child unit has already selected the flame thrower, he keeps it instead of swaping it out with the missle launcher.

So please confirm whether I'm understanding correctly. And then please explain how this is a truly useful feature. I could easily see a situation with the user has configured a bunch of individual child units, at which point a wayward click on an option of the parent unit could cause all of that work to be reset. I don't see that as a "good thing". But maybe I'm not understanding correctly. So please clarify this for me.

Well, I won't be suprised if there is a much better way; I have worked out one possibility that I know works, so I'll describe that later and see if its close to the same plan. But, a better way would make me quite a bit happier [img]./modules/mdforum/images/smiles/icon_smile.gif[/img] .

Ok, so a description of how it's possibly useful:

I'm making up my army list. I select my squad, and give one member a grenade launcher, and another a flame thrower. Now I go on to the rest of my list and I find I have about 50 points left....say! I could use the option to have one unit swap out its morita rifles with trench sweeper lasers on that squad! So, I pick that squad and select the option. The three members of the squad that still have assult rifles should be swapped for trench sweeper lasers, and the two that have special weapons should retain them.

If I followed your description right, when you select the trench sweeper laser on the squad, each member of the squad would be reset to the default rifle. I could see where that would be workable, but you would then need to be able to upgrade that weapon to a special weapon again.

I had a similar problem with a diffrent piece of equipment: a drop capsule. If one member of a squad takes a drop capsule, all of them must. At first I put the drop capsule option on the squad with it mirrored to the troops. That left a drop capsule on the squad, which really didn't work right....I could elminate its cost, but not it from the printout...at least not without elminating it from the squad members it was supposed to be on. SO! I put two hidden stats in, one for squad members and one for drop capsules. Each squad member adds a one to the squads squad member stat. Each drop capsule adds drop capsule stat to the trooper, who then in its postlink script adds that stat if it has it to the squad. In the squads postlink script, there is a comparison of the stats and if drop is greater than zero, and the numbers are not equal, it passes a stat to the root unit, the platoon. Then there is a rule that checks if the platoon has that stat, and if it does, it warns you that all members of the squad must take drop capsules if any do.

Simple, eh? [img]./modules/mdforum/images/smiles/icon_eek.gif[/img]

It works, and gives pretty close to what I want....but you have to select the drop capsule on each indivdual, and it is a squad option, but it does validate the rules properly...but its kind of a pain to select over and over.

So, I can see a way to try it using the same method, but I get stuck on those special weapons. Members can be added to a squad, so I can't hard code a number of how many normal rifles there are, and you don't have to take any special weapons at all. So, how do I get that weapon to just the squad members that need it, but not the others, and if at all possible have the option on the squad, but not given to the squad...only its children. And, barring all of that, if I do another pass the stat trick, how do I make sure that the people who have taken special weapons get ignored in the count? Have the special weapon subtract one from the squad count maybe?

Advice taken [img]./modules/mdforum/images/smiles/icon_smile.gif[/img] .
rob is offline   #7 Reply With Quote