|
Post by The Final Rune on Feb 24, 2007 20:39:34 GMT -5
[white]After a recent chat discussion, I've decided to share my game's unique clock design. A lot of you have no doubt made clock systems of your own, most of which are run by action scripts which cease to function when a content script runs. This may frustrate some of you, maybe, maybe not. Needless to say I didn't like having a clock I couldn't depend on. So I in turn created an entirely different from the norm in game clock. The difference between my clock and other game clocks is that mine is neither run in real time nor run in constant flow. My clock is an accumulation based counter that assigns passage of time calculated from the characters footsteps. Each step in my game adds one quarter minute (0.25 seconds) to the clock. This way game time doesn't pass while you pause, turn away or got to the bathroom. To further immerse the player in my time flow I've introduced time based events and schedules for the NPCs. Everything you do other than just exploring, consumes time. Each conversation costs the player between 2-5 minutes. Sleeping will cause 6-8 hours to pass by (depending on whether you use a tent or a bed). These, along with others make time an important part of the game. After all, why include a clock if you’re not going to put it to use? First, let me just say that in my first design (I'll be showing you the second) I had two completely uneccessary scripts which ate up more than 3000 units of memory. The calculations I had the machine processing would sometimes cause it to freeze for more than 30 seconds while it worked everything out. Needless to say I found a better method. To begin with I made the following Variables: - Clock Min(.25)
- Clock Min
- Clock Hour
- Clock Day
Then, two content scripts: - Clock Counter
- Clock Display
Clock Counter000 Data: Game Info: Load 001 Data: Variable: Clock Min(.25) = Clock Min(.25) + 1 002 Script Branch: Condition: Variable Clock Min(.25) >= 4 003 Data: Variable: Clock Min(.25) = 0 + 0 004 Data: Variable: Clock Min = Clock Min + 1 005 Script: Condition End 006 Script Branch: Condition: Variable Clock Min >= 60 007 Data: Variable: Clock Min = 0 + 0 008 Data: Variable: Clock Hour = Clock Hour + 1 009 Script: Condition End 010 Script Branch: Condition: Variable Clock Hour >= 24 011 Data: Variable: Clock Hour = 0 + 0 012 Data: Variable: Clock Day = Clock Day + 1 013 Script: Condition End 014 Script Branch: Condition: Variable Clock Day >= 7 015 Data: Variable: Clock Day = 0 + 0 016 Script: Condition EndClock DisplaySince this script displays the variables I use the default text box. you could very well program it with a text box, but I don't have the energy to make a text box for 60 minutes and 24 hours of the day. Maybe In the future, if I get really bored. Also, note that all the message boxes should have the 'close window' box unchecked.000 Text: Message "Current Time " 001 Script Branch: Condition: Variable Clock Hour < 10 002 Text: Message "0" 003 Script: Condition End 004 Text Content: Variable: Display Clock Hour Digits Not Fixed 005 Text: Message ":" 006 Script Branch: Condition: Variable Clock Min < 10 007 Text: Message "0" 008 Script: Condition End 009 Text Content: Variable: Display Clock Min Digits Not Fixed 010 Text: Message " - " 011 Script Branch: Sort: Variable Clock Day 012 Script Branch: Apply If: Number is 0 013 Text: Message "Sunday" 014 Script Branch: To End 015 Script Branch: Apply If: Number is 1 016 Text: Message "Monday" 017 Script Branch: To End 018 Script Branch: Apply If: Number is 2 019 Text: Message "Tuesday" 020 Script Branch: To End 021 Script Branch: Apply If: Number is 3 022 Text: Message "Wednesday" 023 Script Branch: To End 024 Script Branch: Apply If: Number is 4 025 Text: Message "Thursday" 026 Script Branch: To End 027 Script Branch: Apply If: Number is 5 028 Text: Message "Friday" 029 Script Branch: To End 030 Script Branch: Apply If: Number is 6 031 Text: Message "Saturday" 032 Script: Branch End 033 Input: Buttons: Constant Wait 034 Text: Close Message WindowCreate the two system events and assign the approriate scripts. Create a custom status indirect effect with steps and ratio both set to zero and place the Clock Counter event in the Flow 2-World-Each Result slot. Apply the custom status to your main character and place the Clock Display script in the square button box in Game Settings-Advanced Tab (or as a call script in a button override script or in the Direct Effect Success slot for an item). Run the game and give it a try. Currently I've been running a check in my enter map script for when to apply time changes to the day. You could include it within the counter script, but I try to leave my custom traits doing as little as possible.[/white]
|
|
|
Post by NASH7777 on Apr 2, 2007 9:50:50 GMT -5
Ok I posted my ideas about this before here doansdomain.proboards27.com/index.cgi?board=Help&action=display&thread=1169136168&page=1#1175000231But you can make a button combo system where time is as important as which buttons you press. For example X..O..XX May be one combo but X..O..X..X may be another. It's not even that hard to make. Essentially you have looping 2 frame wait for button inputs, after each wait if you haven't pressed a button it adds to a variable keeping the interval of time. Afterwards it checks to see if the buttons pressed and intervals kept make a certain combo. For example, I could do the first combo two ways: I could set it up so you get 8-12 frames for the X..O part, same for the O..X part, but have only 0-6 frames for the XX final part The other way would be to let the first interval be be anything, allow the second interval to have to match the first with in a range of + or - 2, and the final range have half the interval of the first two with a range of -2 or +2. You give them the range because people aren't exactly perfect with timing. I'm a percussionist and I play a lot of DDR so I do alright, but I've seen some people that are absolutely horrible. This would also be a cool way to make a DDR Game. I may write up the exact scripts a bit later, or if someone gets ambitious then they can go ahead.
|
|
|
Post by Dungeon Warden on Aug 23, 2007 10:42:46 GMT -5
Direction Jumping
The main concept behind this idea is not mine. If anyone knows who the original designer is, let me know so that they can be created. The jump scripts (step 3 and 4) are my own as none were included in the original notes. I also edited the original notes and added my own observations.
This information will allow the party to Jump in the direction they are moving in using the [] button. If not moving, they will jump up and down on the spot.
1. Name an unused flag "[] pressed" (not required, but makes it easier to find the flag later.)
2. Create a system event for the [] button. You can find the [] button slot under the Adv Game settings.
3. Create a script for the above event that makes the party jump up and down.
Party Float +16/16 4F Party Float 0/16 4F Data Flag [] pressed = OFF
You need to make sure the "[] pressed" flag is turned off
4. Create a content script that jumps the party in the direction they are moving. Call this script "Moving jump"
Data: Game Info: Load Sort: Var 85 [party direction] Apply if: 0 Apply Together Vertical move +16/16 0F Float Height +16/16 0F Direction Move E 2 Steps Face: move Speed: X2 Float Height 0/16 3F Apply in Order to end Apply if: 1 Apply Together Vertical move +16/16 0F Float Height +16/16 0F Direction Move SE 2 Steps Face: move Speed: X2 Float Height 0/16 3F Apply in Order to end
... (repeat for every direction)
apply if: 7 Apply Together Vertical move +16/16 0F Float Height +16/16 0F Direction Move NE 2 Steps Face: move Speed: X2 Float Height 0/16 3F Apply in Order end Sort
Note that applying Vertical Move and Float together makes the characters jump smoothly. Don't put this script in an event. It will be called from an indirect effect using the script at step 6.
5. Create an action script:
Repeat while flag 0 [off(fixed)] = OFF (creates an unending loop) Input: Buttons: Constant Wait Script Branch: Var 04 [user button] = 6 (6 is the [] button) Data: flag: [[] pressed] = ON End Branch End Repeat
Place this event in the motion slot of an event on every map you want the character to be able to jump on. The easiest think is to create an event just for this purpose.
6. Create another content script. This will be placed in a system event so that it can be used in the indirect effect below.
Condition: Flag [[] pressed] = ON Data: Flag: [[] pressed] = OFF Call [Moving Jump] (this is the script you created in step 4) Condition End
7. Create a custom Indirect Effect. Set world Steps and world End values to '0' so that the effect won't end. Under Flow 2, World Result, place the system event that contains the script from step 6. In the character editor, under advanced settings, is the option to add custom indirect effects. Add this effect to any party member(this works best if their is one character who can never leave the party).
Whenever the party moves, the [] pressed flag is checked. If the party is not moving when [] is pressed, the script at step 3 will run. If [] is pressed while the party is moving, then the indirect effect causes the party to jump in that direction.
Note: These notes may not be 100% accurate. If someone finds an error, please let me know so that the mistake can be corrected.
|
|
hermes29
RPG Maker-in-Training
I am a Witch
Posts: 5
|
Post by hermes29 on Mar 18, 2008 17:49:37 GMT -5
Is there anyone who can direct me to a page to learn Flags and Variables? Also, on that Title Screen by Kumo, how do I take my logo and make it appear on the Title Screen with sound effects?
|
|
hermes29
RPG Maker-in-Training
I am a Witch
Posts: 5
|
Post by hermes29 on Mar 18, 2008 17:51:18 GMT -5
Sorry if this is the wrong place to post, I am having a hard time looking, since I'm new here.
|
|
|
Post by The Final Rune on Mar 18, 2008 18:50:03 GMT -5
[white]Your request would go in technical help really, but its not that big of a deal (although, we do have a modify post option, so no need to double post). Check out Dungeon Warden's Advanced RPGM2 FAQ for more details on Flags and Variables.[/white]
|
|
|
Post by mercenaryx on Jul 17, 2008 16:42:08 GMT -5
heres a couple you can use together
for each and every exit and entrance you make into or out of an area you would like it to fade out to black then fade in from black once the zone has been cleared right?
well lets put this into perspective: what do all the zones have in common?: 1.) the fade out (simple fade out) 2.) the fade in (turns the screen black in 0 frames then fades in because the warp command is issued and nulls the fact that the screen is black, so as soon as you enter the zone you have to have a "enter" script set in world organization ready to make the screen black instantly to make it seem as if it never stopped being black)
so first off, we can combine these both into one simple script that each time it is called, it checks if the screen is faded in or out, then does the opposite.
(make a flag called [faded out?])
COMMON SCREEN FADE SCRIPT:
if [faded out?]: ON then{ screen effect:Color: black(0F) turn [faded out?]: OFF screen effect:default(50F) force script end condition end turn [faded out?]: ON screen effect:color:black(50F)
then sometimes this script wont be enough because you need to do some things behind the screen while its still faded out to prepare for when the area becomes visable, in which case you'd do this:
(consider that the screen faded out and the player is warping) in order to avoid having situations in which you need the screen to fade out, but you need to add some code, you add this script too just so that you can use one of the two in any given situation:
screen effect:color:black(0F) turn [faded out?]:ON
and thats it, in any situation where you would need to deal with fade outs/ins, one of those two scripts will be all you need.
|
|
|
Post by Drew on Jan 31, 2009 13:41:23 GMT -5
Doan's Walking/Waiting Script:
SB: Repeat: Flag [Off] = Off -- SB: Condition: Flag [Step] = On ---- Party: Motion: Leader: Walk ---- Game Info: Load ---- SB: Repeat: Flag [Step] = On ------ Wait 8F (slightly more frames than the amount of time it takes to walk one step) ------ Data: Var: Temp0 = PartyX ------ Data: Var: Temp1 = PartyY ------ Game Info: Load ------ SB: Condition: Var [Temp0] = PartyX -------- SB: Condition: Var [Temp1] = PartyY ---------- Party: Motion: Leader: Wait ---------- Data: Flag [Step] = Off -------- SB: End ------ SB: End ---- SB: End -- SB: End SB: End
And the action script would do as I mentioned above: turn on the Step flag when the D-Pad is pressed.
Edit again: Might as well write the action script as well:
SB: Repeat: Flag [Off] = Off -- User Input: Buttons: Constant Wait -- SB: Sort [User Button] ---- Apply If 0 ---- Apply If 1 ---- Apply If 2 ---- Apply If 3 ------ Data: Flag [Step] = On -- SB: End SB: End
and of course that goes in the motion slot of an event on every map.
|
|
ubernoob
RPG Maker-in-Training
Thanks to my friend Charlie for helping me find this site.
Posts: 20
|
Post by ubernoob on Feb 1, 2009 18:22:40 GMT -5
I think I'm missing something. I've spent some time on RPG Maker 2 and I've become a great creator so I will understand what you mean with all of this stuff. I understand what's above this very well, much better than I did before. I think I'm something in this script though. Not sure if it's the way I set up the event or the script. Could you please help? Can you help me with the battle system as well? I will not ask as consistintly as I did before. I make a vow to ask these only once a month. But could anyone help me with those two?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 1, 2009 23:05:58 GMT -5
For the battle system, make a new topic in the technical help forum and ask about what you want help with. For the other, make sure your script is exact and that it's in the motion slot of the event instead of the content script. One thing that's likely to be wrong with the script is the location of the SB: Ends (which stand for Script Branch: End).
We don't really mind the quantity of questions. What's important is that you try it yourself first so that when you do ask a question you'll know more specifically what to ask. I'll give two examples to help show what I mean:
Bad question example: Please tell me exactly how to make a custom battle system. Thanks!
Good question example: I'm trying to make an action battle system like the Zeldas and I've managed to get the sword attack and bow/arrow to work, but I'm having trouble with getting the boomerang to stun the enemies. I've managed to get it so that [x] happens correctly, but it always does [y] thing wrong. I don't understand why [y] always happens because [y] script is in order. Does anything come to mind as being likely to cause this to happen? I can post my scripts if I need to, but they're long and I'm going to try to fix it without posting my scripts first. Thanks!
|
|
ubernoob
RPG Maker-in-Training
Thanks to my friend Charlie for helping me find this site.
Posts: 20
|
Post by ubernoob on Feb 2, 2009 15:53:09 GMT -5
Wow, great way to put a question!!! It's kind of like that, but as you said, I will ask these in the technical help forum.
|
|
|
Post by Doan the Nado on Feb 5, 2009 11:46:06 GMT -5
I'm not sure how to do Nash's Vehicle thing, but that 1st script is actually a Content script that is running using the Vehicle workaround. God this site is awesome... overcoming practically all of RPGM2's deficiencies
|
|
nate
RPG Maker-in-Training
Posts: 28
|
Post by nate on Feb 5, 2009 16:36:05 GMT -5
Here's a way so that anyone can effectively make their own Turn Battle System. Its only the framework, the AI and such are not included. Example Variables: Player 1 AGI; Player 1 Turn; Enemy 1 AGI; Enemy 1 Turn; Script Branch: Repeat (off) Player 1 Turn = Player 1 Turn + Player 1 AGI Enemy 1 Turn = Enemy 1 Turn + Enemy 1 AGI Script Branch Condition: Enemy 1 Turn >= 100 // (can be any number you choose) Call Script: (Enemy Turn) // <- the enemies AI Enemy 1 Turn = Enemy 1 Turn - 100 // Leaves the excess as the turn, while flushing it below 100 Script Branch End Script Branch Condition: Player 1 Turn >= 100 // (can be any number you choose) Call Script: (Player Turn) //<-shows options the player has for his/her turn Player 1 Turn = Player 1 Turn - 100 // Leaves the excess as the turn, while flushing below 100 Script Branch End Repeat end This will basically add agi to each participants 'turn' variable. Whoever hits 100 (or any number you choose) first will then act! Once acted, the turn variable will be deducted 100 (or any number). That way, the turn will carry the excess. Example: Enemy has 30 agi. Current Enemy 1 Turn = 90. The next timestep will make Enemy Turn = Enemy Turn + Agi; which will add to 120. Deducting 100 will start the enemies 'timer' to 20, its excess. Have fun with it
|
|
|
Post by zedocisin on Jul 16, 2012 19:08:13 GMT -5
Making a HP and MP bar ------------------------------- Make VFX's start at 100%HP-5%HP Just make them go down on different bars or on one, I like using just one, it creates more of a realistic effect. Also make the marker to 1F for a solid bar. Make these Variables HP% HP/100 Script[Display HP] [Display HP] Data:Variable:HP/100=Player HP X 100 Data:Variable:HP%=HP/100 / Max Player HP Script Branch Condition:Variable:HP%=>96 Screen Display:Effects:Party:[100%HP]:Leader 1F . . . . . . .Just subtract 4 from each condition number each time to show 100% you would have SBC:HP%=>96<----100% HP-4 for the next one the condition number would have to be 91<----95% HP-4 Im pretty sure you can figure out the rest from there. Script Branch Condition:Variable:HP%=>5 Screen Display:Effects:Party:[5% HP]Leader 1F Script Control Force SCript end Repeat the same for MP make the VFX and make the variables just change HP to MP. Now make an action script that is called [Screen Display] --------------------- Script Branch:Repeat:Flag Off Fixed=off Script control:APply Together Script Call:Display HP Script Call:Display MP Script Control:Apply in order Insert [Screen Display] into your To Map/Facing or if you have your own custom enter map script insert it there. Hi hi new here, I dunno what it is, but I didn't understand what you were talking about subtracting 4 from each condition number..would it go 96, 92, 84, etc. I've been trying a bunch of stuff out but still no dice
|
|
|
Post by Drew on Oct 19, 2014 21:06:57 GMT -5
Taken from the Pav: Nathan posted it thought I'd share it here.
[Changing between Walking/Waiting animations]
[Nash's vehicle script] Script Branch: Repeat: Flag [off(fixed)] Off --Other: Vehicle: Deploy Model(invisible object) type=land, speed=normal --Other: Vehicle: Control Vehicle Script: Branch End
**make/name 2 variables as Temp X and Temp Y. I used Sample 100 and 101. Next name one flag as 'Moving?'**
[Run/Walk Check] Script Branch: Repeat: Flag [Off(fixed)] Off --Data:Game Info: Load --Data: Variable: Temp X = Party X --Data: Variable: Temp Y = Party Y --Other: Wait: 8f --Data: Game Info: Load --Script Branch: Condition: Variable [Party X] = [Temp X] + [0] ----Script Branch: Condition: Variable [Party Y] = [Temp Y] + [0] ------Script Branch: Condition: Flag: Moving? = On --------Flag: [Moving?] = off --------Member: Effect: [Virk] Motion Change Wait Speed = 100 ------end ----end --end --Script Branch: Condition: [Party Y] =/= [Temp Y] ----Script Branch: Condition: [Moving?] = Off ------Flag: [Moving?] = On ------Member: Effect: [Virk] Motion Change Walk Speed = 100 ----end --end --Script Branch: Condition: [Party X] =/= [Temp X] ----Script Branch: Condition: [Moving?] = Off ------Flag: [Moving?] = On ------Member: Effect: [Virk] Motion Change Walk Speed = 100 ----end --end End Repeat
*** Next, we need to make an enter map script that applys the above 2 together:
[Enter Map] Script Control: Apply Together Script: Call[Vehicle Script] Script: Call[Run/Walk Check] Script Control: Apply In Order
finally, make an event named Enter Map, and register that into your world under World Org -> Enter Map Script.
This basically forces the player into a vehicle at all times. This is required because you NORMALLY can't modify the party and have things happen around you. It usually can only be done by triggering events by talking/examining/walking on top of them. This dodges it.
|
|
|
Post by Doan the Nado on Oct 20, 2014 3:36:01 GMT -5
That looks like a similar technique to the one we put together about eight years ago . I'm glad to see it get used and improved! Thanks for putting all the details together and adding it to this thread!
|
|
|
Post by Drew on Oct 20, 2014 10:19:14 GMT -5
Yep! It's that 2.0 haha!
|
|
|
Post by Drew on Jan 11, 2016 22:32:12 GMT -5
Event Collision Hack While tinkering with a "Event as player" type movement system I kept running into the looping "event stuck" issue. Determined I tinkered with a few things and amazingly it worked! All you need to do to have uninterrupted event movements for example:
[Event Movement] (Has to be a content script) Event Change: [Event you want to move] <---That's the key to this. (All your movement handling)
Now insert this into your Enter Map script and voila! No more event interruptions/collision issues.
Video for example and a little bit of explanation.
|
|