Announcement

Collapse
No announcement yet.

RPG Maker 2 Tips & Tricks 2.0

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Re: RPG Maker 2 Tips & Tricks 2.0

    Well, for (part of) my bit in the Reconstruction Effort, here is that silly tutorial I posted for simple Doors and Chests (I just cut and pasted the final draft, so some quotes may not exist anymore... but they were real, I swear! I'll search my text files for other data that may have been lost (if you are reading this much after August, 2005, there was a problem with the server and much data was lost)..

    Originally posted by RPGProgrammer
    Good going. Now, how about scripts for common actions? RPGM2 doors and other dealies are considered evil by many. I'll add some meself once I finish up some miscellany.
    Originally posted by RPGProgrammer
    Way to go, peoples! Though, I have to say that I've gotten a number of comments regarding the obscureness of nearly all of the tips on this page to the absolute novice.

    So, how about providing very simple, step-by-step techniques for taking care of extremely common functions? That is the new agenda.

    Scramble!
    OK, OK already...

    Here is how to make a fully functioning door (remember, this takes less then 5 minutes to do, but may take markedly longer to explain):

    To do this you will need to make 3 scripts and a two page event (don't you dare complain about it being complex... that's why nobody posted it before... and if you think about the number of purely mechanical steps involved in walking through an actual door in the real world, it is truly much simpler).

    This door will open and let you pass when you touch it. It will then stay open forever. It is the simplest example. There are many ways to make doors work in a game. You can have them close behind you. You can have them stay open and then be closed when you reenter the map. You can ring doorbells, or require passwords, or even make the player stand on his head in a bucket of treacle going "Squawk! Squawk! Squawk!" before they can use the door. This open-endedness may be why people never posted anything when Our PG Programmer asked before (I just ignored him) (and to those of us who've been doing this for years... what's your excuse?).

    Anyway, first make 2 "Action" scripts. I shall assume you are brand new to RPGM2 and do not know what that means (just to keep RPGProgrammer happy). When creating a new script there is a "box" that defaults to the word "Content" (actually there are two, but you want the one that is labeled "Type" not the one labeled "Note"). Highlight that, press X, and then select "Action" from the drop down menu.

    Then make a one line script consisting of the command:

    Event: Motion Change=Action A Speed=0

    This is created with the following sequence:

    Events > Effects > Motion Change

    This opens a window with several options. Stare at it in disbelief and confusion, then change the Model from Character to Object. Then change the speed from 100 to 0. Select object 152 (Door Single B) for your model (unless your taste prefers another door).

    Name this Script "Door: Closed."

    That's one.

    Now make a two line action script that reads:

    Event: Single Action=Action A Speed=100
    Event Move: Bypass Members=Yes

    This is created with the following sequences:

    First
    Events > Effects > Single Action

    That opens a similar window to the last one. Once again change the Model from Character to Object, only this time leave the speed at 100. Then find and "Check" the Disable Motion After Action box. And select object 152 (Door Single B) for your model (unless your taste prefers another door) again.

    Then:

    Events > Movement > Bypass Members

    When the window for this command opens, "Just Say 'Yes'" (with apologies to Nancy Reagan).

    Now, name this script "Door : Open" and that's Two!

    Almost done scripting. Now make a normal "Content" script. It, too, is only one line and should read:

    Sound : SFX [Creak] Volume=100 Pitch=0 tempo=100

    This is done vis the commands:

    Sound > SFX and selecting Sound 035 [Creak]. This is just for effect and so you know where the content script goes for if you want to get fancy later.

    Name this script "MOO!" for no good reason.

    Now we need an event for these scripts, but first a detour over to :

    Game > Game Settings > Custom Tab > Flag

    Then select an unused one. I usually start at 989 and work back (the system sometimes uses the "Temporary" flags and variables). So, for those who can't decide, I'll just order you to use flag 989 unless you feel confident selecting your own. Highlight it and press X.

    Now rename it to Door 1. This not only makes life easier when you need another flag (you can tell at a glance that you already used this one) but makes it easier to read in the event page conditions... which, conveniently, is our next destination (after another detour).

    Exit Game Settings and save your changes (Update and Exit).

    I do everything in crazy sequences (I am not at all a well cat) and now have to go back to the content script we created and add a second line which will read:

    Data:Flag: [Door 1] On

    This is created with the following sequence:

    Data > Flags

    and selecting "Single Flag," highlighting and entering the list, going to the flag we renamed (989) and choosing it. Then go to the bottom of the window and choose "On" from the Change options.

    Now go to Scripts > Events and choose Create New Data.

    Give the new event a name if you like (Door 1 is a good idea... it matches the flag).

    Events default to page zero. On this page scroll down to the "Display Type" option. Select object from the drop down menu.

    Right below that is the "Model" thingy. Select object 152 (Door Single B) (unless your taste preferred another door).

    Below that is the Motion slot. Highlight that and choose our "Door : Closed" script.

    Below that is the "Start" option. It defaults to Touch. Leave it alone unless you want to get fancy (more on that later... just get the basic version working first).

    And the last bit is the Apply slot. For that select the Content script we created and then modified by adding the flag command (remember "MOO!"?).

    Next we need a second page for this event. Up top, where the Page 0/0 data appears is an option labeled "New." Highlight that and press X. Select the same model (Display Type = Object / Model = Object 152 {Door Single B}). Now go to the Motion slot and choose our "Door : Open" script.

    In the middle of the page is a big list for "Conditions." Pick the first one and make as a condition "Flag: Door 1: On" (if you can't figure this one out after all this, go take some Logic courses (I tutor Logic as well as Chemistry, Physics, Math and just about anything else I can get somebody to pay me for... you're not paying, so do this one on your own)).

    Now we get to place it. Go to Event Placement and put it somewhere logical (or not if you think that way). Go into Test Play and walk up to it, bump into it, watch in awe as it opens all by itself, rejoice with great gladness and walk through the door.

    To get fancy you could add a wait command to the content script (right after the Single Action command) so the player can't walk through it as it is opening. That is also the script where you would put your password requests, messages, traps, or whatever else your devious mind decides. Although most of those would go before the door opens in the script.

    Change the model to a chest and you have the working scripts for a chest! Just add the rewards and messages as above. You could even create a second content script for page 2 of the event (shows up as page 1/1 because they start at 0) which states that the chest has been emptied already.

    That's all there is to it.

    Wasn't that simple?

    Peace.

    MOO!




    Comment


      #32
      Re: RPG Maker 2 Tips & Tricks 2.0

      To make each enemy drop an item instead of just the last one killed:

      In the Enemy Death script, I added this after it says '_____ has been defeated.' :

      Data: Get Enemy Name
      Data: Sort: Input: Common Name
      -Script: Condition: DungeonLocation = 1
      --Apply If: 'Cave Bat'
      --Data: Flag: BattleItemFlag01 On
      --Text: Message: Cave Bat dropped ____.
      --To End
      --Apply If: 'Blaze Bird'
      --Data: Flag: BattleItemFlag02 On
      --Text: Message: Blaze Bird dropped ____.
      --To End
      --(repeat for all enemies of 1st dungeon)
      -Condition End
      -(repeat for all dungeons)
      Branch End

      Then in the Battle Exit script (Battle Fade should work too, they're basically the same) I did this :

      -Script: Condition: DungeonLocation = 1
      --Script: Condition: BattleItemFlag01 = On
      --Party: Posessions: Item: +____
      --Condition End
      --Script: Condition: BattleItemFlag02 = On
      --Party: Posessions: Item: +____
      --Condition End
      (repeat for all enemies of 1st dungeon)
      -Condition End
      (repeat for all dungeons)

      Comment


        #33
        Re: RPG Maker 2 Tips & Tricks 2.0

        This way takes a slight bit more memory, but doesn't have the flaw found in the one I posted yesterday (or so). Fortunately it's quite similar to the one before:

        In the Enemy Death script, I added this after it says '_____ has been defeated.' :

        Data: Get Enemy Name
        Data: Sort: Input: Common Name
        -Script: Condition: DungeonLocation = 1
        --Apply If: 'Cave Bat'
        *--Data: Var: BattleItemVar01 = BattleItemVar01 + 1
        --Text: Message: Cave Bat dropped ____.
        --To End
        --Apply If: 'Blaze Bird'
        *--Data: Var: BattleItemVar02 = BattleItemVar02 + 1
        --Text: Message: Blaze Bird dropped ____.
        --To End
        --(repeat for all enemies of 1st dungeon)
        -Condition End
        -(repeat for all dungeons)
        Branch End

        Then in the Battle Exit script (Battle Fade should work too, they're basically the same) I did this :

        -Script: Condition: DungeonLocation = 1
        *--Script Branch: Repeat: BattleItemVar01 >= 1
        --Party: Posessions: Item: +____
        *--Data: Var: BattleItemVar01 = BattleItemVar01 - 1
        *--Branch End
        *--Script Branch: Repeat: BattleItemVar02 >= 1
        --Party: Posessions: Item: +____
        *--Data: Var: BattleItemVar02 = BattleItemVar02 - 1
        *--Branch End
        (repeat for all enemies of 1st dungeon)
        -Condition End
        (repeat for all dungeons)

        The - and -- are to show what parts get 'repeated for all dungeons' and 'repeated for all enemies of 1st dungeon' and the * is all the lines that changed from the one before.
        Last edited by WilliamKirk; 08-26-2005, 07:46 PM.

        Comment


          #34
          Re: RPG Maker 2 Tips & Tricks 2.0

          I was messing around with the scripts, trying to get a special bonus item to work, when I stumbled upon an unusual glitch in PRG Maker 2.

          I'm sure many people have messed around with the idea of characters being able to change their models in the game, whether it be to change the colors of the outfit, or to make a character get older. The problem is everytime you move to a new map, all visual changes (color, size and model) are reset.

          In the past you either needed to have a custom condition on the character that used a variable to keep track of what the character looks like, or set up the enter map script to do this. This could be a long script if you want many characters to be able to change several times throughout the game.

          I say, in the past, becuase the glitch I'm talking about occurs when you remove a party member from the party. When that character is restored to the party, all effects remain unchanged! To test this, I used model and size change commands on a character and then removed them from the party. I then walked all over the place and then put the character back into the party. Lo and behold the character still looked the same as when I removed them!

          I now have my game set up so that when the party leaves a map, it records who was in the party and then removes all the party members and replaces them with a place holder character. When they enter the new map, the old party is restored, including all changes to their appearence. This saves a lot of checking and re-changing commands.

          The one limitation on this system is death. When you die, the death model replaces the characters model. You'll need to change the Revive command (script 150) so that it checks the character's appearence before death and restores it, thus forcing you to keep track to the characters appearence. You could always set the model back to default and force the player to make the changes again (if it's a customization thing) and keep track of some important stuff (like age or type of armor worn).

          Saving the game is the same as exiting the map, so you need to use the same commands to keep track of party order before saving and to restore the party after saving. You don't need to worry about continuing from a save since the enter map script will run and restore the party.

          The downside of this is that you need to restore the original party order. If you have a lot of characters in the game, this trick might not be worth the time it takes to restore the order. However, a few customizable characters could easily replace a large party roster. (ex. instead of making male and female fighters, you could just use one character and let the player choose the model they want to use.)

          This trick is most useful in a game with only one character type (like Zelda). You can give the player the choice of what they want the character to look like and make only one character.
          Last edited by Dungeon Warden; 09-04-2005, 06:46 PM.




          The Crown of Order demo is here.

          Comment


            #35
            Re: RPG Maker 2 Tips & Tricks 2.0

            This thread has been dead for too long!

            Live, Thread...LIVE!!

            Right. This tip allows you to:

            Apply Action Scripts as Content Scripts

            This is useless.

            I mean, I only stumbled upon the need while making the VFX Editor Guide.

            But... If you have an action script you want to put in the content slot of an event without wasting the memory to copy and paste it, then convert it to a content script... I have a way.

            Just go to the Action script, change it to a content script and then put it in the content slot of your event (Thank You so much Island Jack for pointing out the suggestive nomenclature we've all been using without openly discussing!).

            Then go back to the script and change it to an Action script again.

            It is still in the content slot (tee-hee) of the event and Not greyed out.

            I tested this in both "Test Play" and "Real Play" and it works.

            The reverse, of course, does not work.

            This only saves a little memory, and has limited uses... But it's Nifty, Darn It!

            Peace.

            MOO!




            Comment


              #36
              Re: RPG Maker 2 Tips & Tricks 2.0

              Just found a way to make concurrency control in RPGM2. For those of you all familiar with threads and syncronization you probably know about spin locks.

              So this will enable you to use the same variable for multiple action scripts running at the same time without having to worry about whether two or more of them is modifiying it or not. It's pretty simple concept and script but very useful once you learn how to use duplicate events. It helps you to reuse the same scripts for multiple enemies.

              So for every variable you want to syncronize you need a flag for it for the lock, and the locking script is


              Lock Variable X
              SB: Repeat Flag [Variable X Lock] On
              Other: Wait 1F
              SB: End
              Data: Flag [Variable X Lock] On


              Then unlocking the variable just involves making sure the flag is off.

              Unlock Variable X
              Data: Flag [Variable X Lock] Off


              to use this in your code that will make use of the same variable wrap this in between these two scripts. *NOTE* these only work in Apply In Order mode.


              Script: Call [Lock Variable X]
              <script code that uses and changes variable X>
              Script: Call [Unlock Variable X]


              Also you should not be locking really long methods if you want things to occur at the same time as locking slows down when really long pieces of code are locked (probably won't slow down the game but events that need to look like they occur at the same time might get out of sync). Just realize that waiting a long time for the lock means that other scripts needing the variable won't be able to run until the lock is released.

              Without doing this you have to make sure that actions events using the same scripts either wait a specified amount of time and make sure they go in a specific sequence or use different variables. This is exactly like a "spin lock" for those of you familiar with threads. I tried it out on my custom menu system which uses 3 events running at the same time spawing duplicate events, all running the same scripts to move the event so I only need one duplicate statement, and each one tries to aquire the lock before creating duplicates of itself and it works like a charm, before I just had the 3 events wait on each other an amount of time I just made up and hoped they wouldn't overlap. So though your milage may vary with this one I've found it to be a very useful concept to have to avoid race conditions in my action scripts.

              This weekend I'll add in how to make duplicate events which act indepentently and can be identified and changed seperately using the event variable, flag, and input.
              Last edited by thetruecoolness; 03-23-2006, 02:56 PM.
              はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
              http://www.thetruecoolness.com/

              5198-2124-7210 Smash

              Comment


                #37
                Re: RPG Maker 2 Tips &amp; Tricks 2.0

                How to get rid of a default battle music:

                If your like me and get tired of listening to the same old bgm for enemy encounters and would rather your battles play seamlessly with the background music of your dungeon or field i found an easy way to do it.

                Just go to system script 15 Battle Enter and alter it, removing all of the bgm related content. Then go to script 23 Enemy Defeated and remove the content Sound: Stop and Sound: Replay Saved from it.

                How to smooth out continuing or changed effects when entering a new map:

                If it's bothering you when you change maps with different lighting effects or camera angles and having to watch these changes take place everytime you enter a new area this is how to fix it, as it can be really distracting how the screen will suddenly flash and turn a different shade or having to rotate quickly to offer the player a better angle.

                Go to World Organazation and you will see a place to put a script which activates before you enter the map. Using this script you can color the screen black and make it 0% transparent, this will make the map appear black when you enter a new area.

                Then create an action script and go to screen effects, color change, and make it 100% transparent (or desired lighting) and have it fade in over time, such as 40 frames. Put all your changes to the new area, such as camera angles, event changes, screen effects before the fade in screen effect, that way all these changes will be made to the new area while the screen is still black and are far less distracting. This will make for a more natural transition between maps.

                Finally, to use your action script make an event and put the script in the place designated for motions, then place the event in the area so it will start automatically when you enter. Just make sure that same area also has the enter map script in place on world organazation that colors the screen black before you enter.

                Adjusting the correct rotations when entering the same maps from different entrances:

                If you're like me and had some difficulty figuring out how to make the camera rotate to the correct angle you want based on which entrance a player enters a map before the fade in process here is how i did it.

                Flag 265 = North
                Flag 266 = South
                Flag 267 = East
                Flag 268 = South

                Put this script at the top of all your motion scripts which control that area -

                Script Condition: Flag 265 = On
                Camera: Rotate North
                Data: Flag: 265 = Off
                Script Condition: Flag 266 = On
                Camera: Rotate South
                Data: Flag: 266 = Off
                Script Condition: Flag 267 = On
                Camera: Rotate East
                Data: Flag: 267 = Off
                Script Condition: Flag 268 = On
                Camera: Rotate West
                Data: Flag: 268 = Off

                Now at the end of all your warp scripts that teleport you to the new area you are wanting the correct rotation in just turn on the corresponding flag that rotates in the direction you want. That way when the screen fades in the right camera angle will result according to which entrance you take. Useful for large rooms with multiple entrances which require different angles depending on which entrance the player takes.
                Last edited by Jeremy; 09-17-2006, 07:20 AM.

                Comment


                  #38
                  Re: RPG Maker 2 Tips &amp; Tricks 2.0

                  How to Make a Title Screen for RPG Maker 2
                  By KumoShinagi


                  To do this, you need your game started on Normal Mode, then switched to Hard Mode,
                  just for ease.

                  Creating the Title Screen:

                  1. Make 3 flags, name them "Title Screen", "New Game" and "Current Game".
                  I placed mine near the 900 range (987-989) to keep them out of the way for
                  future flags.

                  2. Make a Dark Dungoen for the title screen. On the custom tab set the Backgroud's
                  "Clear" and "Cloudy" settings to black. Leave the effect page alone.

                  3. Locate these events: "Enter Map" and "Exit Map. Make a new page in each of them
                  and set the new page conditions for the flag "Title Screen" and set it to "off".

                  4. Head over to Graphics>World Organization and make a new place. Name it "Title Screen".
                  Assign it the dungeon you just created then close it, we'll come back to it in a bit.

                  5. Go to the Scripts and you're gonna create 3 scripts. Name them "Start Game", "Start
                  Game 2" and "Title Screen".

                  6. Put this is "Start Game":

                  Screen Effect: Color= Black, Black, Black, Black Trans=0% 1F
                  Other: Wait 10
                  Teleport: Warp [Title Screen] (16, 16, &#177;0)

                  Exit out.

                  7. Put this in "Start Game 2":

                  Screen Effect: Color= Black, Black, Black, Black Trans=0% 1F
                  Teleport: Warp [Title Screen] (16, 16, &#177;0)

                  Exit out.

                  8. Now head to Events, go to "Enter Map" and go to the second page, click one the "Apply"
                  spot and select the script "Start Game". Save your Changes. Go to "Exit Map", do the same thing
                  execpt select "Start Game 2".

                  9. Make a new event, name it "Title Screen". Make sure you set it as a "System" type event.
                  Hit "Apply" and select the script "Title Screen".

                  10. Go back to World Organization and select "Title Screen". Head to the "Script" tab
                  and select the spot where it says "Enter Map". Now select the event, "Title Screen". Save
                  your changes and exit out.

                  11. Go back to the script "Title Screen" and put this in:

                  Screen Effect: Color= Black, Black, Black, Black Trans=0% 1F
                  Script Control: Apply Together
                  Party: Display: Hide Party
                  Party: Direction Change(Leader) S 0F
                  Camera: Rotate (N ) 0F
                  Camera: Vertical Angle=+ 15&#176; 0F
                  Script Control: Apply in Order

                  Now the rest is up to you.

                  "But Kumo, what do we do about the other two flags?"

                  You use them to track and monitor the game's status.

                  I'll give an example:

                  #When a New Game is started
                  Script Branch: Condition: Flag [New Game] Off
                  Multiple Choice: Start Game, Exit Game
                  Condition: Variable [User Choice] = +1
                  Data: Flag: [New Game] On
                  Data: Flag: [Current Game] On
                  Data: Flag: [Title Screen] On
                  Condition end

                  Condition: Variable [User Choice] = +2
                  Other: Finish Game
                  Condition end

                  #When a game is continued
                  Script Branch: Condition: Flag [New Game] On
                  Multiple Choice: Continue Game, Exit Game
                  Condition: Variable [User Choice] = +1
                  Data: Flag: [New Game] On
                  Data: Flag: [Current Game] On
                  Data: Flag: [Title Screen] On
                  Condition end

                  Condition: Variable [User Choice] = +2
                  Other: Finish Game
                  Condition end

                  Useage:

                  Place this, [Data: Flag: [Title Screen] Off], before "Other: Show New Save Window" in your scripts to
                  send your player to the title screen when he/she loads the game again.

                  Example:

                  Data: Flag: [Title Screen] Off
                  Other: Show Save Window
                  Data: Flag: [Title Screen] On

                  That ends this tutorial!
                  Last edited by AbstractOrigin; 10-14-2006, 06:04 PM.

                  Comment


                    #39
                    Re: RPG Maker 2 Tips &amp; Tricks 2.0

                    This is a simple one that I found to be very useful.

                    It is an action script.

                    Apply Together
                    Events > Motion Change > Happy
                    Events > Event Action > East / West ( Or what ever direction you want )

                    Then in events select character, Child Male

                    When you go to test play it looks like the character is skipping.

                    I've also combined other movements to make horses running about a field.

                    Comment


                      #40
                      Re: RPG Maker 2 Tips &amp; Tricks 2.0

                      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 unnecessary 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 Counter

                      000 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 End


                      Clock Display
                      Since 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 Content: Variable: (Fixed "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 Content: Variable: (Fixed "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 Window




                      Create the two system events and assign the appropriate 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.
                      The Map Editor Guide (Doans Edition) - Map Editor Technical Demo 2.0 - Download it now!!!

                      Comment


                        #41
                        Re: RPG Maker 2 Tips &amp; Tricks 2.0

                        Sweet! I've been needing a thread like this for a while.

                        Comment


                          #42
                          Re: RPG Maker 2 Tips &amp; Tricks 2.0

                          Custom stick-tilt-sensitive movement system:

                          In enter map script, deploy a sky high invisible vehicle(make the party leader have no model too) then use apply together, call a content script, and have a repeat script with control vehicle

                          Then in the called script, make it change the leader member's direction to E, then load data, then have a sort command based on what direction they face(remember- when using sorts, put them in numberical order, and always use branch end command at end of each sort case). In the East(0) sort, have it change leader's direction faced, load data, then check if still facing East, which'll mean the control stick was being tilted right if you're facing north.

                          In this sort cases, have 2 scripts called.
                          One script moves you, and the other moves an event that's in your space(this event's the only thing that should be visible, and make both leader and event able to pass through objects) at the same frame rate.
                          It may be best to have these called scripts repeat until a flag goes off when you stop tilting the control stick, and you could have smoother movement.


                          You could also make the event be right in front of you, and set up a system like that, where tilting left/right turns instead of moves, and you can compare the event's Z height to your's, to determine if they should be able to move there or get knocked back to prevent going where they shouldn't.
                          However you want to do that.

                          Point is, you can have a custom tilt-sensitive movement system.
                          Things like slippery ice physics, accelleration, and custom turning are possible now. Also- in vehicles, you can use action and content scripts at will, and simultaneously. Also, pressing O won't mess up anything with this setup, or even be noticed. Feel free to use O, and even X, if you turn on the No Menus Flag, using a constant wait button input repeat script.
                          Also, makes that long-sought "Character motion changes based on moving and stopping" the easiest thing in the world(there's already some other method, but this one's good as any, especially with all it's other benefits).
                          Last edited by Nje789; 07-03-2008, 11:20 AM.

                          Comment


                            #43
                            Re: RPG Maker 2 Tips &amp; Tricks 2.0

                            This sounds really great, but your explanations are really, not that great. Do you think you could post the scripts?


                            TBS is coming shortly... I finally got off my lazy self and contacted Datel, so new Max Drive software is coming thus allowing me to release my TBS.

                            Comment


                              #44
                              Re: RPG Maker 2 Tips &amp; Tricks 2.0

                              Here's a working version, though I am working on one with smoother movement(this one's not bad actually, but I've gotten better results with bugier setups)

                              Prototype Custom Movement Setup:

                              1-Make a normal event("Event A" used here), and place at your start point's location. It has a model, but no scripts.
                              2-make an object that's transparant

                              Enter Map script:

                              *whatever script commands you want here*, then-
                              Deploy vehicle: invisible object, High Sky type(important!), x/y/z=0,0,0
                              apply together
                              call script A
                              call script B
                              script:repeat
                              control vehicle
                              branch end

                              Content Script A:

                              script repeat
                              member change leader direction NE 0F
                              data: game info load
                              sort: variable 85 party dir
                              script branch apply if=0
                              variable 300=0
                              flag 300=on
                              branch: to End

                              -do 6 more of these apply if's, in number order, equals from 1-6 for sort variable and variable 300. Then do this for the seventh one:

                              script branch apply if=7
                              member leader change direction SW 0F
                              Data: game info load
                              script branch condition: variable 85 party dir=7
                              data: variable 300=7
                              data: flag 300=ON
                              script: condition end
                              Script branch: condition: variable 85 party dir=3
                              data: flag 300=Off
                              script condition end
                              script branch: To End
                              Script: Branch End
                              Script: Branch End

                              Content Script B:

                              repeat flag 0=off
                              repeat flag 300=ON
                              script control: wait for script End
                              apply together
                              call script C
                              call Script D
                              apply in order
                              branch end
                              branch end

                              Script C:

                              member leader bypass objects=Yes
                              Sort: variable 300
                              apply if =0
                              member leader direction move E 1step 6Frame Fixed Direction
                              branch: To End

                              -do apply if's from 1-7, going clockwise from SE to NE
                              branch End

                              Script D:

                              event: change to Event A
                              event move: bypass objects=Yes
                              Sort: variable 300
                              apply if =0
                              event move E 1step facing dir, 6Frame
                              branch: To End

                              -do other 1-7 apply if's, going clockwise SE to NE.

                              This setup has you going through everything.
                              If you don't want that(and most likely wouldn't)
                              you should give the leader no model, which lets the event go through him even when the event doesn't have bypass objects ON, so the event bumps into things. Then just setup a check of some sort that determines if you're not in the same place as the event, and move back into place at 0 frames if not, in script, and I'd make sure to shut off calling the movement scripts with a flag or something while this condition's going on.

                              Also, for much smoother, faster, as natural as normal even, movement- setup the two called scripts to act in syncronization in a repeating branch, so no other scripts are involved in movement until there's no more movement needed at that point in time(like you stopped tilting or ran out of momentum). I actually haven't setup up a finished version of this, but AI events do have this, and I've gotten the natural-looking movement to work with this setup, just not bug-free. I'll post a better version when I get around to it.
                              Last edited by Nje789; 07-07-2008, 09:38 AM.

                              Comment


                                #45
                                Re: RPG Maker 2 Tips &amp; Tricks 2.0

                                Im sure anyone could come up with this but I thought I would share it with you.

                                This script allows you change the display of an object based on the main characters position from the object.

                                Like lets say the main character is 3 spaces away from an object then once he move one space close the object would disappear or change or do what ever you wanted.

                                This could also be used in things such as character direction. Like remember in Super Mario Bros. World for SNES when you had stages with the ghost and if you would look at them they would stop and when you weren't looking at them they would move. You could alter this script to do just that.

                                Also you could use this to have it so you can see your enemies in the field and make it so if you get to close that you initiate a battle.

                                Anyways here is the script:


                                Changing object appearance based on character location.

                                Note: Maximum of ten objects with this script running.

                                Repeat Flag Off
                                Data: Game Info Load
                                Event Control: Event Info Load
                                Variable: X-Plus = Event X + (Range you want in front of the object)
                                Variable: X-Minus = Event X - (Range you want behind the object)
                                Variable: Y-Plus = Event Y + (Range you want in front of the object)
                                Variable: Y-Minus = Event Y - (Range you want behind the object)

                                (Outside of range)

                                Condition: Party X > X-Plus
                                Event Effects: (change model or turn display off or whatever you want)
                                End
                                Condition: Party X < X-Minus
                                Event Effects: (change model or turn display off or whatever you want)
                                End

                                Condition: Party Y > Y-Plus
                                Event Effects: (change model or turn display off or whatever you want)
                                End
                                Condition: Party Y < Y-Minus
                                Event Effects: (change model or turn display off or whatever you want)
                                End

                                (Inside of range)

                                Condition: Party X <= X-Plus
                                Condition: Party X >= X-Minus
                                Condition: Party Y <= Y-Plus
                                Condition: Party Y >= Y-Minus
                                Event Effects: (change model or turn display off or whatever you want)
                                End
                                End
                                End
                                End
                                End Repeat


                                TBS is coming shortly... I finally got off my lazy self and contacted Datel, so new Max Drive software is coming thus allowing me to release my TBS.

                                Comment

                                Working...
                                X