dnd 5e – What is the earliest level that a player character can gain access to a wish spell?

Wish is a 9th-level spell. It’s only on the wizard and sorcerer spell lists.

Full caster classes (including sorcerers and wizards) gain 9th-level spell slots at level 17 in the class. Multiclassed spellcasters know/prepare spells as if single-classed, so you need at least 17 levels in either sorcerer or wizard to have a 9th-level spell slot and thus be able to learn the spell.

The one exception is the bard class, thanks to their Magical Secrets feature:

By 10th level, you have plundered magical knowledge from a wide spectrum of disciplines. Choose two spells from any class, including this one. A spell you choose must be of a level you can cast, as shown on the Bard table, or a cantrip.

The chosen spells count as bard spells for you and are included in the number in the Spells Known column of the Bard table.

You learn two additional spells from any class at 14th level and again at 18th level.

Using the Magical Secrets feature, you can learn 2 spells from any class spell list at 18th level. As full casters, bards also get a 9th-level slot by that point, so they can learn wish using the feature.

Finally, Arcana Domain clerics get the Arcane Mastery feature at 17th level (SCAG, p. 126):

At 17th level, you choose four spells from the wizard spell list, one from each of the following levels: 6th, 7th, 8th, and 9th. You add them to your list of domain spells. Like your other domain spells, they are always prepared and count as cleric spells for you.

They could choose wish as their 9th-level spell from the feature. (Thanks to David Coffron for pointing this out!)

There are a few magic items that can let you cast the wish spell or cast it for you. However, it’s up to the DM whether to even roll on the tables to determine treasure, or whether to allow you to gain items that let you cast the wish spell. Given how powerful wish can be, the DM might be hesitant to do so any sooner than you could normally learn the spell.

The lowest-rarity item, the Efreeti Bottle, is still listed as “very rare”, and only has a 10% chance of giving you wishes:

When you use an action to remove the stopper, a cloud of thick smoke flows out of the bottle. At the end of your turn, the smoke disappears with a flash of harmless fire, and an efreeti appears in an unoccupied space within 30 feet of you.

The first time the bottle is opened, the GM rolls to determine what happens.

On a roll of 91-00 on the percentile dice (“d100”), it gives the following result:

The efreeti can cast the wish spell three times for you. It disappears when it grants the final wish or after 1 hour, and the bottle loses its magic.

All but one of the remaining items that allow you to cast wish are legendary items. The first and probably most controversial is the Deck of Many Things. Only one of the cards in the Deck, the Moon, lets you cast wish (with the other possible effects ranging from campaign-destroyingly good to campaign-destroyingly bad):

Moon. You are granted the ability to cast the wish spell 1d3 times.

A much simpler item that lets you cast wish is the Luck Blade:

Wish. The sword has 1d4–1 charges. While holding it, you can use an action to expend 1 charge and cast the wish spell from it. This property can’t be used again until the next dawn. The sword loses this property if it has no charges.

The Ring of Three Wishes is probably the most straightforwardly named of the bunch, and does what it says on the tin:

While wearing this ring, you can use an action to expend 1 of its 3 charges to cast the wish spell from it. The ring becomes nonmagical when you use the last charge.

And finally, the last item (or pair of items) is an artifact, the Eye and Hand of Vecna (DMG, p. 224). Attuning to both items involves some self-mutilation (and removing either one afterwards kills you), but you gain a variety of benefits and incur a few dangers. If you attune to both, the last benefit listed is:

You can use an action to cast wish. This property can’t be used again until 30 days have passed.

There is, of course, the possibility (however unlikely) of acquiring a 9th-level spell scroll with the wish spell on it. Spell scrolls can only be used by those with the spell on their class spell list, so only sorcerers or wizards can do it (or bards who pick the spell with the Magical Secrets feature, but they’d already know the spell that way so it’s kind of pointless for them). Note that even lower-level sorcerers/wizards could use a wish spell scroll, but they’d have to pass a DC 19 check using their spellcasting ability (Charisma for sorcerers, Intelligence for wizards):

If the spell is on your class’s spell list but of a higher level than you can normally cast, you must make an ability check using your spellcasting ability to determine whether you cast it successfully. The DC equals 10 + the spell’s level. On a failed check, the spell disappears from the scroll with no other effect.

The Magic Item Rarity table on DMG p. 135 suggests that very rare items be limited to 11th-level or higher characters, and that legendary items be limited to 17th-level or higher characters.

However, the magic item tables on the following pages do list specific magic items as possible treasures, and the treasure hoard tables do give guidance on randomly determining the contents of a large cache of treasure, whether that’s the accumulated wealth of a large group of creatures, the belongings of a single powerful creature that hoards wealth, or a reward from a wealthy/powerful benefactor for completing a quest (DMG p. 133):

When determining the contents of a hoard belonging to one monster, use the table that corresponds to that monster’s challenge rating. When rolling to determine a treasure hoard belonging to a large group of monsters, use the challenge rating of the monster that leads the group. If the hoard belongs to no one, use the challenge rating of the monster that presides over the dungeon or lair you are stocking. If the hoard is a gift from a benefactor, use the challenge rating equal to the party’s average level.

Every treasure hoard contains a random number of coins, as shown at the top of each table. Roll a d100 and consult the table to determine how many gemstones or art objects the hoard contains, if any. Use the same roll to determine whether the hoard contains magic items.

The Efreeti Bottle corresponds to a roll of 71 on the d100 on Magic Item Table H (DMG p. 148). Magic Item Table I (DMG p. 149) includes the Luck Blade (corresponding to a roll of 11–15), the Deck of Many Things (81), and the Ring of Three Wishes (94).

The table for treasure hoards corresponding to CR 5–10 creatures (DMG, p. 137) has two rows that involve rolling once on Magic Item Table H; following these guidelines, it’s only possible if the DM rolls 99 or 100 on the d100 when determining the treasure hoard. In order to then get an Efreeti Bottle, the DM would need to roll a 71 on another d100 for the magic item table. (And in order to then have the efreeti grant you 3 wishes, they’d need to roll a 91-00 on the d100 when the bottle was actually used by a character.)

Alternately, the treasure hoard table for CR 11–16 creatures (DMG, p. 138) includes a few more rolls that could theoretically result in an item that lets you cast wish. If the DM rolls 83–92 on the d100 for the treasure hoard table, they can roll 1d4 times on Magic Item Table H (to potentially get an Efreeti Bottle). If they instead roll 93–00 on the d100 for the treasure hoard table, they can roll once on Magic Item Table I. (And they’d then need to roll an 11–15, 81, or 94 on the d100 for the magic item table to result in an item that can let you cast wish.)

Finally, the treasure hoard table for CR 17+ (DMG, p. 139) states that a roll of 73–80 corresponds to 1d4 rolls on Magic Item Table H; a roll of 81–00 corresponds to 1d4 rolls on Magic Item Table I.

Artifacts (such as the Eye and Hand of Vecna) are a totally different beast, beyond even the highest treasure hoard or magic item tables (DMG, p. 219):

An artifact is a unique magic item of tremendous power, with its own origin and history. An artifact might have been created by gods or mortals of awesome power. It could have been created in the midst of a crisis that threatened a kingdom, a world, or the entire multiverse, and carry the weight of that pivotal moment in history.


Characters don’t typically find artifacts in the normal course of adventuring. In fact, artifacts only appear when you want them to, for they are as much plot devices as magic items. Tracking down and recovering an artifact is often the main goal of an adventure. Characters must chase down rumors, undergo significant trials, and venture into dangerous, half-forgotten places to find the artifact they seek. Alternatively, a major villain might already have the artifact. Obtaining and destroying the artifact could be the only way to ensure that its power can’t be used for evil.

All in all, the DMG does not really expect low-level characters to be able to cast wish even through magic items. You can only expect to have a fairly significant chance to get a magic item that lets you do so once you’re already high enough level to cast the spell (assuming you don’t multiclass). This is probably at least somewhat by design, given that even the spell description begins:

Wish is the mightiest spell a mortal creature can cast. By simply speaking aloud, you can alter the very foundations of reality in accord with your desires.

Frankly, you’re better off talking to your DM about finding a way to cast simulacrum directly rather than trying to cast wish to replicate its effect, given how potentially world-changing (and campaign-affecting) wish can be.

java – How do I get the player from the LivingEntity so I can make this knockback effect on the amethyst sword?

Like the title says, how do I get the player from the LivingEntity so I can make this knockback effect on the amethyst sword?
i want the amethyst sword to give knockback 10 to any entity i hit and in the direction im looking at

public static void onPlayerAttack(LivingAttackEvent event){
    Entity entity = event.getEntity();
    LivingEntity living = event.getEntityLiving();
    Item item = ItemInit.AMETHYST_SWORD.get();
    if (event.getEntity() instanceof LivingEntity){
        living.applyKnockback(10, 20, 20);
        System.out.println("i print");

dnd 5e – Problematic player constantly looking to power play

This is called ‘arguing for advantage’, and it’s not really a problem unique to DnD.

‘I should get X because of Y reason’ isn’t usually about the Y reason – the person just wants X. The Y can be anything, and frankly doesn’t matter. When your human perception and judgement (aka basic social interaction skills) tell you that someone is arguing for an advantage rather than for some other reason (because they think Y is more logical, because they think Y is a better story, because they don’t like Z for personal reasons, etc) you should simply say ‘no’.

You may need to say no quite a few times. The arguing for advantage may morph into other means of social pressuring, like vague blame, repetitive asking, calling-in allies, convincing the crowd, so on. It’s entirely possible for this to suck the fun out of the game and make continuing with that player entirely unworkable. However you have a considerable advantage in this situation due to explicitly being the authority, limiting the social pressure it is acceptable to bring against you and giving them an ‘uphill battle’ in attempting to gain the advantage they are seeking.

If need be, explain that in this game the DM is the final arbiter of all rules interactions and world setting. They should be impartial, like a referee, and consult the table’s preferences to make a good game but when it comes down to it the DM is the one who decides what rules are used, makes up new rules if necessary, arbitrates any disputes, and gets to say what hair colour exactly that npc’s beard is. That’s the basic rule of the game and it is what people agree to implicitly when they sit down to game with people.

You can also do the following things.

Provide examples of what advantages can be successfully argued for.

Or ‘asked’ for. The paladin asks if there is a church in the village? You answer ‘yes’. The fighter wants to know if after seeing an awesome polearm fighter he can go learn from him? Yes. You change the fighter’s Fighting Style to Great Weapon Mastery as well, as he’s now using a halberd rather than the two shortswords he was previously, to reflect the results of his character training with the Yuan-ti Spearmaster for those 3 weeks. The mage wants to use a readied frost spell to turn the falling poison rain into ice, so it bounces off the party’s raised shields rather than dowsing and poisoning them? Yes. By agreeing to more reasonable requests, you show the arguing player that things can be gained by toning down his demands – this often leads to the demands being toned down.

Talk to them out of game.

Explain that DnD is a cooperative game and you don’t want one character to be more mechanically powerful than the others as it makes your job harder. Likewise, that giving one player exceptions to the rules and not others both makes your job harder (have to remember two sets of rules) but is also unfair. Explain that GMing is quite difficult for both mechanical and storytelling reasons, and you’d appreciate their help in keeping it simpler. Accusations and further arguing are rarely helpful – informing them of your point of view in a non-accusatory way and thus creating empathy is likely to be more helpful.

Move the game along.

If a player is arguing with you about getting whatever, you can simply move the game along – turn to another player, and tell them that they ‘find the innkeeper’ or whatever they were doing before the arguing player redirected the conversation onto why they should have X. If the player is ‘interrupting’ to make his arguments, it’s rude – this will lead to less arguing overall, as you can also make the ‘sorry but said he wanted to do X, so i’m talking to him now after talking to you about how you want a Flametongue’ which is reasonable/sounds reasonable.

Ultimately this is a social problem. It is about someone not sticking to the implicit rules of an activity. It needs to be solved through that lens, and the RPG-specific tactics available are limited.

There’s also something else that you’ve hinted at.

You’ve talked about whose ‘fault’ the TPK was, used the term ‘power play’ without qualifier or explanation, and talked about how someone making a choice in-game is a ‘problem player’ behaviour (hiring or firing an NPC guide).

These are all red flags. A GM blaming a TPK on a player or players instead of acknowledging that as the designer of the world they have significant control over whether the party lives or dies, someone who does not qualify what ‘power play’ entails to them but assumes it is universal, and a GM who assumes that in-game actions are universally for out-of-game reasons, are all common red flags for negative GM behaviours and attitudes in TTRPGs. I have and will again avoid a game with a GM who talks about such things, expecting that at the table their game will just not be.. good.

While from your question I lack any detail at all to determine whether these hinted-at problems actually exist, i’d suggest in general that whenever you are trying to determine how to interact with someone in a positive way that you also look at your own behaviour in an objective and logical fashion to find out if your own preconceptions, expectations, or negative beliefs are exacerbating any problems with the situation.

unity – Camera doesnt track player properly on different resolution

Hello i have 2d mobile game where camera follow players car, on my mobile phone with resolution 2960×1440 everything works fine but when i start the game on tablet with resolution 2160×1620
the camera shows only a half of the car… i made some drawings for better imagination 🙂

first is my mobile resolution

and second is my tablet resolution

I was trying to do it by myself for a few days but i am new in unity and i do not fully understand Camera class

i have this script on my camera:

public GameObject playerPos;
private Vector3 lastPlayerPosition;
private float distanceToMove;
void Start()
    lastPlayerPosition = playerPos.transform.position;
void Update()
        distanceToMove = playerPos.transform.position.x - lastPlayerPosition.x;
        transform.position = new Vector3(transform.position.x + distanceToMove,         transform.position.y, transform.position.z);
        lastPlayerPosition = playerPos.transform.position;

How can I stop the Unity Video Player on WebGL from starting each video with a frame of all black?

I’m working on a system to seamlessly reconstruct and play numerous segments of a continuous video stream by playing one segment on the active Video Player while loading the next on the hidden, waiting Video Player—and swapping between them when the active segment is done playing.

Although it’s not necessary to see the code for this, I included it below just in case:

public class VideoController : MonoBehaviour
    (SerializeField) private VideoPlayer activePlayer;
    (SerializeField) private VideoPlayer waitingPlayer;
    // The waiting player starts off invisible.

    private Queue<string> _segmentUrls;
    private bool _videoIsPlaying;

    private bool NextSegmentExists => _segmentUrls.Count >= 1;

    private void Awake()
        // Initialize fields.
        _segmentUrls = new Queue<string>();

        // Subscribe to events.
        // VideoPlayer.Prepare() doesn't seem to work in WebGL. The workaround is to call
        // Play() instead and set the players to pause once the track is finished preparing.
        activePlayer.prepareCompleted += source =>
        waitingPlayer.prepareCompleted += source =>
        activePlayer.loopPointReached += SwitchVideoPlayer;
        waitingPlayer.loopPointReached += SwitchVideoPlayer;

    public void EnqueueSegment(string segmentUrl)

        if (!_videoIsPlaying)
        else if (!waitingPlayer.isPrepared)

    private IEnumerator StartPlayback()
        // Give the Video Player a second to finish preparing the segment for playback.
        yield return new WaitForSeconds(1f);

        SwitchVideoPlayer(lastPlayer: activePlayer);
        _videoIsPlaying = true;

    private void PrepareNextSegmentOnWaitingPlayer()
        var segmentUrl = _segmentUrls.Dequeue();
        waitingPlayer.url = segmentUrl;

    private void SwitchVideoPlayer(VideoPlayer lastPlayer)
        activePlayer = waitingPlayer;

        waitingPlayer = lastPlayer;
        if (activePlayer.isPrepared)
            _videoIsPlaying = false;

        if (NextSegmentExists)

When a Video Player begins playing, the first frame or two is just a black screen. As a result, when a segment finishes playing and it’s time to swap the active and waiting players, there’s a momentary black “blink” on the screen.


Below is a GIF of the issue:

Blinking Demo

Each blink corresponds to swapping Video Players.

(Not to be confused, the video player is showing a recording of a Unity project.)

When a Video Player is done preparing the new segment for playback, I have it advance two frames, so it picks off right where the old segment ended and transitions perfectly smoothly.

This is done by changing the callback for VideoPlayer.prepareCompleted as follows:

activePlayer.prepareCompleted += source =>
waitingPlayer.prepareCompleted += source =>
// Experimentation found that two calls to StepForward() are necessary.

Why It Doesn’t Work

It works on Windows, but testing it on the WebGL build—my primary build target—throws an exception telling me VideoPlayer.StepForward() is not supported on WebGL.

I tried the equivalent of calling StepForward() by setting the current time of the Video Player to a value equal to 2 / framerate, where the “2” stands for two frames.

Why It Doesn’t Work

It works on Windows, and it seems adjusting the time value works on WebGL, too—at least for values equal to or less than 0.5 seconds. However, on WebGL, the black blink persists despite the time-skip.

I tried the same approach as in #2, but by directly adjusting the current frame of the Video Player when preparing the segment for the waiting player.

Why It Doesn’t Work

For the same exact reason as in #2. 😫

Why does the Video Player start off with black frames on WebGL no matter what, and how can I avoid that?

gm techniques – How to punish a character while not punishing the player?

In my last session where I am GM, an accident happened. My player attacked unwillfuly an NPC who wants to punish them for that. As they are actually my best player, I really don’t want ruin their fun. Now I need to think how I can punish his character without punishing my player. I would rather not drop NPC vengeance, as rest of my group could get even more relentless seeing there are no consequences of their actions.


Game is on Dungeon World system in high fantasy world. It is entirely custom made, and has not much beyond where the players currently are. Magic there is quite common and potent.

History before situation

One of my players (let’s call him Bob) had a quarrel with a stablemen about quality of horses. This quarrel escalated quite a bit and finished with a
guard needing to intervene. Another player (lets call her Alice) had a brilliant idea: while Bob and stablemen was gone speaking with guards, she came and casted curse on horses to look like in decay (this would hamper horse quality and help Bob in dispute). Now Bob with guards, stablemen and crowd of onlookers come to stable to check those horses.

Meanwhile, the third player (lets call him Grzegoż, he’s that guy who messed up), is closing to this stable from entirely different direction knowing nothing about quarrel and curse. Grzegoż, as his character is helpful and quite compassionate offered guard boss that he will decurse those horses with small fee. Also, at the same time, guards called town sorceress, very powerful magician NPC to help with curse.

The accident

Grzegoż is a bard, but lately he was learning arcane arts and rituals. After some simple perception tests he started ritual of decursing. First time went poorly, on a second try, Alice approached him and offered help (she could help Grzegoż as she casted that curse). She can speak with different ghosts and spirits, so I’ve allowed speaking with those of curse. Ghosts offered deal, that she help them find another host. Alice agreed and needed to point single humanoid around (there was like hundred of different bystanders around), and in some kind a flash of genius she pointed at the sorceress. Ghosts had no choice and compelled. Also Grzegoż had no idea of this deal.
Grzegoż tried second time, with “help” of Alice, and succeed partially. Expelled ghosts tried to enter the sorceress, but failed miserably as she deflected them with ease. Unfortunately for Grzegoż, she seen from where those ghosts came and assumed it was an attack, promptly freezing everyone around bind magickly Grzegoż and took him to her tower.

The sorceress

She lives in the town my group is now currently. She is only important mage in that town. She is super powerful, cracking entire city in half would be big problem. She is a little bitchy but generally calm and not very caring (until she’s atacked of course). Her main area of expertise is ground magic, general arcane stuff and everything that could arise from being half medusa. She also helped my group quite considerable 2 sessions before and offered some more help in exchange of some adventuring favors.

java – HSQLDB and Hibernate: ERROR user lacks privilege or object not found: PLAYER in statement

I’m not sure where I’m going wrong. I know I can connect to the database just fine, but my error comes when persisting an object to a table in the database. I tried adding an empty player and a defined player such as my nick player, both produced the same error.


Hibernate: insert into Player (id, acceleration, age, endurance, fastest100m, fastest200m, fastest400m, form, lastRaceTime, mental, name, place, speed, stamina, start) values (default, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2021-07-20T10:08:02.022-0400  WARN  SQL Error: -5501, SQLState: 42501
2021-07-20T10:08:02.022-0400  ERROR  user lacks privilege or object not found: PLAYER in statement (insert into Player (id, acceleration, age, endurance, fastest100m, fastest200m, fastest400m, form, lastRaceTime, mental, name, place, speed, stamina, start) values (default, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement
    at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
    at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
    at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
    at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:726)
    at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:706)
    at Main.main(Main.java:22)
Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement
    at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
    at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186)
    at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:111)
    at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.prepare(GetGeneratedKeysDelegate.java:51)
    at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3195)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3801)
    at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:84)
    at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645)
    at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282)
    at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263)
    at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317)
    at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330)
    at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287)
    at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193)
    at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123)
    at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:185)
    at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:128)
    at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55)
    at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:93)
    at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:720)
    ... 2 more
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: PLAYER in statement (insert into Player (id, acceleration, age, endurance, fastest100m, fastest200m, fastest400m, form, lastRaceTime, mental, name, place, speed, stamina, start) values (default, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)
    at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
    at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$2.doPrepare(StatementPreparerImpl.java:109)
    at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:176)
    ... 21 more
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: PLAYER
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.ParserDQL.readTableName(Unknown Source)
    at org.hsqldb.ParserDQL.readRangeVariableForDataChange(Unknown Source)
    at org.hsqldb.ParserDML.compileInsertStatement(Unknown Source)
    at org.hsqldb.ParserCommand.compilePart(Unknown Source)
    at org.hsqldb.ParserCommand.compileStatement(Unknown Source)
    at org.hsqldb.Session.compileStatement(Unknown Source)
    at org.hsqldb.StatementManager.compile(Unknown Source)
    at org.hsqldb.Session.execute(Unknown Source)
    ... 25 more

Here is my main

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import entity.Player;

public class Main {

    public static void main (String() args) {

        Player nick = new Player(32,20,100,74,84,64,100,31,"Nick");

        EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("default");
        EntityManager entityManager = entityManagerFactory.createEntityManager();


My persistence class

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
    <persistence-unit name="default">

            <property name="hibernate.connection.url" value="jdbc:hsqldb:file:baldwin/bDB1"/>
            <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbc.JDBCDriver"/>
            <property name="hibernate.connection.username" value="username"/>
            <property name="hibernate.connection.password" value="password"/>
            <property name="hibernate.show_sql" value="true"/>
            <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">






package entity;
import javax.persistence.*;

public class Player {

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private int id;

    @Column(name = "acceleration")
    private int acceleration;

    @Column(name = "age")
    private int age;

    @Column(name = "endurance")
    private int endurance;

    @Column(name = "place")
    private int place;

    @Column(name = "form")
    private int form;

    @Column(name = "mental")
    private int mental;

    @Column(name = "speed")
    private int speed;

    @Column(name = "stamina")
    private int stamina;

    @Column(name = "start")
    private int start;

    @Column(name = "fastest100m")
    private double fastest100m;

    @Column(name = "fastest200m")
    private double fastest200m;

    @Column(name = "fastest400m")
    private double fastest400m;

    @Column(name = "lastRaceTime")
    private double lastRaceTime;

    @Column(name = "name")
    private String name;

    public Player() {

    public Player(int acceleration, int age, int endurance, int form, int mental, int speed, int stamina, int start, String name) {

        this.acceleration = acceleration;
        this.age = age;
        this.endurance = endurance;
        this.form = form;
        this.mental = mental;
        this.speed = speed;
        this.stamina = stamina;
        this.start = start;
        this.name = name;
        fastest100m = 15.0;
        fastest200m = 30.0;
        fastest400m = 60.0;
        lastRaceTime = 100.0;


    public void setId(int id) {
        this.id = id;

    public void setAcceleration(int acceleration) {
        this.acceleration = acceleration;

    public void setAge(int age) {
        this.age = age;

    public void setEndurance(int endurance) {
        this.endurance = endurance;

    public void setPlace(int place) {
        this.place = place;

    public void setForm(int form) {
        this.form = form;

    public void setMental(int mental) {
        this.mental = mental;

    public void setName(String name) {
        this.name = name;

    public void setSpeed(int speed) {
        this.speed = speed;

    public void setStamina(int stamina) {
        this.stamina = stamina;

    public void setStart(int start) {
        this.start = start;

    public void setFastest100m(double fastest100m) {
        this.fastest100m = fastest100m;

    public void setFastest200m(double fastest200m) {
        this.fastest200m = fastest200m;

    public void setFastest400m(double fastest400m) {
        this.fastest400m = fastest400m;

    public void setLastRaceTime(double lastRaceTime) {
        this.lastRaceTime = lastRaceTime;

    public int getAcceleration() {
        return acceleration;

    public int getAge() {
        return age;

    public int getEndurance() {
        return endurance;

    public int getPlace() {
        return place;

    public int getForm() {
        return form;

    public int getMental() {
        return mental;

    public String getName() {
        return name;

    public int getSpeed() {
        return speed;

    public int getStamina() {
        return stamina;

    public int getStart() {
        return start;

    public int getId() {
        return id;

    public double getFastest100m() {
        return fastest100m;

    public double getFastest200m() {
        return fastest200m;

    public double getFastest400m() {
        return fastest400m;

    public double getLastRaceTime() {
        return lastRaceTime;

    //Method to print out runner's Last race type, time and place
    public String getLastRace() {

        double time = getLastRaceTime();
        String race = "";

        if ((time < 70 && time > 24)) {

            race = "400m";
        } else if ((time < 35 && time > 15)) {

            race = "200m";
        } else if ((time < 15)) {

            race = "100m";

        return race + " with a time of " + time + " and placed " + getPlace();

    //Prints out name, attributes and fastest times
    public String toString() {

        return name + " Acceleration:" + acceleration + " Speed:" + speed + " Start:" + start + " Stamina:" + stamina + " Form:"
                + form + " Endurance:" + endurance + " Mental:" + mental + "n100m Overall:" + Math.round(overall100m() * 100.0) / 100.0
                + " 200m Overall:" + Math.round(overall200m() * 100.0) / 100.0 + " 400m Overall:" + Math.round(overall400m() * 100.0) / 100.0
                + "nFastest 100m: " + getFastest100m() + " Fastest 200m:" + getFastest200m() + " Fastest 400m:" + getFastest400m() + "n";

    //Calculates overall for 100m
    public double overall100m() {

        double acceleration = 2 * this.acceleration;
        double speed = 1.5 * this.speed;
        double start = 1.25 * this.start;
        double form = this.form;
        double endurance = .75 * this.endurance;
        double stamina = .4 * this.stamina;
        double mental = .1 * this.mental;
        double ovr = acceleration + speed + start + form + endurance + stamina + mental;

        return ovr;

    //Calculates overall for 200m
    public double overall200m() {

        double acceleration = 1.5 * this.acceleration;
        double speed = 2 * this.speed;
        double start = .3 * this.start;
        double form = 1.0 * this.form;
        double endurance = 1.30 * this.endurance;
        double stamina = .7 * this.stamina;
        double mental = .15 * this.mental;
        double ovr = acceleration + speed + start + form + endurance + stamina + mental;

        return ovr;

    //Calculates overall for 400m
    public double overall400m() {

        double acceleration = .8 * this.acceleration;
        double speed = 1.1 * this.speed;
        double start = .2 * this.start;
        double form = 1.3 * this.form;
        double endurance = 2.5 * this.endurance;
        double stamina = .7 * this.stamina;
        double mental = .4 * this.mental;
        double ovr = acceleration + speed + start + form + endurance + stamina + mental;

        return ovr;

virtualization – VMware Player si not opening virtual machines

I’ve ordered someone to set up a virtual machine for me because I had vmmon and vmnet issues. We managed to go through that and open a virtual machine properly, but when the virtual machine needs to restart, there’s nothing we can do to open it again.

The VMware menu doesn’t show the virtual machine on display, it shows the .vmx file in the ‘Open a virtual machine’ option but it can’t open it. There are no error messages appearing.

I have the latest version of Ubuntu ‘21.04’, and the latest version of VMware Workstation Player ‘16.1.2’. Dell Inspiron 3668.

unity – How to make Player consistently jump *to* a specific target rather than *towards* it?

I’m trying to make it so if my player hits “E” then they jump precisely to a specific target. The current code results in player jumping towards the target but not really making it there.

I’ve tried adjusting forceMultiply and ForceMode and adding an offset but I just can’t get a result that simply consistently launches the player’s rigidbody rb towards the anchorPoint position.

The code I have is:

private void Update()
    if (Input.GetKeyDown(KeyCode.E))
        tryGrabbing = true;

private void FixedUpdate()
    if (tryGrabbing)
        rb.AddForce(anchorPoint.transform.position * forceMultiply, ForceMode.Impulse);

Thank you for any help!!

physics – (Unity 3D) How to make Player consistently jump *to* a specific target rather than *towards* it?

I’m trying to make it so if my player hits “E” then they jump precisely to a specific target. The current code results in player jumping towards the target but not really making it there.

I’ve tried adjusting forceMultiply and ForceMode and adding an offset but I just can’t get a result that simply consistently launches the player’s rigidbody rb towards the anchorPoint position.

The code I have is:

private void Update()
    if (Input.GetKeyDown(KeyCode.E))
        tryGrabbing = true;

private void FixedUpdate()
    if (tryGrabbing)
        rb.AddForce(anchorPoint.transform.position * forceMultiply, ForceMode.Impulse);

Thank you for any help!!