# Disable flare based on a module option

**URL:** <https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565>\
**Category:** Feature Requests\
**Tags:** v3\_7\
**Created:** [October 6, 2026, 5:48am UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565 "2026-10-06T05:48:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![g1ul10](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@g1ul10](https://forum.vassalengine.org/u/g1ul10)\
**Post date:** [October 6, 2026, 5:48am UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565/1 "2026-10-06T05:48:19Z")

</div>

Hello, guys, this is a feature request. I’ll start with a preliminary consideration. Flare is great when playing online, but not so great when reviewing past game log files. So, I would like to be able to turn Flare off when reviewing a log file. I thought, but maybe I’m wrong, that a way to do it would be to have an option in the module preferences to ignore the related key, so that I’m able to switch the flare off when replaying old games. Another approach could be to avoid saving the flare key in the log. But maybe you guys have a better idea.

Best,

g

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 6, 2026, 12:17pm UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565/2 "2026-10-06T12:17:24Z")

</div>

> this is a feature request.

This kind of request is best suited for #Feature Requests sub-forum, or opening an issue on [GitHub](https://github.com/vassalengine/vassal). Check the sub-forum descriptions in the pinned posts in each sub-forum, or see [How to format forum posts](https://forum.vassalengine.org/t/how-to-format-posts/85002) for a short overview.

> I’m able to switch the flare off when replaying old games. Another approach could be to avoid saving the flare key in the log.

I think the first option is the most attractive. There are use cases for flares in logs. It would likely require some code changes in the `BasicCommandEncoder` and similar.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![g1ul10](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@g1ul10](https://forum.vassalengine.org/u/g1ul10)\
**Post date:** [October 6, 2026, 12:23pm UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565/3 "2026-10-06T12:23:19Z")

</div>

Thanks, Christian. You already moved the post where it was supposed to be, right? Thanks! And for the second point. I wasn’t clear, sorry. I meant “Having an option that avoids saving the flare key in the log.” Of course, flare might be useful in logs too.

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 6, 2026, 12:51pm UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565/4 "2026-10-06T12:51:00Z")

</div>

> [@g1ul10](#):
>
> You already moved the post where it was supposed to be, right? Thanks!

I cannot do that, so I think it was either @uckelman or @Tim_M

> [@g1ul10](#):
>
> I meant “Having an option that avoids saving the flare key in the log

That makes more sense. One could argue, why _use_ Flare when writing a log if you know the recipient does not like that 😃 In that sense, it makes more - well - sense to allow the recipient to disable play-back of flares.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![g1ul10](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@g1ul10](https://forum.vassalengine.org/u/g1ul10)\
**Post date:** [October 16, 2026, 7:21am UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565/5 "2026-10-16T07:21:53Z")

</div>

Christian,

Maybe it is possible to “clean” the saved file of some keys in post-production. What about your pywargame? I understand that it is meant to work on modules. But maybe you could make a similar tool that decodes a log file, removes user-selected keys, and repacks it?

g

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 16, 2026, 9:52am UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565/6 "2026-10-16T09:52:47Z")

</div>

> [@g1ul10](#):
>
> What about your pywargame? I understand that it is meant to work on modules.

[`pywargame`](https://gitlab.com/wargames_tex/pywargame) works on modules (`.vmod`) as well as saves (`.vsav`), logs (`.vlog`), and extensions (`.vmdx`), though the support for logs is far from complete, and there’s stuff in saves that need to be coded by the user.

You can use the utility `vsavdump.py` to show the content of a save or log file in somewhat plain text.

> [@g1ul10](#):
>
> Maybe it is possible to “clean” the saved file of some keys in post-production.

If you look at the code used by `vsavdump.py` - in particular [`pywargame.vassal.SaveIO.dumpSave`](https://gitlab.com/wargames_tex/pywargame/-/blob/master/pywargame/vassal/save.py#L558) - you will see that log and save files consists of lines. Lines generally start with a _tag_ - for example `+` to add a piece.

If you look at [`VASSAL.build.module.map.Flare`](https://github.com/vassalengine/vassal/blob/master/vassal-app/src/main/java/VASSAL/build/module/map/Flare.java#L74) you see that the _tag_ of flares is the string `FLARE\t` followed by an identifier (set by the module developer), then a `\t`, the X (pixel) coordinate, another `\t` and the Y (pixel) coordinate (see also [`VASSAL.module.build.map.Flare#encode`](https://github.com/vassalengine/vassal/blob/master/vassal-app/src/main/java/VASSAL/build/module/map/Flare.java#L531) and [`VASSAL.module.build.map.Flare#decode`](https://github.com/vassalengine/vassal/blob/master/vassal-app/src/main/java/VASSAL/build/module/map/Flare.java#L549)).

Thus, if you use If you look at the code used by `vsavdump.py` - in particular [`pywargame.vassal.SaveIO.readSave`](https://gitlab.com/wargames_tex/pywargame/-/blob/master/pywargame/vassal/save.py#L178) to read in the save and split into lines, then you can filter out any lines that contain the `FLARE` tag:

```auto
#!/usr/bin/env python

if __name__ == ' __main__':
    from argparse import ArgumentParser, FileType
    from pywargame.vassal.save import SaveIO

    ap = ArgumentParser(description='Remove flares from log')
    ap.add_argument('input', type=FileType('r'), help='Input file')
    ap.add_argument('output',type=FileType('w'), help='Output file')

    args = ap.parse_args()

    key, lines, savemeta, modulemeta = SaveIO.readSave(args.input, True)
    newlines = [line for line in lines if not line.startswith('FLARE\t')]
    SaveIO.writeSave(args.output, key, newlines, savemeta, modulemeta)

```

(above is untested).

See if that does the trick for you.

> [@g1ul10](#):
>
> … you could make a similar tool that decodes a log file, removes user-selected keys, and repacks it?

I will leave that as an exercise for the interested reader 😃 Of course, I will gladly accept contributions to `pywargame` - and give proper credit.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![g1ul10](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@g1ul10](https://forum.vassalengine.org/u/g1ul10)\
**Post date:** [October 30, 2026, 8:08am UTC](https://forum.vassalengine.org/t/disable-flare-based-on-a-module-option/90565/7 "2026-10-30T08:08:52Z")

</div>

Hello Christian,

It turns out that lines with the flare command don’t start with FLARE but with “LOG”, followed by whitespace or tabs, then “FLARE”.

The following seems to work

```auto
#!/home/giulio/Desktop/Varia/venv/bin/python
if __name__ == ' __main__':
   from argparse import ArgumentParser, FileType
   from pywargame.vassal.save import SaveIO

   ap = ArgumentParser(description='Remove commans matching a tag string from log')
   ap.add_argument('tag', type=str, help='Tag of lines to be removed')
   ap.add_argument('input', type=FileType('r'), help='Input file')
   ap.add_argument('output',type=FileType('w'), help='Output file')

   args = ap.parse_args()
   key, lines, savemeta, modulemeta = SaveIO.readSave(args.input.name, True)
   newlines = [line for line in lines if not args.tag in line]
   SaveIO.writeSave(args.output.name, key, newlines, savemeta, modulemeta)

```

Thanks for yor help. This is actually better than a VASSAL option. Now I can deflare anybody’s saves! This pywargame of yours is really nice. Kudos!
