Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loyalty check in S02 for issue #23 #110

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

cooljeanius
Copy link
Collaborator

I wrote the existing loyalty check for BfW 1.14. Conversation with @CelticMinstrel (and checking the wiki) reminded me that upkeep="loyal" can go directly into a SUF now, as of BfW 1.15.3, so we can just use that.
Closes issue #23.

get loyalty check to work
fixes issue #23
@cooljeanius cooljeanius requested a review from nemaara March 1, 2023 01:19
@Toranks
Copy link
Contributor

Toranks commented Mar 1, 2023

Wait. IIRC @knyghtmare and me found that upkeep=loyal tested positive on level 0 units because 0, free and loyal are synonymous on upkeep. So, your old method must be more reliable.
This is what we are using on UnitMarker now:

[have_unit]
	x,y=$x1,$y1
	side=$side_number
	upkeep=loyal
	[not]
		level=0
	[/not]
[/have_unit]
[or]
	[have_unit]	
		x,y=$x1,$y1
		side=$side_number
		[filter_wml]
			[modifications]
				[trait]
					[effect]
						apply_to=overlay
						add="misc/loyal-icon.png"
					[/effect]
				[/trait]
			[/modifications]
		[/filter_wml]
	[/have_unit]
[/or]

@cooljeanius
Copy link
Collaborator Author

Wait. IIRC @knyghtmare and me found that upkeep=loyal tested positive on level 0 units because 0, free and loyal are synonymous on upkeep. So, your old method must be more reliable. This is what we are using on UnitMarker now:

[have_unit]
	x,y=$x1,$y1
	side=$side_number
	upkeep=loyal
	[not]
		level=0
	[/not]
[/have_unit]
[or]
	[have_unit]	
		x,y=$x1,$y1
		side=$side_number
		[filter_wml]
			[modifications]
				[trait]
					[effect]
						apply_to=overlay
						add="misc/loyal-icon.png"
					[/effect]
				[/trait]
			[/modifications]
		[/filter_wml]
	[/have_unit]
[/or]

aaaahhhhh that looks complicated... can you test and see if that works here?

@nemaara nemaara merged commit 6bfc26b into nemaara:master Mar 1, 2023
@cooljeanius cooljeanius deleted the fix_issue_23 branch March 1, 2023 04:04
@cooljeanius
Copy link
Collaborator Author

uh... ok, I guess if you come up with a better solution, @Toranks, you can submit a separate PR

@cooljeanius
Copy link
Collaborator Author

uh... ok, I guess if you come up with a better solution, @Toranks, you can submit a separate PR

...actually, I might have to do this myself...

@cooljeanius
Copy link
Collaborator Author

I wrote the existing loyalty check for BfW 1.14. Conversation with @CelticMinstrel (and checking the wiki) reminded me that upkeep="loyal" can go directly into a SUF now, as of BfW 1.15.3, so we can just use that. Closes issue #23.

@CelticMinstrel it looks like this doesn't actually work; it will fire when inapplicable, and the validator complains about it

@cooljeanius
Copy link
Collaborator Author

I wrote the existing loyalty check for BfW 1.14. Conversation with @CelticMinstrel (and checking the wiki) reminded me that upkeep="loyal" can go directly into a SUF now, as of BfW 1.15.3, so we can just use that. Closes issue #23.

@CelticMinstrel it looks like this doesn't actually work; it will fire when inapplicable, and the validator complains about it

I reopened #23 due to this; cc @knyghtmare

cooljeanius added a commit to cooljeanius/A_New_Order that referenced this pull request Feb 19, 2024
more messing with loyalty check; see nemaara/A_New_Order#23 and nemaara/A_New_Order#110
(I *think* I've finally got it correct?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants