Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   Army Builder (http://forums.wolflair.com/forumdisplay.php?f=16)
-   -   Figuring out intsynch.... (http://forums.wolflair.com/showthread.php?t=6259)

Bluefool May 27th, 2006 05:32 AM

Figuring out intsynch....
 
OK, Mirroring I have working no problem, but I'm stuck on intsynch.

I have a parent unit with the option trench.

I have a child unit with the option trench with an intsynch of trench.

If I understand things right, that means if I pick the option on the parent, it will choose it on the child, but allow the child to deselect it.

However, the child unit never picks up the option initally. I know I can't mess with the link nature like I do with a mirror to get it to show up, so...what did I miss, or what should I be looking for?

rob May 29th, 2006 01:42 PM

Figuring out intsynch....
 
The "initsynch" mechanism will mirror the state of the option at the moment the child entity is created. At any time after the child is created, there is zero connection between the two options. Consequently, if the child is attached to the parent via an "include" or "auto" link, the child will be created when the parent is created. If the option is user-selectable for the parent, then it will start out unselected on the parent and therefore be unselected on the child. Selecting the option on the parent after the child's creation has NOTHING to do with the state on the child.

I hope this helps to clarify. If you have something specific you're trying to do, please outline it and I'll see what suggestions I can come up with.

-Rob

At 06:32 AM 5/27/2006, you wrote:

Quote:

OK, Mirroring I have working no problem, but I'm stuck on intsynch.

I have a parent unit with the option trench.

I have a child unit with the option trench with an intsynch of trench.

If I understand things right, that means if I pick the option on the parent, it will choose it on the child, but allow the child to deselect it.

However, the child unit never picks up the option initally. I know I can't mess with the link nature like I do with a mirror to get it to show up, so...what did I miss, or what should I be looking for?

Bluefool May 30th, 2006 04:40 AM

OOOoooo...gotcha. Thanks!

I want to have an option on a parent unit that if selected certain children get the option, while others don't.

The game mechanics are like this:

A squad has a squad sgt and several squad members. All members of the squad start with a basic assult rifle which has an underslung grenade launcher. Each individual member of the squad can take a rather large varitey of options which are unique to them. For this example, that main assult rifle can be swapped out with a missile launcher, or a greande launcher, flame thrower, etc. Up to two members of the squad can upgrade their main weapon this way.

Also, one squad per platoon can swap out the underslung grenade launcher with an underslung trench sweeper laser. Of course, if you have upgraded to a flame thrower, you don't get the underslung trench sweeper laser.

So, AB wise, the parent is the squad itself, the sgt and the normal troops are the children. I use hidden stats to pass up to the squad from the troops if they have taken a "special" weapon, which then passes to the platoon where rules validation takes place. Each trooper has an assult rifle added through an option of nature auto with a remainder group of mainweapon, which has a upper limit of one.

Weapon upgrades are options on the troopers that have an exclusion group of one main weapon.

What I'm trying to figure out is how to have an option on the squad to swap each members main weapon if it is an assult rifle, but not if its a "special" weapon.

Hopefully that made sense :)

retaf33c June 2nd, 2006 04:39 AM

Since the troopers and sgt are child to the squad, I don't know if this will work, but it might be worth a try. Treat the underslung Trench sweeper as an option to the assault rifle. The assualt rife should have the attribute remainder set for the exclusion group controlling the main weapon. The max allowed for the group should be set to "#" for the number of members in the squad.

The special weapons then should be in two exclusion groups, the main discussed above and a second that control the maximum number of special weapons allowed. That should give you the correct number of weapons that are allowed the upgrade.

rob June 6th, 2006 04:09 AM

Figuring out intsynch....
 
OK, I've been having trouble wrapping my brain around this description. But I think that part is academic, because I think the REAL issue is the title of this thread and your initial post.

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.

Is that what you want?

If so, then there is really only one way to achieve this, and it's NOT an easy solution. I'm honestly not even certain the trick will work, but I THINK it will. You'll have to play a bunch of games to get this to work. And I have to question whether providing this capability is truly "valuable" to the user.

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.

Thanks, Rob

At 05:40 AM 5/30/2006, you wrote:

Quote:

OOOoooo...gotcha. Thanks!

I want to have an option on a parent unit that if selected certain children get the option, while others don't.

The game mechanics are like this:

A squad has a squad sgt and several squad members. All members of the squad start with a basic assult rifle which has an underslung grenade launcher. Each individual member of the squad can take a rather large varitey of options which are unique to them. For this example, that main assult rifle can be swapped out with a missile launcher, or a greande launcher, flame thrower, etc. Up to two members of the squad can upgrade their main weapon this way.

Also, one squad per platoon can swap out the underslung grenade launcher with an underslung trench sweeper laser. Of course, if you have upgraded to a flame thrower, you don't get the underslung trench sweeper laser.

So, AB wise, the parent is the squad itself, the sgt and the normal troops are the children. I use hidden stats to pass up to the squad from the troops if they have taken a "special" weapon, which then passes to the platoon where rules validation takes place. Each trooper has an assult rifle added through an option of nature auto with a remainder group of mainweapon, which has a upper limit of one.

Weapon upgrades are options on the troopers that have an exclusion group of one main weapon.

What I'm trying to figure out is how to have an option on the squad to swap each members main weapon if it is an assult rifle, but not if its a "special" weapon.

Hopefully that made sense [img]./modules/mdforum/images/smiles/icon_smile.gif[/img]

Bluefool June 6th, 2006 08:35 AM

Re: Figuring out intsynch....
 
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 :D .

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 :).

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? :shock:

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 :).

rob June 12th, 2006 07:28 PM

Figuring out intsynch....
 
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] .

Bluefool June 13th, 2006 06:54 AM

A diffrent option that is only design...DOH!

A tag with a live expression on the childrens option....DOH!

Painfully obvious once you know the answer :P

Excellent excellent excellent! Thanks!


All times are GMT -8. The time now is 10:32 AM.

Powered by vBulletin® - Copyright ©2000 - 2020, vBulletin Solutions, Inc.
wolflair.com copyright 1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.