Mods / Salary Coin

Tags:
Economy
Author:
Maz
Side:
Both
Created:
Sep 16th at 11:39 PM
Last modified:
1 day ago
Downloads:
54
Recommended download (for Vintage Story 1.22.0 - 1.22.7):
salarycoin_v2.0.2.zip  1-click install

Mod crée pour le serveur francais   Vintage RôlePlay - Chapitre 1 : Prima Insula, Rejoignez nous !

English

A leather coin purse for every player, and a regular salary for the time spent on the server. Coins are AnyCoin coins; the purse keeps their value, shows where every coin came from, and lets other mods pay into it. Made for roleplay servers with a closed economy, for Vintage Story 1.22.7.

New in 2.0: a full rework

  • A purse that counts value, not coins. A 10-coin is worth 10, a 100-coin is worth 100. The purse is kept by the server, so it can be paid even while its owner is offline. Purses from 1.x are carried over automatically, at their real value.
  • A leather and parchment window (key B or /bourse): your balance, a pocket to drop coins in (your inventory opens next to it), the seven AnyCoin coins to take out with a click (shift-click: ten), or any amount you type.
  • Salary at a glance: a live countdown to the next pay day, today's quota as a bar, and when it resets.
  • A statement: every movement with its time and the balance after it: salaries, deposits, withdrawals, and the lines written by other mods.
  • An on-screen counter under the map: your balance, each gain or expense for a few seconds, otherwise the time to the next salary. It can be hidden.
  • Talks to other mods. With Contrats & Gages, contract pledges, rewards, refunds and offerings go through the purse and appear in the statement; the purse also shows the coins pledged in your contracts, your contracts in progress and the rewards waiting for you.

Commands

  • /bourse opens the purse; /bourse retirer [amount] and /bourse deposer.
  • Staff (controlserver, also from the console): /bourse voir, crediter, debiter [player] [amount]. Every correction is written in the player's statement.

Configuration

In ModConfig/salarycoin.json: coins per pay day (10), seconds between pay days (900), daily quota (40, reset at midnight UTC), log line, optional chat message, statement length. Each player can move or hide the counter in ModConfig/salarycoin-client.json.

For modders

No reference needed: the purse answers on the game's event bus. salarycoin:credit and salarycoin:debit (uid, amount, kind, lang key and arguments of the statement line), salarycoin:balance, salarycoin:ping; the purse pushes salarycoin:changed after every change and salarycoin:summary when a purse opens, so your mod can add its own lines. Details in the README.

Requirements

Server and client: install it on the server; players download it automatically. English and French, with a guide in the handbook. AnyCoin by Vyp3rG0d; no files from it are included. Salary Coin is under the MIT license.


Français

Une bourse de cuir pour chaque joueur, et un salaire régulier pour le temps passé sur le serveur. Les pièces sont celles d'AnyCoin ; la bourse garde leur valeur, montre d'où vient chaque pièce, et les autres mods peuvent y verser. Pensé pour les serveurs RP à économie fermée, pour Vintage Story 1.22.7.

Nouveau en 2.0 : une refonte complète

  • Une bourse qui compte la valeur, pas les pièces. Une pièce de 10 vaut 10, une pièce de 100 vaut 100. La bourse est gardée par le serveur : on peut la remplir même quand son propriétaire est déconnecté. Les bourses de la 1.x sont reprises automatiquement, à leur vraie valeur.
  • Une fenêtre de cuir et de parchemin (touche B ou /bourse) : votre solde, une poche où glisser des pièces (votre inventaire s'ouvre à côté), les sept pièces AnyCoin à retirer d'un clic (Maj + clic : dix), ou la somme de votre choix.
  • Le salaire en un coup d'œil : compte à rebours jusqu'au prochain versement, quota du jour en barre, et heure de sa remise à zéro.
  • Un relevé : chaque mouvement avec son heure et le solde après coup : salaires, dépôts, retraits, et les lignes écrites par les autres mods.
  • Un compteur à l'écran sous la carte : votre solde, chaque gain ou dépense pendant quelques secondes, sinon le temps avant le prochain salaire. Il se masque.
  • Parle aux autres mods. Avec Contrats & Gages, mises en gage, primes, remboursements et oboles passent par la bourse et s'inscrivent au relevé ; la bourse montre aussi l'argent en gage dans vos contrats, vos contrats en cours et les primes qui vous attendent.

Commandes

  • /bourse ouvre la bourse ; /bourse retirer [montant] et /bourse deposer.
  • Staff (controlserver, aussi en console) : /bourse voir, crediter, debiter [joueur] [montant]. Chaque correction est inscrite au relevé du joueur.

Configuration

Dans ModConfig/salarycoin.json : pièces par salaire (10), secondes entre deux salaires (900), quota du jour (40, remis à zéro à minuit UTC), ligne au journal, message de chat facultatif, longueur du relevé. Chaque joueur peut déplacer ou masquer le compteur dans ModConfig/salarycoin-client.json.

Pour les moddeurs

Aucune référence nécessaire : la bourse répond sur le bus d'événements du jeu. salarycoin:credit et salarycoin:debit (uid, montant, nature, clé de langue et arguments de la ligne du relevé), salarycoin:balance, salarycoin:ping ; la bourse envoie salarycoin:changed après chaque changement et salarycoin:summary à l'ouverture, pour que votre mod y ajoute ses lignes. Détails dans le README.

Prérequis

Serveur et client : à installer sur le serveur ; les joueurs le téléchargent automatiquement. Français et anglais, avec un guide dans le manuel. AnyCoin par Vyp3rG0d ; aucun de ses fichiers n'est inclus. Salary Coin est sous licence MIT.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
2.0.2 salarycoin
1.22.0 - 1.22.7
7 1 day ago salarycoin_v2.0.2.zip 1-click install

Compatibility 1.22.x

2.0.1 salarycoin 3 1 day ago salarycoin_v2.0.1.zip 1-click install

crash fix

2.0.0 salarycoin 2 1 day ago salarycoin_v2.0.0.zip 1-click install

Major UI / UX update

1.2.9 salarycoin 13 3 days ago salarycoin_v1.2.9.zip 1-click install

If the player has remapped the key, they will see its actual keybinding instead of B—the client resolves this itself via `capi.Input.HotKeys[“coinpurse”].CurrentMapping`.

1.2.7 salarycoin 3 3 days ago salarycoin_v1.2.7.zip 1-click install

What's been added:

DailyMaxCoins in the config (default: 40) — set to 0 to disable the limit.
Tracker salarycoin_daily in the player's WatchedAttributes: stores the current date (UTC) and the total earned. Automatically resets to zero at midnight UTC.
If the player has reached their limit, GiveToPurse returns 0 without giving any coins or displaying a salary message—no spam.
The receipt message displays the actual amount received (useful if the last payment of the day is partial, e.g., 6/10 to stay under 40).

Translated with DeepL.com (free version)

1.2.6 salarycoin 26 Sep 16th at 11:47 PM Empty salarycoin_v1.2.6.zip 1-click install

Disclaimer

By downloading a mod you consent to our Terms of Use.

We tell you this specifically because we want to make sure you are aware that we cannot validate every mod, and you are responsible for any damages you might incur by installing or loading mods.

This prompt will not be shown to you again (for the current browser session) if you proceed.


4 Comments (oldest first | newest first) (threaded | flat)

DilanRona, Sep 17th at 4:40 AM

Thank you

Michaloid , Sep 17th at 12:23 AM

Hello! Please add an english description as well.

Maz , Sep 17th at 12:33 AM
@Michaloid: Hello! Please add an english description as well.

Yeah Sure sorry !

Michaloid , Sep 17th at 2:00 AM
@Maz: Yeah Sure sorry !

No problem. Thank you. If you want to, you can also include the description in the language you prefer. But English is a requirement.