C2C Combat Mod Option: Hide and Seek

Missions which provide temporary promotions is a good idea. Where temporary is variable length. It would allow such things as formation promotions which would affect speed of movement and combat. Eg March formation would increase movement but decrease combat strength allowing troops to move quickly in safe territory but expose them to surprise attacks whereas combat formations would slow movement to almost nothing but make the unit difficult to attack. Pie_at uses an assortment of "fortify" style promotions to great effect in his mod. His turn off when you move the unit.

I'm thinking of just making them toggleable status promos. But yes, formation or current focus promotions would be appropriate for this. I'll keep the promo structure basic and fulfilling immediate needs at first but would be very welcoming of efforts to expand the feature.
 
Question about tag; why is it not possible to do this:
Spoiler :
Code:
		<PromotionInfo>
			<Type>PROMOTION_HUNTING_SIGHT1</Type>
			<Description>TXT_KEY_PROMOTION_HUNTING_SIGHT</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereq>PROMOTION_HUNTER1</PromotionPrereq>
			<PromotionLine>PROMOTIONLINE_HUNTING_SIGHT</PromotionLine>
			<iLinePriority>1</iLinePriority>
			<NotOnGameOptions>
				<GameOptionType>GAMEOPTION_HIDE_AND_SEEK</GameOptionType>
				<GameOptionType>GAMEOPTION_SIZE_MATTERS</GameOptionType>
			</NotOnGameOptions>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_COMBATANT</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_EXPLORER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_RUFFIAN</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<AIWeightbyUnitCombatTypes>
				<AIWeightbyUnitCombatType>
					<UnitCombatType>UNITCOMBAT_HUNTER</UnitCombatType>
					<iAIWeight>20</iAIWeight>
				</AIWeightbyUnitCombatType>
			</AIWeightbyUnitCombatTypes>
			<iChanceFirstStrikesChange>1</iChanceFirstStrikesChange>
			<iPursuitChange>5</iPursuitChange>
			<Button>,Art/Interface/Buttons/Promotions/Sentry.dds,Art/Interface/Buttons/FinalFrontier1_Atlas.dds,4,10</Button>
		</PromotionInfo>
		<PromotionInfo>
			<Type>PROMOTION_HUNTING_SIGHT1</Type>
[COLOR="Blue"][B]			<bTypeDependency>1</bTypeDependency>
			<AndDependencyTypes>
				<DependencyType>PROMOTION_HUNTING_SIGHT1</DependencyType>
				<DependencyType>GAMEOPTION_HIDE_AND_SEEK</DependencyType>
				<DependencyType>GAMEOPTION_SIZE_MATTERS</DependencyType>
			</AndDependencyTypes>[/COLOR][/B]
			<VisibilityIntensityChangeTypes>
				<VisibilityIntensityChangeType>
					<InvisibleType>INVISIBLE_SIZE</InvisibleType>
					<iIntensity>2</iIntensity>
				</VisibilityIntensityChangeType>
			</VisibilityIntensityChangeTypes>
		</PromotionInfo>
Instead of this:
Spoiler :
Code:
		<PromotionInfo>
			<Type>PROMOTION_HUNTING_SIGHT1</Type>
			<Description>TXT_KEY_PROMOTION_HUNTING_SIGHT</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereq>PROMOTION_HUNTER1</PromotionPrereq>
			<PromotionLine>PROMOTIONLINE_HUNTING_SIGHT</PromotionLine>
			<iLinePriority>1</iLinePriority>
			<NotOnGameOptions>
				<GameOptionType>GAMEOPTION_HIDE_AND_SEEK</GameOptionType>
				<GameOptionType>GAMEOPTION_SIZE_MATTERS</GameOptionType>
			</NotOnGameOptions>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_COMBATANT</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_EXPLORER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_RUFFIAN</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<AIWeightbyUnitCombatTypes>
				<AIWeightbyUnitCombatType>
					<UnitCombatType>UNITCOMBAT_HUNTER</UnitCombatType>
					<iAIWeight>20</iAIWeight>
				</AIWeightbyUnitCombatType>
			</AIWeightbyUnitCombatTypes>
			<iChanceFirstStrikesChange>1</iChanceFirstStrikesChange>
			<iPursuitChange>5</iPursuitChange>
			<Button>,Art/Interface/Buttons/Promotions/Sentry.dds,Art/Interface/Buttons/FinalFrontier1_Atlas.dds,4,10</Button>
		</PromotionInfo>
		<PromotionInfo>
			<Type>PROMOTION_HUNTING_SIGHT1_HIDE_SEEK</Type>
			<Description>TXT_KEY_PROMOTION_HUNTING_SIGHT</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereq>PROMOTION_HUNTER1</PromotionPrereq>
			<PromotionLine>PROMOTIONLINE_HUNTING_SIGHT</PromotionLine>
			<iLinePriority>1</iLinePriority>
			<OnGameOptions>
				<GameOptionType>GAMEOPTION_HIDE_AND_SEEK</GameOptionType>
				<GameOptionType>GAMEOPTION_SIZE_MATTERS</GameOptionType>
			</OnGameOptions>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_COMBATANT</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_EXPLORER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_RUFFIAN</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<AIWeightbyUnitCombatTypes>
				<AIWeightbyUnitCombatType>
					<UnitCombatType>UNITCOMBAT_HUNTER</UnitCombatType>
					<iAIWeight>20</iAIWeight>
				</AIWeightbyUnitCombatType>
			</AIWeightbyUnitCombatTypes>
			<iChanceFirstStrikesChange>1</iChanceFirstStrikesChange>
			<iPursuitChange>5</iPursuitChange>
			<VisibilityIntensityChangeTypes>
				<VisibilityIntensityChangeType>
					<InvisibleType>INVISIBLE_SIZE</InvisibleType>
					<iIntensity>2</iIntensity>
				</VisibilityIntensityChangeType>
			</VisibilityIntensityChangeTypes>
			<Button>,Art/Interface/Buttons/Promotions/Sentry.dds,Art/Interface/Buttons/FinalFrontier1_Atlas.dds,4,10</Button>
		</PromotionInfo>
Is it possible to make it work like this? Have I misunderstood the purpose of the dependency tag?

Alternatively would it be possible to make it work like this:
Spoiler :
Code:
		<PromotionInfo>
			<Type>PROMOTION_HUNTING_SIGHT1</Type>
			<Description>TXT_KEY_PROMOTION_HUNTING_SIGHT</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereq>PROMOTION_HUNTER1</PromotionPrereq>
			<PromotionLine>PROMOTIONLINE_HUNTING_SIGHT</PromotionLine>
			<iLinePriority>1</iLinePriority>
			<OnGameOptions>
				<GameOptionType>GAMEOPTION_HIDE_AND_SEEK</GameOptionType>
				<GameOptionType>GAMEOPTION_SIZE_MATTERS</GameOptionType>
			</OnGameOptions>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_COMBATANT</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_EXPLORER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_RUFFIAN</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<AIWeightbyUnitCombatTypes>
				<AIWeightbyUnitCombatType>
					<UnitCombatType>UNITCOMBAT_HUNTER</UnitCombatType>
					<iAIWeight>20</iAIWeight>
				</AIWeightbyUnitCombatType>
			</AIWeightbyUnitCombatTypes>
			<iChanceFirstStrikesChange>1</iChanceFirstStrikesChange>
			<iPursuitChange>5</iPursuitChange>
			<VisibilityIntensityChangeTypes>
				<VisibilityIntensityChangeType>
					<InvisibleType>INVISIBLE_SIZE</InvisibleType>
					<iIntensity>2</iIntensity>
[COLOR="Blue"][B]					<InvisibilityCondition>
						<And>
							<Has>
								<GOMType>GOM_OPTION</GOMType>
								<ID>GAMEOPTION_SIZE_MATTERS</ID>
							</Has>
							<Has>
								<GOMType>GOM_OPTION</GOMType>
								<ID>GAMEOPTION_HIDE_AND_SEEK</ID>
							</Has>
						</And>
					</InvisibilityCondition>[/B][/COLOR]
				</VisibilityIntensityChangeType>
			</VisibilityIntensityChangeTypes>
			<Button>,Art/Interface/Buttons/Promotions/Sentry.dds,Art/Interface/Buttons/FinalFrontier1_Atlas.dds,4,10</Button>
		</PromotionInfo>
or something similar?
 
AndDependencyTypes are about the existence or not of other objects in the XML. Include this if this is in the game.

Game Options are not XML objects in the game.


That is the short answer.
 
Hmm, when this &#8595; is used on a promotionline I expected it to disable all promotions belonging to the line when one of the options were off. It doesn't really seem to do anything when placed there. It works as expected when placed in a promotion.

<OnGameOptions>
<GameOptionType>GAMEOPTION_HIDE_AND_SEEK</GameOptionType>
<GameOptionType>GAMEOPTION_SIZE_MATTERS</GameOptionType>​
</OnGameOptions>

Is this, for promotionlines, only meant to clean up the leftover if the same tags are used for its promotions?

And just to make sure, this is an AND function, right; not an OR or bEqual function?

EDIT:
Additionally, I though this &#8595; would enable something when all listed options were turned off...
<NotOnGameOptions>
<GameOptionType>GAMEOPTION_HIDE_AND_SEEK</GameOptionType>
<GameOptionType>GAMEOPTION_SIZE_MATTERS</GameOptionType>​
</NotOnGameOptions>

It does not when placed in a promotion... I tested it in the Combat I promotion and started a new game with size matters and Hide and Seek turned off; Combat 1 was not enabled.

Edit: I must have done something wrong here as I couldn't reproduce it, but the first part of the post still stands.
 
OnGameOptionTypes is to establish that all listed options must be on for this promotionline to function.

NotOnGameOptionTypes is to establish that ANY of the listed options must NOT be on for the promotionline to function.

Check the schema or other entries with those tags in use to ensure you've got the syntax right.
 
OnGameOptionTypes is to establish that all listed options must be on for this promotionline to function.
As I though; I forgot to mention that I tested it with all variations of those two options.

NotOnGameOptionTypes is to establish that ANY of the listed options must NOT be on for the promotionline to function.
I expected this one to be an AND function as well. Good to know that it works as an OR.

Check the schema or other entries with those tags in use to ensure you've got the syntax right.
I copy pasted from promotions where you had used the tags. Checked the schema anyway to be sure. The syntax was correct.
 
Make sure you have the promotions established properly on that promo line. I usually double up and put the option prereqs on the promos as well though.
 
Make sure you have the promotions established properly on that promo line. I usually double up and put the option prereqs on the promos as well though.
When defining hunting sight variations I only placed the option prereqs on the promos as it had no effect in promotionline; hence my original question of what is the effect of having the option prereq in the promotionline.
 
Ah... yeah, a version for when both options are on and a version for when either is off should be sufficient.
Yeah I tried this and NotOnGameOptions acted like an AND function. So I had to define 4 hunting sight variations to get it to work on all game option variations. 1 for when both are on, 1 for when both are off, and 2 for when one is off and the other on.
 
Yeah I tried this and NotOnGameOptions acted like an AND function. So I had to define 4 hunting sight variations to get it to work on all game option variations. 1 for when both are on, 1 for when both are off, and 2 for when one is off and the other on.

You'd only have to do this if you wanted a version for each. If you set it like:
Code:
<NotOnGameOptions>

    <GameOptionType>GAMEOPTION_HIDE_AND_SEEK</GameOptionType>
    <GameOptionType>GAMEOPTION_SIZE_MATTERS</GameOptionType>

</NotOnGameOptions>
You'd be turning the promo off if either of the those options are on. That seems to be appropriate unless you actually do want a version for each configuration.

The code checks to ensure NO NotOnGameOption game option is on to allow the promo.

According to the code, Promotionlines should work the same way for all the promos in the line. Of course, in this case you have variations using the same promotionline so you shouldn't have to define different promolines.
 
So this Option is "creeping" into the Main Mod?

JosEPh
 
So this Option is "creeping" into the Main Mod?

JosEPh
Not as far as I know, in my civic modmod I'm adding visibility to hunting sight, and I had to make 4 duplicates of the promo for it to be correct no matter what options are played with.

If the bottom part of this post was possible I would have been able to do the same without duplicating the promo at all.
 
So this Option is "creeping" into the Main Mod?

JosEPh

What makes you ask? There IS a project that this mod has opened up the need for that has some potential core applications which would be Status promos but that's something Hydro and DH have wanted for a while anyhow. Furthermore, its application to this Option won't have any effect on the main.

As an side note, there will admittedly be a number of game effects that are planned that will only be able to take place within the scope of this option so there will come a point where players are missing out on a lot if they don't play with it. To the point that I had originally not even considered optioning this out. But I know how the community can be about enhanced complexity soooo... here we have another major mod contained within an option.

But I'm not seeing where you would feel the discussion has indicated that this is 'creeping' into the core.

If you are working with visibility intensities, visibility range intensities, invisibility intensities or any modifiers thereof, the core game will find that data meaningless. The promos still show up in the pedia due to some previous discussions with AIAndy on how optioned out promos should display, but that's just to let players know its there when no options have yet been selected.

What Toffer was working on was actually a way to have an established promo that's active on the main mod differ in the way it behaves on the main from the way it behaves with both size matters and hide and seek engaged. This is necessary to keeping things FROM 'creeping over to the main'.
 
8860
  • Changes the effects of negative Visibility Range.
@TB: Something is still strange about negative range values. It still makes visibility intensity increase for each step away from the unit when it should decrease.
So potential targets are visible until I get too close to them; then they turn invisible. You must have forgotten a minus sign somewhere or something.

Example of how it should be: Vis.intensity: 8 & Range: -2
The tile the unit stands on should be unaffected (still 8 visibility). Then going away from the unit tile by tile: 6,4,2,0.
 
k. I'll re-evaluate the math again.
Edit: Ok, I believe I found the flaw. I just had a numeric adjustment in the wrong spot and it led to an unintended multiplication with a negative amount that should've been negated before that point.
 
OK so I got a case for you with rev. 8867:
My unit has 12 visibility intensity and -2 range
He is standing on the same tile as a unit with 5 invisibility
He can not see the other unit.

There are no other types of invisibility than Invisible_Size involved in this case.
 
Ok... same tile must still suffer from some kind of off math. Will review again looking for how that takes place.

EDIT: is this situation specifically setup after the latest revision or is this a replay of a previous test? The visible data on plots would be completely flawed from the previous math if its the latter. So make sure its a clean setup of the test. I'll try something on this end but running the math through the variables for that scenario suggests that the same plot should have 12 pts towards the size visibility.

EDIT2: I did find a severe flaw but it's not something I would've thought would impact a same tile range sighting. It could, however, be screwing up that situation by the way the situation came about.

Btw, this may be something a recalc would correct (check after I get the next dll release onto the svn here in about 15-20 min)
 
Back
Top Bottom