News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Using a "larger" game as "setting" for a Simutrans game

Started by knotwork, November 29, 2020, 09:55:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

knotwork

This thread, while a general how one could embed aka "set" a Simutrans game "within" some larger context / game / metagame thread, is intended to hopefully further the goal of setting Simutrans games within the context of the Galactic Milieu.

And before anyone asks, yes I am familiar with the Julian May novels and no the Milieu I mean is not specifically, only, or, so far, really even partly, about that particular setting. The name is more along the lines of an homage or tip of the hat than an indication the meta-game is actually based on that series of literary works, just as my Graphic Omniscient Device was more a tip of the hat than an actual simulation or emulation.

So. In the course of another topic, jamespetts recently wrote "As to the idea of integrating Simutrans-Extended and other games into a meta-game, that is very interesting in theory, but I am not sure how one might achieve it in practice."

That (how one might achieve it in practice) is precisely what this thread is intended to explore.

However, since he also, in that same post, mentioned "comfort levels"; and I have recently been reading some discussions on this forum that seem to imply there are in fact five "classes" of passengers implemented by at least one Simultrans-Extended modpack; and that to at least some extent said "classes" do seem somewhat akin to "comfort levels" in some sense; and the fact that a long back-burner'd "Java play by email client for the Galactic Milieu" also features in a sense "classes" of passengers; I figured I'd start by continuing to discuss the comfort levels concept.

That old play-by-email client and its associated server basically implement planets on which you can build businesses and which can develop populations that need, according to their "class", different supplies in order to maintain their standard of living and possibly thereby their jobs.

Each business needs X number of executives (first class people), Y number of managers / supervisors / foremen (second class people) and Z number of worker-drones, labourers, whatever, the third class people.

The businesses need to pay the people enough for those people to maintain their standard of living, since each class of people needs or demands its own class of life-support: three classes of housing, three classes of food and so on.

Presumably if that includes clothing (I cannot recall after all these years) one cannot hope to get/keep a job as an executive without proper executive attire, and so on.

Since the players also stock the "stores" (markets) with goods, offering them at any price they choose, presumably the player owning the business might be able to put the needed stuff into the local market at low enough price that the employees can afford their appropriate lifestyle. But in that particular subgame / rabbithole the players are usually captains of starships, shipping freight and passengers from planet to planet, so they put stuff in the market at prices typically higher than they bought it for elsewhere, and buy up anything that is cheaper than elsewhere to ship it elsewhere and profit by selling it there at a higher price than they get it for here.

So although presumably initially the starships came looking for what the factories on that planet are making, and likely also to sell to them the materials they need to make whatever they make, nonetheless if a business offered stuff at too-low price to keep their own employees from having to be paid more to keep their employees in appropriate condition for the class of job they hold, presto these starship captains would likely bollox that idea right up by snapping up all the cheap food clothing and shelter-units you had intended for your employees.

So anyway, one potential way a Simutrans game could be plugged into the Milieu would be as pretty much a non play-by-email version of much the similar kind of subgame.

To get down to nitty-gritty, maybe each Simutrans game instance could be a planetoid (which reminds me, can it do maps that wrap?) and each starship could appear on the map something like a new player joining the game, with their ship or cargo-shuttle or whatever being placed as a headquarters; they could ship stuff back to their own ship, and at some point fly off with all the stuff they shipped to themselves.

Further details, especially the matter of compensating the denizens of the planetoid for what the outsider took off the map aka out of the subgame, obviously need some thought... ;)

-MarkM-

jamespetts

Interesting. Did you plan to make any changes to Simutrans-Extended's code and/or paksets to allow for this, or did you just envisage that one would set up a Simutrans-Extended game and imagine it being part of the Galactic Milieu universe?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

knotwork

#2
I try for "minimum necessary change".

For example FreeCiv lacked Starships so I created the Galactic Ruleset.

That is, no code changes and unlike an actual modpack no graphics, just pure textfile, the rules, referencing only existing images.

Thus no new nations (they would need flags hence images thus be a modpack not a ruleset, terminologically), so the FreeCiv representation we use for a civilisation of "Ancients" is FreeCiv's pre-existing "Antarcticans" and the represenation for E-for-Evil nasties in case player versus environment needs, for dramatic purposes, a nasty, we use FreeCiv's pre-existing "Egyptians", with a nod and a wink to the "Stargate" mythos.

The anticipated minimum necessary change some day to FreeCiv's actual code is something to make Starship travel easier to accomplish than by saving the games of the origin and destination worlds, hacking the savegame files to move the Starships and contents to their destinations, then re-starting the games.

Possibly though we might just make a Lua script hooked by disbanding a unit and assume that by disbanding a Starship you mean send it off-planet rather than cash it into resources. Though I don't know offhand how tricky it might be from Lua to catch the resources so they don't go to the city you disbanded at. Maybe though if that can be done from Lua it can also pop up a dialog asking if you want to really disband for real or simply leave the planet.

Then the Lua would leave a note to the hack-the-savegame-files shell scripts and the actual voyage would take place over the monthend when the servers save the turn and go down for monthend processing before starting up for the next month's turn.

(It is assumed game time will run about 12 times as fast as planet-known-as-Earth time; CoffeeMUD does that easily, Crossfire-RPG doesn't seem far off that and if it is maybe can be adjusted. FreeCiv players do however regard a game with only one day per turn to be a "long game" so one month per gameyear likely will seem extraordinarily long to many.)

But the thing is, you only need concern yourself with the FreeCiv scale if it impacts you enough for you to consider it worthwhile to become a citizen of a FreeCiv civilisation and (assuming it is a Democracy) vote to influence its actions or (if it a Despotism) maybe try to assasinate the current despot and take that job, or whatever. For roleplaying gamers accustimed to operating at individual-character scale the whole larger nation world and so on and maybe even the city whose sewers you are exploring killing rats looking for rumoured irradiated crocodiles or even some kind of alien "dragon" or whatever is all kind of shrug who cares, all that matters is it has a shop where dungeoneering equipment can be bought...

Part of the point of integrating different games is so that instead of having a high level deathstar in a galaxy cost about the same as a high level ranger or mage or whatever would cost in something like World of Warcraft the fact that you'd have to smelt down a heck of a lot of swords and shields and greaves or whatever to get just the metal towards building a deathstar can actually affect the relative prices of swords as compared to deathstars.

When games are separate universes, it tends to be that a minor purchase in one game costs about the same in planet known as Earth (also as Sol III) currency as a minor purchase in another, which just doesn't seem right (to me at least) especially on worlds where virtually everyone can see simply from the fact that the number of Civilisations purported to exist on this mythical "Earth" place is crazy-high, way beyond what any (FreeCiv) planet in any known galaxy has ever been known to have achieved, that Earth is just a myth, albeit an extraordinarily pervasive myth. (FreeCiv's limit on civilisations used to be lower than it is now, and even now I am not sure offhand whether it allows as many as this planet known as Earth place is purported to have.)

-MarkM-

jamespetts

Interesting. Do let us know how you get on with this project!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

knotwork

Well I think a lot of it depends upon this new-fangled "cryptocurrency" stuff.

Back in the old days before the internet, when dialup modem BBSs were the thing and I put literally billions of galaxies full of "Traveler"-like planets onto a single Apple IIe disk by virtue of the magick of predictable pseudo-random nuimbers, I had assumed that it was ridiculous to imagine some kind of universal "credits" that worked everywhere, because, for example, suppose blockades were a thing?

So back then when a starship left a planet any "local currency" got left behind as a "tip" to the starport, not-incidentally clearing the starship's "local currency" field ready for the next planet. It was the actual goods in your cargo bays that carried value with you from planet to planet, and every planet's price-list could be displayed in terms of any item on that list as well as defaulting to the random local currency having a random value relative to an internal value never actually displayed but used by the code and having a currency name built, like planet names, from pseudorandom phonetic characters. Thus usually it turned out to be convenient to display prices in terms of tons of fuel, since (almost) every starship needed fuel.

When in searching for trading software, even if it need be only trading of things that stay in place when you trade them ("I'll give you so much of this here for so many of that over there"), figuring a transport baron overlay could be added later to introduce actually moving what you bought at one place to some other place, I stumbled upon the newfangled "Bitcoin" I was elated!

Here at last was the potential to have an interstellar currency that did not require actually being able to carry something other than pure data from starsystem to starsystem! A blockade would have to block communications not just block starships! Wow! Time to reconceive the possibility of interstellar currencies!

Cryptocurrency also seems ideal for passing between games, since it requires no central server and likely no individual game can really hope to control it. I was particularly happy when a bunch of "Sci-Fi themed" cryptocoins came out, such as Gold Pressed Latinum (GPL), Universal Federation Credits (UFC), Klingon Empire Darseks (KED) and so on, later followed up by United Sci-Fi Coin or Universal Sci-Fi coin or maybe it is Unified Sci-Fi coin (USF to me, SCIFI on some exchanges) that let people carry-over value from the older coins that maybe were not being "mined" heavily enough to be considered "secure" blockchains.

Because of cryptocurrencies, it really does seem feasible now to have Deathstars actually cost a heck of a lot more than swords, even fairly legendary-grade magick swords; because of the simple fact that virtual items can be as it were "backed" or "underlain" by cryptocoins, so that when you are buying a Deathstar you are implicitly buying a very very large pile of crypocurrency "in deathstar form" as it were...

-MarkM-

Vladki

I think there were similar ideas before. The aim was to simulate very-long distance travel (and cargo delivery), for which the size of map would be too large. Although there is no strict limit on map size, the limit is practical in how much RAM and CPU power you have.  One of the ideas how to simulate such long distance travel was to create "fake factories or sea/air-ports" that will produce imported exotic goods in exchange for local exported goods. That could be the way to go, if we could interact with factories using some external lua script. Take this as a bit of brainstroming...

Imagine a factory - inputs are goods to be exported from the game (island or planet). Outputs are goods to be imported to the game. Production (and all boosts) is 0 to disallow the factory from normal operation (if by chance all inputs are supplied). I'm not sure if the game would accept a factory, with inputs and outputs being the same and consist of all possible goods.

But now the hard part comes in - the external script would have to check what goods are supplied to these special factories, report that to the "meta game", which will deal with inter-continental / inter-planet transport. Demand could be detected by checking if the special factory is linked as supplier to some other factories, and checking what sort of goods they need.  Then, when the virtual spacecraft (or whatever) will arrive, the script will change the input and output storage of the special factory. But there is lot of obstacles to solve:

1. is it possible to interact with the game in this way at all? i.e. read the input storage, and connections of a factory _and_ to modify the output storage? Even the read operation may be feasible, I really doubt about the modify operation, because of #2
2. Externally modifying the game will break network games (clients will desync), unless this is added to the network communications. Clients do their own simulation of most stuff.
3. It would be necessary to block this special factory from being built automatically when industry density is increased. It will have to be built manually and linked to local industries. Otherwise one could end up with game where all goods are supplied by these "space ports". I had similar problem with recycling center - I ended up with world with no mining industry, everything was provided by recycling waste ;-)
4. No idea how the game would cope with a factory with same goods as both input and output.
5. The price of the goods is not simulated in simutrans. Players are paid only for transporting them. So there is no way to tell if some good is more valuable in one game than in another.

I thought about the space-port being a "station" in simutrans, but that would be even bigger problem. Goods are routed based on contracts between factories. So unlike in OpenTTD you cannot just go to the coal mine, load coal and drop it off wherever you want.  But ... that would make OpenTTD better candidate for such feature. A special (sea/air/space-port) that would be a station. In OpenTTD you can "force-unload" goods there, and stuff could "magically" (dis-)appear there. Also passengers are quite happy to get off on the first stop where you get them, (unless some interesting changes in openttd happened), so it would be also quite ease to get people and mail to the space-port and have some appear there as well.  However problems #1 and #5 will remain in OpenTTD too.

And one more thing - regarding point #3: automatically generated industries is simutrans always generate the whole chain - from primary resources to consumers (shops). So there would be no need for importing goods from other worlds. Unless you somehow force the game to create incomplete industry chains, or completed by this "joker" industry. But a careful balancing would be necessary to reduce the probability of this special industry so that only a small fraction of goods has to be imported.

knotwork

#6
Thank you! Yes let us brainstorm! :)

As to similar ideas before, see the post-subsection (not at all sure I can link to a subsection just the whole post) Portals/overseas destinations.

One thing about players, and possibly also for all I know maybe about Ministers of War and Logistics and suchlike folks, is they can sometimes be observed to not actually really find the modern "anonymous" market to be ideal for them; I think often they would actually prefer to see each individual offer regardless of price, {so as | and} to be free to choose to deal with their allies rather than with folks who might not be their best of friends. (Why supply your enemy's war-machine with its raw materials, for example...)

I also found when researching trade-in-place (no transport layer yet, first just trade stuff right where it is) and serendipitously stumbling upon Bitcoin in the process that for players contemplating playing merchant princes or auction-house tycoons type of thing, that they too would really prefer to be wheeler-dealers getting however much they could get for goods consigned to their warehouses for sale rather than go ahead and give the seller a higher price than they asked for merely because the house wheeler-dealer managed to attract a buyer willing to pay more. So again, the modern market like most online cryptocoin "exchanges" for example, or I suppose as is probably usual in stock-markets and forex-markets worldwide, did not really seem ideal from the perspective of the position the players would be expected to play.

So, lacking a market onto which goods get put with prices to be compared by price by potential buyers need not, I suspect, be a dealbreaker here. There might be something to be said for contracts, even.

Admittedly, Simutrans and maybe OpenTTD too don't really seem to worry too much about war; maybe their planets / islands are best left behind friendly lines. (Or if behind enemy lines, just don't let on to the natives that you're from that far far away. ;))

I think from what I have been reading that a factory can have at most two outputs and at most three inputs.

If clients are to not think the server is cheating, we'd need the clients to expect inputs the natives put in to just plain vanish, poof, gone. (But how would we then ever even know there had ever even been any input?)

There already exist factories whose outputs "come from no-where", clients ought not freak out if we have an alien-productry factory producing alien products of some kind; they just might have trouble figuring out what kind of industry to pop up to take that stuff as inputs. :)

But still, a factory might not be the best "model". Maybe a depot that in open to the universe mode can create vehicles already full of something? That'd be a pak, the clients would have to run the same pak, so they'd be expecting vehicles to be able to be bought pre-loaded with cargo.

That would bring us back to "how much are Simucents actually worth 'out there'?"

Which as I was mentioning earlier in a thread not so very far from here, could lead to curiosity about the value of the whole kit and kaboodle, up to possibly even the whole planetoid planet or island, trees, abandoned buildings and all? For which see said other thread.

Such a depot might suffice in not actually open to the universe at large mode; it could accustom players and clients to buying stuff that came from no-where, at least; but in open to the universe mode we'd at least need to know how many Simcents vanished via that mechanism and, if the universe "out there" is not someone along the lines of FreeCiv's "Hacker" civilisation as the Galactic Milieu portrays them ("any sufficiently advanced technology is indistinguishable from magic"), also how much of what was in all pre-loaded vehicles that were bought.

Doubtless a lot more I could type, but that might be food enough for thought for now. :)

-MarkM-

EDIT: There almost have to be things the server does get to "make up"? If it claims a new player joined for example do all the other clients conduct their own interrogations of the new player's client to prove to themselves the server isn't just making one up? What about the server firing up A.I.s hence scripts, do all A.I.s that are going to participate have to already be up and running before anyone joins? Maybe our "otherworldly agency" has to be the public player?

Vladki

Quote from: knotwork on November 30, 2020, 11:50:31 PMI think from what I have been reading that a factory can have at most two outputs and at most three inputs.
I do not think there is any such limit. Just that the industry chain builder does not like loops in the production (i.e. consuming and producing the same stuff).

Quote from: knotwork on November 30, 2020, 11:50:31 PMAdmittedly, Simutrans and maybe OpenTTD too don't really seem to worry too much about war;
Simutrans has an explicity policy forbidding any war related industries and transport. Also there are no accidents or disasters in Simutrans (while they exist in openttd).


Quote from: knotwork on November 30, 2020, 11:50:31 PMThere already exist factories whose outputs "come from no-where", clients ought not freak out if we have an alien-productry factory producing alien products of some kind; they just might have trouble figuring out what kind of industry to pop up to take that stuff as inputs. :)
The primary resource factories (mines, farms) produce goods in deterministic way. So each (network game) client runs its own simulation, and this MUST result in the same production rate on all clients. If it deos not (due to a bug), client will desync and disconnect.  The only non-deterministic events are player actions. So these are the only things communicated between server and clients.  But not even the public player can affect factory production, or make goods appear out of nowhere.  A.I. scripts can join the game at any time, but their actions would be limited to whatever any other player can do.

Using depots is also out of discussion - any cargo on vehicle that is send to depot will disappear. You cannot buy pre-loaded vehicle.

knotwork

Well maybe all we can do then is provide mod-paks then examine the map afterward to see how things went.

Like maybe just provide a new chain of industry, from a "spaceport" or "offplanet trader's landed cargo-shuttle" to a "curiosity shop" selling "offworld trinkets" to the civilians. (Glass beads? Firewater? Whatever... ;))

I guess I have to go take a deeper dive into OpenTTD now than I so far have...

-MarkM-