inherit
177248
0
Mar 31, 2020 16:17:47 GMT -8
fennecfyre
22
February 2012
fennecfyre
|
Post by fennecfyre on Jun 20, 2019 12:37:32 GMT -8
I'm fiddling around with a survival-based animal roleplay site, and one mechanic I want to implement is random-chance encounters with predatory creatures and other dangers. Basically, every in-character board that represents a location in the game world will have a danger rating of sorts that determines how likely one is to encounter something unpleasant. If it's possible, I'm trying to find a plugin that uses random number generation (or something similar) to: 1) Run a check either when a thread is first posted or whenever a new post is added to the thread. 2) If the random-number result falls in the range for an encounter, it adds a small blurb on to the post to let the user know they've triggered an event. 3) Notifies/tags an admin account. I don't need the plugin to write out the random event itself, just automatically roll a virtual die to see if a player encounters something and then tag an admin account so they can DM the encounter. I've been trying to accomplish this with the Events on Posts plugin, although I don't see any way to tag a staff account using it. It does mention another plugin, Interests Notification Center, which I was able to find here but is no longer available in the plugin library, making me think it might be out-of-date. I can download it from that thread and try to import it directly, although it would require me to buy another super key, which I'm hesitant to do until I know it'll work. Any advice or help is appreciated!
|
|
inherit
Official Code Helper
65613
0
1
Sept 28, 2022 13:12:14 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,835
December 2005
horace
|
Post by Chris on Jun 20, 2019 13:46:04 GMT -8
Have you given Todge 's Creature Hunt II plugin a gander? Although I myself have never used it, a quick glance suggests the plugin does write content to post so I'm sure it wouldn't be far fetched to ask that an optional list of people to tag while that is happening be added
|
|
inherit
177248
0
Mar 31, 2020 16:17:47 GMT -8
fennecfyre
22
February 2012
fennecfyre
|
Post by fennecfyre on Jun 20, 2019 14:17:55 GMT -8
I did look at that one, yeah! If it's possible to tag users in it then it would be a perfect fit, but I'm not sure if that's a feature.
|
|
inherit
Official Code Helper
65613
0
1
Sept 28, 2022 13:12:14 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,835
December 2005
horace
|
Post by Chris on Jun 20, 2019 15:47:46 GMT -8
Not a current feature but as I said it appears to add post content meaning it could be quite trivial to add that feature simply ask in the support thread for that plugin.
|
|
inherit
177248
0
Mar 31, 2020 16:17:47 GMT -8
fennecfyre
22
February 2012
fennecfyre
|
Post by fennecfyre on Jun 20, 2019 16:24:11 GMT -8
I asked, so we'll see what happens!
Looking at it again, though, are the plugin's events able to pop up randomly in threads, or do you have to create the encounter as a thread and wait for people to reply? I'm looking for something that can be sprung on players without warning--think walking in the tall grass and a Pokemon popping out.
|
|
inherit
Official Code Helper
65613
0
1
Sept 28, 2022 13:12:14 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,835
December 2005
horace
|
Post by Chris on Jun 20, 2019 16:32:50 GMT -8
My understanding of how the plugin works is it kind of rolls a die anytime you create a post in the thread to determine the chance that some event you define occurs during the creation of that post. The author of the plugin (Todge) would of course be much more qualified to answer questions about the capabilities of the plugin they have written since as I said I have never even used it. Edit: I took a deeper look at the source and it doesn't actually add content to the post when an event occurs so I am way off base on this one, sorry Todge
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,281
January 2004
todge
|
Post by Todge on Jun 21, 2019 17:30:32 GMT -8
My understanding of how the plugin works is it kind of rolls a die anytime you create a post in the thread to determine the chance that some event you define occurs during the creation of that post. The author of the plugin (Todge) would of course be much more qualified to answer questions about the capabilities of the plugin they have written since as I said I have never even used it. Edit: I took a deeper look at the source and it doesn't actually add content to the post when an event occurs so I am way off base on this one, sorry TodgeNo worries Chris.. And well done in managing to decrypt the mess I made of the coding. All these new smilies and not a single embarrassed ones....
|
|
inherit
177248
0
Mar 31, 2020 16:17:47 GMT -8
fennecfyre
22
February 2012
fennecfyre
|
Post by fennecfyre on Jun 21, 2019 17:46:03 GMT -8
My understanding of how the plugin works is it kind of rolls a die anytime you create a post in the thread to determine the chance that some event you define occurs during the creation of that post. The author of the plugin (Todge) would of course be much more qualified to answer questions about the capabilities of the plugin they have written since as I said I have never even used it. Edit: I took a deeper look at the source and it doesn't actually add content to the post when an event occurs so I am way off base on this one, sorry Todge No worries Chris .. And well done in managing to decrypt the mess I made of the coding. All these new smilies and not a single embarrassed ones.... Ahh, okay. Creature Hunt may not be the solution I need then, but thanks regardless. Still looking for ideas/suggestions/kind souls willing to help!
|
|
inherit
Official Code Helper
65613
0
1
Sept 28, 2022 13:12:14 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,835
December 2005
horace
|
Post by Chris on Jun 21, 2019 21:44:32 GMT -8
I am assuming the plugin fits your criteria except for the part about tagging staff. Here is an experimental workaround implementing the notification via tagging idea I originally thought was possible through a minor tweak to the creature hunter plugin whenever someone in the thread attacks/retreats. <script> /* Add notification to select members when a poster attacks or retreats from a creature in a thread */ $(function () { $('input[value="Attack"], input[value="Retreat"]').bind_first('click', function () { $(this).closest('form').find('textarea[name="message"], .bbcode-editor textarea[tabindex]').replaceSelection('[div style="width:.1em;height:.1em;overflow:hidden;"]@admin @staff1 @staff2[/div]'); }); }) </script>
Try dropping that code into the footer of the board (or boards) the plugin runs on changing the names to be tagged to who you want to be tagged on your forum when an attack occurs. Obviously @staff1 and @staff2 don't exist so replace with real names or remove. You can add as many to be notified as you wish. It's a pretty simple script so I didn't do much testing but if you decide to give it a try let me know if you encounter any unforeseen circumstances.
|
|
inherit
177248
0
Mar 31, 2020 16:17:47 GMT -8
fennecfyre
22
February 2012
fennecfyre
|
Post by fennecfyre on Jun 22, 2019 5:05:50 GMT -8
Hey Chris, I really appreciate you writing the mod up for me, but I don't think Creature Hunt is what I need for my site. The dangers players would encounter are typically coming looking for them, not the other way around. I need a plugin that can "interrupt" a thread with an encounter, which I don't think CH is designed to do.
|
|
inherit
Official Code Helper
65613
0
1
Sept 28, 2022 13:12:14 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,835
December 2005
horace
|
Post by Chris on Jun 22, 2019 13:54:32 GMT -8
Hey Chris, I really appreciate you writing the mod up for me, but I don't think Creature Hunt is what I need for my site. The dangers players would encounter are typically coming looking for them, not the other way around. I need a plugin that can "interrupt" a thread with an encounter, which I don't think CH is designed to do. I had setup the plugin in a political discussion thread and on the 5th reply Ivanka Trump attacked the poster who had just coincidentally created a post disparaging Mr Kushner. The poster definitely was not expecting to be attacked in the thread (at least not by Ivanka Trump) and in fact had no idea there was a monster lurking in the neighborhood but when that happened she chose the attack button rather than retreat and landed a massive blow then continued the political discussion. Four posts later Ivanka attacked again and this time there was a killing blow (then the thread discussion continued). That sounds to me like what you are describing (an "interruption"), nobody was actively hunting the Ivanka
|
|
inherit
177248
0
Mar 31, 2020 16:17:47 GMT -8
fennecfyre
22
February 2012
fennecfyre
|
Post by fennecfyre on Jun 22, 2019 14:16:36 GMT -8
I had setup the plugin in a political discussion thread and on the 5th reply Ivanka Trump attacked the poster who had just coincidentally created a post disparaging Mr Kushner. The poster definitely was not expecting to be attacked in the thread (at least not by Ivanka Trump) and in fact had no idea there was a monster lurking in the neighborhood but when that happened she chose the attack button rather than retreat and landed a massive blow then continued the political discussion. Four posts later Ivanka attacked again and this time there was a killing blow (then the thread discussion continued). That sounds to me like what you are describing (an "interruption"), nobody was actively hunting the Ivanka That's beautiful xD Though, did you trigger the Dreaded Ivanka's attack yourself, or was it an automated thing? Like, there was a 20% chance of encountering the Ivanka when making a post in that board.
|
|
inherit
Official Code Helper
65613
0
1
Sept 28, 2022 13:12:14 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,835
December 2005
horace
|
Post by Chris on Jun 22, 2019 14:19:29 GMT -8
Todge's plugin handles the probability of event occurrences once you set it up, no further intervention is necessary
|
|
inherit
177248
0
Mar 31, 2020 16:17:47 GMT -8
fennecfyre
22
February 2012
fennecfyre
|
Post by fennecfyre on Jun 22, 2019 14:40:52 GMT -8
That's what I need--a plugin that automates the probability of an encounter happening so I can step in and DM the encounter. It's at least worth experimenting with xD
|
|
inherit
Official Code Helper
65613
0
1
Sept 28, 2022 13:12:14 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,835
December 2005
horace
|
Post by Chris on Jun 22, 2019 14:51:02 GMT -8
Just add it to your test forum (you do have one of those don't ya?) to see it in operation and work out any kinks before putting on your mainline forum.
|
|