file – Java logger (of doom!), updated

In a previous question, Java logger (of doom!), I had posted my own logger, written in Java. I have since taken the answers from that question and a few of my own things to update it.

New code:

 * Syml, a free and open source programming language.
 * Copyright (C) 2021 William Nelson
 * mailto: catboardbeta AT gmail DOT com
 * Syml is free software, licensed under MIT license. See LICENSE
 * for more information.
 * Syml is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of

package personal.williamnelson;

import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Logger implements Closeable {

    public File logfile = new File("");

    protected FileOutputStream fos;
    protected OutputStreamWriter osw;

    protected DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); // example: 2021/27/5 12:07:23

    public void init(File fileToLog) {
        try {
            logfile = fileToLog;

            if (fileToLog.exists()) {
            } else {
                if(!fileToLog.createNewFile()) {
                    System.out.println("An unrecognized error occurred while creating the logfile.");

        } catch (IOException e) { //NOSONAR
            System.out.println("An error occurred while creating a logfile. Are you sure that '" +
                                logfile.toString() + 
                               "' is a valid filename?"); 
        try {
            fos = new FileOutputStream(fileToLog, true);
            osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        } catch (IOException e) {
            System.out.println("An unrecognized error occurred while start logging stream and " +
                               "writing to log stream, despite passing all tests.");


    public void log(Object o, int logType) throws IOException {
        // logType should be 0 = INFO, 1 = WARN, 2 = ERROR, 3 = FATAL
        osw.write(getTime() + ": ");

    public void log(int i, int logType) throws IOException {
        osw.write(getTime() + ": ");

    private String getTime() {
        LocalDateTime ldtNow =;
        return ldtNow.format(dtf);

    private void clearFile(File file) throws IOException {
        FileOutputStream fosClearer = new FileOutputStream(file, false);
        OutputStreamWriter oswClearer = new OutputStreamWriter(fosClearer);

    private void printErrorType(int errorType) throws IOException {
        switch (errorType) {
            case 0:
                osw.write("INFO: ");
            case 1:
                osw.write("WARN: ");
            case 2:
                osw.write("ERROR: ");
            case 3:
                osw.write("FATAL: ");
                throw new IllegalArgumentException("Parameter 'logType  " +
                        "of 'personal.williamnelson.Logger.log'" +
                        " must be one of the following: n" +
                        "    0: INFOn" +
                        "    1: WARNn" +
                        "    2: ERRORn" +
                        "    3: FATALn");

    public void close() throws IOException {

dnd 5e – How do I recalibrate this encounter from D&D 3.5e’s Red Hand of Doom for D&D 5e?

Seeing as there have been no other answers, I will provide an answer from my own experience actually running this encounter.

To preserve the spirit of the original 3.5e encounter under 5e rules, the challenge of the non-combat objective needs to be reduced if the PCs are below 9th level.

The original encounter presents options — not many, and not easy, but clearly more than just a single railroaded approach. The PCs can take out the defenders first and then turn attention to the main objective, of course. Or they can try to sabotage the objective first, probably with magic, which is presented as the most effective means of affecting it directly.

However, many of the sabotage tools a party would’ve had in 3.5e are simply not available, or are available only at higher levels. As written for 3.5e, RHoD names two spells available to PCs of 5th level or lower that are effective for this sabotage task. Soften earth and stone, available to 3.5e PCs of 3rd level, can theoretically do the job in one casting:

The weak spot under the southeast tower needs only 40 damage to collapse the bridge, whereas each other 5-foot section of the bridge has a whopping 270 HP. Soften earth and stone, if used on the ground under the bridge, deals 1d4x10 damage to the bridge section above it. RHoD, p. 33. If used on the ground under the weak spot, this spell has a 25% chance of dealing 40 damage and collapsing the bridge in one turn.

But as mentioned in the question, soften earth and stone doesn’t exist in 5e. Likewise, stone shape, available to 3.5e PCs of 5th level, is explicitly described as being able to do the job in one “clever” casting, RHoD, p. 33 — but that “clever” casting depends on the spell’s area being larger in 3.5e than it is in 5e. Besides, in 5e, stone shape is a 4th-level spell only available to PCs of 7th level or higher.

As a result, using 5e rules, PCs heading into this encounter would need to be significantly higher-level to have tools of equivalent “one shot” efficacy. PCs in 5e get access to transmute rock at 9th level, which — as the questions states — can easily do the job in one turn. No lower-level 5e spell, as written, will do so. Worse, RHoD encourages DMs to limit tools the PCs do have, saying 1st- and 2nd-level spells in general “won’t do much to the (objective).” RHoD, p. 33. Taking that instruction literally, a party of 5e PCs under 9th level has even fewer spell options that might be effective.

Granted, spell scrolls in 5e can give PCs access to spells above their level — but they are not guaranteed to work. Using a scroll to cast a spell of a higher level than the caster could normally cast requires an ability check, and failure means the scroll is wasted. That is dangerous in itself, but more so given that 5e assumes a smaller distribution of magic items than 3.5e did overall, at least in my many years of experience playing both systems.

Moreover, casters in 3.5e typically could cast more spells in a day thanks to bonuses from ability scores, but those bonuses no longer exist in 5e. So even if a 3.5e party only had lower-level, less-effective spells available, they probably could cast them a greater number of times in the encounter before exhausting their resources.

When my 5th-level PCs faced this encounter, the only spell they had available that even came close to the parameters for efficacy originally defined in the adventure was shatter — and only if upcast with a 3rd-level spell slot, of which the party’s wizard had a total of two. As written, an upcast shatter would’ve been incapable of dealing the damage necessary to do the job in one casting, and meanwhile it was competing with 3rd-level spells that could’ve provided serious support (e.g., hypnotic pattern) or utility (e.g., fly) in the sabotage effort. In short, the party really had no option other than to fight. Nothing they had access to would’ve given them the chance a 3.5e party of equivalent level would’ve had to hit the objective hard in one turn and get out.

Had I to run the encounter again for a party of similar level, I would

reduce the HP of the normal bridge sections by 50% to 135 HP, and rule that the bridge’s weak spot has vulnerability to thunder damage such as that dealt by spells like shatter.

These adjustments would give a 5e party more options, while still providing substantial challenge. After all, the PCs would still have to

find the weak spot before they can target it,

and the defenders surely won’t make that easy.

gm techniques – How do I move forward when an impending doom was stopped by accident?

I’m having an issue in a campaign I am running where an impending doom that was part of a front was stopped by the players pretty much by dumb luck.

In order to both prevent any of my nosy players from getting behind the front info, and to make this simpler I will use a made up example of the same issue I am facing:

My front has the impending doom:

The Dark Serpent DeorcaĂžexe is awoken by King Cyndemund’s meddling.

And I have an early portent:

King Cyndemund’s scouts retrieve the tomes of arcana.

This portent comes to pass, and the players meet a suspicious pair of travelers staying at the same inn. The pair some sort of box that they are heavily guarding. The players reason that although they look suspicious, many people look suspicious and it just isn’t very important so they will ignore them.

Now this is fine, ignoring my front is something I can totally deal with. This is certainly not the first time this has happened.

However short while later when the party is a bit strapped for cash they decide that they remember these suspicious travelers and figure that they must have something valuable. So they attempt to steal the box, things go south and they end up murdering the travelers. They find that the box contains some boring old books not gemstones and burn the evidence. The party wizard uses charm person to pin the crime on an old man also staying in the inn. They use the reward money to pay off their debts and the party leaves the town later that week.

So now with the tomes destroyed my front obviously has to change, but I am a bit conflicted. Usually when the party ignores a front I want to increase the danger. As far as the party seems to think these travelers were unimportant and I was being stingy with distributing loot. I could make another way for King Cyndemund to access the magic he desires. However I also don’t want to railroad anything, we are playing to find out, and “Oh you destroyed the tomes, but it turns out there was a second copy!” is not really in line with my principles.

So what is the right path here? Do I consider the front resolved even though the players ignored the portents? Do I repair the front and ignore the players actions because they were incidental?

dnd 5e – How do I recalibrate this encounter from Red Hand of Doom for 5th Edition D&D?

I’m running D&D3.5e’s Red Hand of Doom updated for 5e. So far it has been effortlessly straightforward. I’ve been keeping the basic combat encounter structures and simply swapping out 3.5e monsters for similarly-named 5e monsters (3.5e hobgoblins for 5e hobgoblins, 3.5e manticores for 5e manticores, etc.). Likewise, I’ve been winging skill checks and other non-combat challenges just by eyeballing how hard the stated 3.5e DCs likely would’ve been and using my best judgment to apply 5e DCs of roughly similar probability given bounded accuracy.

However, the PCs are coming up on a critical encounter with a major non-combat objective that presents special conversion problems. The encounter in question, arising near the end of Part I, is

Skull Gorge Bridge, where the PCs are tasked with destroying the eponymous bridge while facing heavy resistance.

Because this objective isn’t a monster, I can’t simply turn to stock 5e monsters and assume all the calibration will have been done for me. At the same time, it’s not as simple as a skill check that I can just eyeball. RHoD provides 3.5e combat statistics for the objective (see p. 34-35), but I’m not sure how those statistics translate to 5e. As written, the objective has what I perceive to be an outsize pile of HP, plus additional defensive features (taking reduced damage from certain sources, etc.) arising from how 3.5e treated entities in the nature of this objective. It’s not clear whether, or how, 5e might expect me to recalibrate those statistics and features.

That is problem enough, but RHoD also goes out of its way to enumerate 3.5e spells that can interact effectively with the objective — most of which are either unavailable or fundamentally changed in 5e. To wit:

  • Soften earth and stone does not exist in 5e.
  • 5e’s version of stone shape restricts the effected area to “no more than 5 feet in any direction,” which was not a limitation of the 3.5e version.
  • Stone to flesh does not exist in 5e.
  • Transmute rock does exist in 5e and is substantially more useful in that it applies to any nonmagical rock, rather than only natural, unworked rock as did the 3.5e version. The 5e version could probably deal with the objective in a single turn, whereas RHoD says the 3.5e version just dealt some modest damage if used in a particular way.

Given the different combat mechanics and spell functions between 3.5e and 5e, how do I convert this encounter so it remains an appropriate challenge?

(In case context is helpful, the party is level 5 and comprises a Light cleric, a Hunter ranger, a melee-heavy Battlemaster fighter, and an Abjuration wizard. Despite RHoD being written for 3.5e parties starting at level 6, up to this point these 5th-level PCs have been able to handle the encounters in Part I of the adventure.)

development environment – Logical choice between VIM and Doom EMACS

I like the VIM Key bindings editing on VIM. I’ve researched online and found Doom Emacs EVIL mode can do “EVERYTHING” VIM can when it comes to writing code and productivity, plus more. Not really sure how accurate that is. If this is not true, then are the features not available in DOOM Emacs that is in VIM a deal breaker? I know Emacs is a whole ecosystem not just a text editor.

What are the reasons why I should choose VIM over Doom EMACS if Doom EMACS can do “Everything” VIM can.

All I want is a Dev environment for C, C++, Javascript and Python that boosts productivity and “lightwight”. At least lighter than VS Code, ATOM, Sublime Text or Notepad++.

Any references to good javascript algorithms for drawing 3d rooms like retro doom? [closed]

Ive got a basic idea here: I can have a enemy that can move towards you and hit you but you can also shoot the enemy with your gun. So everything but a 3d world to move around in at the moment the background is static and you can not move the player either. Ive, also got sprite animation for the enemies and weapons.

So, I lack what I need to do in order to create a 3d room to move around in.
Any, libraries to achieve this can webgl do this or is there any others you recommend to do this task Im asking.

dnd 3.5e – What does AL NG, LE mean for the city of Brindol in Red Hand of Doom?

AL here means alignment, and NG and THE represent the alignments well neutral and loyal bad, respectively. (While the Dungeon Master Guide doesn't go so far as to define AL when used in this way as specifically meaning alignment, AL is used to mean alignment speak Dungeon Master Guide in multiple places like in creature stat blocks on 201 et al. Similar city statblocks are used in many 3.5 products, and Red hand of destiny does not seem to introduce new rules in this regard.)

These alignments, when used in conjunction with a city's state block, indicate the alignments of the centers of power in Brindol – how officials run the city. the DMG covers what this means in more detail and better, but, in part, he says that a "neutral neutral power center seldom influences community residents other than to help them when they are in need" and that "A community with an evil power center generally has a set of codified laws, which most people obey for fear of harsh sanctions" (138).

The conventional power center of the city is Lord Kerden Jarmaath and his forces (they are aligned NG), while the non-standard power center of the city is Lady Verrasa Kaal and his forces (they are group LE).

Princess's Lamentations of Flame – What is the Optimum PC Level for Death Frost Doom?

The 2014 edition of Lamentations of the Princess Flame, Death Frost Doom, says it's "suited to low-level characters". I have read the adventure thoroughly and I am aware that it can be deadly random for all PC levels, but I would like to hear from people who have actually run the adventure as to at the optimal PC level for a single shot. I have read the recommendations for the 2009 edition of levels 3 to 6.

I want the adventure to be done in one go, and that it is not a TPK because of the low PC level, or too easy if they are too high. Again, I know that there are many ways to die, independent of the level.

Doom 2016 does not work on the solus proton

I know it's not Ubuntu but I could not ask Solus to work …
when i tried to install doom 2016 on solus budge, it crashed and told me that i could not read the default configuration i understand if you can not m 'help because his solus
Damage 2016 about the steam on the proton on solus