All times shown according to UTC.

Time Nick Message
01:11 slackfriarzen1 <friarzen> yeesh, that's alot of scrollback messages that made my eyes bleed.
02:33 DiscordBot <xJake> How do I force a shutdown if I broke things? lol
02:36 <Darren> Evennia stop?
02:36 <xJake> Process doesn't work. Stuck on 'stopping...'
02:38 <Darren> Do ‘ps ux’ to get the process ids then ‘kill #’
02:38 <Darren> Should be 2 but there might be just 1
02:39 <xJake> I got it. Ended the python processes
03:08 <xJake> Am I able to do something like this to grab the first character of a person's input? variable = string_input.strip[0]
03:12 <xJake> Answer: yes, I can.
03:46 stoopkid joined #evennia
05:46 DiscordBot <Kovitikus> Boy, I sure am glad I dipped out and went to sleep before that pointless genre definition argument started. Here's a thought for you. If you have these definitions for 20+ years now and still can't agree on what they mean, perhaps they need to be tossed out entirely. So ridiculous.
05:50 <Kovitikus> Sad that I have to abandon any hope of reading through some of the more interesting parts of the chat history, since I'm not going to sort through all that muck and mire you all bogged it down with.
05:52 <Kovitikus> I did love how Griatch tried to stop the conversation when he saw it rearing its ugly head, but to no effect. 😆
06:00 <UncleSam> Änkling åpijblööööbmmö. M L 🔮 ⛏ 🏷 ⚰ ikllööbbbökpbpåjjjpbpnmmi
06:00 <Kovitikus> What's with the spam?
06:43 evenniacode [push] Griatch pushed 2 commits to evennia/master (https://github.com/evennia/eve[…]cf...de418b2a1644):
06:43 [Griatch]: Fix line breaks from fixed-width lines in webclient. Resolve[...]
06:43 [Griatch]: Merge branch 'master' of github.com:evennia/evennia
06:43 [issues] Griatch closed issue #1837 in evennia: new lines where there shouldn't be in EvMenu (https://github.com/evennia/evennia/issues/1837)
06:44 [issue comment] Griatch commented on issue #1837 (new lines where there shouldn't be in EvMenu) in evennia: This ended up being a wholly webclient related issue. The sp[144 more] (https://github.com/evennia/eve[…]comment-530245468)
06:46 glyph joined #evennia
06:48 DiscordBot <Kovitikus> Hmmm... I ssh'ed into my server after restarting my computer and Ubuntu is telling me => There is 1 zombie process. It also says 1 package can be updated. and *** System restart required ***
07:03 <Kovitikus> Well, fixed the zombie and reboot required at least. 🙂
07:30 Griatch It's really rare to have to restart a linux system; a system restart would usually mean that there is some security fix in the kernel
07:31 I have a 30 day uptime on my laptop right now. It's that small because I wrote 'reboot' instead of 'evennia reboot' last month :/
07:38 castlelore EvenniaOS!
07:41 Griatch Indeed
07:42 DiscordBot <xJake> I must be tired and not using my brain functionally. You can make a channel to support the Evennia IRC, yeah?
07:42 <xJake> In the game, I mean.
07:42 Griatch Yes.
07:42 DiscordBot <xJake> Well, I know what I'll be doing tomorrow.
07:42 <xJake> Or... today, I suppose.
07:43 Griatch https://github.com/evennia/evennia/wiki/IRC
07:44 DiscordBot <xJake> Pardon the stupid question: that will link to this server specifically?
07:53 <Bornasm> I'm at 41 days on my work PC. Win 10
07:56 castlelore usually you have to be superuser to invoke the all-powerful "reboot" command
08:04 DiscordBot <Kovitikus> Griatch lives on the edge. I had to type sudo reboot and enter my password.
08:31 Griatch xJake: Read the wiki page; it explains. You can link to whatever IRC channel or network you want.
08:35 Actually, I didn't need to sudo for it, I would have expected to have to. Now I wonder if Linux Mint has some weird default for a single user setup.
08:41 DiscordBot <Kovitikus> Maybe Mint is the more "desktop user experience" and it's not expected to be some server or administration type thing where people have critical things running.
08:42 Griatch Sounds weird, honestly - it's just some better hardware drivers and a desktop, mostly. But maybe they did make the decision to have reboot 'easier', need to look into that.
08:45 DiscordBot <Kovitikus> I'm not finding any results that indicate you don't have to type sudo before rebooting, so it must be something with your install or some other weird thing going on.
08:46 Griatch Well, I'm not going to test it right now :)
08:46 DiscordBot <Kovitikus> 😎
09:47 <Lysaer> In the olc - is there a way to set location to the self.location of the person using the spawn command?
09:48 <Lysaer> I tried here, to no avail... and now I can't seem to unset it, so the prototype is broken 🙂
11:42 <Lysaer> Ah, ok never mind if it's unset that's what it defaults to... oki.
13:07 <grungies1138> the person using the spawn command, or any command, would be self.caller inside the command's class
13:48 slackfriarzen1 <friarzen> morning
13:50 DiscordBot <Kovitikus> Hey Zen.
13:50 <Kovitikus> Has anybody else actually tested the multimedia webclient stuff?
13:51 <Kovitikus> I tried sending an image and it just didn't show anything. I tried sending a YouTube video and it just wouldn't fetch it properly. Simply a broken looking square with controls.
13:51 slackfriarzen1 <friarzen> I believe Griatch has, but I don't know of any live games using it yet.
13:52 <friarzen> The video tag only supports one format across all browsers.
13:53 <friarzen> It is the Achilles heel of html5 video.
13:53 DiscordBot <Kovitikus> I thought YouTube converts any and all videos into the same format?
13:55 slackfriarzen1 <friarzen> They might but I'm not sure they use the .mp4 format.
13:56 <friarzen> I remember reading you had to specifically add something to their URLs to get them to serve HTML-compatible mp4 video.
13:56 DiscordBot <Kovitikus> https://pastebin.com/U6WRpzGv
13:56 <Kovitikus> They don't use MP4.
14:00 <Kovitikus> I'm not finding exact information, but when I've downloaded videos from YouTube, it tends to default to WEBM I think? I don't know really, because I'm getting info here that if you upload something they don't support by default, it converts to FLV.
14:00 <Kovitikus> Well, in any case, my image won't even work. So what might be going on with that?
14:01 slackfriarzen1 <friarzen> Hmmm, do you get a broken image icon in the browser, or nothing at all?
14:02 DiscordBot <Kovitikus> Nothing at all.
14:02 <Kovitikus> As you can see in the screenshot I provided at the top of the pastebin, my text message shows, but nothing else.
14:02 <Kovitikus> If you have a YouTube link you know works with the webclient that I could test too?
14:03 <Kovitikus> I added a video link below the image link, and still only got this. https://i.imgur.com/iSwLZ6l.png
14:06 <Kovitikus> Maybe also an image link you know works, so I can test that too. Perhaps imgur just doesn't work.
14:06 slackfriarzen1 <friarzen> Hmm...if you open the browser's developer tools panel (F12 in chrome, 3dashes->Webdeveloper->toggle tools in firefox, etc), and look at the console messages does it list "MultiMedia plugin loaded"?
14:06 <friarzen> it is not a feature enabled by default on new games, I dont believe.
14:07 DiscordBot <Kovitikus> What do you mean 3dashes?
14:07 <Kovitikus> https://i.imgur.com/HZpYHTh.png
14:07 <Kovitikus> I'm testing it on chrome atm.
14:09 Griatch Both image and video worked for me. I couldn't get a youtube video to work though, I grabbed an mp4 for that testing.
14:21 DiscordBot <Kovitikus> Oh, you probably mean Hamburger Menu.
14:21 <Kovitikus> Anyways. I found it I think. https://i.imgur.com/WlSiJM0.png
14:21 <Kovitikus> It says Multimedia plugin initialized.
14:21 <Kovitikus> ¯_(ツ)_/¯
14:23 Griatch How are you sendig the image to the webclient?
14:24 DiscordBot <Kovitikus> Typing this command to test.
14:24 Griatch Because it is its own outputfunc
14:24 DiscordBot <Kovitikus> https://i.imgur.com/iSwLZ6l.png
14:25 Griatch Hm I think that looks correct ( don't recall, but img sounds like the correct outputfunc name)
14:25 DiscordBot <Kovitikus> Yes, I read your changelog.
14:25 Griatch Maybe imgur don't allow for sharing images like that?
14:26 DiscordBot <Kovitikus> Is this stuff even documented anywhere? Also, I doubt that, because they seem to let me use their links any way I want and have no upload limit.
14:29 <Kovitikus> - Webclient multimedia support for relaying images, video and sounds via .msg(image=URL), .msg(video=URL) and .msg(audio=URL)
14:29 <Kovitikus> Welp.
14:29 <Kovitikus> Maybe that explains it.
14:30 <Kovitikus> I was typing img rather than image.
14:30 <Kovitikus> https://i.imgur.com/N1LPtP0.png
14:30 <Kovitikus> The image works now, but of course the videos are still broken.
14:31 <Kovitikus> Oh well, images are more important I think. People will probably want to open the video in a new full featured YouTube page anyways.
14:32 Griatch Videos work, but as said, it needs to be an mp4
14:32 DiscordBot <Kovitikus> Yeah.
14:32 <grungies1138> Video would be whatever is supported by the browser though, right?
14:33 <Kovitikus> As Zen just said, it's HTML5 that is the issue.
14:33 <Kovitikus> Something like that. I dunno obviously.
14:33 evenniacode [issues] Panzerbyte opened issue #1916 in evennia: Most text formatting appears wrong (https://github.com/evennia/evennia/issues/1916)
14:54 asg joined #evennia
14:55 slackfriarzen1 <friarzen> The only format that is supported by all html5 browsers is mp4
14:56 DiscordBot <Kovitikus> That seems a bit extreme, but what do I know?
14:57 Griatch There are convert services online to convert
14:58 DiscordBot <Kovitikus> There's free and open source software you can use to download video and it has conversion built in. I don't know if you mean convert the link, as if you never have to download anything though.
14:58 <Kovitikus> This is the GUI version of the software. https://github.com/MrS0m30n3/youtube-dl-gui/
14:59 Griatch I think also online converters just lets you download as the converted video
14:59 DiscordBot <Kovitikus> Don't trust any of those sites.
15:00 <Kovitikus> It bothers me that they disappear all the time and wonder who's running those things.
15:01 <BP-Santo> ya mp4 sounds safe - webm for instance no worky on safari
15:01 <Kovitikus> Here's the original, non-GUI version, https://github.com/ytdl-org/yo[…]/README.md#readme
15:01 Griatch It's anyway possible to embed youtube videos in forums etc, so there must be some general wrapper solution for it, if maybe not native in HTML5?
15:03 DiscordBot <Kovitikus> https://github.com/ytdl-org/yo[…]edding-youtube-dl I don't know if this embedding part could be useful to Evennia,  but here it is.
15:03 <Kovitikus> It may help that this thing is also written in Python.
15:23 slackfriarzen1 <friarzen> Video is still a proprietary cesspit of heavily monetized/defended micro-territories.  Nobody wants external direct linking, so for the most part every video supplier only provides their own full-ad custom player.
15:25 DiscordBot <BP-Santo> Then you utilise the dev tools in the browser and get the file directly 😄
15:25 <BP-Santo> Albeit would have to write something to do it programatically to embeed rather than just watch yourself
15:26 <BP-Santo> Probably safest anyway to selfhost this kinda stuff
15:26 slackfriarzen1 <friarzen> Yeah, any link you get from a service is likely to be very short lived.
15:27 DiscordBot <Kovitikus> It's all about them dolla dolla bills ya'll.
16:05 bostrt joined #evennia
16:05 bostrt joined #evennia
16:08 xardion joined #evennia
16:32 DiscordBot <xJake> Griatch: in my default_cmdsets.py, do I have to comment out the super() and rewrite the command to replace it, or is there a simpler way to go about this?
16:32 <xJake> Or whoever.
16:33 <xJake> If I can avoid rewriting 90 commands, that'd be swell lol.
16:51 <BP-Santo> You can add and remove cmdsets so if you want to leave super() to populate everything but want to just remove one thing you can remove the cmdset which is a method just like the .add one
16:51 <BP-Santo> I am not in front of my code though so forgot what the exact method was - should be in the docs for cmdsets I think
16:52 <BP-Santo> I can have a look later to find it if you won't manage by then cause gots to run an errand right nao
17:04 <Kovitikus> Leave the super() and .remove(Command) to instead pick and choose the individual commands you don't want.
17:16 bostrt joined #evennia
17:31 DiscordBot <xJake> Thanks guys. That helps.
17:41 castlelore Aloha
17:53 DiscordBot <Reilena> What service is http://www.evennia.com/ hosted on?
17:54 Griatch Reiliena: That's just a simple google site
17:54 Google Sites I think is the name of the service
17:56 DiscordBot <Reilena> Ok awesome thank you
17:58 evenniacode [push] Griatch pushed 1 commit to evennia/master: [Griatch]: Use literal space rather than \s in text2html parser. Resolv[...]
17:58 [issues] Griatch closed issue #1916 in evennia: Most text formatting appears wrong (https://github.com/evennia/evennia/issues/1916)
17:58 [issue comment] Griatch commented on issue #1916 (Most text formatting appears wrong) in evennia: Sorry about that. Try now. (https://github.com/evennia/eve[…]comment-530494589)
18:02 [push] Griatch pushed 1 commit to evennia/master: [Griatch]: ... and another fix to handle line breaks in web client
18:17 DiscordBot <Bornasm> Hello.
18:18 <Bornasm> Griatch, got a question. I know there were talks about scripts recently. I recall something about global scripts starting automatically. Can I get some clarification on that?
18:19 Griatch Bornasm: What kind of clarification are you looking for?
18:19 DiscordBot <Kovitikus> Any scripts added to settings.py as GLOBAL_SCRIPTS will now be created and started automatically upon first server reload after they are added to the settings. (I think it's scripts that are at least 1 repeat or higher or something).
18:19 <Bornasm> Am I remembering right? 😄
18:19 Griatch https://github.com/evennia/eve[…]ts#Global-Scripts
18:19 DiscordBot <Bornasm> Ah, that's the one.
18:19 <Bornasm> Okay, thanks.
18:20 bostrt joined #evennia
18:20 bostrt joined #evennia
18:20 Griatch All scripts are started; you don't have to have an interval to be a script
18:20 bostrt joined #evennia
18:20 bostrt joined #evennia
18:20 Griatch GLOBAL_SCRIPTS will track, well the global scripts
18:21 DiscordBot <Bornasm> I am sure I talked about this ages ago. But I have zones. I want to make a new typeclass for the zone so I could create those and I would have a place to pull the names from for the menu.
18:21 Griatch But only those added to settings.GLOBAL_SCRIPTS will auto-recreate if you delete it
18:21 DiscordBot <Bornasm> Also gives me the ability to add logic and attributes onto those zones.
18:21 <Bornasm> Like marking a temporary zone with isTempZone attribute or something like that.
18:22 Griatch You could certainly use Scripts to hold meta-info about your zone(s) if you wanted to
18:22 DiscordBot <Bornasm> I don't see any other way. Got any other ideas?
18:22 Griatch No, I'm good with that. :) The alternative would be to make a custom model
18:23 DiscordBot <Bornasm> I was considering going full on custom actually.
18:23 <Bornasm> But I am not sure how much it's worth it.
18:23 <Bornasm> Currently without making my own models I can't set FKs or anything like that.
18:24 Griatch No, Attributes would then act as a sort of makeshift foreignkey instead
18:24 DiscordBot <Bornasm> Like for the zone I have to create a script which has a name of TestZone. And then when creating a room, if I want to include it into the TestZone I have to set a tag Zone with value of TestZone, which I get by pulling from the scripts
18:24 <Bornasm> Yeah. Exactly.
18:24 <Bornasm> How much of a hassle is it working with custom models?
18:24 Griatch Sounds good though.
18:25 DiscordBot <Bornasm> I work with DB stuff literally every day at work, but I don't know much about Django
18:25 Griatch You don't need to refer to the room as an Attribute on the Zone-Script either - you could also just a function that queries for the rooms with the tag on-demand if you want to
18:26 As for making your own model, have you read the Evennia docs about it?
18:26 DiscordBot <Bornasm> I wouldn't refer to the room. I'd be refering to the zone.
18:27 <Bornasm> I don't think I've seen that part of the documentation. There's a lot of it 😛
18:27 Griatch Well, you want to find all rooms in the zone, right?
18:27 But reverse - storing one reference to the zone-script on the room is trivial
18:27 DiscordBot <Bornasm> Yeah. I'd then do a tag search for the tag Zone with value of whatever the zone name is
18:27 <Bornasm> Yeah, basically a FK on the room that points to the zone
18:28 Griatch That's not a big deal db-wise.
18:29 What the Attribute does is basically store the database reference to the zone-script and when you fetch it, it uses that reference (which includes pk, table name and creation time stamp) to query for the zone.
18:30 It's really fast and easy to do, and the result is that you can refer to roo.db.zone and get the Script directly (same as with a FK)
18:31 DiscordBot <Bornasm> That would be quite nice. I think I'd just complicate my life with making my own db models.
18:33 Griatch If that is the only main connection between the two, then yes I think so. Custom models come into play more if you want to make complex queries across your entire game (how many rooms with a blue flower exist across all zones?) - in those cases Attributes will be less efficient to search.
18:34 But in this case, you could in that case just fall back to the tags, so you'd still be ok
18:34 DiscordBot <Bornasm> Oh. I don't think I'd ever need to pull some info like that.
18:34 Griatch Tags are very efficient for searching; that's their reason d'etre after all
18:35 DiscordBot <Bornasm> It just feels a bit wrong not building out an actual DB for everything
18:36 <Bornasm> We use postgres at work and LLBLGen as our ORM. So plenty of writing sql scripts when you want to change something.
18:36 Griatch yeah, there are advantages to not have to make database migrations every time you change a typeclass.
18:38 DiscordBot <grungies1138> ok... so as of now, I can create a board, list the boards, join a board, make a post to a board, view the post, mark it as read when viewed or posted by the same person.
18:38 <grungies1138> working well so far.
18:38 Griatch As said, new database tables have their uses. One should be aware of why one wants them though, before setting out.
18:39 Griatch: Your posts are Msgs, right? Do you associate those with the board somehow? Or is the board querying for Msgs on-demand?
18:39 Bah, I'm addressing grungies
18:39 DiscordBot <grungies1138> yes and yes
18:40 Griatch The second yes is a yes to which alternative?
18:40 DiscordBot <grungies1138> so the boards are Scripts which hold references to the Posts.  but I am also tagging the Post Msg objects with the post number and the board as the category
18:40 Griatch How do you hold references to the Posts in the Scripts?
18:41 DiscordBot <grungies1138> list on each board
18:41 <grungies1138> holding Post references
18:41 Griatch Hm. That sounds like it may not scale well.
18:41 DiscordBot <grungies1138> https://github.com/grungies113[…]eclasses/board.py
18:44 <grungies1138> given that I am tagging them, I might not even need to hold the reference
18:44 Griatch I would suggest decoupling your Msgs from the posthandler and not store them in a list. When that list is updated, it will need to cycle all the Mgs instances, serialize them to an id/table/time placeholder and save them all in a serialized format. For a large number of posts (which is likely to be), it means that the addition of new posts becomes an O(N) operation.
18:44 So I'd recommend that you rely on your tags instead and query for the needed posts when requested.
18:44 DiscordBot <Bornasm> I think I know how I'll deal with my problem. I'll make a property on the Room typeclass and the getter will return the actual Zone, while the setter will search for the zone by it's name and then store the instance of it(is this a good approach or should I store just the name and then have the getter pull it into an instance?)
18:45 Griatch Adding a new post with tags are cheap, and you usually only want to fetch a few dozen at a time for display purposes.
18:46 I'd not have the setter do an internal search; that's not how a setter usually works.
18:47 DiscordBot <Bornasm> So then just have a setter save the dbref and getter pull it when I need it?
18:47 Griatch I don't think this needs to be complex - room.db.zone is the zone of that room - what more do you need?
18:47 DiscordBot <Bornasm> Oh. That's what you meant.
18:47 Griatch The Attribute will handle the database saving for you, so you can do room.db.zone = yourzonescript directly to it
18:47 DiscordBot <Bornasm> Yeah I suppose that will do.
18:48 <Bornasm> Forgot the .db for a moment there. I was thinking of pulling it with room.zone
18:48 Griatch You *could* make a property wrapping the Attribute (so you can do room.zone) if you wanted to.
18:48 DiscordBot <Bornasm> It seems like code bloat. I'll just have extra 10 lines for nothing.
18:49 Griatch But all the property's get/setter would do would just assign to .db.zone and return db.zone for you.
18:49 It's up to you. Personally I prefer using .db directly so I know where things are.
18:49 DiscordBot <Bornasm> So if I do room.db.zone = myzone, it will save the reference to that zone, right? Then doing room.db.zone would pull me the full instance and I can do with it whatever?
18:49 Griatch Yes
18:50 DiscordBot <Bornasm> Awesome. Thank you.
18:50 <Bornasm> Now I just need to somehow mark what attributes I am using. Because I will totally forget about it.
18:50 Griatch it's all transparent to you. What is stored internally is just a serialized id/table/time tuple, but when you access it, the full referenced object is returned.
18:50 DiscordBot <Bornasm> I think just a comment would do fine with that one.
18:51 <grungies1138> sorry, so you think I should create methods on the Post Handler to fetch posts or a specific post?
18:51 <grungies1138> get_post() and get_all_posts()
18:52 Griatch grungies: You are already tagging your messages so you can very efficiently get all associated posts as well as an individual post on-demand yes. So some helper methods to hide the query sounds convenient.
18:52 DiscordBot <grungies1138> cool.  works for me
18:53 <Bornasm> Is there a way to do sorting before pulling posts? So lets say I wanted to pull the newest 10 posts only to show their titles on the actual board
18:54 <grungies1138> hmm.  since the PostHandler is just initialized in an attribute on the Board, how can I then refernce the board from the PostHandler?
18:54 Griatch Msgs have a db_date_created field, you can use that to sort in the database.
18:55 DiscordBot <Bornasm> That will be helpful. Thank you Griatch.
18:55 <grungies1138> actually... I might not need the Post Handler at all
18:55 <grungies1138> I think I can actually handle all of it on the board itself
18:55 <grungies1138> lemme think on this
18:56 Griatch Yes, If you use the tags, you can bypass some of the levels
18:56 Remember that tags can have categories as well
18:56 DiscordBot <grungies1138> yes and I use category to hold the board ID
18:56 <grungies1138> which is just a user friendly number for picking the board they want to interact with
18:58 Griatch Bornasm: The query would be something like `ten_last_msgs = Msg.objects.all().order_by​('-db_date_created')[:10]`
18:58 DiscordBot <grungies1138> def get_all_posts(self):         return list(Msg.objects.get_by_ta​g(category=self.board_id))
18:58 Griatch With some more filtering in there since Msgs are used for other things too
18:59 grungies: Something like that, I don't recall the message manager methods offhand
18:59 DiscordBot <grungies1138> I use that get_by_tag for other things
18:59 <grungies1138> so I knwo it works
19:00 Griatch Alrighty then :)
19:05 KatieLove joined #evennia
19:05 DiscordBot <grungies1138> this will actually help clean up some smelly code I was going to go back to anyway
19:06 KatieLove is there anyway to limit search() to just the contents of an object. For example, if I want to "eat apple" I should only be able to eat apples in my inventory, not one lying on the ground.
19:06 Griatch Yes, specify the candidates to the search
19:06 DiscordBot <grungies1138> in your eat command, you simply look for hte item in self.caller.contents
19:07 Griatch You can do (in a command): `self.search(query, candidates=self.caller.contents)`, where query would be, say, the string 'apple'.
19:08 self.caller.search, even
19:08 KatieLove oh, thanks!
19:09 DiscordBot <Kovitikus> self.caller.search("apple", location=self.caller) should work as well,  but Griatch's candidates argument is likely more appropriate.
19:10 Griatch Using `location` works fine too :)
19:10 KatieLove why is candidates more appropriate than location? what s the difference between them?
19:11 DiscordBot <grungies1138> now, one other potential scaling issue.  I want to track which Posts each user has already read.  so far, I have a dictionary with the board.key as the key and a list of posts as the value.  Should I maybe jsut do a list of the post_ids to compare to?
19:11 <Kovitikus> They are essentially two versions of the same thing, but candidates may express your intentions better when reading the code.
19:13 KatieLove got it. thanks!
19:13 Griatch Internally, what happens when you specify `location`, is that ` the system will fetch the contents of that location to build `candidates` for you, internally. You can by the way add both `location` and `candidates` - your custom `candidates` will then extend the ones auto-generated based on the `location`.
19:15 grungies: That's a tricky one. I suppose you always know which user is checking the board though, so you should easily be able to fetch the list of read posts for reference. Yes - I think just storing the ids is probably good enough.
19:29 DiscordBot <grungies1138> ok.  so I think I only have three more commands to write.  Leaving a board, setting the locks on a board and setting the Post timeout
19:29 <grungies1138> Then I will have some work to get it contrib ready
19:30 slackfriarzen1 <friarzen> Hmm....Grungies1138's boards sounds really nice.  I wonder how feasible it would be to make a new Command class that auto stores every command execution into the Msg database as well, category=sender.  Hmm...
19:30 Griatch Cool. :) Don't forget contribs require unit tests :)
19:30 DiscordBot <grungies1138> exactly what I was talking about. 🙂  which means i have to learn to write unit tests. 😛
19:30 slackfriarzen1 <friarzen> that would effectively turn on auditing for the entire game.
19:31 DiscordBot <grungies1138> add it to the comand parser?
19:32 slackfriarzen1 <friarzen> yeah, that's what I'm thinking.
19:53 <friarzen> Hmm...grungies1138, the first idea that I have for the "has read" state would be to have a tag with number range and category added to the account or character.
19:53 <friarzen> not a very nice key but it "should" work.
19:53 DiscordBot <grungies1138> meh.  a dictionary with the board key and the list of Msg IDs should be fine.
19:54 <Darren> Could always borrow a trick from Myrddin's
19:59 slackfriarzen1 <friarzen> Yeah, that'll work, seems like once you get into a couple thousand messages, though, that'll be a large number of list entries for not alot of use
19:59 DiscordBot <grungies1138> true, but we are still talking about a list of integers
20:00 <Darren> I took the easy way. &BB.READ %#=[settag(%q<board>,[time()],|)]
20:01 <grungies1138> also keep in mind that this is intended to be a very basic design.
20:01 slackfriarzen1 <friarzen> yeah. true.
20:01 <friarzen> hmm...maybe flip it around.  track the last-read message id, and then keep a list of unread messages.
20:02 DiscordBot <grungies1138> why would I track unread messages on a character?
20:02 <grungies1138> or store a list of unread for each character on the board.
20:02 <grungies1138> which puts me right back in the same position
20:03 slackfriarzen1 <friarzen> so if you have 300 messages, and they've read up to 200 skipping the occasional, you'd have the list of occasional missed, and the remaining unread that would get removed as the player read them up to most recent.
20:03 DiscordBot <Darren> Keeping track of the time that a post was read for each board will work, but it won't track unread posts if the player skips messages
20:03 slackfriarzen1 <friarzen> it would only be "refreshed to most recent" when the player actually goes to read new messages.
20:05 DiscordBot <grungies1138> how do I clear all locks on an object?
20:18 <Darren> .clear() apparently
20:18 <grungies1138> ahh thank you
20:39 <grungies1138> One more command
20:39 <grungies1138> and it's a super simple one
20:42 <Darren> You're on a roll. Must be a slow day at work :p
20:45 <Thenomain> Thoughts on this bundle for Python newbs? :: https://www.humblebundle.com/level-up-your-python
20:46 <grungies1138> not all that slow, but I hit a stride
20:52 <Darren> I bought that last year, was not impressed. Save your money and put it towards a copy of Learning Python 5th Edition instead. https://read.amazon.com/kp/emb[…]_dp_K3vEDbTCN0F09
21:03 bostrt joined #evennia
21:03 bostrt joined #evennia
21:06 Griatch There may still be an Evennia Pycharm license around if you want one - for free, no bundle needing to be bought :)
21:12 Learn Python 3 the Hard way is around. People liked the original book; did anyone try the py3 version? The author antagonized a lot of people with his ranting about py3 some years back, soured me a little on the books.
21:15 My favorite Python book is this: https://www.amazon.com/Python-[…]&s=books&sr=1-126 It's excellent for beginners but also allows you to grow. Alas, it's 10 years old now so it's in dire need of a 5th edition. But it does cover py3 and should work perfectly fine to start out with.
21:17 Looks like the next edition is coming in a year, woo: https://www.amazon.com/Python-[…]ef=dp_ob_title_bk
21:33 DiscordBot <BP-Santo> Yeah most of the humble bundles for technical books are really meh
21:33 <BP-Santo> Better to buy a single, well respected text than a bunch of often outdated crap bundled in with something good but possibly not best which is usually the case
21:39 <Darren> The humble bundle tech books are generally not very well written, either
21:40 <grungies1138> hmm.  ok so I guess Msg.objects.get_by_tag() doesn't actually work
21:41 <Darren> When they're giving away big collections of books that normally sell for anywhere between $20 and $40, for next to nothing, there is a reason
21:46 <BP-Santo> I personally like  authoritative works written by brilliant people - even if I don't agree or don't understand or cannot apply in my day to day activities I feel I can still draw many benefits now or in the future. You can rarely find books like that in the discount bin.
21:47 <grungies1138> something is not working right
21:48 <BP-Santo> whats wrong?
21:48 <grungies1138> tags.
21:48 <grungies1138> evennia.search_tag is not finding clearly tagged items
21:51 <grungies1138> >>> from evennia.comms.models import Msg; message = Msg.objects.filter(id=20); self.msg(message[0].tags.all()) ['3']
21:51 <grungies1138> result of in-game command tag/search '3'
21:52 <grungies1138> No objects found with tag '3'.
21:52 <grungies1138> and evennia.search_tag() returns the same.  nothing found.
21:56 <BP-Santo> I dunno, only thing that comes to mind is searching by tag not being possible with Msg
21:56 <grungies1138> Msg has the tag handler though
21:56 <BP-Santo> Yeah but the search itself could maybe not search all the tables?
21:56 <grungies1138> but the search might be restricted to  typeclassed objects.
21:56 <BP-Santo> Maybe MSG lives in its own table
21:57 <grungies1138> which, of course, it does
21:57 <grungies1138> and I have to leave.  I'll hit Griatch up later.  If it's a bug, I'll create an issue.
21:57 <BP-Santo> safe safe
21:57 <Darren> Cya
22:06 <Darren> 6:05pm anf I've already hit the wall. Working with no sleep sucks 😦
22:19 <Darren> You'd think that evolution would have found a way to eliminate the need for sleep by now
22:22 <Calades> It did. If you're a stupid jellyfish.
22:25 <Darren> No fair
22:28 <Calades> Totally fair. You trade in that endless stamina for a big brain that needs to be super cooled. 😉
22:33 KatieLove joined #evennia
22:39 KatieLove so I'm trying to write code to check to see if an object is a subclass of a class in order to find out if I can perform certain operations on it. For example, making sure an object is a weapon before being able to wield it.  I tried using the python isinstance() function but it isn't finding the typeclass.  It there a recommended way to do this? I
22:39 had thought of just putting a string value is_weapon or is_food or whatever in them, and then checking the value of those, but it seems like a workaround rather than the proper solution.
22:41 slackfriarzen1 <friarzen> what is the typeclass you are looking for, and what is the typeclass of the object being evaluated?
22:41 KatieLove in this case sword is a subclass of type weapon
22:43 weapon is a subclass of the object typeclass
22:44 slackfriarzen1 <friarzen> yeah, ok, you probably want the utils.inherits_from() method then instead of isinstance()
22:44 KatieLove oh thanks! looking that up now...
22:44 DiscordBot <Darren> Sounds like you want utils.inherits_from(), yeah.
22:47 KatieLove well at least it isn't crashing now! :-D
22:47 it isn't quite working. I think I need to work out the correct class name
22:48 DiscordBot <Darren> Not crashing is a good sign 🙂
22:49 KatieLove got it! Thank you! just did a type() to figure out how to fill in the type information
22:50 it feels good when you start understanding this stuff
22:50 slackfriarzen1 <friarzen> woo!  :thumbsup:
22:51 evenniacode [issues] strikaco opened issue #1917 in evennia: Inconsistent Django requirements (https://github.com/evennia/evennia/issues/1917)
23:00 [issues] strikaco closed issue #1917 in evennia: Inconsistent Django requirements (https://github.com/evennia/evennia/issues/1917)
23:00 [issue comment] strikaco commented on issue #1917 (Inconsistent Django requirements) in evennia: After recreating the repo and instance, it looks like whatev[253 more] (https://github.com/evennia/eve[…]comment-530598277)
23:07 KatieLove joined #evennia
23:08 KatieLove So how does everyone handle attacking in their mu*?  I mean, I can attack <mob>, but what happens if you attack <table>?  Does is let you do so? Does it fail?  Do you have objects that you can attack, or just mobs (for instance breaking down a door)?
23:17 DiscordBot <Kovitikus> I currently check if the attack target has an HP attribute, but I could see myself changing that later to an inheritance check or a tag check.
23:18 KatieLove That's how I have been implementing it too. Figured then I can make things distroyable just by giving them hp
23:20 DiscordBot <Kovitikus> Sure. I can always keep the HP check and tag things that have HP, but don't get attacked. Might even add a lock if the target has HP, normally shouldn't be attacked, yet could in certain cases.
23:23 <Kovitikus> Then again, could be easier to simply use locks in the first place, so permissions can be applied dynamically.
23:24 KatieLove I have this fear i'm going to get way down the road and then wish I had done this all a different way
23:24 DiscordBot <Kovitikus> This way you can attack a table only with certain commands like kick or punch.
23:26 <Kovitikus> Meh, get used to it. Refactoring is inevitable. It's just how coding works. You can't let that freeze you in place or you'll never make progress.
23:27 KatieLove so what did you use to implement?  hasattr() or try: ?  I'm having difficulties getting hasattr() to work, but it seems like a cleaner approach to me
23:28 DiscordBot <Kovitikus> I just use simple if checks. if target.attributes.has('hp'):
23:28 KatieLove there's a .attributes.has?
23:29 DiscordBot <Kovitikus> Then an else: with an error message and a return to leave the function.
23:29 KatieLove i've been doing if hasattr(a, 'property'):
23:29 actually I did if not has attr(): then return
23:29 DiscordBot <Kovitikus> Hehe, nah, use the attribute handler instead.
23:30 KatieLove haha wow. I just found it. Thanks!  I feel like there are just so many little things like this I have to learn
23:31 I'm really glad I have you all here to bounce questions off of or this would be a lot slower going
23:33 it works! Also I need to stop forgetting to put a : at the end of my if statements.
23:34 DiscordBot <Darren> I rarely use .has(). I normally just get the attribute and if the return value is false, the it isn’t set on that object eg ‘a = self.db.hp. If a...’
23:34 <Kovitikus> Little mistakes account for most issues, even with more experienced coders.
23:55 <grungies1138> the estimates are that there is a bug for every 1000 lines of code in something like Windows.

← Previous day | Index | Server Index | Channel Index | Today | Next day → | Atom Feed | Search | Google Search | Plain-Text | plain, newest first

Evennia