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

Script-Request: Counting point items for each level #7

Closed
janitress opened this issue Jul 31, 2018 · 1 comment
Closed

Script-Request: Counting point items for each level #7

janitress opened this issue Jul 31, 2018 · 1 comment

Comments

@janitress
Copy link

Request:

Out of curiosity, what level in Secret of the Oracle has the most neural stunners? How can I measure the number of point items each level has?
(asked in the forums)

@Fleex255
Copy link
Owner

Ah, thanks for reminding me about this. To find how many of something each level has, you can us PSThar!

Get-Level | % {
	$script:stunners = 0
	$_ | %t {
		$f = $_ | Get-LevelTile $x $y 1
		$i = $_ | Get-LevelTile $x $y 2
		If ($f -in (0x67B, 0x68D)) { $script:stunners++ } # Foreground tiles
		If ($i -in (0x44, 0x22)) { $script:stunners++ }   # Infoplane tiles
	}
	$obj = [psobject]::new()
	$obj | Add-Member NoteProperty 'Level' ($_.Name)
	$obj | Add-Member NoteProperty 'Stunners' $stunners
	$obj
} | sort Stunners -Desc

That script counts stunners. To count something else, change the tile ID lists on the two labeled lines. If you want to change the property name, make sure to adjust both the second Add-Member call and the sort.

To find how many of an item there is in one specific level, enable Tools | "Resource Accountant: count items by item type" in the Configuration dialog, then use the Resource Accountant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants