RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Random Encounters only at night! Is this possible?

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 81
Hello people.

Basically for my game (The Crystals of Time)
i'd like the random encounters that happen every X amount of steps, to only happen during the evening/night.
Is this possible?

The day night script im using is KGC's day/night phase...

I know how to set random encounters on the map, obviously, but how can i use the day night variable to make this only happen at evenings and night time?
Seeing as the random encounters are created from the map properties i cant see how this can be done as there is no place to add a variable...

I hope this makes sense to some one and they could shed a little light on the situation...
I'm keen to get moving with my game :)

Thanks Matt

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
This seems like something that can easily be fixed, and I think I know how... But, I would say to go ahead and not worry about it for now, and I'll take a look...

I'm sure that if we fix this up just right, it will be fantastic!
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
Ok, posted a new post because I wanted this bumped so you would read...

I think I can make this work!

Set a switch to turn on when night comes along, and have a background event playin' that will check for that switch (or be activated by it) and start a processing of a variable that will determine how many steps before an encounter and what enemy ID you will face (you can set commands for this in the event menu)

That's the only way I can think of for doing this, sorry... But I'm an eventer at heart, a scripter only in my own fancies.

However, this is a simple event based solution, but you would have to have different events for different areas and difficulties But it seems very easy to pull off, if you ask me...


How does that fit for you, eh?
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

**
Rep:
Level 83
I am very proud to say that i have the solution in one of my scripts :)

http://rmrk.net/index.php/topic,34614.0.html

I don't know KGC night and day script .
But if there is a switch or something that can tell you if you are in night or day , you can make a common event based on it . In this common event , you can use my script to modify the encounter list .
You can use my scripts freely . but not for commercial use .
:ccbync:
Don't encrypt your game !!!
Want to give me credit ? Easy ,add me in your game :

**
Rep: +0/-0Level 81
thanks for the help guys,
I'll see if i can get around this problem with your solutions...

Im all very new to game making and scripting but i'm loving every second of it...

Here's some screenshots of my game - The Cyrstals of Time
Any sugestions welcome...
i'm trying take my time with it and make something thats really worth playing :)

Heres a few screen shots... hope you like.

Title screen
http://i282.photobucket.com/albums/kk280/mattdeepelm/1title.jpg   

Screen 1
http://i282.photobucket.com/albums/kk280/mattdeepelm/Screen1.jpg

Screen 2
http://i282.photobucket.com/albums/kk280/mattdeepelm/Screen2.jpg

Screen 3
http://i282.photobucket.com/albums/kk280/mattdeepelm/Screen3.jpg

Battle Screen
http://i282.photobucket.com/albums/kk280/mattdeepelm/Screen4.jpg

Thanks again
Matt

**
Rep: +0/-0Level 81
Ok, posted a new post because I wanted this bumped so you would read...

I think I can make this work!

Set a switch to turn on when night comes along, and have a background event playin' that will check for that switch (or be activated by it) and start a processing of a variable that will determine how many steps before an encounter and what enemy ID you will face (you can set commands for this in the event menu)

That's the only way I can think of for doing this, sorry... But I'm an eventer at heart, a scripter only in my own fancies.

However, this is a simple event based solution, but you would have to have different events for different areas and difficulties But it seems very easy to pull off, if you ask me...


How does that fit for you, eh?

Thanks for the advice my friend, i was beggining to think that no one else had even considered random encounters only at set times of day.

I was going with the concept of exploring and questing during the day, and battling and leveling up during the night.
This gives the player time to find items and prepare for battle during the day, as well as adding more depth to the battle system by including the tinted effects of the day/night script im using (thanks to KGC)

... Im a little confused as to how you
"start a processing of a variable that will determine how many steps before an encounter and what enemy ID you will face"

I know how to make a variable called 'steps' (for example).
if they are say 50 or above then does this switch then become active? is that how it works?

Also how does my variable called 'steps' actually register the steps my charaters takes... I dont think i quite understand.

sorry for not being so clued up...
I wish it was easier to learn this stuff, but you guys are pretty much the only source of help/info

thanks
Matt

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
Sorry... I mean to say is to set a variable called Steps

Now make Steps equal any number from X to Y.

Now, using the amazingness of conditional branches, steps will be your conditional variable.

If the number is 1, wait for 60 seconds (or, if you can find a way, have it equal Z steps)
if the number is 2, wait for 120 seconds (or, if you can find a way, have it equal V steps)

Etc...

Then make a new variable called monster that starts at 1 and ends at your last monster ID (in monster tab) and have the event command "start battle processing" equal a variable to find which monster to battle.

I think I explained it a bit clearer now, but if you still need help, don't hesitate to ask.
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

**
Rep: +0/-0Level 81
Sorry... I mean to say is to set a variable called Steps

Now make Steps equal any number from X to Y.

Now, using the amazingness of conditional branches, steps will be your conditional variable.

If the number is 1, wait for 60 seconds (or, if you can find a way, have it equal Z steps)
if the number is 2, wait for 120 seconds (or, if you can find a way, have it equal V steps)

Etc...

Then make a new variable called monster that starts at 1 and ends at your last monster ID (in monster tab) and have the event command "start battle processing" equal a variable to find which monster to battle.

I think I explained it a bit clearer now, but if you still need help, don't hesitate to ask.


Right, i'll apologise in advance because you lost me on the last post...

"make steps equal any number from X to Y."
- It this written as script in the event?

"Now, using the amazingness of conditional branches, steps will be your conditional variable.

If the number is 1, wait for 60 seconds (or, if you can find a way, have it equal Z steps)
if the number is 2, wait for 120 seconds (or, if you can find a way, have it equal V steps)"
- I dont mean to be ungrateful, but isnt this an extremly complicated way of getting the result i need?
- surely doing this for every area in my game will be very time consuming?


Its frustrating me because have achieved certain effect i want in my game...   
for example
- in the day time, all interior windows with curtains are open, at evening/night the are all drawn
- all lights in the town are off in the day. On, in the evening/night

To do the above things, i am using a variable that reckognises when my day night script has a value of 1 (this is when it is evening/night) therefore changing all the graphics to the oppriate ones (eg. curtains closed)

Surely there must be a simple way i can apply this variable to an area without lots of compliated events?...

sorry i ask a lot of questions
Matt

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
not a problem at all...

The thing is, I am making this sound much more complicated than it is... Basically, the event will look something like this, and I suggest setting it as a common event to make things go quicker... (if V is before a word, it is meant to be a variable. Anything in brackets ([]) is simply notes)

[You would have a parallel process that would be set to check if your day or night is on, and it would look similar to this]
-Conditional Branch: VDayNight == 1 [as I assume that 1 is nighttime]
-> Call common event (monsters)


[Then, that event would call up this Common Event]
Variable operation: VSteps = Random number (X-Y) [where X and Y can equal any number, really, as long as you are willing to code them]
-Conditional Branch: VSteps == 0
->wait 60 secs
->Variable operation: VMonster = Random number (X-Y) [where X and Y can equal any number, really, as long as you are willing to code them]
->Battle Processing: VMonster [this will make monsters appear based on X and Y so that it won't always be a slime or something]

[and you would have to repeat this for every step or group of steps you have for VSteps.]

It isn't really a complicated thing, it just sounds that way... To be honest, if it seems like too much work, I recommend using the script provided above... It may be easier than this...
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

**
Rep: +0/-0Level 81
not a problem at all...

The thing is, I am making this sound much more complicated than it is... Basically, the event will look something like this, and I suggest setting it as a common event to make things go quicker... (if V is before a word, it is meant to be a variable. Anything in brackets ([]) is simply notes)

[You would have a parallel process that would be set to check if your day or night is on, and it would look similar to this]
-Conditional Branch: VDayNight == 1 [as I assume that 1 is nighttime]
-> Call common event (monsters)


[Then, that event would call up this Common Event]
Variable operation: VSteps = Random number (X-Y) [where X and Y can equal any number, really, as long as you are willing to code them]
-Conditional Branch: VSteps == 0
->wait 60 secs
->Variable operation: VMonster = Random number (X-Y) [where X and Y can equal any number, really, as long as you are willing to code them]
->Battle Processing: VMonster [this will make monsters appear based on X and Y so that it won't always be a slime or something]

[and you would have to repeat this for every step or group of steps you have for VSteps.]

It isn't really a complicated thing, it just sounds that way... To be honest, if it seems like too much work, I recommend using the script provided above... It may be easier than this...


Right...
Im still really confused but i think i've found the answer to my problem, I just cant get it to work for some reason...

In the KGC day/night script im using there is this set of instructions for encounters at set times of day.

? Phase-Specific Encounters ?
#_/ 
#_/  When [DN Phase#](Where Phase# refers to the phase. 0 = Noon, 1 = Evening,
#_/   2 = Night, 3 = Morning) is inserted into a specified Troop's "Notes" box
#_/   in the Troops tab of the database, the specified Troop will only appear
#_/   under those conditions.


This sounded too good to be true...
-when i tried to follow these intructions I noticed their is no 'Note' box in the troop tab of the database, the only appropriate tab   that had a 'Note' box was under the enemies tab....
- When i entered [DN Phase1] in the 'Notes' box for a ghost for example, hoping this would create encounters with the ghost in my designated area but only in the evening of my day/night cycle, when i started my game this was not the case and random encounters in that area (the church graveyard) we're still happening during the day...

can anyone help... this piece of script seems so easy to follow but i just can't figure it out, maybe i've gone mad....

Matt

**
Rep: +0/-0Level 81
YAY!!!!!

Problem of having encounters at set times now figured out....

I just needed to put the [DN 1] tag in the name of the enemy troop i wanted to set at that time.


The only problem i have now is the fact that the battle backs i have for the encounter (a church sideview, with parallax fog effect) dont seem to be affected by the script when it comes to the tinting effects of the different day cycles.

currently it looks a bit stupid getting attacked in evening/night and then the battle back looks nothing like the time of day you were in when attacked.

Can anyone suggest how i could get around or solve this problem?...

I've already considered loading my battle backs into something like photoshop and tinting them to a similar shade, but thats not the exact effect i want.

I'd much prefer the battle back to have the same tint from my day/night script as well as oviously tinting the charaters and enemies....
Otherwise again, they're going to look out of place...

any ideas?

Matt

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
An idea I could think of (although I have no clue at all, I am only theorizing) is that you could have a dark parallax in front of the battle that will tint everything...
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.