Citadel Generators · Legacy archive
Random Generator Chat
-
Re: Random Generator Chat
#41Ok, the idea is that you tag entries so that on subsequent tables, results with compatible tags are upweighted, while incompatible ones are down weighted.
ex.
Table 1 result gets a war tag
Table 2 entries
1. Priest -war
2. Merchant
3. Soldier +war
4. Thief
Weight
Priest 1
Merchant 2
Soldier 3
Thief 2
The idea is that tags accumulate as you go through tables, and -tag and +tag will cancel if somehow they occur. The effects are exaggerated due to the small table size. For tables with 20+ entries, the effect will be much less pronounced and perhaps + values should be higher to reflect this. I would also say there is no limit to the number of tags a row can be weighted by.
eg. We have the following tags active in a character creation generator
Elf++
War-
Rich++
Heirloom Table
Pile O' gold Rich
Longbow War, Elf
BattleAxe War, -Elf
Boat Water
Misc junk -Rich
Fine Dress Elf,Rich+
Portrait of Strolen Elf
Effective Weights
Pile O' gold 4 Match On Rich, Increased twice
Longbow 2 Match on -War, decreased, Match on elf, increased, so cancelled.
BattleAxe 1 Match on both war (-) and elf (-), but 1 is the minimum probability.
Boat 2 No match. Left alone
Misc Junk 1 Match on Rich, decreased
Fine Dress 5 Match on Rich, increased by 3 (+ and ++)
Portrait of Strolen 3 Match on Elf, increased
No entry can be weighted below 1. Oddities should be allowed to happen occasionally.
It allows you to have results which go together even if separated by many stages of generation.
-
Re: Random Generator Chat
#42Okay, so the weighting looks like what I was thinking. In terms of how it's applied, your idea is that "subsequent tables" are later generators used within this same overall generation, i.e. table 1 has templates, and the tag-weights get passed to the "children" generators that build it's subcontent.
This is roughly what I was thinking needed to be done, I just wasn't entirely sure if you were aiming for something else that I wasn't quite catching. I've already attached placeholder metadata variables throughout the code, so this should be extremely straightforward to implement. -
Re: Random Generator Chat
#43An interesting(?) observation. These generators can also be used for combat resolution. Simply allow for a static entry point with a predefined set of tags. This would work for the system Goss is making on another thread.
rough example:
Boo Boo the warrior
tags Strength 3, Con 2, Int -2, HP 4
Wound Result against Sword+
Light HP 2, Armor 1
Moderate HP 1 ,Armor 1, Sword 1
Heavy HP -1 , Sword 1 , Club -1
Weights:
Light 8 (2+2+4)
Moderate 8 (2+1 + 4+1 )
Heavy 1 ( min(1,(2 -(1+4) +1))
So chances of this guy getting a heavy wound is 1/19, and with equal chances of light or moderate.
Just a rough example of another use of the generators - a built in combat system!
light 8
Moderate 7
Heavy 1
So, chances are this character would have
-
Re: Random Generator Chat
#44Still more (sorry - I'm waiting for hardware at work... )
Make generator results be accessible in chat
/roll GeneratorName
and in forum
[roll GeneratorName ]
-
Re: Random Generator Chat
#45Hell, make em accessible via an API so our content becomes mashable :)
-
Re: Random Generator Chat
#46API was intended from the start (esp. in light of AG's apps). I've been coding it in a very loosely-coupled fashion, so that the content generation is independent of the presentation.
Thought: Saving the output of the generator for sharing/later use. In the end, it's just text with metadata attached. JSON encode it and shove it in the DB with a version number and id. Render with the same template as used on the live generators (yes, I plan to have all the generators use the same underlying templates for rendering).
Adding generators to full-chat isn't a difficult task once the API is up, I'm just seeing that going badly for the epic-length generators. I'd think shareable links would provide a nice compromise in that respect. -
Re: Random Generator Chat
#47Put a max chars on the API - having user-defined random functions available in chat would be transformative.
Character generation
treasure
combat resolution
scenes
etc.
-
Re: Random Generator Chat
#48I wouldn't do it on the API; I'd do it on the chat-side. API results should be as nested as necessary.
Alternately, I could make the API always make a saved copy, and then the chat can just display a share-link if the text breaks the limit. Two birds, one stone. -
Re: Random Generator Chat
#49
I would like to request that we install Python 2.7, and the virtualenv toolkit. I can take it from there, since virtualenv comes with pip. Currently developing on a VM, but I'll need those in place when I get to something workable to show off.
Are you good installing this yourself? I could probably do python without much issue but looking at virtualenv might be more than plug 'n play.
And I am super excited by what this is shaping up to be. Insane!! -
Re: Random Generator Chat
#50I have no problems doing those installs, assuming I have sudo permissions. Additionally, are we doing the initial demo install on the demo server? I'd hope so, but I have no clue where we put the credentials for that. -
Re: Random Generator Chat
#51You may need to upgrade the python on the server too, i seem to remember it was too low to support django. -
Re: Random Generator Chat
#52The new python will have to be installed next to the current one. The WHM/Cpanel requires the current python.
Will try and refind the passes. I have them all autosaved in all different places so need to hunt them down. -
Re: Random Generator Chat
#53I realize it doesn't look like much at the moment, but I assure you that this is a huge step forward. We've got content generators calling each other, and a website displaying them dynamically. Everything else is fiddly-bits to make it friendly and keep people from killing the server.
Now we need a UI. And UAC, though that's going to be interesting since the cookie authentication for the site is through PHP. Users will need to login again when they want to edit their generators. -
Re: Random Generator Chat
#54Awesome!!
Can we use something like this for the smf/python auth?
https://gitorious.org/mumble-scripts/mumble-scripts/source/40bb6b1d3d4e2f4b11a1582a2f54c472683565bb:Authenticators/SMF/smfauth.py
A short discussion of it that makes sense in my unpython ways
http://www.bitchx.com/log/mumble-f/mumble-f-29-Jan-2010/mumble-f-29-Jan-2010-03.php
There was one for django as well. I am sure your googlefu is as good as mine so maybe there is something out there already that we can use? -
Re: Random Generator Chat
#55Forum filter ate your second link. Also, I was planning to look for some kind of Django-SMF auth plugin, I just needed sleep last night. :P -
Re: Random Generator Chat
#56What I have drawn from this is that if we get some big snakes and Jamie Foxx dressed as a cowboy we can have generators -
Re: Random Generator Chat
#57And lookie here, exactly what we need:
https://djangosnippets.org/snippets/577/
So the authentication won't be an issue (didn't think it would be, honestly, even if I had to write a connector myself). -
Re: Random Generator Chat
#58Not much to this update, though it now LOOKS pretty, at least. I pulled the view files for the main citadel page, cut it down to something that didn't require PHP, and converted it into a Django template. I then updated the two pages I currently have pulling actual content to use the new template setup.
And on that note, look at how clean those templates are! After dealing with insanity of all types in PHP template systems (including rolling my own header-page-footer setup for multiple client projects), Django template inheritance is gorgeous. Yeah sure, the base template is mostly HTML. But every subpage just has to define the appropriate content blocks and they're done. *love*
http://i.imgur.com/Gmp4N1P.png
http://i.imgur.com/JkR9jXm.png
http://i.imgur.com/972T2lp.png
http://i.imgur.com/NmdHBjW.png -
Re: Random Generator Chat
#59Looking good, Chaosmark! Keep it up! :D -
Re: Random Generator Chat
#60Sweet!!!!! -
Re: Random Generator Chat
#61Not bothering with screenshots tonight.
Added an AJAX interface to the display generator page, so it dynamically pulls the generator data on every button push. That page is done (except perhaps layout-wise) until optioned randomizer/generators are implemented.
Started on the edit generator page, got Redactor displaying and working properly. Currently evaluating options for implementing the items listing, since that's dynamic. I also need to consider how I'm going to implement the template variables integration, though some work after writing the previous half of this sentence provided an integration with Redactor to insert template variables into the editor toolbar. So all I really need to do for variables integration is write the code to add and delete variables from each item, and then add/remove those special insert buttons from the toolbar.
This is shaping up to be rather clean and effective. Redactor is making me very happy; much easier to integrate with than CKEditor. -
Re: Random Generator Chat
#62I want pictures of the ajax!!!
I do like redactor even though it might occasionally have issues. -
Re: Random Generator Chat
#63Alright, I'll post a few pictures once I get home tonight. -
Re: Random Generator Chat
#64I tease. Fell flat. It is like taking a picture of a bell ringing. (Which is my favorite picture to take by the way. Most bell pictures I have of "stationary bells" are the bells ringing. :) ) -
Re: Random Generator Chat
#65Honestly, I was thinking I'd record a video of it working and link to that. :P -
Re: Random Generator Chat
#66Significant progress was made tonight. Unfortunately, my VM decided to go haywire right after I started adding a Bootstrap modal into the mix, so no screenshots for j00.
I've got the edit page somewhere between 40%-60% done at this point. I have almost all of the layout done, but I still need to add buttons to let users interact with the interface functions I've built that do stuff. Then I need to make it actually save the generator in question. And THEN I need to polish it all.
With that said, I'm really happy I was able to get functions working to add and remove template variable buttons from the individual editors of each item. That's going to be a nice touch for users: no need to manually type a template variable into the editor, just click the button and it inserts automagically. :D -
Re: Random Generator Chat
#67That is so bad ass that the term "bad ass" needs to be redefined to become more awesome! -
Re: Random Generator Chat
#68After a week of downtime thanks to deadlines and the upcoming holiday, tonight I was finally able to get back in the swing of things.
Finished off editing of template variables, and began working on the overall save functionality for the generator once editing is done. client-side is almost done for that; need to do the server-side. -
Re: Random Generator Chat
#69All the pieces of this generator are already there.
http://terribleminds.com/ramble/2013/12/23/the-terribleminds-choose-your-own-profanity-generator/
-
Re: Random Generator Chat
#70By way of update, I've been swamped and unable to work on the generators for the past few weeks. However, last night I was able to make some decent progress; I made the "list all generators, sorted by owner" page function correctly, and I also got the "list all generators owned by such-and-such user" page working.
Left on my todo list is:
Forking generators (I've got most of the code ready for this, I just have to finish it off and add the options to the interface)
Finish the edit generators page interface. This is mainly just cleaning it up and adding a few buttons for saving/cancelling.
Add halt-checking to the recursive generators; I don't really want to rely on the loop-iteration limit I've set in place for this, but adding "proper" checks will involve a hefty chunk of code. This might get pushed off to v2.
Finish the generator display page. It's spartan and plain atm, and it needs a bit more added to it (edit button, fork button, fiddly bits).
Login/authentication system (see below)
My main issue currently is that the MySQL Connector Oracle publishes has flaws in their Django backend. They're subtle, so it works for almost everything, but when I try to get the login system working, it crashes. There aren't any other backends available that don't require a compiler toolchain, so I'm debating whether I want to finish debugging these issues, or just compile one of the open source backends. -
Re: Random Generator Chat
#71Did you see if there was an smf tie in? They have a few api's floating around. -
Re: Random Generator Chat
#72I found an SMF authentication backend, and it works nicely. That part isn't a problem. The problem is with the Django user login-authentication apps/modules. When I try to use it, it calls functions in the db backend that Oracle obviously didn't test, because they break. -
Re: Random Generator Chat
#73Fuck Oracle. I'll deal with compiling MySQLdb into an rpm for Centos if necessary. I'm done dealing with their dev-hell bugs.
Next up is user restrictions. Got part of it working, buuuuut I need to extend the User model to allow for the SMF account ids. -
Re: Random Generator Chat
#74Figured. But I am rather good at stupid questions so figured why would I stop now!?
-
Re: Random Generator Chat
#75There are no stupid questions. Just a lot of inquisitive idiots. -
Re: Random Generator Chat
#76For future improvements to the login system (assuming we don't switch over to Django for the main site): https://github.com/winhamwr/django-php-bridge
Progress:
Login authentication system is done.
Edit page is done.
Generator display page is done.
Generator forking/cloning is done.
With that, this is now ready for deployment to the testing server. Do we have a repository that I can upload it to, for simplicity in deployment and updates? -
Re: Random Generator Chat
#77Generators are up and ready for testing: http://readpostplay.com/generators
Your login is your citadel login; unfortunately at this time there isn't cross-session capability, so the fact that you're logged into the main site (or even readpostplay.com) won't mean you're logged into the generators app. You have to login separately for each.
Let me know if you find problems; I tried to make it as stupid-proof as possible, buuuuut we all know how well that goes.
(Note to self: restart command is "gunicorn --pid /tmp/gunicorn_generators.pid -D -w 4 citadel_generators.wsgi:application", run from the src directory with the virtualenv activated)
(Further note to self: finding processes for kill -9 is "ps -C "gunicorn -D"")
(Third addendum: The restart command must be run as root. Just use the fscking fabfile.) -
Re: Random Generator Chat
#78begins playing with new toy -
Re: Random Generator Chat
#79And the first bug has been found by Scras (though he hasn't mentioned it yet): Generators names should be required. Deeeeeeerp.
Also, it's worth mentioning that the database used is the same as what it will use on the live site, so don't be afraid to build towering edifices to test it out; they'll still be there when we switch things over.
In terms of features, there is no delete currently. I'm still debating on that, since other generators can reference yours; a good compromise might be to have a "disable display", so that the generator doesn't show up anywhere, but is still available if already referenced.
I'm open to further suggestions. A user's guide will be forthcoming Soontm, but your major points to remember are that you can add template variables to your items using the "+", and that this lets you reference the content of other generators. -
Re: Random Generator Chat
#801. Means to transform a pasted numbered list into a generator
2. Delete Generators - if a generator refers to a deleted generator, the text Generator has been deleted will be returned as a result.
3. Variables should not explicitly return page/paragraph breaks or some means of stripping those when capturing the result should be possible.
Eg You find a
Red
Atlantian
Sword
would rather be able to get
You find a Red Atlantian Sword.