arxcode
arxcode copied to clipboard
Update Griatch's 'Arxcode installing help' walkthrough
Is your feature request related to a problem? Please describe.
I'd like to make some PRs, but I don't like making PRs to things without standing up the site to smoke test the changes. The walkthrough on the Evennia wiki page is helpful for standing up an instance, but the steps to create characters do not result in playable characters.
https://github.com/evennia/evennia/wiki/Arxcode-installing-help
Describe the solution you'd like
I want an up-to-date walkthrough.
Describe alternatives you've considered
I have considered making PRs with only unit tests, but that makes me uncomfortable and grouchy. So... my alternative is not to make PRs.
I have made a very clunky workaround by creating a class that inherits from the ArxTest class. I loaded it up in a django shell to run commands to populate the db.
Additional context
Having an up to date walkthrough would be great. I'm sure I'm not the only person who has stopped by to make changes who's bounced off that wall. The workaround is imperfect and not newbie friendly.
I'm writing from the point of view of someone who knows how to setup and run django stuff. So the snags I'm focusing on are what happened after I did all that. If people leave feedback on snags that happened when they tried to setup or run the game, I can try and help improve the docs for that.
Anyway....
When you connect to the game the Limbo room description mentions As Account #1 you can create a demo/tutorial area with @batchcommand tutorial_world.build. That didn't work when I tried it, but something like that would be really great.
Here are some of the snags that I ran into while following the Additional Setup Steps part of the guide.
- Flag account as
Staffand apply theAdminpermission group (This assumes you have already set up an Admin Group in Django).
If an Admin group is required, an instruction step should be added for creating a group and which permissions to use. If it isn't, then remove the parenthetical there. (I went ahead and created a group with all of the permissions).
- Log into the game using the web client (or a third-party telnet client) using your superuser account. Move to where you want the new staffer character to appear.
There is no way to move to another location. Perhaps remove this part. If it should stay, then add steps for how to create a new location. My advice is to remove that part unless it is strictly required. It's better to go with dead simple steps in a tutorial.
- In the game client, run
@create/drop <staffername>:typeclasses.characters.Character, where<staffername>is usually the same name you used for the Staffer account you created in the Admin earlier (if you are creating a Character for your superuser, use your superuser account name). This creates a new in-game Character and places it in your current location.
If a person following these steps does not have developer background, the angle bracket idiom may be confusing. My advice is to just to use an example name there. A user can make characters with other names once they've gone through this tutorial.
- Have the new Admin player log into the game.
When I did the above, it output The Character does not exist. So I skipped this step and continued with the next steps as the superuser.
- Have the new Admin puppet the character with
@ic StafferName.
I was unable to use ic for that character I dropped, so I continued as the superuser character.
Now that you have a Character and an Account object, there's a few additional things you may need to do in order for some commands to function properly. You can either execute these as in-game commands while
@ic(controlling your character object).
There is no 'or' clause to match the 'either'. Either add the optional methods or drop the conditional. My advice is show only one way to do it in a beginner tutorial.
After doing all of that, from my point of view I'd like a command (or at least guidelines) for what to do to add some example world data and non-staff users and characters with a random selection of inventory, clues, etc. so that I can standup the site and test changes (for example, changes in informs formatting)
When checking PRs I've made, I've generally made a guess for what data to add. I'm not familiar with.
I'd be interested in some guidelines or tutorials on how to set up a map. When I attempted to create a map and locations everything barfed. I can go into that in more detail later. For now I'd really like the basic setup guide to work.
I only got as far as setting up the initial stuff, BUT one thing I encountered: the Getting Started guide for Evennia that this guide directs you to is based on the newest Evennia versions that require Python 3.7, but the Arx game is from an earlier Evennia version and uses an earlier version of Python. So there's a disconnect there that someone else had to help me with, wherein I needed to actually create the virtualenv with an earlier version of Python instead in order to get the Arx game installed properly.
Maybe it was written a while back when evennia was on python2?
Anyway, I can't remember what I did exactly but I'm pretty sure I ignored that part of the tutorial and made a virtualenv (virtualenv -p python2 venv ) and then maybe did something like pip install -e evennia using the local evennia repo.
Ok.... probably it would be good to completely get rid of the Evennia digression and not point users at the Evennia install directions right now.
...oh and maybe we could add a small developer guide to talk about how to go through the steps to fork the repo and make PRs.
Do you think it would be simpler to add the evennia dependency to requirements.txt? The instrunctions could be to make a directory, git clone both evennia and arxcode in it, then go to arxcode and pip install -r requirements.txt
The requirements.txt file would have a entry for evennia that specifies installing it locally from ../evennia
Maybe point it at my Evennia fork. I think the branch from my Evennia fork I run Arx's prod server on is attr_set_changes, some minor fix that was resolved in a newer Evennia version.
We won't update to the newest Evennia version at least until the postgres cutover is done. I'll probably dockerize the environment at that point too, since it'd both make handling the python version a bit easier and I'd really prefer our nginx server to be in another docker container and its configuration captured somewhere. Ideally that'd make the whole process a lot easier for someone coming in, if we could have the entirety of running things be some docker-compose alias like 'arx up'.
Yeah, I actually can't remember what it is my friend told me to do -- I had to make sure I was using the right version of Python, and then I believe the magic key was doing a git thing to pull a specific version of Evennia instead of the most recent master branch. The problem of course is that the Arx code setup guide points to the main Evennia install guide first, which naturally gives directions for the most recent version.
I'll add a note on the wiki for now mentioning your fork, @TehomCD . If it isn't the master branch you're using, let me know and I'll update the wiki ab out it.
I don't want to change the wiki too much, but that small change seems like a good thing to do right now.
One of my goals in the short term is to build a docker image to make this easier. Also, it would probably not be a terrible idea to build a super small world with markets and a few basic pieces of test data.
Domains, rosters, fake characters, etc.
@TehomCD: Would it be possible to have a tools project on the project board?