Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content


This module can be used to assign some data to an entity from the GraphicEntityModule. The data will be displayed in a tooltip when the mouse cursor hovers over the entity on screen.

You may change the assigned data of each entity once per game turn.


⚠ This module requires the GraphicEntityModule to work.

Add the dependency in the pom.xml of your project.


And load the module in your config.js.

import { GraphicEntityModule } from './entity-module/GraphicEntityModule.js';
import { TooltipModule } from './tooltip-module/TooltipModule.js';

export const modules = [


@Inject TooltipModule tooltips;

public void init() {
  // adding a tooltip to an entity
    tooltips.setTooltipText(myEntity, "the tooltip text linked to this entity");

  // removing the tooltip from an other entity

  // getting the tooltip text associated to an entity
    String text = tooltips.getTooltipText(myEntity);
  // in this case text will now be "the tooltip text linked to this entity"
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content