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

Scan for potential use of scripted effects and triggers #76

Open
Zankoas opened this issue Jan 10, 2020 · 0 comments
Open

Scan for potential use of scripted effects and triggers #76

Zankoas opened this issue Jan 10, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Zankoas
Copy link
Contributor

Zankoas commented Jan 10, 2020

As you can imagine, most large mods rapidly create a long and useful list of custom scripted effects and triggers. They are immensely useful, letting sweeping changes be made easily, avoiding bugs and just keeping the line count down to make maintenance easier.

However, with such a long list of custom scripted effects and triggers, remembering to use them can be pain. So, scanning for any triggers or effects that match an existing scripted effects and triggers should show an info suggesting you make use of it.

For example, in KR we have the following scripted effect:

remove_all_ministers = {
	hidden_effect = {
		remove_ideas_with_trait = head_of_government
		remove_ideas_with_trait = foreign_minister
		remove_ideas_with_trait = economy_minister
		remove_ideas_with_trait = security_minister
	}
}

If I had this in an event effect:

add_politcal_power = 50
add_ideas = new_guns
hidden_effect = {
	remove_ideas_with_trait = head_of_government
	remove_ideas_with_trait = foreign_minister
	remove_ideas_with_trait = economy_minister
	remove_ideas_with_trait = security_minister
}

An info should be thrown suggesting I use the remove_all_ministers scripted effect. Same can be done for triggers. Would no doubt save us many lines.

@tboby tboby added the enhancement New feature or request label Jan 11, 2020
@Zankoas Zankoas changed the title Scan for Potential Use of Scripted Effects and Triggers Scan for potential use of scripted effects and triggers Jan 11, 2020
@Zankoas Zankoas added the good first issue Good for newcomers label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants