Enquirer Home Page | Twitter | Back to Improbable Island

 Forum Index > Places > Places: Programming Help New Topic Post Reply
 Adding Random Events to your Bar
 |  Printable Version
Twosocks Monkey
 Wednesday, March 28 2012 @ 11:46 PM UTC (Read 1338 times)  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 01/28/11
Posts: 246

Ok well so the PSK has this neat thing. Sometimes when you visit, something random happens. There's the shady guy...the drunk. You know. Neat flavour things. Oh yes, flavour. SO DELICIOUS!!!!

So I have a bar in my place. Well, a speakeasy.

And I thought, hey, I should be able to figure out how to do that thing the PSK has! I've been reading all of Hairy Mary's tutorials and Buddelia's comments etc.

And the cool thing is, I got it to work. I don't have the pages written yet with the flavour text, but I have a program with 10 escape hatches and each one triggers just deliciously.

There's just ONE PROBLEM.

Here's the concept:

Enter Speakeasy

Trigger program that increments a memory depending on whether or not you're playing ZOMBIE. This is an undead speakeasy, I want to know how many undead visit! It increments one memory if you're undead, and one if you're not. (I WISH it could tell if you 'identify' as undead, say those playing custom race vampires, but you know, I can't have everything. Ahem, anyway, moving on).

Trigger program that checks to see if you've EVER visited the main entrance (yes you had to to get here) which automatically shows the hidden door back out (it's a speakeasy, the door should be hidden!). Just for kicks, I also added my roll to thought here. Cause why not. This rolls a thought 'randomizer' to a number between 1 and 10.

Trigger program that uses the 'randomizer' thought. It has one line for each option. Thought Equal in the first is set to 1. Then the dial is set to ALL FAIL. If it's 1 it does what's in the escape hatch (which will eventually be FLAVOUR TEXT AWESOME #1) and is currently show trees so I can see if it's working before I make 10 pages of fancy text. There are 9 more rows all with the dial set to ALL FAIL, so it only triggers the flavour text if the 'randomizer' is say, 3, or 4, or whatever it rolled.

SO FAR THIS WORKS. I'VE RUN IT.

THE PROBLEM.

There are other things to do in the Speakeasy. Look around, check out the menu, etc. Problem is, that random thing, well actually ALL THE PROGRAMS in the main room that I just listed, they ALL TRIGGER EVERY SINGLE TIME YOU LOOK AT A PAGE.

This is great in some ways. For instance, the hidden door stays shown. Great. The exit is always there.

PROBLEM is...now we've got random events happening ALL THE TIME.

Now I see TWO problems actually. One, this random event thing needs to be MORE RANDOM.

AND TWO, well...heck. I don't WANT them all running all at once.

Current brainstorming between me and Budd is that I need to make a new memory just for this. One that increments every time you look at a page or 'do anything' in the room proper. Then I can set all the programs I only want running the first time you enter the room (from the entrance or a different place) to only run when that memory is at 1, which it will be when you enter the room. Then I'll need to add programs in the other rooms nearby to set that memory back to zero on exit, so you can trigger the random event again if you walk back in.

Does this...

Will this work?

Is there an EASIER way?

I trust you people. Help me.

PS: I thought at some point that I should've designed the programs I wanted remotely instead of IN THE ROOM I was working in, and theoretically that might help, however, I've already shelled out for a ten row program in the room, so I gotta figure out how to make it work IN THE ROOM and not remotely. And honestly, every answer I came up with that involved triggering it from a remote location has the same problem at heart, all the programs run every time you do ANYTHING in the room.

Love, Rose





moooooooooo Visit and help me finish the monster list: goo.gl/rpBGe (Ya'll mostly know me as CLOG, fyi)
 
Profile Email Website
Quote
Hairy Mary
 Thursday, March 29 2012 @ 12:33 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/17/08
Posts: 1083

I was going to write the next (but one) memories tutorial on that very trick in fact. I've used it and it works. In my case it was for a more sophisticated "grand entrance" so you only "sweep down the stairs"* when you enter, not every time that you say anything, which might get a little tiresome after a while.

Minor mistake. In the nearby rooms you're setting the memory to zero, but in the room itself, checking if it is one.

Is there an easier way? I can't think of one, and I've given it some thought.

You can reuse the memory for something else elsewhere. If you want to have a lift like Budd's thinking of say, or a casino with a gambling game in which you want a memory for. Just make sure that each usage is isolated from the rest and the memory is set to an appropriately value on the way in.

Also, you only really need one memory part for this, so you've still got another five to play with in the bar. Make sure that it never increments past nine. Put the Increment Memory in one of the programs which only runs first time.

How do you mean "more random"? That this only happens sometimes? That just takes a dice roll in front of the program. That is, make the first line a Dice Roll, and check that it's over 800 (for a one in five chance of random event). Alternatively, in your original Roll to Thought, make it a number between 1 and 50, so that if it comes up 1-10 then you get the corresponding event, but if it's 11-50 then nothing happens.

Or that things can be more random? You could have anything that you can program. (Build elsewhere this time, and then use a Run Program.) So - Warp to somewhere else in your Place. An NPC appears briefly and you have the opportunity to chat with them. (That's a show page and a show Page Link to the starting segment of a conversation. Or else, if you're using the NPC's as "movable objects" idea that got mentioned elsewhere, then move your NPC there.) Once you get started, then imagination will give you lots.

Should have built elsewhere. With hindsight, yes. This sort of thing is going to be happening all over the place. Everybody who gets anywhere at all has to experiment a bit, and experiments a) Aren't always the best ways, but b) are permanent. My places are rough as anything. But you've done it now.

You can still call this program from other rooms in your Place. If you make the probability that something strange happens a Thought then you can call it with varying chances of something strange happening from different rooms. By "make it a thought" I mean like in a previous program Set Thought chanceofrandomevent to 200, then in this program start with Roll to Thought eventhappens 1 to 1000 and then a Thought eventhappens Less Than chanceofrandomevent. Then elsewhere you can set chanceofrandomevent to something else before you call this program.

----

*In my case, see the garden as you enter the cottage.


 
Profile Email
Quote
Twosocks Monkey
 Thursday, March 29 2012 @ 12:50 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 01/28/11
Posts: 246

Ok so I've done some work.

I bought a new memory chip in the Lodge, and labelled it 'reset button'.

I added a line in the main entrance that sets the reset button to 0.

Now when you enter the Speakeasy all the programs I only want to fire once have a Memory lesser set to 1. That way if it's 0 it will fire, and if it's more than 0 it won't.

I added contraptions to the four pages that allow you to 'look around' that all increment the reset button plus 1 (One thing I didn't do was only allow them to go to 9. What will happen if they go over 9? Will it explode?).

Then if you leave the Speakeasy back to the main entrance, it will reset the 'reset button' back to 0, and if you visit the catacombs outside the bar the same thing will happen.

So far, so good.

Also, I added the die roll contrivance set to 800. That seems to be that.

I've poked about, and it seems to work. Fantastically actually.

YAY!

So far I only want these events to happen in the bar, but now I think it may be fun to have 'Something Improbable' events happen ALL OVER, with a very slim chance of happening. That...that sounds epic. If I do that, I'm storing those programs in a secret program room somewhere or something.

Now for fancy flavour text in ten flavours of...goodness. Both the hard and the fun part.

Thanks!

Also, also, I love your tutorials Hairy Mary, sorry if I'm jumping the gun on this one. I just got excited.

-Rose


moooooooooo Visit and help me finish the monster list: goo.gl/rpBGe (Ya'll mostly know me as CLOG, fyi)
 
Profile Email Website
Quote
Hairy Mary
 Thursday, March 29 2012 @ 03:49 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/17/08
Posts: 1083

Excellent!

Quote by: Twosocks+Monkey

I added contraptions to the four pages that allow you to 'look around' that all increment the reset button plus 1 (One thing I didn't do was only allow them to go to 9. What will happen if they go over 9? Will it explode?).



Did...did nobody tell you? The internet fairies will be escape from the web in which they have been bound to serve us, leading to a titanic struggle between good and evil. Surprised! Also, if you're using the second place in your memory to remember something else, then it will interfere with that.

Also, also, I love your tutorials Hairy Mary, sorry if I'm jumping the gun on this one. I just got excited.



Shocking behaviour! How dare you try to do something that I haven't yet written about in the wiki! What is the world coming to?
*slouches off mumbling something about "the youth of today", "When I were lad" etc. etc.

Oh, and cheers for saying nice things about the tutorials. Big Grin


 
Profile Email
Quote
Content generated in: 0.37 seconds
New Topic Post Reply



 All times are UTC. The time is now 04:39 AM.

Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content