OpenXcom Forum

OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: zRrr on August 17, 2024, 02:41:06 pm

Title: [DONE] Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: zRrr on August 17, 2024, 02:41:06 pm
Add ability check if ctrl, alt or shift are pressed to recolorUnitSprite, recolorItemSprite, selectUnitSprite and selectItemSprite scripts.

This can be useful to highlight units, items on the ground, units with primed timed explosives, units without xp, remaining shield capacity, active proxies and other stuff.
Title: Re: Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: Yankes on August 17, 2024, 07:08:02 pm
Doable, as this is only "readonly" script and do not affect gameplay results its safe to expose this state to this hooks.
Title: Re: Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: Yankes on August 18, 2024, 02:11:43 pm
After looking into code adding this was simple, but I see another opportunity Night vision toggle could be exposed too.
Title: Re: Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: zRrr on August 19, 2024, 01:03:22 pm
Can be useful, but will also need access to NV color from options, or some function that converts color to NV mode.

Currently recolors override NV completely, which is good for my use case, I like things to stand out.

Title: Re: Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: Meridian on August 19, 2024, 01:20:18 pm
Currently recolors override NV completely, which is good for my use case, I like things to stand out.

NV recolor does not apply to units.
(There is nothing to preserve/override.)
Title: Re: Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: Yankes on August 19, 2024, 01:44:38 pm
Yes, but some mods would like some control, like NV work more like HeatVision or some thing like this.
As long it do not affect rest of engine I would allow some custom iteration with NV and units.
Title: Re: Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: Yankes on August 24, 2024, 01:27:59 am
in OXCE 7.13.8 special keys and NV state is exposed to graphic script hooks.
Title: Re: [DONE] Add access to Ctrl/Alt/Shift key state from recolorSprite/selectSprite scripts
Post by: zRrr on August 27, 2024, 12:42:39 am
Thanks

Resulting mod: