The International Simutrans Forum

 

Author Topic: Total Asset Value?  (Read 378 times)

0 Members and 1 Guest are viewing this topic.

Offline knotwork

  • *
  • Posts: 28
  • Languages: EN
Total Asset Value?
« on: November 30, 2020, 03:31:40 AM »
Does the game "know" the total current value in "local currency" (whatever value is measured/accounted in within an instance of the game)?

If so, is there a way/place whereby a shell script can obtain that metric?

If not, would a tool that, pointed at a saved game (or its log!), returns the total asset value be a relatively trivial/easy tool to build?

Apparently there are or can be un-owned assets so it seems it is not as simple as adding up the assets of all the players including the public player, but maybe the game keeps a total for "the" unplayer, as it were? So then one culd add up all of those and be done?

(I am not concerned about potential mineral resources potentially obtainable by mining the terrain and items like that, just how much game money is in that game instance including game money that is "in asset form".)
 
Total Liquidation Value could also possibly be interesting or useful if known or easily knowable, but is not essential since a discrepancy between total coins issued and total coins actually still in circulation not lost forever due to lost private keys or whatever is common in the cryptocurrency world and I usually just use total number of coins minted as a figure to divide total "treasury" (assets) by to arrive at a value per coin for purposes of computing conversion rates between different currencies.

(The converse of "market cap", in effect. Take the total assets as "market cap" and divide it by the number of units of currency.)

Some applications for such a tool include such things as being able to assign a "kitty" or "treasury" of some arbitrary currency to an instance of the game and be able to divvy it up in proportion to each player's, or each "winning" player's, holdings-as-a-fraction-of-total-game-worth.

So it would not be just for embedding a game within a meta-game that this could be useful, except of course to the extent that a tournament or suchlike can I suppose technically be considered a metagame in its own right.

-MarkM-
« Last Edit: November 30, 2020, 05:29:38 AM by knotwork »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10528
  • Languages: De,EN,JP
Re: Total Asset Value?
« Reply #1 on: November 30, 2020, 04:58:59 AM »
For embedding, I think the use of the Simutrans scripting engine is the best choice. THat has access to almost any of the parameters ingame, and can selectively set or enforce actions.

However, in extended the script engine is not working, as far as I know.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Total Asset Value?
« Reply #2 on: November 30, 2020, 11:15:03 AM »
Simutrans (including Simutrans-Extended) is not generally designed to export data to the command line, except what is necessary for online multi-player games using the nettool interface. Scripted scenarios can interact with certain values, but, as Prissi points out, this feature has never been fully integrated into Simutrans-Extended.

There is not a system of keeping track of the value of unowned items, not least because many such items (e.g. industries, rivers, trees, ground objects such as rocks and ponds) do not, in fact, have any value assigned to them as the player never needs to interact with them financially.

The value of each player company is ascertainable in Simutrans-Extended, as there is an option for one player to be able to take over another player, and this requires the cost of doing this to be calculated.

The currency in Simutrans is known as SimuCents, incidentally.

Offline knotwork

  • *
  • Posts: 28
  • Languages: EN
Re: Total Asset Value?
« Reply #3 on: November 30, 2020, 11:46:45 AM »
Thank you both.

I have have been looking into the scripting, it does seem more than adequate to work with.

I think all I (or who-ever decides to put up a kitty) will miss out on from unowned things not being counted is automatically having a residual value (kitty/collateral) for the remaining map once all players have been "paid off".

That is really very trivial since they are free to provide any value to what is left simply by pouring in more of whatever arbitrary currency they are using for the kitty.

In fact I imagine from the point of view of a player on the map it makes more sense that paying off all the players (who qualify) leaves nothing in the kitty.

From the outside it maybe looks a little strange (a whole planetoid, trees empty factories and all, totally free?!?) but that is an artifact of only assigning a value to a virtual world, game, item, object etcetera based on how much "actual" collateral is, basically, "being represented in the form of" that virtual whatever, based on your view of what is "actual".

(To the cryptocurrency moguls only the "hard currency", the coins on the blockchain, are "actual", all the rest is just "window-dressing" making a particular pile of coins have some kind of storyline or whatever whereby they are "appearing in the form of" virtual things.

-MarkM-