# Current view info (mode and switch state) for booster scripts

**URL:** https://forum.eternagame.org/t/current-view-info-mode-and-switch-state-for-booster-scripts/5578
**Category:** Feature Suggestions
**Tags:** eternascript
**Created:** [September 18, 2025, 12:10pm UTC](https://forum.eternagame.org/t/current-view-info-mode-and-switch-state-for-booster-scripts/5578 "2025-09-18T12:10:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Wipf0](https://forum.eternagame.org/letter_avatar_proxy/v4/letter/w/e47c2d/32.png) [@Wipf0](https://forum.eternagame.org/u/Wipf0)
#### Post date: [September 18, 2025, 12:10pm UTC](https://forum.eternagame.org/t/current-view-info-mode-and-switch-state-for-booster-scripts/5578/1 "2025-09-18T12:10:00Z")

</div>

I would like to be able to get the currently displayed switch state and mode (_natural mode_ or _target mode_) from the EternaScript booster API.

Here are some mock-ups with the information I would like to be able to get in booster scripts encircled in bright green (the total number of switch states is already available via `get_targets().length`):

 ![mockup_target_2](https://d2he8ud106d9gn.cloudfront.net/original/2X/b/bbd1fdc881ace9618db93909016356122a0c6c78.png)  
 ![mockup_target_single_v2](https://d2he8ud106d9gn.cloudfront.net/original/2X/a/a5461790931e1ad09e1fa6304a7574e8960ad709.png)  
 ![mockup_natural_1](https://d2he8ud106d9gn.cloudfront.net/original/2X/7/7400aa3d890ba908deb75548bb08380b451341dd.png)  
 ![mockup_target_PIP_v2](https://d2he8ud106d9gn.cloudfront.net/original/2X/b/ba324d6420b85539a297634851291929e413877e.png)

_Why?_  
Sometimes I wish to use information about which state and/or mode the player is currently looking at in my booster scripts in order to output the relevant information for the current view or operate with the corresponding secondary structure. But as far as I can tell the current API does not provide that information.

---

<div class="post-metadata">

### Author: ![LFP6](https://forum.eternagame.org/user_avatar/forum.eternagame.org/lfp6/32/7_2.png) [@LFP6](https://forum.eternagame.org/u/LFP6)
#### Post date: [September 18, 2025, 3:55pm UTC](https://forum.eternagame.org/t/current-view-info-mode-and-switch-state-for-booster-scripts/5578/2 "2025-09-18T15:55:07Z")

</div>

Thanks for the suggestion, moving this to the feature suggestions category.

EternaScript definitely isn’t well developed for UI-related extensions. In general this seems reasonable, at least in the current setup - something like `current_structure_mode(): 'natural' | 'target'` and `current_state(): number | 'PIP'`.

I do have some vague concerns about what might happen if we ever make UI updates that break the assumption that we only have two modes, that PIP can only split between states, that PIP always shows all states, etc. This is probably unlikely to happen without larger changes anyways, but flagging as a potential consideration.

---

<div class="post-metadata">

### Author: ![Wipf0](https://forum.eternagame.org/letter_avatar_proxy/v4/letter/w/e47c2d/32.png) [@Wipf0](https://forum.eternagame.org/u/Wipf0)
#### Post date: [September 19, 2025, 8:20am UTC](https://forum.eternagame.org/t/current-view-info-mode-and-switch-state-for-booster-scripts/5578/3 "2025-09-19T08:20:05Z")

</div>

Thanks for considering my suggestion. I have edited my request to rephrase it more as a feature suggestion instead of an EternaScript request.
