PDA

View Full Version : RPG Maker 2 Tips & Tricks 2.0


RPGD
07-08-2005, 06:16 PM
It's baaaaaaaaaaaack. Post any useful scripts and/or script manipulation techniques you may have to make RPGM2 less of a drag for newcomers and veterans alike.

RELICS FROM THE ANCIENT PAVILION RUINS

Resize your characters, make them UNdeformed: By EZALB

This is the way to get nice looking charactor models that are not SD.

First go to Script Editor and create a new Script. Make sure it says contents on it and then continue to the event options. Heres the path you need to go to...

Members
Effects
*Size

Click on *Size it should be marked by a astrerik now go to where it says "members" and highlight the party member you wish to edit. Load him up and your ready to rock. For some reason it doesnt display your party member so simply highlight "Preview" and pick the model that matches your charactor.

Here is my UNSuper Deformed Model

NOTE:CAREFUL adjuding the attributes the models sizes are very sensitive to even the slightest change. These percenatages are also based off of the "Hero" model so other models may vary but you get the idea.

X-axis-110%
Y-axis-90%
Z-axis-140%

When increasing size make sure everything stays proportional.

After all this make sure you make all your size changes at the boot of the game.

Have fun!

Button Mapping: By Draygone

I figured out how to apply multiple uses of the [] button! Yay me! I'm sure there are others that have figured this out by now, but I'm gonna post this anyway.

1) Go to Hard Mode.

2) Go to Scripts > Scripts > Create New Data

3) Name your script something like "[] used". (Make a note about it if you want.)

4) Keep the Type of the script on Content, or change it. (I only tried this on Content, but it should work with the other options.)

5) In the script box, select Input Creations > Buttons

6) Keep it on Constant wait, or put in the F Wait (the latter being used if you want to limit the amount of time the player has to press the button).

7) Go to Script Branch > Condition

8) Mark Variable, and in the Variable list, select 004:User Button (this is the only one that will work for this process).

9) In the box with Variable and Fixed, select fixed. Set it to one of these numbers, depending on which button you want pressed:

-1: Nothing (if you gave the player a time limit to press the button)
O: Up
1: Down
2: Left
3: Right
4: Triangle
5: O
6: []
7: X
8: START
9: SELECT
10: L1
11: L2
12: L3 (press the left analog stick)
13: R1
14: R2
15: R3 (press the right analog stick)

10) Two new pieces of script appear:
Script Branch
Script: Condition End
In between those two, put what you want to happen if the button you want is pressed.

(This way, say you want the player to press [] a second time, so you want the variable to be set to 6. When the player presses that button, the variable will be set to 6, then the branch will do what you put in it.)

11) If you want more than one button option to be available (such as [] + O and [] + R1), repeat steps 7-10, setting the variable condition for the branch to work to a number corresponding the button you want to be pressed.

12) Update Data and Exit, and head back to the main menu.

13) Now go to Scripts > Events > Create New Data

14) Create a name for it, and a note if you wish.

15) Select the box right under name (by default it's Normal), and select System.

16) Go down to the box marked Apply, and select the script you just created in the steps above.

17) Update Data and Exit, and head back to the main menu.

18) Go to Game > Game Settings, and click on the Adv tab.

19) Click in the Settings tab, and go down to the box marked [] Button.

20) Select the event you just created in the steps above.

21) Update Data and Exit. You're done!

I've tested this, and it works. Now you're that much closer to creating a 3D platformer. But what if you wanted to use a button combination? Simple. Go back into the script editor, in the script you created.

A) In one or more of the branches, select Input Creation > Buttons, and set it to what you want.

B) Create a new branch, using the same variable condition as before (004:User Button)

C) Next select Script > Force Script End. Otherwise, one of the other branches might be triggered if they are triggered by the second button the player pressed.

Once again, Update Data and Exit. I've tested this as well, and it works. I believe that's it. Any questioins?
Oh, and I'm sorry if this was already posted in a different topic. I sort of went to this topic first-thing.

EDIT: I forgot to mention, the way this is set up, it can activate in any location, without there being an event on the map to trigger it. There's probably a way to use this feature to do something like press buttons on a door to unlock it (requiring the player to be at the event), but I ran out of time, so I couldn't try to figure it out.

Custom Victory Music: By MarkS99

For those who have been wondering just how the hell you make a custom victory music that doesn't play over the Dungeon/Overworld music as soon as a random battle/event battle ends, I've discovered the solution. And it's very simple too.

Note: You can do this by either loading up the Beginner or Normal mode data. Then you must switch over to Hard mode.

Here's how to do it:

Go to Scripts > Scripts > File 23-Enemy Defeated > Edit

When the Script Editor appears highlight the Script Editor window and press X. Then highlight Line 001 - Sound: Replay Saved, press X, and delete it. Then between Line 000 and Line 001 press X and choose Sound > SFX > (Choose Victory Music). The victory music should now be set on Line 001. Then Update Data and Exit to save the changes.

Next, go to Scripts > Scripts > File 25-Battle Success > Edit

When the Script Editor appears highlight the Script Editor window and press X. This time, scoll to the bottom and place the cursor line after Line 022 - Text: Close Message Window. Press X and choose Sound > Replay Saved. This should now be set on Line 023. This will play whatever previous music was playing just before the battle start upon exitting the battle. Now Update Data and Exit to save the changes.


And that's it! You now have custom victory music of your choosing, and it transitions to wherever you previously were before the battle perfectly with the BGM!

Creating Custom Music: By Judgem

To create custom music:

1) Create a Context script for each instrument part:
- Sound: SFX ... (Adjust Tempo to match the following Wait command)
- Other: Wait ...
- (repeat these steps for each note, or just the Wait command for rests)

2) Create an Action script for the music (all instrument parts put together):
- Script Branch: Repeat: Flag [FlagXXX] On (this flag can be any flag not yet used, and it will be on whenever it's ok to play the corresponding music)
- Script Control: Apply Together
- Script: Call ... (call an instrument part script created earlier)
- (repeat this last step for each instrument part)
- Script Control: Apply In Order
- Script: Branch End

3) Create a Page Condition Script for a music event:
- Script Branch: Condition: Flag [FlagXXX] On (same flag as earlier)
- Data: Flag: [Satisfy Page] On
- Script: Condition End

4) Create an Event for the music:
- Type: Normal
- Condition Type: Script
- Script: (The Page Condition script created earlier)

EDIT: I think I made things a little more complicated than they need to be. You could probably just put the flag directly as the page condition. But I'll leave it here as an example of how to use a page condition script.

- Model: -None-
- Motion: (The Action script created earlier)
- Start: (Doesn't matter, as there's no Apply script)
- Apply: -None-

5) Place the event somewhere on the map that you want the music to play in.

6) Go to the Graphics/World Organization/Script, and turn on the above FlagXXX in the Enter Map script.

Does anyone do it a different way? I have a small problem creating very short notes in the scripts in part one; I created another topic to ask for help on this. But basically, the problem is that when using a short Wait period, the note will carry on even when the next note starts.

I found a trick to have enemies do a special animation when they first enter the battle. Yeah, one might think it's simple, but only applying text to tell when the enemy enters is simple. But took me a half-hour to try to get an enemy to animate once then do its Wait animation. It either always just repeated its battle entry animation or skipped right to the Wait animation. Well, I figured it out, and I'm sharing it with you, just because I care that if I didn't mention this first and somebody else did people would think that I used information that someone posted. Anyway, here's how to do it.

1) First, create the animation in the Enemy Action editor. It can be as simple as it doing Action A once, or as complex as an enemy coming through a lightning-filled black hole.

2) Now, go to the script editor. Create a Content Script called Enemy Intro 2 (I'll explain why later).

3) Put in the command Script > Apply Together.

4) Put in the command Battle > Enemy > Enemy Action.

5) Set the action to the one that holds the enemy's intro animation. Uncheck "Enable Marker".

6) Put in Battle > Enemy > Default Enemy Action. This'll automatically apply the Wait animation for the enemy. (One could probably just select the Wait animation in Batte > Enemy > Enemy Action, but I couldn't get it to work that way.)

7) Update Data and Exit.

8) Create another script, called Enemy Intro 1. This is the actual script that will be used to start the enemy's intro.

9) Put in another Script > Apply Together command.

10) Go to Script > Call Script, and select Enemy Intro 2.

11) Update Data and Exit.

12) Go to the Event editor.

13) Create an Event called Enemy Intro, and set the type to System.

14) In the Apply Box below, select Enemy Intro 1.

15) Update Data and Exit.

16) Go to the Enemy editor, create a new enemy (or select one you already made).

17) Click on Adv > Directing.

18) In the box marked Battle Start, select the event you made (Enemy Intro).

You're done. I think I explained everything. Oh, but keep in mind, when the battle loads, the enemies have already started their Wait animations. So if you set their intro animations for them to appear from nowhere, you'll end up seeing them, they'll disappear, then fade in. I'm sure there's a way to make it so you can't see the enemies before you start the intro animation, but I haven't found out how.


Enemy Introduction Animations: By Draygone

I found a trick to have enemies do a special animation when they first enter the battle. Yeah, one might think it's simple, but only applying text to tell when the enemy enters is simple. But took me a half-hour to try to get an enemy to animate once then do its Wait animation. It either always just repeated its battle entry animation or skipped right to the Wait animation. Well, I figured it out, and I'm sharing it with you, just because I care that if I didn't mention this first and somebody else did people would think that I used information that someone posted. Anyway, here's how to do it.

1) First, create the animation in the Enemy Action editor. It can be as simple as it doing Action A once, or as complex as an enemy coming through a lightning-filled black hole.

2) Now, go to the script editor. Create a Content Script called Enemy Intro 2 (I'll explain why later).

3) Put in the command Script > Apply Together.

4) Put in the command Battle > Enemy > Enemy Action.

5) Set the action to the one that holds the enemy's intro animation. Uncheck "Enable Marker".

6) Put in Battle > Enemy > Default Enemy Action. This'll automatically apply the Wait animation for the enemy. (One could probably just select the Wait animation in Batte > Enemy > Enemy Action, but I couldn't get it to work that way.)

7) Update Data and Exit.

8) Create another script, called Enemy Intro 1. This is the actual script that will be used to start the enemy's intro.

9) Put in another Script > Apply Together command.

10) Go to Script > Call Script, and select Enemy Intro 2.

11) Update Data and Exit.

12) Go to the Event editor.

13) Create an Event called Enemy Intro, and set the type to System.

14) In the Apply Box below, select Enemy Intro 1.

15) Update Data and Exit.

16) Go to the Enemy editor, create a new enemy (or select one you already made).

17) Click on Adv > Directing.

18) In the box marked Battle Start, select the event you made (Enemy Intro).

You're done. I think I explained everything. Oh, but keep in mind, when the battle loads, the enemies have already started their Wait animations. So if you set their intro animations for them to appear from nowhere, you'll end up seeing them, they'll disappear, then fade in. I'm sure there's a way to make it so you can't see the enemies before you start the intro animation, but I haven't found out how.

2D Custom Graphic Editing Using Building and Dungeon Editors: By ValhallaRPG

As you know, unlike its predecessor, RPG Maker 2 don't have an Anime Maker nor an image editor - only import digital camera and screenshot feature. However it's possible to simulate a graphic editor by using the Dungeon and Building editor. In that case the blocks will represent pixels that you place on a big 32 x 32 "image grid".

Here's how it basically works:

1- Draw your image by using blocks with different textures in a dugeon. Use also buildings to make variations in colors. You then place those buildings in the dungeon (main image).
2- Create a script containing camera effects to set the camera in 90° at a very far distance so you can clearly see the 32 x 32 region during play test mode.
3- Place the script in an event and then apply it for the dungeon to start when entering dungeon.
4- Make your party member(s) invisible - no character models. That way they won't interfer with the image you wanna snap.
5- During game test, make a screenshot of your zoomed dungeon.
6- Save the image from the screenshot in the Image editor.
7- Enjoy.

Here's the steps more in-depth

1- Create a dungeon that will be used as the main image. You should use it as the main frame of your image. Use textured block to "draw" the "pixels". For example, use black textured blocks to make the contours. I recommend filling the sides and top of the blocks even if it seems like only the top will be visible after the camera zoom effect. It'll be also easier to work your image that way. Also, if your image has a dominant color, use the background color feature to fill it You'll save a lot of blocks that way. (Also, the background color will be easy to fill with shades of light by using transparent blocks in building that we'll see later) For my Dragon Warrior Slime, I used a blue background as the dominant color and black textured blocks to make the shape.

Using Buildings for your dungeon:
Althought there's a good choice of textures, you'll probably lack in variety of colors. In that case you can use buildings to draw different regions of your image with different colors. How? In the Building editor in the Custion Dialog box section, you can change the color property of the building. By default, it's grey (neutral). Use the Lower Texture #28. (default texture when entering edit mode) This texture adapts well to the specified building color. You should enter your Dungeon in the database to refer to it when editing your blocks.It'll make your design time easier. One of my buildings is simply the mouth part of the Slime image. I changed the color to red in the Custom Building properties.

Making shades of colors:
Remember when we used a background color in the dungeon editor as the main color for the image? By using buildings, it's possible to alter the shades of this background color. Let's take again the DW Slime example. On the left part of the slime I wanted to have a white light that reflected to give some volume. So I made different buildings with different white blocks regions to cover the slime. Each building has a different percentage of transparency in the Custom properties. So with the slime it gives different shades of blue. You can also darken you background with a transparent black block building. Or use transparent colored buildings to make other shades of color.

As you draw, you may want to see the final result with all the building parts ("drawing regions") in your dungeon. So edit the Object Placement and then follow the next steps to be able to view your image in play test mode.

2- Script for camera effects:
To get a good screenshot, you'll have to adjust the camera settings to act as if you were in a graphic editor, not as a playable dungeon. Create a "Content" script and enter the following commands:

000 Camera Vertical Angle = +90 0F
001 Camera Distance = 1000 0F
002 Camera Viewpoint Height = +1000 0F
003 Screen Effect: Mask(122, 70)~(382, 370) Color Black 0F

The first line is a camera effect to have the camera look down at 90 degrees. The second and third are camera effects for raising the camera's height. The fourth line is optional. It's to mask the surroundings outside the 32 x 32 dungeon. Depending of what you want and the graphic size, you'll may want to adjust the camera distance and mask effect. These settings are just a suggestion. Save the script and go in the Event editor.

3-Create a "System" event and put the previous script in the Apply section. Save and exit. In the World Organisation editor, make the assembly of the dungeon and object placement. Since we made a System event, you can put it in the section where it will start when you enter the dungeon. (I don't remember the exact name) Exit the World Organisation editor.

4- Make your party member(s) invisible - no character models. That way they won't interfer with the image you wanna snap. Also make you party start in the proper "image" dungeon and put tem at the center of your image to save time in test play mode.

5- You're now ready to play test your image. During game test, make a screenshot of your zoomed dungeon. If you're not satisfied, then go make modification to the corresponding dungeon and buildings. At least your "Zoom camera" script is made.

6- Save the image from the screenshot in the Image editor.

7- Enjoy.

This drawing method can be quite tricky at first, but at least it gives you some possibilities to draw your custom graphics, apart from the digital camera feature. You could also use Maps instead of dungeons to draw.

***
Now the problem you'll face is that this method uses a lot of dungeon and building memory that you'll want to keep for RPG purpose instead of custom graphics. And even if you're done with the source dungeon and buildings and made your screenshot, you'll probably want to keep them for further updates on your images. The solution is simple. Create a totaly different file on your memory card just for these "custom graphics editors". Once you make the screenshot that you want to keep, save your RPG Maker2 data used for custom graphics. To load your other RPG Maker2 data (The one with your game progress) you'll have to delete all the current data. Don't worry, you don't have to delete the snapshot saved in the clipboard. You'll be asked this question: "Do you wish to delete Screenshot Image Data as well?". Answer NO and you'll be able to use your screenshot with other RPG Maker2 data!

BTW, a dungeon has a 32x32 grid and a limit of 1024 blocks. 32 * 32 = 1024. So you should have enough blocks for your custom image.

If you want to make bigger custom images than 32 x 32, you can adjust multiple image parts together with the Special effect editor.

Hope you find this trick useful.

Creating Doors That Work Without The Use of Variables: By Giels

First, make an object model of the doors you want to use.

You'll want to make 2 scripts.

Script 1
Change TYPE to ACTION
->Events>Effects>Single Action. Select Model to Object and None. Change speed to 0.

Script 2
TYPE = CONTENT
->Events>Effects>Single Action. Select Model to Object and None, check disable motion after action, and set Speed to 100.
->Events>Movement>Bypass Members. Set to YES.

Now, time to make the event. Go to the event editor and make a new event.
TYPE = NORMAL
DISPLAY TYPE = OBJECTS
DISPLAY MODEL = DOORS
MOTION = Set to Script 1
START = Touch and -None-
APPLY = Set to Script 2

Now place the event. You can place as many as you want on the same map and they will all open seperately. You can also add your sound effects to Script 2.

(Almost) Real Timer & Events Moving Simultaneously: By Shawnforbes

Okay, so I experimented with a few things and came up with a solution for two problems.

1. (Almost) Real time timer.
2. (Almost) Dual action event.
3. Activate Event From Specific Direction

Here's what you do:

(ALMOST) REAL TIME TIMER

1. Create an ACTION script: Name it "TIMER".
2. Input the following:

TEXT BOX: 3
WAIT 30 F (Note: 30 F = 1 second)
CLOSE TEXT BOX
TEXT BOX: 2
WAIT 30 F
CLOSE TEXT BOX
TEXT BOX: 1
WAIT 30 F
CLOSE TEXT BOX
TEXT BOX: 0
DATA>FLAGS>FLAG X ON
WAIT 10 F (Note: This is optional - only so the player will see "0" before it's removed.)
CLOSE TEXT BOX (Note: This is also optional, as I will explain later.)

(Feel free to add as much time as you wish, I just use 3 seconds as an example.)

3. Create a CONTENT script: Name it "WIN/LOSE"
4. Input the following script (which is use for example only, you can use whatever you want):

SCRIPT BRANCH>CONDITION>FLAG X ON
DATA>FLAGS>FLAG X OFF
SCREEN DISPLAY>TEXT>MESSAGE "YOU LOSE!"
PARTY>TELEPORT>WARP>LOCATION (pick a location you want the party to move to)
CONDITION END
SCRIPT BRANCH>CONDITION>FLAG X OFF
CLOSE TEXT BOX (Note: Optional - this would close the ACTION text box from before if it hasn't already been closed.)
SCREEN DISPLAY>TEXT>MESSAGE "YOU WIN!"
EVENT>EFFECTS>DISPLAY OFF (Note: This is just so that you will actually SEE the results.)
DATA>FLAGS>FLAG Y ON
CONDITION END

5. Create an EVENT: Name it "TIMER&WIN/LOSE" and select any model (Note: Again, this is just so that you actually SEE the results.)
6. Place "TIMER" in the MOTION option.
7. Place "WIN/LOSE" in the APPLY option.
8. Set START to TOUCH (or whatever you want).
9. Add a second page with no graphic and set the page condition as FLAG Y ON
10. Place your event on the dungeon/world map that you want it.
11. Test play.

If you've followed this, what'll happen is that the timer will count down to zero and stop. Now, if you touch it BEFORE it gets to zero it'll say "YOU WIN!" then it'll disappear. However, if you touch it AFTER it gets to zero it'll say "YOU LOSE" and warp you to whatever location you picked.

This could also be done with variables, and adding a few more conditions could cause your event to do different things depending on what veriable the ACTION script has reached. (Eg. The variable could be preset to 3 and subtract 1 for every second that passes. Then the conditions of the WIN/LOSE event could be different for every variable/second. Making sure to take into consideration that you don't want the event to activate the LOSE condition before the timer gets to 0 - you may want to substitute the FLAG you used in the appropriate place within the script.)

BTW - I tried many different ways to get the event to activate automatically (without having to press SQUARE then CIRCLE), but none of them worked. If someone else finds a way, I'm very interested to know.

EVENTS MOVING SIMULTANEOUSLY

So, I finally managed to firgure out how to move two (or more) events in the same (or different) direction at the same time, within a content script.

Here's how it works:

1. Create an EVENT: Name it "MOVE1" and select a model.
2. Create an EVENT: Name it "MOVE2" and select a model.
3. Create an EVENT: Name it "COMBINED", don't use any graphic and set the START as AUTO. (This is just so you'll see the results.)
4. Place "MOVE1", "MOVE 2" and "COMBINED" on the dungeon/world map that you want them to be on. (Optional - can be done later.) Just make sure that "MOVE1" and "MOVE2" are where you want them to start, it doesn't matter where "COMBINED" is placed.
5. Create a CONTENT SCRIPT: Name it "CONTROL A"
6. The Script should read:

EVENTS>CONTROL>CHANGE>"MOVE1"
EVENTS>MOVEMENT>Move the event however you want it to move.

7. Repeat 5 & 6: Name the script "CONTROL B" and change EVENTS>CONTROL>CHANGE>"MOVE1" to EVENTS>CONTROL>CHANGE>"MOVE2".
8. Create another CONTENT SCRIPT: Name it "COMBINE"
9. The script should read:

SCRIPT>APPLY TOGETHER
SCRIPT>CALL SCRIPT>"CONTROL A"
SCRIPT>CALL SCRIPT>"CONTROL B"

10. Go back to "COMBINE" event and add "COMBINE" into the APPLY option.
11. Test play.

If you've followed this, what'll happen is that the two events that you placed on the map will move (at the same time) to wherever you wanted them to go.

This can aslo be combined with text, player movement, camera movements and some more things too (I'm sure):

A. Allowing for the camera to zoom in/out (whatever) while the events are moving.
B. Waiting a certain amount of time before saying a message.
C. Having the event(s) move while the party moves as well.

Lastly, since you can control the members of your party individually, you could also have the party members move off in different directions while the events are moving too.

Pickpocketing: By WilliamKirk

An extremely easy way to do this(possible in RPGM1 too) is make it so when you talk to people you get a 2-Way Choice to either talk to the event or steal from the event. Then you just use a script branch and a flag to make it so you can only steal once. And on top of that you could make it so when you steal you have a __% of stealing this or a __% of stealing that or a __% of stealing nothing.

Random Weather Script: Posted By WilliamKirk; Credit Chocobo Knight Reika

Script Branch : Repeat : Flag "Off (Fixed)" = Off
Script Branch : Condition : Variable "Weather" </= +50
Other : Wait 500F
Script Branch End
Script Branch : Condition : Variable "Weather" > +50
Script Branch : Condition : Variable "Weather" </= +80
Screen Effect : Weather (Rain) Strength = 20%
Other : Wait 500F
Script Branch End
Script Branch : Condition : Variable "Weather" > +80
Screen Effect : Weather (Rain) Strength = 100%
Screen Effect : Weather (Clouds) Strength = 100%
Sound : World "Rain" Volume = 100
Other : Wait 500F
Script Branch End
Script Branch End
Sound : World "-None-"
Screen Effect : Default (Weather)
Data Varible : "Weather" = (+1) ? (+100)
Script Branch End

"With this script you have a 50% change of clear weather, a 30% chance of light rain, and a 20% chance of heavy rain.

Change the #s and weather patterns to anything you'd like. If you want more patterns just add more conditions. Oh yeah, and this should be an action type script."

MP Cost & Spell Damage by % Value: By WilliamKirk

If you put this in a script called up by the spell it'll work just fine:

(variable#1 * variable#3) = variable#4
variable#4 / variable#2 = MP Cost or Spell Damage

variable#1 would be different per spell(don't have it exceed 100 as it is in essence a percentage)
variable#2 would always be 100(to make variable#1 a percentage)
variable#3 would always be equal to the casters max MP
variable #4 would just be a variable to transfer the data of the other variables without changing them

**BlueSenshi Note: To deduct the MP from the Caster, just use the sample Script that deals with MP consumption. As long as your characters are set up properly, it should work, even in a CBS.**

Random Item Generation: By Dungeon Warden

The easiest way to generate a randon item is to set up a variable to generate a number from the first item to the last item.

For example; if item 15 to 20 were all random prize items (note: numbers are assigned when you make the item), you would generate a number from 15 to 20 using Data > variable:
Var ??? (any unused variable) = 15 ? 20

Then you would load the data of the character you wanted to give the prize to. Do this by setting var 086: Member number to the number of the party member (this is the character number in the character creation list, not the characters position). data > member info > load. check variables 117 - 128 using a branching script command. These contain the items the player is caring. If any variable contains a -1, the character does not have an item in that slot. If all the variables are full, you can print a message saying the character can't hold any more items. Otherwise, change the variable of the first slot that contains a -1 to the number randomly generated. Use data > member info > save and the character will now be carring the item.

Talking or Examining at the Same Time: By Giels

WARNING: This is for more advanced users because you'll also have to edit the 'System Errors' script.

1. To start, edit the System Errors script. Delete lines 001-015 or edit the wording to make it say, "Entered Talk Mode" or "Entered Examine Mode".

2. Create a script for your event. I will call this script "DualScript".
000-Script Branch>Variable>01System Generate=0?
001-Text>enter your talking text here.
002-Script End
003-Script Branch>Variable>01System Generate=4?
004-Text>enter your examination text here.
005-Script End

3. Make an event like normal, Make sure the Start say TOUCH and none. Change apply to your "DualScript".

4. Place your event and voila!

NOTES
This system is not perfect. System Generate variable is what the game uses for identifying errors. 0 is the default. So at the start of the game, all you have to do is touch the event and it will display your 'talk' command. To get it to search, press X to bring up the menu and select 'Look'. As long as there is not an event in front of you that has it's start set to 'Examine', you'll get an error 4(if you deleted line 001-015 then nothing is displayed, if you edited the script then it will say "entered examine mode") Now whenever you touch the event, it will search it. Also, if you trigger any other System Generate error(for example, if you try to use an item from a member who has no item, then system generate changes to 16.) If System Generate does not equal 0 or 4, then when you touch that event, it will not do anything at all.

Permanently Change Party Graphics: By Cloud the HUmar

First Go to game>Game Settings>go to the "ADV" tab and click on settings. See the enter map and exit map system events? that's what we'll be messing with.

Alright, go to Scripts>Scripts>Select the Enter Map script, copy and paste it. Now enter the newly pasted script, and between 000 and 001 go to members>effects>choose model and make the change.

Next, go back to effects again and select color, then change the color to the model you want. Now, go to events>go and select "Enter Map"and make a new page, apply that script that you just changed, and put up a flag.

This trick is useful if your character grows up or undergoes a transformation that is permanent.

Boss Battles: By Cloud the HUmar

If you played Fu-Ma and made it to the end (or if you cheated by loading it from edit game and warped to the ending battle) you will notice that when you kill the end boss, it doesn't display the text "(Monster's Name) is dead!". Well, here's how. Go to Events and hunt down the event that says "Enemy Defeated". Once you've found it, make a new page and assign a flag to it. Now, before the event battle begins, use that flag to turn the event off, then after the battle turn that flag you used off to make things normal again. You could probably use this with the event "Party Defeated" to make a fixed battle.

Vibration in Battle: By Cloud the HUmar

First, go to "Other">Controller Vibration.

Next, go into Scripts and look for the script "Normal Damage|Member Directing|"

Finally, go into it and set the vibation script after the SFX.

Custom Music Sample: By Lilly of Tinto

Here's an example, try it out for kicks. (its only the first intro measure, the melody comes in at measure 3, using the flute SFX)

Measure 1 looks like this (Note: All the tempos of the SFX = 15):

script>apply together
sound>sfx>ocarina vol=20 pitch=+4
sound>sfx>harp v=30 p=+4
sound>sfx>guitar1 v=20 p=+11
sound>sfx>bass v=40 p=-3
Other>Wait=24F
script>apply inorder
script>apply together
sound>sfx>orcania v=40 p=+4
sound>sfx>harp v=50 p=+2
sound>sfx>guitar1 v=40 p=+11
sound>sfx>bass v=60 p=-3
other>wait=24F
script>apply inorder
script>apply together
sound>sfx>orcania v=45 p=+7
sound>sfx>harp v=55 p=+1
sound>sfx>guitar 1 v=45 p =+11
sound>sfx>bass v=65 p=-3
other>wait=12F
script>apply inorder
script>apply together
sound>sfx>orcania v=20 p=+7
sound>sfx>harp v=30 p=+1
sound>sfx>guitar1 v=20 p=+9
sound>sfx>bass v=40 p=-3
other>wait=36
script>apply together

Repeat this twice and you have the first two measures.

According to the sheet music I have the first four notes go from quiet to loud to quiet in, thus the differences in volume. Listen and you'll hear the difference. Its complicated, but just like the rest of RPG Maker 2 its easy once you get the hang of it.

RPG Learner
07-09-2005, 01:41 PM
Cool this will be really useful stuff. I've have something for the chest item script in another topic i did here.

Also i've written down some of the old notes on how to edit the Magic Formula by someone but i forgot to put down the name by who figured it out and i don't want any credit for finding this since it would'nt by honerable anyhow.

But anyway i've too still have some of that info from the pavillion and agetec boards to post if you want to.

RPGD
07-09-2005, 01:59 PM
Go Right ahead.

VFX tips, though, should be saved for the VFX Q&A I'm compiling.

RPG Learner
07-09-2005, 06:21 PM
Here we go.

Here is something from the old pavilion ruins that i've found helpful for those that want to edit the Magic Formula. Unfortunetly i've don't know the name of the person that did this but it was very helpful to me. If someone knows the person that figured this out please give that person credit.

Here's what the info said.

In Scripts find Script 76 "Magic Formula" Go all the way down to line 59. Edit it and change the 1000 so that it represents the increase you want.

1000 = .1% increase per INT
500 = .2% increase per INT
200 = .5% increse per INT
100 = .1% increse per INT

Change this to suit the balance you want for your game. Now go down to line 69 edit it, and change the 1000 just like you did above.

Here is some more info that was there on that post also (I think it's been a long time since i've seen that post.)

I aslo found out how to load the data into variables. What caused my confusion was that you can't control the variables the information gets loaded into. To find out where the information is going so you can edit it. hit start before selecting the command from the menu.

In the example process from my question above. you would use the Data command to Load Direct Effect Info to load the rate into a tempary variable.
you would use the Battle command Make Active Character. followed by Substitute Target Attribute for Variable to load the casters INT into into the default variable 101: Intelligence and then save this into a tempoary variable.

Well this is all i've remebered about that post by someone.

But it should help.

thetruecoolness
07-09-2005, 07:33 PM
Well for those interested in the main formulas I have worked them out, mainly because I want to change them myself. And though I'm sure RPG Learner is aware of this if you leave it the way it is it is .1% for each int point not 1%. And 100 is 1% the others are right now though, I know it was just another typo on your part.

So the Magic Formula 1 is used for all normal attack magic excluding status magic, all out magic, and absorb magic. Healing magic just uses the Direct Rate and nothing else to determine amount healed. And status removal magic always works if they have the status you're trying to heal.

Normal Damage = Direct Effect Rate * ((100 - Enemy Magic Resist) / 100) * (Intelligence + 1000) / 1000

or

Normal Damage = Direct Effect Rate * [1 - (Enemy Magic Resist / 100)] * [1 + (Intelligence / 1000)]


and then a random amount from 10% to -10% of this calculation is added to the final damage

Final Damage = Normal Damage + [(-Normal Damage * .1) ? (Normal Damage * .1)]

And if the enemy selected defend Final Damage is Cut in half.

if (Defend)
Final Damage = Final Damage / 2

Now this looks slightly different in the script as I have simplified the formula and used a bit of math to combine certain parts to emphasise their effect.

Magic Formula 2 just uses the Instigators MP * 3 (or HP for the sacrifice ability) instead of the Direct Effect Rate. This is only used for Magic fire and the Sacrifice and Suicide abilities, it is meant for all out attacks that use all your MP or HP.

Magic Formula 3 is used for the success rate of status effect magic, including insti death. All it is

if (Direct Success * (100 - Target Magic Resist) >= 0 ? 10000)
__then Insti Success


Magic Formula 4 is used for Absorb HP only, and Magic Formula 5 is the exact same except it's for Absorb MP. This only gives damage, the actual heal part of absorb is done in another script, but just uses the damage calculated from these scripts.

This is the exact same as Magic Formula 1, except you replace Direct Rate with

[(Direct Rate * Target Max HP/MP) / 100]

The rate used by the game is 10 so the damage will be 10% of the targets Max HP.

Skill Formula used for skills, which typically use HP. This formula is exactly the same as Magic Formula 1 with the exception that it uses Strength instead of Intelligence. You could easily combine these to save some memory.

EDIT: Ok the default battle formula is fairly similar to the Magic one, except it adds in dodge capability and critical hits

Battle Formula

So dodge is stated in the Battle Formula script and is

if (Target Agi - Insti Agi) * 10 >= (0 ? 10000)
__then dodge succesful (Target Dodge flag set to ON)

(NOTE the left side of the if statement is clamped to be between 100 and 5000 resulting in a dodge percentage from 1% to 50%)

The success rate for an attack is just if it is greater than a random number from 1 to 100. This is halved if the character is blinded.

Critical rate is just the Direct Effect rate so

if (Direct Rate > (0 ? 100)
__ Then Critical Success

The actual formula for damage is

Normal Damage = (Insti ATT - (Target DEF / 2)) * [1 - (Enemy Wpn Resist / 100)] * [(Damage Rate A) / 100]

for critical it is

Normal Damage = (Insti ATT - (Target DEF / 10)) * [1 - (Enemy Wpn Resist / 100)] * [(Damage Rate A) / 100]

then like magic a random amount from -10% to 10% is added

Final Damage = Normal Damage + [(-Normal Damage * .1) ? (Normal Damage * .1)]

same for defend

if (Defend)
Final Damage = Final Damage / 2

For attacks if the Final Damage is less than 0 it had a 50% chance of doing 1 damage.

*note* the m ? n indicates a random number from m to n

EDIT: All of these are finished now, so now you know the basic formulas used for battles. And knowing is half the battle.

RPG Learner
07-09-2005, 07:36 PM
Whoops sorry but this is what i've found on a post in the pavillion forums but i wish i knew who though this up cause i know i did'nt. and now we'll never know.

Sorry i forgot to put the decimals in.

neobi
07-09-2005, 08:48 PM
Use the "square" and "circle" Symbols
In the script editor, place a show map script. Buried within it in two text blocks are the symbols for [] and O, just copy and paste them.

WilliamKirk
07-09-2005, 08:56 PM
I believe DW posted that up. :)

RPG Learner
07-10-2005, 10:43 AM
Are you sure William? If it is he get's credit for this.

Dungeon Warden
07-10-2005, 04:38 PM
It could have been me, I don't remember. I know I figured that stuff out on my own, but it's not hard to use the help files to figure out what things do. I do have the complete list of everything that is loaded with all the load commands written down in my notes. I should post it some time so people don't have to rely on the help menu. There is also a couple errors in the help files, but not anything important.

RPGD
07-10-2005, 05:21 PM
I command you to archive your useful scripts and such in this topic ASAP. With enough volume, people should be able to copy and paste their entire game system in a flash through this, CMS and CBS included. That goes for everyone.

HOP TO IT!

neobi
07-10-2005, 08:12 PM
^^^ CBS's too?!?!! Holy **** that would take forever with ACBS games like mine. Especially now since I have different vearieties of the ACBS, the shadow style being fastest and most fluid.

Also that [] O icon thing I posted waaaaay back at the old pavillion board long ago. As far as I recall i was the first to post it in there, and I know I discovered it on my own a looong time ago. Considering I had the game pre-ordered and got it when it came out and sat there and went through every single script and everything when I got it, its quite possible I was the first to discover this weather it was posted somewhere else before me idk?

Would maybe a summary of ACBS's or tricks to do things in the game w/ acbs's work?

RPG Learner
07-10-2005, 09:57 PM
Alright i'll post this what i had in a topic i wrote.

Chest Item Trick by RPG Learner.

Since there is that you need a flag for each treasure chest for one item why not have one for multiple items here's how i did it.

First copy and paste the Chest item script

Here's mine for example

Script 428 Chest Item

Here are the edits i did.

1st. Make an item called Equipment. put this item in a script that is called...

005- Data: Substitute Database number for variable.

This should have.
Variable #134 (Item Number)
Record (Item) Equipment

Then here's the edit how i did it.
014- Target Data: Item +(Equipment)
015- Target Data: Item +(Iron Pipe)
016- Target Data: Item +(Baseball Cap)
017- Target Data: Item +(Garbage Can Lid)
018- 014- Target Data: Item +(Healing Cream)
019- Target Data: Item -(Equipment) [Remove Equipent from the inventory]
*020- Member Info (Character 1) Equip +Iron pipe

*If you want to have the character equip the item use this.

Now for the bag one. This will be short.
050- Party: Bag (Equipment) +1
051- Party: Bag (TreeBranch) +1
050- Party: Bag (Equipment) -1

That's all.

How to make a double blow like skill.

Remember BOF 3 and 4 where there was this skill that allowed you to have a two hits and Triple blow now you can easily do a skill like that.

First you need the script Act x2 which can be found in the defaults.
Script 219 Actx2
Data: Variable Battle Turns=(0 fixed) + (+2)

For this skill here's the example i did.
(Direct Effect) Skill
Name Double Blow
Note Attack Skill (x2)

Directing (Success) Normal Attack
(Crtical) Normal Attack
(Fail) Normal Attack

Flow 1
Turn End (Actx2) (Should this be put in Turn Start?)
Check Start: Start HP
Check Fail: Ban Ability
Effect Start: Technique
Consume: Consume HP 1

Flow 2 Multi Effect
*First Effect
*Second Effect
*(I wondered if i should put Consume HP 1 here in this script?)
Success Check: Skill Formula

Result Success (Attack Success)
(Crtical) Attack Crtical
(Custom) -None-
Fail: Attack Failure
Dodge: Attack Dodge

There's just one minor problem with this. when use use the attack the consupion takes effecy twice with the Attack x2 command but this will also make some interesting things for it.

Also there's little trice on how to change the music into something else but since Rodak found this out first before me he should get full credit for this.

http://www.pavilionboards.com/forum/showthread.php?t=2043

thetruecoolness
07-10-2005, 10:56 PM
Here is my time script which includes calls to a random weather generator, which has a fairly natural progression of weather so it's not sunny at one point and then a thunderstorm pops up. I still need to fix it so it doesn't redo the weather when you enter another map and it happens to be on a transitional time. I'll post that later tonight. This also keeps track of the day of the week too, though it doesn't keep any dates. I'll also add in my time and day display scripts to this later tonight.

*Note* This is an action script and must be used as the motion script of an event. This event must be placed on a map in order for the map to be able to keep track of time. So you could omit it on indoor dungeons and such to not make time progress in them, though you would probably want to call the first part of this script which just sets up the beginning time of day.

Variables used:

Hours of Day - Variable to keep track of hours
Day of Week - variable to keep track of day of the week
-- 0 Is Monday and 6 is Sunday

Script Control: Apply Together // needed for smooth transitions of times of day
// Sets up correct day effect when you enter a map
Data: Flag: [Temp Flag 0] Off // used to see if it's night when they enter Off if it is
Script Branch: Condition: Variable [Hours of Day] >= 6
- Script Branch: Condition: Variable [Hours of Day] < 11
-- Screen Effect: Time (Dawn) 0F
-- Data: Flag: [Temp Flag 0] On
- Script: Condition End
Script: Condition End
Script Branch: Condition: Variable [Hours of Day] >= 11
- Script Branch: Condition: Variable [Hours of Day] < 17
-- Screen Effect: Time (Noon) 0F
-- Data: Flag: [Temp Flag 0] On
- Script: Condition End
Script: Condition End
Script Branch: Condition: Variable [Hours of Day] >= 17
- Script Branch: Condition: Variable [Hours of Day] < 22
-- Screen Effect: Time (Dusk) 0F
-- Data: Flag: [Temp Flag 0] On
- Script: Condition End
Script: Condition End
Script Branch: Condition: Flag [Temp Flag 0] Off
- Screen Effect: Time (Night) 0F
Script: Condition End
// Actual time loop
Script Branch: Repeat: Flag [Off (fixed)] Off // infinite loop since it's an action script
-Script Call: [Apply Weather] // does the weather effect based on weather stored in Input: Current Weather
-Script: Call [Day of Week] // displays the day of week in a text box based on the value of Variable Day of Week
-Script Branch: Repeat: Variable [Hours of Day] < 24
-- Script Branch: Sort: Variable [Hours of Day]
--- Script Branch: Apply If: Number is 5 // Morning starts
---- Screen Effect: Time (Dawn) 60F // Smooth out transition by making it take an hour in game time
-----Script Call: [Calculate Weather] // gets next weather conditon
-----Script Call: [Apply Weather]
--- Script Branch: To End
--- Script Branch: Apply If: Number is 10 // Noon starts
---- Screen Effect: Time (Noon) 60F
-----Script Call: [Calculate Weather]
-----Script Call: [Apply Weather]
--- Script Branch: To End
--- Script Branch: Apply If: Number is 16 // Dusk starts
---- Screen Effect: Time (Dusk) 60F
-----Script Call: [Calculate Weather]
-----Script Call: [Apply Weather]
--- Script Branch: To End
--- Script Branch: Apply If: Number is 21 // Night starts
---- Screen Effect: Time (Night) 60F
-----Script Call: [Calculate Weather]
-----Script Call: [Apply Weather]
--- Script Branch: To End
-- Script: Branch End
-Data: Variable: [Hours of Day] = [Hours of Day] + 1 // increment hour
-Other: Wait 60 F // 2 second wait change this to make your hours longer or shorter right now 2 Sec = 1 hour
-Script: Branch End
-Data: Variable: [Day of Week] = [Day of Week] + 1
-Data: Variable: [Hours of Day] = 0 + 0 // reset hour - VERY IMPORTANT other wise the game will freeze
Script: Branch End

Rodak
07-11-2005, 05:55 AM
I command you to archive your useful scripts and such in this topic ASAP. With enough volume, people should be able to copy and paste their entire game system in a flash through this, CMS and CBS included. That goes for everyone.

HOP TO IT!

YOU ASKED FOR IT...

Put the camera behind the character:

Data:Game Info Load
Script Branch Sort:Variable {85?} [Party Dir]
Apply if=0
Camera Rotate E : Frames=15
Branch : To End
Apply if=1
Camera Rotate SE : Frames=15
Branch : To End
Apply if=2
Camera Rotate S : Frames=15
Branch : To End
Apply if=3
Camera Rotate SW : Frames=15
Branch : To End
Apply if=4
Camera Rotate W : Frames=15
Branch : To End
Apply if=5
Camera Rotate NW : Frames=15
Branch : To End
Apply if=6
Camera Rotate N : Frames=15
Branch : To End
Apply if=7
Camera Rotate NE : Frames=15
Branch End

===========

I was gonna use this as my [] button script and call it "examine" but I'm not sure now... either way it is useful :

Call Script [Camera Behind] *see above*
Apply together
Party:Hide Party
Camera:Viewpoint Angle=1 Degree Frames=15
Camera:Distance =100 Frames=15
Input : User Button : Constant wait
Apply together
Party:Show Party
Camera:Default Frames=15

This zooms in on whatever the character is looking at just at that moment.

I found too many instances where I needed to adjust the height as well so I may not use it for the [] button, but it (or a variation of it) gets a lot of use in other circumstances.

===============

This is in the manual, but since many used games come without the manual this is not a complete waste of bandwidth.

To change the BackGround Music in a Boss Fight (or any other "Event Battle"):

Sound : Temporary Save
Sound : BGM=[moo!] vol=...
Script : Apply Together
Screen Effect : {all squares black with 0% Transparency} : 40 Frames
Effect : Apply Wipe
Other : Wait : 40 Frames
Script : Apply In Order
Other : Event Battle: ("Uncheck" Battle Start Defaults Box)
Sound : Replay Saved

The 40 frame rate set in two lines above is equal to the 40 frames the system takes to transport you to the battle screen.

This script can easily be tweaked and modified to allow for things like using the "other" wipe {the one not set in default settings} for boss battles (first set wipe, then apply).

If you used a character (or object) look-alike for an intro to the Boss Fight you can have them perform a "Ya Got Me, You Racially Impure Lower Life-Form" (A real line from my game) scene, then flash and vanish (or whatever you like) right after this bit of script.

You can even lead right into a second fight with no chance to heal.

===============[/COLOR]

A little trick to fill a map with tiny scrambling "mice" for effect.

Set this Action Script to the motion slot of an event with a resized (smaller) fish for a model. I named the event MEESES, but you can call it anything you like.

Script Branch: Repeat: Flag [Off Fixed]: Off
Event Control: Duplicate [MEESES]: Coordinates (+1, +1, 0)
Event Move: Bypass Members=Yes
Event Action: Random Move Facing=Movement 4F (Set the E/W and S/N values very high... I used 111 for all 4 slots and kept the height adjust at 0)
Script: Branch End

Place the event at coordinates 0, 0, 0 (or whatever Z coordinate is ground level). There is no content script, so you can set "Start" to anything you like or just ignore it.

This gives a map full of tiny little meeses running every which way. The map I used was relatively flat and that matters as meeses can get caught inside things and not be able to move. You do not want to use Bypass Objects to get around this as it causes them to run through everything.

Just another "little touch" to make dungeons and other areas more interesting.

+=+=+=+=+=+=
EDIT:
+=+=+=+=+=+=

I remembered I originally did have a content script in this!

I made a squeaky sound and set the "start" condition to Equal.

That way when you stepped on them, they made noise.

I did not like the results enough to keep, but it was worth mentioning.

===============

Here is the script that runs the heart of the puzzles in the "Puzzle Room" of my demo (another shameless plug!). Basically you are stopping a spinning block with a carefully timed button press. Each side of the block has a different texture. I used three variations; a single block with the candle texture lit on one face and unlit on the other three; a four block puzzle with four "corner textures" that line up only on one of the faces (2 combinations that do not form patterns and one that does, plus one side blank for the "null position"); and a sadistic 9 piece puzzle.

The nifty part is the timing part. You need only a little practice to get it down, so it seems a well constructed script. I found the hard part to be getting a "Deny" sound to play when the button press was mistimed.

There are messages based on conditions surrounding this script excerpt, but they would be different for everybody, so here is the hard part (this script is attached to a "lever" object, so the "single action" command simply "flips the switch"):


Data: Flag: [Puzzle X Solved]: Off
Sound: SFX [Door Squeak]
Event: Effects: Single Action {check the "Disable Motion After" box}
Event Control: Change Target to [Puzzle X Piece X]
Script Branch: Repeat: Variable [User Button] /= {not equal to} 4
Sound [Switch 2]
Script Control: Apply Together
Event Move: Rotate Clockwise 90 degrees: 2 frames
Input: Buttons: Wait 2 frames
Script Branch: Sort: Variable User Button
Script Branch: Apply If: Number is +4
Sound: SFX [Deny]
Script: Branch End
Input: Buttons: Wait 3 Frames
Script: Branch End
Event Control: Event Info Load
Data: Variable [Puzzle Attempts] = [Puzzle Attempts] + 1
Script Branch: Condition: Variable [Event Dir] = +2 {or whatever}
Sound: SFX
Text: Message "THAT'S IT!"
Data: Flag: [Puzzle X Piece X] On
Data: Game Info: Save
Script: Condition End
Text Message: "Wasn't Dat Fun?" {uncheck "Close Window" box}
Script Branch: Sort: Variable [User Button]
Script Branch: Apply if: Number is +4
Input: Buttons: Constant Wait
Script Branch: To Top
Script Branch: End
Text: Close Window
Script: Condition End

At the end, after the messages, I call a script to check all the flags for all the pieces of that puzzle. If they are all on I trip another flag for the entire puzzle (which controls the very beginning of the script messages). Of course the One-Piece Puzzle does not need to call a script, but the 4 piece and especially the 9 piece, puzzles need it.

The "Number of tries" variable is there so I could do something nice if they keep trying, and failing. I figure I'd just give it to those who have difficulty with the timing, but keep trying anyhow. If the variable gets big enough, I can slow it down or give them it outright, just as a reward for trying so hard (and because you do not want the player to lose interest or get completely stuck with no way to continue).

Peace.

+++++++
EDIT:
+++++++

The "Wasn't Dat Fun?" question part is essential to the script, even though it seems irrelevant. You need to change the value of the user input or it will confuse the script when it runs the next puzzle piece. The way I have it set up any button other than Triangle will close the window and change the user input variable's value.

If anyone knows a better way to do this, please let me know.

===============

Here's one that gave me more trouble than it had any right to give, so I'm posting it here in case anyone else is as slow as me about these things.

It is a way to keep random things more random by preventing repeats. I have found that I can generate the same random number 3 or 4 times in a row and that can really ruin some aspects of gameplay if the randomized bit needs variety.

This is a very useful concept for making random things appear more random. It is set up for ten different possibilities with no repetition for at least 4 turns.


Script Branch: Repeat: [Temp Variable 8] =/= {not equal to} 100
__Data: Variable: [Temp Variable 9] = 0 ? 9
____Script Branch: Condition: [Temp Variable 9] = [Last Try]
________Script Branch: To Top
______Script: Condition End
____Script Branch: Condition: [Temp Variable 9] = [2 Tries Ago]
________Script Branch: To Top
______Script: Condition End
____Script Branch: Condition: [Temp Variable 9] = [3 Tries Ago]
________Script Branch: To Top
______Script: Condition End
__Text: Message "" {No entry; Uncheck "close window" box}
__Text: Content: Variable: Display: [Temp Variable 9]
__Data: Variable: [Temp Variable 8] = [Temp Variable 8] + 1
__Data: Variable: [3 Tries Ago] = [2 Tries Ago] + 0
__Data: Variable: [2 Tries Ago] = [Last Try] + 0
__Data: Variable: [Last Try] = [Temp Variable 9] + 0
Script: Branch End
Text: Message "MOO!" {Check "close window" box}
____Data: Variable: [Temp Variable 8] = 0 + 0 {for repeat uses}


This gave consistent strings with no repeats for at least 4 numbers.

While this is written in the form of a test script (one that displays the results in conversation form and intended to be placed on an NPC) it could be adapted by replacing the text lines with a Sort command and a few (10) "Apply If's" for your chosen actions. And the overlayed repeat loop (the one for temp variable 8) can be removed too. It was just there so I could get a long enough list to detect duplications.

I use this in battle for random abilities on an NPC that I do not want to repeat (he yells insults, and repetition in a case like that detracts from the whole concept... especially when it repeats 4 times!!).

My thanks to Nash for putting me on the right track!

Peace.

==============

Some Default Music Modifications that work nicely:

Try these (all available in my demo for The Clean Underwear Quest... *shameless plug*...)

Home 9
Pitch 7
Tempo 240

Town 5
Pitch 9
Tempo 240

Castle 3
Pitch -12
Tempo 125

Mellow 5
Pitch 1
Tempo 300

Theme 6
Pitch -4
Tempo 125

Town 4
Pitch 8
Tempo 250

A good tip for this kind of playing around is to listen to the time signature of the music. If it is 3/3 time multiply the tempo by increments divisible by 3. Likewise, 4/4 time gets multiples of 4.

Of course, if something sounds just right for your purposes, use it no matter what the numbers!

Peace.

===============[B]

Here is a link to a DBS Modification I posted a while ago:

http://www.pavilionboards.com/forum/showthread.php?t=1504

It lets you create additional enemy actions and call them smoothly through the DBS when needed.

==============

Finally:VFX tips, though, should be saved for the VFX Q&A I'm compiling.Here is a link to a VFX editor tip for creating your own coordinate system.

http://www.pavilionboards.com/forum/showthread.php?t=1219

Don't for get that for your VFX Q&A!

======================

That's all for now.

Dungeon Warden
07-11-2005, 08:16 PM
Here's the promised information for the load commands:

LOAD COMMANDS

Game Info Load

Input: Variable 134: Item Number (optional)

Output: Variable 75: Party Member Total; Variable 77: Total Party Money;Variable 78: Total Party Items; Variable 79: Total Bag Items; Variable 80: Total Item**; Variable 81: Map Number; Variable 82: Party* X coordinate; Variable 83: Party* Y coordinate; Variable 84: Party* Z coordinate; Variable 85: Party* Direction

* Party in this case refers to the party leader. ** The total amount of the item specified in Var134 that is in the bag.

Game Info Save

Output: Saves Variable 77: Total Party Money

Member Info: Use Member Order

Input: Variable 53: Member Order

Output: Variable 86: Member number; Variable 48: Instigator Member; The following flags are turned off: Flag 70: Side; Flag 71: Apply side; Flag 72: Instigator Side

Member Info : Load

Input: Variable 86: Member Number; Flag 81: Stat Check type (optional) [if On, the Stats marked with * will be adjusted for equipment and class changes; If Off, only Armor and Attack will be calculated.]

Output: Variable 99: Str*; Variable 100: Def*; Variable 101: Int*; Variable 102: Agi*; Variable 103: Luck*; Variable 104: Attack*; Variable 105: Armor*; Variable 106: Max Hit Points*; Variable 107: Max Magic Points*; Variable 97: Hit Points; Variable 98: Magic Points; Variable 91: Level; Variable 95:Exp; Variable 92: Exp to Level; Input 1: Common Name; Input 6: Origin; Input 7: Sex; Variable 87: Total Member Items. Variables 117 - 128 contain the item numbers of the items the character is carring (-1 if no item in that slot). The following contain the item number of the equipped items (-1 if nothing equiped) Variable 129: Weapon; Variable 130: Helmet; Variable 131: Armor; Variable 132: Shield; Variable 133: Accessory. Flags 140-144 are On if the equipped item can't be removed. Flag 121: Action Status (On if inflicted) Variable 88: Class number (-1 if no class); Variable 90: Class Rank (0 if no class); Variable 112: Class Exp; Variable 113: Class Victories; Variable 93:Class Exp to Level; Variable 94: Victories to Level; Flag 40: Member Present (On if member is in the party); Variable 108: Member X Coordinate; Variable 109: Member Y Coordinate; Variable 110: Member Z Coordinate; Variable 111: Member Direction. Normal Flags 180 - 189; Normal Variables 180 - 189; Normal Input18; Battle Flags 190 - 199; Battle Variables 190 - 199; Battle Input 19

Member Info : Save

Input: Variable 86: Member Number; Flag 81: Stat Check type (optional) [if On, the Stats marked with * will be adjusted for equipment and class changes; If Off, only Armor and Attack will be calculated.]

The following Variables are saved: Variable 99: Str*; Variable 100: Def*; Variable 101: Int*; Variable 102: Agi*; Variable 103: Luck*; Variable 104: Attack*; Variable 105: Armor*; Variable 106: Max Hit Points*; Variable 107: Max Magic Points*; Variable 97: Hit Points; Variable 98: Magic Points; Variable 91: Level; Variable 95:Exp; Variable 90: Class Rank; Variable 112: Class Exp; Variable 113: Class Victories; Normal Flags 180 - 189; Normal Variables 180 - 189; Normal Input18; Battle Flags 190 - 199; Battle Variables 190 - 199; Battle Input 19

Load Item Info

Input: Variable 134: Item Number; Variable 86: Member Number (optional); Variable 88: Class Number (optional); Loading Member Info will also effect the output (optional)

Output: Variable 135: Item Type; Variable 136: Item Buy Price; Variable 137: Item Sell Price; Variable 138: Item Weapon Property; Variable 139: Item Used Direct Effect; Variable 140: Item Used Indirect Effect; Variable 141: Item Equipped HP; Variable 142: Item Equipped MP; Variable 143: Item Equipped Str; Variable 144: Item Equipped Def; Variable 145: Item Equipped Int; Variable 146: Item Equipped Agi; Variable 147: Item Equipped Luck; Variable 151: Item Attack Direct Effect; Variable 152: Item Attack Indirect Effect; Flag 130: Hide Item Info; Flag 131: Unsellable Item; Flag 132: Indestructable Item; Flag 133: Member Can't Equip; Flag 134: Member Can't Remove; Flag 135: Class Can't Equip; Flag 136: Class Can't Remove; Input 1: Common Name

Load Direct Effect Info

Input: Variable 163: Direct Effect Number

Output: Variable 164: Direct Rate; Variable 165: Direct Success Ratio; Variable 166: Direct Type; Variable 167: Direct Target Type*; Variable 168: Direct Menu*; Variable 169: Direct Range*; Flag 160: Direct Effect Death Check (On = Before; Off = After); Input 1: Common Name

* Note that these variables were misnamed. Var167 is Direct Menu; Var 168 is Direct Range; and Var169 is Direct Target Type

Load Indirect Effect Info

Input: Variable 172: Indirect Effect Number; Variable 36: Instigator Magic Property (optional); Variable 37: Instigator Weapon Property

Output: Variable 173: Indirect Weapon Resistance; Variable 174: Indirect Magic Resistance; Variable 175: Indirect Priority; Variable 176:Indirect Rate; Variable 177: Indirect Type; Input 1: Common Name

Load Ability Info

Input: Variable 155: Ability Number

Output: Variable156: Ability Cost; Variable 157: Ability Direct Effect; Variable 158: Ability Indirect Effect; Variable 159: Ability Useable; Variable 160: Ability Random Type; Flag 150: Ability Type; Flag 151: Hide Ability Info; Input 1: Common Name

Event Info Load

Input: None (this command loads the information of whatever event is active at the time this command is executed)

Output: Variable 67: Event X coordinate; Variable 68: Event Y coordinate; Variable 69: Event Z coordinate; Variable 70: Event Direction; Variable 71: Event Number; Input 5: Event; Flag 50: Event Condition

Event Info Save

Output: The following are saved: Variable 71: Event Number; Input 5: Event; Flag 50: Event Condition

Note: Var71 = 0, Flag 50 = Off, and Input 5 is blank for all events until changed by this command. All events are reset upon entering a map so you can't share information between maps.

Substitute Attribute for Variable

Same as Member Info : Load except you can use Variable 55: Enemy Battle Order in place of Variable 86: Member Number to load in enemy data. Note that Flag 70: Side must be On to do this.

Substitute Variable for Attribute

Same as Member Info : Save except if Flag 70: Side is On, the info will be saved to the enemy whose battle number is in Variable 55: Enemy Battle Order

Substitute Target Attribute for Variable

Same as Substitute Attribute for Variable except Variable 96: Attack Order is also loaded.

Substitute Variable for Target Attribute

Same as Substitute Variable for Attribute except Variable 96: Attack Order is also saved.

RPG Learner
07-13-2005, 01:32 PM
Well here's something for Dungeon Warden did for the Script 15 battle enter.

I've still have it.

How to make custom music for maps by Dungeon Warden.

This is the original script.
000- Sound: Tempoary Save
001- Sound: BGM (-None-) Volume=100 Pitch=+0 Tempo=100
002- Script Control: Apply Together
003- Sound: Battle Music
004- Script Branch: Condition: Flag (Sample Flag 59) On
005- Map: Remove
006- Script: Condition End
007- Script Branch: Condition: Variable: (Screen Effect)=-1
008- Screen Effects: Mask(256,221)~(256,221) Color=Black 30F
009- Script: Condition End
010- Script Branch: Condition: Variable (Screen Effect)=/-1
011- Screen Effect: Color=black Trans=100% 0F
012- Screen Effect: Color=black Trans=0% 40F
013- Script Control: Apply in order
014- Effect: Apply wipe
015- Script: Condition End

Now here's the modified version that was done

000- Sound: Tempoary Save
001- Sound: BGM (-None-) Volume=100 Pitch=+0 Tempo=100
002- Script Control: Apply Together
*003- Data: Game Info: Load
*004- Script Branch: Sort Variable (Map Number)
*005- Script Brance apply if number is +3
*006- Sound: BGM (Battle 4) Volume=100 Pitch=+0 Tempo=100
*007- Script Branch: To End
*008- *Just a note i've put for a remider of where i've stopped.
*009 Script Branch: No Application
*010- Sound: Battle Music
*011- Script Branch: To End
*012- Script Branch End
*013- Script Branch Condition: Flag (Sample Flag 59) On (I'm not sure about this one.)
*014 Map: Remove
015- Script: Condition End
*016- Script Branch: Condition: Variable (Screen Effect)=-1
*017- Screen Effect: Mask(256,221)~(256,221) Color=Black 30F
018- Script Condition End
019- Script Branch: Condition: Variable (Screen Effect)=/-1
020- Screen Effect: Color=black Trans=100% 0F
021- Screen Effect: Color=black Trans=0% 40F
022- Script Control: Apply in order
023- Effect: Apply wipe
024- Script: Condition End

*Means modified for this but i don't remeber this though. I wonder if DW knows about this.

Oh and BTW The Debug Menu Scripts 5 through 14 provide helpful ideas for a CMS system. I'll write down only the helpful stuff you should know that i've found helpful.

RPGD
07-13-2005, 02:11 PM
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.

neobi
07-13-2005, 03:27 PM
There's a topic at Doan's that has all the common scripts like opening doors and common push blocks.

RPG Learner
07-13-2005, 03:35 PM
Then would'nt it be better to post that information here as well.

Valkysas
07-13-2005, 03:36 PM
well, I guess I have resources for that script archive I was planning. yay everyone!

RPG Learner
07-13-2005, 03:48 PM
And there's a lot more for RPG Maker 3 when it comes out. I'll possibly will have to write out the scripts again.

Until then more RPG Maker 2 Tips and tricks.

RPGD
07-13-2005, 07:24 PM
Thank good ol' HUmar. He's indirectly responsible for this whole mess. Much love to him.

Dungeon Warden
07-13-2005, 07:27 PM
If you want to have a NPC watch the party move around create an action script like this:

Event : Effect : Action [wait] 100% 0 F
Script Branch : Repeat : Flag 0: Off(fixed) = Off
Event : Movement : direction change (face leader)
Script Branch : End Repeat

and put it in the action slot of the NPC. Now whereever the party goes, the NPC's eyes will follow.


Create fade in/fade out for Map Music

In the enter map script, find the command Sound : Map Music and add the following before it.

Sound [None] Vol 100% Pitch 0% Tone 0 %
Wait 2 F
Sound : Sound Control (Fade in 30 F)
* Sound : Map Music

To the exit map script add:

Sound : Sound Control (Fade out 30 F)
Sound [None] Vol 0% Pitch 0% Tone 0 %

Now whenever you leave one map and enter another, the old map's music will fade away, and the new map's music will fade in.

KumoShinagi
07-13-2005, 11:51 PM
Thank good ol' HUmar. He's indirectly responsible for this whole mess. Much love to him.

You're all welcome. :D

I still have the links to the Ancient Pavilion Ruins!

That place is scary now....

RPGD
07-13-2005, 11:53 PM
They're called the Ancient Pavilion Ruins now, person. It's overrun with hobo ghosts.

RPG Learner
07-14-2005, 02:03 PM
Fuma Ladder Script 0992

000- Event Control: Change the Target to [Event 0972]
001- Event Move: Bypass Members=Yes
002- Event Control: Change the Target to [Event 0970]
003- Event Move: Bypass Members=Yes
004- Event Control: Change the Target to current event
005- Party: Gather Speed=2x
006- Party: Vertical Move (Party) Change Height +64 10F
007- Event Control: Change the Target to [Event 0972]
008- Event Move: Bypass Members=No
009- Event Control: Change the Target to current event
010- Party: Direction move E 1 step(s) Facing= Movement Speed=Normal
011- Party: Gather Speed=2x
012- Event Control: Change the Target to [Event 0970]
013- Event Move: Bypass Members=No
014- Event Control: Change the Target to current event

Script 0972
000- Data: Variable: [Variable 311] =(+2) + (0 fixed)
001- Teleport: Warp (World Set 079) (134, 129, +1)

Script 0970
000- Data: Variable: [Variable 311] =(+0 fixed) + (0 fixed)
001- Teleport: Warp (World Set 079) (13, 23, +16)

Event 0972
Display Type: Objects Direction S
Motion: Script 0115
Start: Touch
Model: Object 000

Event 0970
Display Type: Objects Direction S
Motion: -None-
Start: Touch -Script 140
Model: Object 000
Apply: Script 0993

Script 115
000- Event Move: Bypass Members=Yes

Script 140 Type Start Condition
000- Data: Game Info Load
001- Script Branch: Condition: Variable (Party: Dir)=+4
002- Data: Flag (Satisfy Execute) On
003- Script: Condition End

Script 0993
000- Event Control: Change the Target to [Event 0972]
001- Event Move: Bypass Members=No
002- Event Control: Change the Target to [Event 0970]
003- Event Move: Bypass Members=Yes
004- Event Control: Change the Target to current event
005- Party: Direction Change (Leader) E 5F
006- Party: Direction Move W 1 step(s) Facing= Fixed Speed=Normal
007- Party Gather Speed=2x
008- Party: Direction Change (Party) E 1F
009- Event Control: Change the Target to [Event 0972]
010- Event Move: Bypass Members=Yes
011- Event Control: Change the Target to current event
012- Party: Landing (Party) 20F
013- Party Gather Speed=2x
014- Event Control: Change the Target to [Event 0970]
015- Event Move: Bypass Members=No
016- Event Control: Change the Target to current event

neobi
07-14-2005, 04:09 PM
•Password Script (Brock Nash)

Text: Message "Enter Password"
Input: Input Text 15 letters
Script Branch: Sort: Input[input] (input is #003)

~Script Branch: Apply if: Text is "baah"
~scripting here
~Script Branch: To end

~Script Branch: Apply if: Text is "baah2"
~scripting here
~Script Branch: To end

~Script Branch: No Application
~Text Message "error, bad password"
~Script Branch: To end
Script: Branch End

•Common Push Block (Brock Nash)

Game Info: Load Game Info
Script Branch: [Party Direction]=0
~Event Control: Move Event East 1 30f
Script Branch End
Script Branch: [Party Direction]=2
~Event Control: Move Event South 1 30f
Script Branch End
Script Branch: [Party Direction]=4
~Event Control: Move Event West 1 30f
Script Branch End
Script Branch: [Party Direction]=6
~Event Control: Move Event North 1 30f
Script Branch End

NOTE:(you may option to be able to push at diagnols as well)

•One Face Activated Events (William Kirk)

Game Info: Load Game Info
Script Branch: [Party Direction]=(value of 0-7, press start on variable 'Party Direction' to see what each means)
(what you want the event to do)
Script Branch End

•Basic Custom Menu (William Kirk)

Multiple Choice: (whatever you want the options to be called)
Sort: Variable: User Choice
Apply If: 1
(what you want first option to do)
To End
Apply If: 2
(what you want second option to do)
To End
(repeat however many times you want for every option you have)
Script Branch: End

•Put the camera behind the character (Rodak)

Data:Game Info Load
Script Branch Sort:Variable {85?} [Party Dir]
Apply if=0
Camera Rotate E : Frames=15
Branch : To End
Apply if=1
Camera Rotate SE : Frames=15
Branch : To End
Apply if=2
Camera Rotate S : Frames=15
Branch : To End
Apply if=3
Camera Rotate SW : Frames=15
Branch : To End
Apply if=4
Camera Rotate W : Frames=15
Branch : To End
Apply if=5
Camera Rotate NW : Frames=15
Branch : To End
Apply if=6
Camera Rotate N : Frames=15
Branch : To End
Apply if=7
Camera Rotate NE : Frames=15
Branch End

•Hit timing (William Kirk)
Hit the right part of the sword at the right time to make it strong and sturdy.
Use 'X', '[]', 'O', and '/_\' as Text VFX or Text Box messages and do this.

Main Script___
Data: tempvariablex = 0
Data: tempvariablez = 0
Script Branch: Repeat: tempvariablex <= 8 (this 8 is the number of times they'll hit the sword)
Data: tempvariablex = tempvariablex + 1
Data: tempvariabley = 1 ? 4
Script: Sort: tempvariabley
Apply If 1
Call Script: 'X Button'
To End
Apply If 2
Call Script: 'Square Button'
To End
Apply If 3
Call Script: 'O Button'
To End
Apply If 4
Call Script: 'Triangle Button'
To End
Script Branch: End (sort)
Script Branch: End (repeat)

X Button Script___
Text Box/Text VFX: 'X'
Input Buttons: XF (30 frames is one second, find what is good)
Script: Sort: variable 'User Buttons'
Apply If (value for X button, press start on variable 'User Buttons to find what it is)
SFX: (good sound)
Data: Variable: tempvariablez = tempvariablez + 1
To End
No Application
SFX: (fail sound)
To End
Script Branch: End
Wait 1F (this is hear because of the Text Boxes)

Square Button Script___
Text Box/Text VFX: '[]'
Input Buttons: XF (30 frames is one second, find what is good)
Script: Sort: variable 'User Buttons'
Apply If (value for [] button, press start on variable 'User Buttons to find what it is)
SFX: (good sound)
Data: Variable: tempvariablez = tempvariablez + 1
To End
No Application
SFX: (fail sound)
To End
Script Branch: End
Close Text Box/Remove Text VFX
Wait 1F (this is hear because of the Text Boxes)

Triangle Button Script___
Text Box/Text VFX: '/_\'
Input Buttons: XF (30 frames is one second, find what is good)
Script: Sort: variable 'User Buttons'
Apply If (value for /_\ button, press start on variable 'User Buttons to find what it is)
SFX: (good sound)
Data: Variable: tempvariablez = tempvariablez + 1
To End
No Application
SFX: (fail sound)
To End
Script Branch: End
Wait 1F (this is hear because of the Text Boxes)

O Button Script___
Text Box/Text VFX: 'O'
Input Buttons: XF (30 frames is one second, find what is good)
Script: Sort: variable 'User Buttons'
Apply If (value for O button, press start on variable 'User Buttons to find what it is)
SFX: (good sound)
Data: Variable: tempvariablez = tempvariablez + 1
To End
No Application
SFX: (fail sound)
To End
Script Branch: End
Wait 1F (this is hear because of the Text Boxes)

And in the end you'll have a value of 0-8 to rank them on (how many successful hits). This is basically your normal hit-the-right-button-quick-enough mini game. Good luck. It can also be changed to do more, but this is the basic neccessities of what you'll need for it.

•Text Timing (Doyleman)

This is a pretty simple script, but I honestly just put something of the sort in my game, so LAY OFF! lol, j/k

Putting more 'expression' into your game helps, so making certain waiting before the next letter in a convo helps understand mood.
*EXAMPLE*
Screen Display: Text: Message (Uncheck the Close Window)
"Well"
Wait 20F
Screen Display: Text: Message (Unchech the Close Window)
"."
Wait 20F
Screen Display: Text: Message (Unchech the Close Window)
"."
Wait 20F
Screen Display: Text: Message (Unchech the Close Window)
"."
Wait 20F
Screen Display: Text: Message (Keep Close Window Checked)
"*enter*
I lost it!"

This will make a char. say:
"Well...
I lost it", with 2/3rd wait in between 'Well' and '.', making it seem like the Char is hesitant about explaining his/herself.

•Persistant Weather and Timer (thetruecoolness)
this one introduces how to add in persistant weather, and has smooth transitions between the times of day (2 second transistions). Might be more efficient as well since it only uses 4 sorts, it's about 800 in my game. This must be added as an action script to all maps, since as a content script it would be an infinite loop.

Script Control: Apply Together // needed for smooth transitions of times of day
Data: Flag: [Temp Flag 0] Off // used to see if it's night when they enter Off if it is
Script Branch: Condition: Variable [Hours of Day] >= 6
- Script Branch: Condition: Variable [Hours of Day] < 11
-- Screen Effect: Time (Dawn) 0F
-- Data: Flag: [Temp Flag 0] On
- Script: Condition End
Script: Condition End
Script Branch: Condition: Variable [Hours of Day] >= 11
- Script Branch: Condition: Variable [Hours of Day] < 17
-- Screen Effect: Time (Noon) 0F
-- Data: Flag: [Temp Flag 0] On
- Script: Condition End
Script: Condition End
Script Branch: Condition: Variable [Hours of Day] >= 17
- Script Branch: Condition: Variable [Hours of Day] < 22
-- Screen Effect: Time (Dusk) 0F
-- Data: Flag: [Temp Flag 0] On
- Script: Condition End
Script: Condition End
Script Branch: Condition: Flag [Temp Flag 0] Off
- Screen Effect: Time (Night) 0F
Script: Condition End
Script Branch: Repeat: Flag [Off (fixed)] Off // infinite loop since it's an action script
-Script Call: [Apply Weather] // does the weather effect based on weather stored in Input: Current Weather
-Script: Call [Day of Week] // displays the day of week in a text box based on the value of Variable Day of Week
-Script Branch: Repeat: Variable [Hours of Day] < 24
-- Script Branch: Sort: Variable [Hours of Day]
--- Script Branch: Apply If: Number is 5 // Morning starts
---- Screen Effect: Time (Dawn) 60F // Smooth out transition by making it take an hour in game time
-----Script Call: [Calculate Weather] // gets next weather conditon
-----Script Call: [Apply Weather]
--- Script Branch: To End
--- Script Branch: Apply If: Number is 10 // Noon starts
---- Screen Effect: Time (Noon) 60F
-----Script Call: [Calculate Weather]
-----Script Call: [Apply Weather]
--- Script Branch: To End
--- Script Branch: Apply If: Number is 16 // Dusk starts
---- Screen Effect: Time (Dusk) 60F
-----Script Call: [Calculate Weather]
-----Script Call: [Apply Weather]
--- Script Branch: To End
--- Script Branch: Apply If: Number is 21 // Night starts
---- Screen Effect: Time (Night) 60F
-----Script Call: [Calculate Weather]
-----Script Call: [Apply Weather]
--- Script Branch: To End
-- Script: Branch End
-Data: Variable: [Hours of Day] = [Hours of Day] + 1 // increment hour
-Other: Wait 60 F // 2 second wait change this to make your hours longer or shorter right now 2 Sec = 1 hour
-Script: Branch End
-Data: Variable: [Day of Week] = [Day of Week] + 1
-Data: Variable: [Hours of Day] = 0 + 0 // reset hour - VERY IMPORTANT other wise the game will freeze
Script: Branch End

RPG Learner
07-15-2005, 02:15 PM
For CMS Help Script 5 Debug Menu parts of it

000- Data Flag: (No Movement) On
001- Data Flag: (Cancel Menu) On
002- Data Flag: (Cursor Shortcut) On
003- Data: Variable: (User Choice)=(0 fixed) +(-1)
004- Text: Display Money On
005- Script Branch Repeat Variable (User Choice) /= (0 fixed)
006- Input: Mutiple Choice, 8 (20, 4) Member Info *You put what it says like status, item, etc.*
007- Script Branch: Sort: Variable (User Choice)
008- Script Branch Apply If: Number is +1
009-Script Call (Item) *example*
010- Script Branch: To End
*repeat until your have the max commands*
031- Script Branch: To End
032- Script Branch: End
033- Script Branch: End
034- Text: Display Money Off
035- Data Flag: (No Movement) Off

Part of this. *Use for all the commands for it.
For top of the script.

000- Data: Variable: (TempVariable 0) = (User Choice) + (0 fixed)
001- Data: Variable: (User Choice) = (+1) + (0 fixed)
002- Script Branch Repeat Variable (User Choice) /= (0 fixed)

*Use the Flag Cancel Menu first on the top. Always to can cel it.*

000- Data Variable: (User Choice) = (Temp Variable 1) = (0 fixed)
001- Script: Condition End
002- Script: Branch End
003- Data: Variable: (User Choice) = (Temp Variable 0) + (0 fixed)

Well i hope this helps.

And these two parts are in the Debug Menu Scripts.

The Final Rune
07-15-2005, 03:14 PM
Something simple, that I'm sure a lot of you already know, but it was very useful to me once I found out.

If you hold [] while looking through the game's menus and various databases you can cycle 100 numbers/entries at a time by press left or right.

This make finding a certain variable or flag, or jumping from the middle to the end of a script database, or finding that VFX out of the 300+ a whole lot quicker. Also setting the Hard level option on your databases causes the scroll maker to start at that postion when ever you access the database.

Rodak
08-15-2005, 05:17 AM
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)..

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.

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.

WilliamKirk
08-26-2005, 03:04 AM
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)

WilliamKirk
08-26-2005, 03:10 AM
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.

Dungeon Warden
09-04-2005, 07:44 PM
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.

Rodak
02-19-2006, 10:17 AM
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.

thetruecoolness
03-23-2006, 02:48 PM
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.

Jeremy
09-13-2006, 04:46 AM
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.

KumoShinagi
10-12-2006, 10:06 PM
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, ±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, ±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° 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!

Whataface2
05-23-2007, 11:06 PM
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.

thefinalrune
09-20-2007, 04:23 PM
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.

11Evil Chipmunk
09-20-2007, 04:59 PM
Sweet! I've been needing a thread like this for a while.

Nje789
07-03-2008, 12:17 PM
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).

madcopper
07-04-2008, 07:51 AM
This sounds really great, but your explanations are really, not that great. Do you think you could post the scripts?

Nje789
07-04-2008, 10:23 AM
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.

madcopper
11-24-2008, 11:36 AM
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

Drew
01-16-2009, 03:38 AM
Heres my contribution.

How to make somewhat intelligent AI movements:

Somewhat jerky, but you can modify to your likings....Mainly for Acbs's but can be used for numerous things.

Make this flag.

<Lock/EvtLD>

Scripts:
Courtesy Of thetruecoolness for the lock variables trick.
[Lock/Variable]
SBR:Lock/EvtLD=on(<---doesn't have to be that, you can use any flag if youd like..)
other:wait:1F
SBE
Data:Flag:Lock/EvtLD=off


[Repeat Step]
SBR:FLag fixed=off
Event:Movement: Direction Change:Face Leader:5F
Other:wait:40F
Script:call:[Lock/Variable]
Event:Control:Event:Info Load
Sort:Event: Dir
Apply If 0
Event Move: Direction Move:E 1 step 8frames.
Script:Control:To end
.......Repeat all the way up to 7
Apply if 7
Event Move: Direction Move:NE 1step 8frames
SBE
Data:Flag:Lock/EvtLD=off
SBE

Just use this method instead of the event action TO LEADER command.

DK6025
03-20-2009, 03:43 AM
I had suggested to Moo recently a confusion status as a way to spice up the DBS. I figured I might as well share it with everyone.

Confusion Status
Since you can't designate an action outside of a trait script, you essentially have to recreate a direct effect through call scripts. First of all, make 2 flags called confused and target , and 2 variables called target and instigator. Make the confusion effect an action status so it disables the player from making a choice at the start of a turn. Put whatever you want in the Flow 1 slots. Then in the Character End slot of Flow 2, put this script;

Confused Turn
Flag: Confused = On
Condition: Flag: Instig Side = On
Variable: Instigator = Instig Enemy #
SC: End
Condition: Flag: Instig Side = Off
Variable: Instigator = Member Number
SC: End
Var: Temp Var 0 = 0?1
if 0, Flag: Target = On(Enemy is targeted)
if 1, Flag: Target = Off(Party is targeted)
SB: End
Condition: Flag: Target = On
Temp Var.0 = 0 ? ParticipateEnemy
Variable: Target = Temp. Var.0
SC: End
Condition: Flag: Target = Off
Temp Var.0 = 0 ? ParticipateMember
Variable: Target = Temp. Var.0
SC: End
Call[Effect Start]
Call[Battle Formula]
Condition: Flag: Instig Success = Off
Call[Failure]
SC: End
Condition: Flag: Instig Success = On
Condition: Flag: Target Dodge = Off
Call[Attack Success]
SC: End
Flag: Confused = Off

Now make this script;

Set Target
Condition: Flag: Confused = Off
Make Active Char.
SC:End
Condition: Flag: Confused = On
Check Who Goes First
SB: Repeat: Flag: Member Check = On
Condition: Flag: Target = On
Condition: Variable: Instig Enemy = Target
Force Script End
SC:End
SC:End
Condition: Flag: Target = Off
Condition: Variable: Instig Member = Target
Force Script End
SC:End
SC:End
Check Who Goes Next
SB: End

Now this is where it gets complicated. In every script that is used in the Direct Effect for a normal attack, whenever there is a "Make Active Character" command where it is making the target an active char., replace the command by calling the above "Set Target" script. Every command that changes back the active char. must be "Change Back Active Character".

And for those who would like to make the battle system a little more Final Fantasy-like;

Elemental Absorbtion
First designate a battle variable for the elemental property to be absorbed. Set it to -1 for enemies that don't absorb anything. Make a Flag called Cure.
In the Magic Formula script, where the target's stats are being substituted for temp variables, place these commands;

Condition: Battle Variable X = Instig M Property
Flag: Cure = On
SC: End

Then in the Attack Success Script;

Condition: Flag: Cure = On
Call[Healing]
SC: End
Condition: Flag: Cure = Off
Call[Reduce HP]
SC: End
Flag: Cure = Off

Draygone
11-18-2009, 09:21 PM
HAVE AN EVENT CHANGE PAGE ANY TIME

While searching for my own problem, I came across a topic where somebody was asking how to do the above thing, and a response to him said it was impossible. To an extent, it's true. Events don't change pages unless the map was just entered, or an event's content script just executed. (Possibly also after a random encounter. Haven't tried.) However, duplicated events will start at the proper page.

The context was the person had a randomly wandering enemy, and so I shall provide my information as such.

First, gotta have the event in question. For this example, we'll call it "Moving Guy". First page is his default script, and other pages have their conditions like you'd normally have.

Now, create two action scripts. One script just has the command that gets the event moving (we'll call it "Get Moving!"). Simple. The second one (which we'll call "Event Wander") is going to be put in the event's Action slot. It's a little more complex, so here it is in detail.

000 - Script Control: Apply Together
001 - Other: Wait 10F
002 - Script: Call [Get Moving!]
003 - Script Branch: Repeat: Flag [Off (Fixed)] Off
004 - _Other: Wait 1F
005 - _Script Branch: Condition: (condition for page change goes here)
006 - __Event Control: Duplicate [Moving Guy] Coordinates (0, 0, 0)
007 - __Event Control: Temporary Removal
008 - _Script: Contition End
009 - Script: Branch End

Let me explain this script in more detail. The first Wait command (at 001) is there to ensure that if the event goes back to this wandering page, it doesn't get stuck on or walk over its previously active self. Rather, it gives its previous self ample time to remove itself.

The Apply Together command (at 000) and the called script (at 002) are important. Event Action movement commands are constant. If the script hit one, it'd never pass it. By calling the wandering script and having the current script apply together, it triggers the wandering script and continues on without the script freezing.

Now, within the repeating script (starting at 003) is where you'll be wanting all your various conditions for changing pages. First off, the Wait (at 004) is very important. Apparently, action scripts with repeating branches lag the game if there's no Wait command. (Alternatively, you could have an Input: Button command with a wait time of 0F.) Then go ahead and put in branch conditions for the page change.

Within those final conditional branches, duplicate the event on top of itself (as at 006), and remove the currently running event (as at 007). As I said earlier, the duplicated event should be set to the page with the proper condition. It should be noted, though, that duplicated events do not automatically trigger their Auto Start scripts upon creation. The event will also sorta "jerk" into place when it's duplicated if the event was moving, but that's no big deal.

I'm likely not the first to come up with this. It seems pretty necessary when it comes to creating custom battle systems. But it hasn't been mentioned in this topic, before, and it's good enough to be worth mentioning, and to say to the person who said automatic page changes were impossible: WRONG! :P

Drew
10-30-2010, 10:58 AM
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

Drew
10-29-2011, 02:12 PM
Return Holding O to run using Nash's Vehicle trick:

Create the following

Vars: RUN X, RUN Y
Scripts: Vehicle Speeds, Forced Vehicle, Walk/Run check, Button Mapping
Flags: Walk/Run


[Forced Vehicle]
Script Branch Repeat
Call: [Vehicle Speeds]
Other: Control Vehicle
Script Branch End

[Vehicle Speeds]
If Walk/Run=on
Other: Deploy Vehicle 2x speed
End
If Walk/Run=Off
Other: Deply vehicle normal speed
End

[Walk/Run Check]
Script Branch Repeat
If Walk/Run=On
Other: Exit Vehicle
Wait 8f (1 step)
Data: Game Info Load
Run X= Party X + 0
Run Y= Party Y + 0
If Run X = Party X
If Run Y = Party Y
Other: exit vehicle
Walk/Run=Off
End
End
End
Script Branch End

[Button Mapping]
Script Branch Repeat
Input Constant Wait
If User Button=5 (O)
Walk/Run=On
End

Call all 4 of those scripts in your enter map script and apply them together, I honestly have no clue why it works when you hold O, but it does haha.

Lonewolf
11-25-2011, 01:21 PM
Pickpocketing: By WilliamKirk

An extremely easy way to do this(possible in RPGM1 too) is make it so when you talk to people you get a 2-Way Choice to either talk to the event or steal from the event. Then you just use a script branch and a flag to make it so you can only steal once. And on top of that you could make it so when you steal you have a __% of stealing this or a __% of stealing that or a __% of stealing nothing.

-------------------------------------------------------------------------------------------
Some possible additions to this:

1. You could add in a Direction Check, so that you can only Pickpocket from behind.

2. I am not sure how the Custom Start Script option works, but you could probably use this to set it up so that the option to Pickpocket someone appears when you are within a certain range. (You would have to set up a flag so that this doesn't keep occurring, thus preventing you from Talking to them.)

3. You could also have the character's Pickpocketing skills increase after so many successes, thus increasing the range from say 1 step away(right behind them) to like 2 or 3 steps away. (This could also work in reverse, decreasing after a certain number of failed attempts.)