Dirtsand on a VPS

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Re: Dirtsand on a VPS

Postby Surta » Thu Jul 23, 2020 1:37 pm

Oh thank you Chuckles! That is a VERY useful page, it's bookmarked. Meanwhile, I think I have enabled them all... now going in to collect :D Thanks again Hoikas for the pointers!

Edit; well, I got 10 so far. One I don't have access to yet because I haven't finished the multiplayer age yet and the other is off limits in the Great Zero, boo hoo! :cry:
Surta
 
Posts: 83
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Surta » Mon Jul 27, 2020 10:19 am

Ok, I hope you guys won't mind me jumping to the next "phase" of my self imposed project - I can create a new thread if you wish.

So, with the server, client and everything working (well, 99.9%), I would love to learn more. I found this page: https://guildofwriters.org/wiki/DIRTSAND and I really like the "clients" command because it shows who is online (currently either one of basically two players, haha). I also noticed that Gehn has this message "there are currently x explorers in the cavern".

I am not unfamiliar with setting up php pages and I think I should be able to create a connection to PostgreSQL and create a web page, but would I be imposing if I asked you to share the content of your page? I know this doesn't fall under the header of "open source" but I'm hoping you are willing to share the content of the file anyway :D

Side note: I don't want to to ask questions that have already been answered in the past, so usually I try some research before I ask things. In fact I read back almost to 2012 but it seems setting up custom shards hasn't been very popular, am I right? I would have thought those would be pretty basic setups to share information about, but it doesn't seem it's ever been asked before :lol:
Surta
 
Posts: 83
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Surta » Tue Jul 28, 2020 5:18 pm

Aaandddd, I am back, this time with a real bug again (I think).

So I finally managed to create an external client - with the help of your updated instructions. The reason why I wanted that, I finally got into the shard with another player and we could hardly chat, when we type the letter L it displays a log file and other letters suddenly change the angle of viewing etc.

I figured that I'd need to build an external client after all, which went well. But with that client I can't get any further than the startup screen, and the Python log reads

(07/28 16:40:38) Python 3.8.3 Main init failed!!
(07/28 16:40:38) init_fs_encoding: failed to get the Python codec of the filesystem encoding
(07/28 16:40:38) Python file xKI.py was not found.
(07/28 16:40:39) Python file stupStartUp.py was not found.


So, I figured it would be time to finally build that python.pak and tried to build the build the files, but I'm getting this error (on each file, I just copied the last files):

SyntaxError: invalid syntax
== Packing PlasmaNetConstants, ......blast! Compile error in PlasmaNetConstants!
File "PlasmaNetConstants", line 116
print "Class %s is not derived from modifier" % (cl.__name__)
^
SyntaxError: invalid syntax
== Packing PlasmaTypes, ......import failed ......blast! Compile error in PlasmaTypes!
File "PlasmaTypes", line 201
print "Unrecognized event type %d" % (event[0])
^
SyntaxError: invalid syntax
== Packing PlasmaVaultConstants, ......blast! Compile error in PlasmaVaultConstants!
File "PlasmaVaultConstants", line 180
print "Class %s is not derived from modifier" % (cl.__name__)
^
SyntaxError: invalid syntax
== Packing ptWordFilter, ......import failed ......blast! Compile error in ptWordFilter!
File "ptWordFilter", line 222
print "Class %s is not derived from modifier" % (cl.__name__)
^
SyntaxError: invalid syntax

Python Package written to D:\URU\Python\python.pak


The python.pak file is only a few kb and according to PlasmaShop it isn't a valid .pak file, so I'm not sure how to build the python.pak file?
Surta
 
Posts: 83
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Tsar Hoikas » Tue Jul 28, 2020 6:24 pm

Good news: you've now crossed the bridge into the Python 3 update - this isn't actually on Gehn yet, so you will definitely have to build your own python.pak. I already spoke a bit about that here. Of particular note is to make sure you're using the python scripts from here and not the old moul-scripts repository, which has now been deprecated and archived.

Surta wrote:I am not unfamiliar with setting up php pages and I think I should be able to create a connection to PostgreSQL and create a web page, but would I be imposing if I asked you to share the content of your page? I know this doesn't fall under the header of "open source" but I'm hoping you are willing to share the content of the file anyway :D


Feel free to use the Gehn page as a sample to get started. I copy it for any testing shard I throw up...
Image
User avatar
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2046
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Dirtsand on a VPS

Postby Surta » Wed Jul 29, 2020 8:38 am

That is great news indeed! I can't believe the progress you guys have been making even in the short time I have been dabbling with this... well done!

The good news is that using the Plasma Python files definitely creates a python.pak file with content (about 1.7MB so smaller than the Gehn python). With that new python.pak it does proceed to the login page with my new external client.

However, all is not well. I'm still getting the python error in the log but even weirder than that... it shows my login with the name Eric - I can assure you that is NOT the name I'm using! After that I can only Alt-F4 out, because that is as far as it gets.

Screenshot 2020-07-29 08.20.29.png
Screenshot 2020-07-29 08.20.29.png (136.86 KiB) Viewed 258 times


Also, the log still shows lots of errors (just quoting the last bit):

Show Spoiler


I read through the other post and you mentioned something about bulding the ScriptsSystem, I'm actually not sure how to do that... but I'm sure we'll be getting there :D

Tsar Hoikas wrote:Feel free to use the Gehn page as a sample to get started. I copy it for any testing shard I throw up...


Thanks so much!! Unfortunately I found out it isn't going to be as easy as I thought, because I'm running PostgreSQL in Docker. While this has many advantages, apparently there is no (simple) way for another Docker image (web server) to connect to the database, so I'm going to have to place that on the backburner for now. For the interested, the error I'm getting is "Fatal error: Uncaught Error: Call to undefined function pg_connect() in /var/www/html/...." And no, I won't be asking questions about that here, I realize how far outside the scope of Dirtsand that would be :geek:
Surta
 
Posts: 83
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Tsar Hoikas » Fri Jul 31, 2020 5:09 am

Again, make sure you are using the python scripts from here and not the old moul-scripts repository. The moul-scripts repository has been archived and is not compatible with Python 3. Once you rebuild the client and the ScriptsSystem target, the python directory in the bin directory will be populated with the complete set of scripts needed to build the python.pak. Here is where you need to go to build ScriptsSystem:

Show Spoiler


Surta wrote:While this has many advantages, apparently there is no (simple) way for another Docker image (web server) to connect to the database, so I'm going to have to place that on the backburner for now.


I actually took inspiration from you and built docker containers for both dirtsand and postgres, and it was pretty straightforward to isolate the two applications into their own containers.
Image
User avatar
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2046
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Dirtsand on a VPS

Postby Surta » Fri Jul 31, 2020 12:10 pm

Oh it's all clear now!! Done, AND I have a bit of EXCELLENT news on top of that: now the city book WORKS!

Strangely enough no Great Zero yet, in fact, many city locations are missing now.

Show Spoiler


But eh, we just went from two remaining bugs to just the one, so who's complaining :D

Docker: oh wow, I'd LOVE to have the server installation as a docker file - it would make it such a breeze to install Dirtsand and keep it up to date... ever since my friend introduced me to Docker, I'd never go back.

FYI I'll share the story of my web-database connection woes, but once again, I'm NOT asking for solutions here... I just share it for the sake of sharing.

This the yaml file (well, part of, I left out the containers I use for non-Uru related stuff) I'm currently using:
dirtsand.zip
(967 Bytes) Downloaded 5 times


That image is working like a charm. The web part is great for hosting the static pages such as the welcome page etc, and of course having PostgreSQL in docker is sheer magic. Recently I went from v11 to v12 and back without any issues (for the record, both work just fine).

However, I can't get my website to display information from the database - it's giving the error "Call to undefined function pg_connect()".
After some research, I found out that you can't use the php:apache image for that because it's indeed missing the pg_connect drivers. Instead, you need a php:fpm image in combination with an apache image. No matter what I try, I just can't get that to work (I keep getting a 502 gateway error as soon as I fire up the containers). I found this site and also a blog post with a ready made image, but none of those seem to be able to display the site at all.

Again, this is NOT a problem I'm dumping here, I'm just sharing information. I'll keep searching for a solution, after all, it took me "only" a year to get a working MOUL server so I still have time to sort all that :lol:
Surta
 
Posts: 83
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Tsar Hoikas » Fri Jul 31, 2020 4:31 pm

Since you're now using the mainline python, it should be safe to turn the GreatZero book back on in the Neighborhood using the globalsdl command. I can't remember the name of the variable, but I'm sure you'll find it ;).
Image
User avatar
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2046
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Dirtsand on a VPS

Postby Surta » Fri Jul 31, 2020 5:13 pm

Yahooooooooooooooooooooooooooooo!!!!!!! The Great Zero WORKS!!! We're officially BUG FREE, what a milestone, what a joy! Hoikas, thank you so, so, SO very much for your help and patience - no bugs left... I still can't believe it :D :D :D
Surta
 
Posts: 83
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Surta » Mon Aug 10, 2020 9:07 am

I think I found the tiniest little bug in this vast sea of flawlessness :lol:

Just tried to upload an image to the hood imager and the game crashed immediately. The vault shows this error:

[Auth] Got client python traceback:
KIHandler - Traceback (most recent call last):
File "ki.__init__", line 1275, in OnVaultEvent
RecursionError: maximum recursion depth exceeded while calling a Python object


The imager in Relto works just fine.

I thought I'd create a new version of the python.pak file (and got all excited when I saw the addition of easter eggs, haha), but it's giving errors:

== Packing ptWordFilter, ......import failed ......blast! Compile error in ptWordFilter!
Traceback (most recent call last):
File "C:\Users\user\Documents\GitHub\Plasma\build\bin\python\plasma\ptWordFilter.py", line 46, in <module>
ModuleNotFoundError: No module named 'string'


Also the python.pak file in Plasma\build\bin\python is only 1.75Mb.

Other than that, the server is sheer PERFECTION - even the guild pubs appear as they should :D
Surta
 
Posts: 83
Joined: Fri Mar 29, 2019 1:13 pm

Previous

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron