Fandom

MonsterGirlQuest Wiki

Making a Side Story

688pages on
this wiki
Add New Page
Comments172 Share

How to make a Side story;
This page will (hopefully) help you make your own side storie(s). A lot of things here were taken from Gnomes Laboratory, the main blog for MGQ-side-stories. This tutorial only covers side-stories for Chapter 1, since I didn't find a good list of Chapter 2 material.

Since this page was created, much has been added that supports Chapter 2 as well as Chapter 3. Currently, the documentation covers pretty much anything and everything that you can do within a side story.

Getting situated

Required items

  • A text editor
  • A (basic idea for a) story

Optional, but advised items

  • Excel, or a likewise program, just to make editing your text much more easy.
  • The monster lab converter (Everything can be made without it, but else it can be found on Rogue's website here (top link doesn't work, use the link provided by "dark" at the almost bottom of the page). The converter can be found in the folder "mon_labo/tool"
    • Excalibur is an upgrade of the monster lab converter and can be downloaded here.
  • The lists of background music, sound effects and original in-game character and background codes, found in the same folder as the above converter.
    • Which can be extracted via NSAout at here. Remember that the all the .arc files must be in the same location as NSAout.

Basic begin

Looking at the competitors

I'm not joking, before you get started, take a look at the stories other people made and then especially at the "story.ini" files. (Just open them with notepad)

Things every story needs:


Notepad only?

If you only use the notepad, just copy the following in, and start editing.

[setting]
title = "TITLE_HERE"
[story] 0 = " " ... 9999 = "end"

Now you have to have every new line start with a next number and add your message between the " " with as last symbol (so before the second quotation mark) a SPACE. if your story is done, your end it by changing the 9999 into the next number you should use.


Monster lab converter?

If you use the monster lab converter, you can leave the numbers and " but you still need to add the end-of-text-spaces (more about that later)


Excalibur?

Excalibur is an upgrade for the monster lab converter, but for best results you will need GC345's game patch.


Excel?

Excel requires a bit more setting up, but that might pay off in the long run.

  • In column A type in row 5-7 the numbers 1-3, select them all and the use the drag the square at the lower right corner down, to let excel number further for you
  • In column B, row 5 type " = "" (so SPACE, equal symbol, SPACE, quotation mark) and also click and drag down the black square in the lower right corner
  • In column D, row 5 you do a space and a single quotation mark and again you repeat it downwards
  • After the last line you use, you put the end-line as seen above.
  • The text you use can now by normally typed in column C.
  • When you are done with the story, copy all the cells to notepad and replace (Control+H) the TAB's with nothing.

Now you have a basic story, but without any names above the text boxes, pictures or sounds. Here we will talk about in the next steps.

Standard text strings

If the story.ini string not includes any command - the string just printed in the text window.

Unfortunately @ (new line wait state) and new lines aren't supported, the game always starts the new text string from a new page.

Backgrounds, sprites and sounds

To add anything else then just plain text, you will have to do a bit more research and testing. Especially if you write the story first, and choose and add the rest later it is handy to use (a program like) Excel, so you can move parts of your text, without having to re-number everything.


Backgrounds

To have a background you need the following line in your end-product:

0 = "bg,bg002,10,1500"

This line has 4 parts:

  • bg - Signals the game that you want to add a background.
  • bg002 - Selects what background you want; in this case, this one is Luka's house. In the list_bg.jpg file, found in the tool folder of the download, you can see all the available backgrounds in chapter 1 and there codes.
  • 10 - Sets the drawing effect. Most commonly used effects are 0 - no drawing, 1 - instant drawing and 10 - the pixel crossfade. Possible values are 0 - 14, effects 15 - 18 and 99 aren't supported in Spin-off stories.
    • 0 - No drawing. 
    • 1 - Sprite instantly appears.
    • 2-5 - Sprite appears via rightward, leftward, downward, and upward shutter, respectively.
    • 6-9 - Sprite appears via rightward, leftward, downward, and upward curtain, respectively.
    • 10 - Fades in the sprite (the pixel crossfade).
    • 11-14 - Scrolls the entire game window like a slideshow, where the next "slide" has the sprite.
  • 1500 - Sets effect duration in milliseconds. Effects 0 and 1 ignore this parameter.
  • You can add your own background,in that case you need to have it in the same folder with all the rest of the files (story.txt) etc... Most of the backgrounds are in BMP format so i reccomend keeping it that way. Possible formats are .bmp, .jpg and .png.
  • To have a custom background show up in your side story, use a format similar to "0 = "bg,filename.bmp,10,1500" with "filename" being the picture file you want to use. Also, it is recommended to keep the resolution the same as the game window's: 800px x 600px, otherwise the game may not display it properly.

Solid Color Backgrounds

While it's awesome to have a background, sometimes you don't want one. How to get rid of the background in one easy step...

1 = "bg,black,10,1500 " 2 = "bg,white,10,1500"

  • Everything is the same as above, except black/white is not a picture file; just a command.
  • As above, you can use whatever transition and transition duration that you'd like...

Format is #RRGGBB in hexadecimal. if you know your colors then this should be easy; otherwise you can use a program to mix them and find out what color you're looking for. Additionally you can use imaging software to select and identify colors with decimal values, then convert them to hex. 255 = FF, 0 = 00.

  • 1 = "bg,#FF0000,10,1500 " //red
  • 2 = "bg,#00FF00,10,1500 " //green
  • 3 = "bg,#0000FF,10,1500 " //blue
  • 4 = "bg,#7F7F7F,10,1500 " //50% Grey

Sprites

Sprites are the pictures of the monster girls, and are used as such: 0 = "sp,8,alice_st01,0,1,10,100 " This line has 7 parts:

  • sp - Signals the game that you want to add a sprite.
  • 8 - Selects the layer, similar to Photoshop. For those who don't know how it works, the higher the number, the further "back" the picture gets. So if you have a picture on layer 7 and 8 at the same position, the picture on layer 7 will appear in front of the picture on layer 8. You can use negative values.
  • alice_st01 - Sets the sprite you want to use (look at the list_chara.txt file for all the sprite names). Custom sprites can be used as well by adding the file extension; the game looks for them in the same folder directory as the story file.
  • 0 - Sets the position horizontally. Positive values set sprite to the right, negative values to the left. A value of 0 aligns the left edge of the sprite image to the left edge of the game window.  
  • 1 - Sets the position vertically. Positive values set a sprite low, negative values set a sprite high. A value of 0 aligns the top edge of the sprite image to the top edge of the game window.
  • 10 - Sets the way the sprite appears on screen (sliding in, fading in, etc). Must have a value between 0 and 14 (including 14) but not over 14, or else the game crashes. See the bg command above for what these values do.
  • 100 - Sets the time it takes for the appear-animation to finish in milliseconds. The higher the number, the slower the sprite appears. Can be as high as the thousands (1000 ms = 1 second).
Alice Unconscious

A fullscreen sprite added using the sp_non_alpha command.

Sp command uses right half of the sprite as the blending mask. So - if you try to use this command with background image - the result will likely be a sprite that doesn't display properly.

To add a sprite that takes up the entire screen (such as Alice's unconscious sprite, or almost any rape scene drawn by UN_DO) use the following command:

sp_non_alpha,3,alice_iv02,10,100

Badsprite

A fullscreen sprite added without using the "sp_non_alpha" command

This line has 5 parts:

  • sp_non_alpha - Tells the game that you want to add a sprite without eliminating the background (alpha) color. If the background color is removed, then the sprite will appear to be transparent.
  • 3 - Selects the layer, identical to the previous sprite command.
  • alice_iv02 - The filename of the CG you wish to use. Again, custom sprites can be used.
  • 10 - Sets the transition effect/how the sprite appears on screen (sliding in, fading in, etc). Must have a value between 0 and 14 (including 14), but not over 14, or else the game crashes. See the bg command above for what these values do.
  • 100 - Sets the time it takes for the appear-animation to finish in milliseconds. The higher the number, the slower the sprite appears. Can be as high as the thousands (1000 ms = 1 second).

Unlike the previous command, you can't change where this sprite is positioned.

To delete a sprite (set with either sprite command) use a similar function to calling a sprite. Using the above for an example, you could enter:

sp_del,8,10,500

This line has 4 parts:

  • sp_del - This signals that you want to delete a sprite.
  • 8 - Similar to the above, this calls the sprite layer of eight to be deleted. Note that you do not need to reference the name of the sprite - the game will delete everything on that layer.
  • 10 - This is the way the sprite disappears from the screen, similar to the second-to-last (10) operation above. By changing it you can change the way that sprite disapear from a screen
  • 500 - Sets the time it takes for the disappear-animation to finish in milliseconds. The higher the number, the slower the sprite appears. Can be as high as the thousands (1000 ms = 1 second).

Sprites2

sp2 command sp2 is similar to sp in that it can display sprites! Other than that, the mechanics and syntax to it are are much more intricate. It's handy if you want to rotate or resize a sprite. It's also a little more consistent in how it centers sprites. Sprites displayed with sp2 can be put on layers 0 through 9 along side the sprites placed with sp. (you can put a sprite on layer 4 with sp, then another one on the same layer with sp2). Don't bother putting sprites on layers higher than 9. They won't appear. The command looks like this sp2,4,alice_st11,350,300,0,0,0,4,1000

  • sp2 - The command
  • 4 - The sprite layer. These layers appear to be separate from the layers used in the sp command.
  • alice_st11 - The image
  • 350 - x position (0 puts the vertical center of the image at absolute left of the game screen)
  • 300 - y position (0 puts the horizontal center of the image at absolute top of the game screen)
  • 0 - x expansion (0 leaves the image as is, anything bigger increases it's size by that many pixels, anything smaller makes it smaller by that many pixels)
  • 0 - y expansion (0 leaves the image as is, anything bigger increases it's size by the many pixels, anything smaller makes it smaller by that many pixels)
  • 0 - rotation (0 leaves the image as is, positive values rotate the image counter clockwise by specified amount, negative rotate clockwise)
  • 4 - transition effect
  • 1000 - transition duration (ms)

It's worth noting that inputting -200 for both the x-expansion or the y-expansion parameters will invert the sprite. So if you want to Alice to face the other way, or see Tamamo standing on her head, that's how you do it.

sp2_del

sp2_del works exactly the same as sp_del, only difference is that it works with sprites created with sp2 vs sp.

0 = "sp2_del,4,5,1000"

  • sp2_del - the command
  • 4 - the layer
  • 5 - the transition
  • 1000 - the duration

Move Command

The move command has 10 parts, took me a while to figure them out, but once you know what you're doing (and you stop crashing MGQ) it's a pretty useful command.

move,2,3,4,5,6,7,8,9,10 //please do not run that line of script

  • 2 - This is the sprite layer to be moved. Sprite layers are between 0 and 9.
  • 3 - This is the horizontal shift (movement). Can be positive or negative. "3" moves the sprite 3 pixels right per movement loop.
  • 4 - This is the vertical shift (movement). Can be positive or negative. "4" moves the sprite 4 pixels down per movement loop.
  • 5 - This is the width modifier and can be positive or negative. "5" will increase the sprite's width by 5 pixels around the center. (will stay centered unless it's being moved by the other values)
  • 6 - This is the height modifier and can be positive or negative. "6" will increase the sprite's height by 6 pixels around the center. (will stay centered unless it's being moved by the other values)
  • 7 - This is the rotation of the sprite. Can be positive or negative; positive numbers rotate counter clockwise and negative numbers rotate clockwise.
  • 8 - Opacity. Can be negative or positive; though, it has a maximum value and once it's over that it doesn't get any more opaque.
  • 9 - Delay - This number sets the delay per loop. A delay of 0 isn't instant as the display time still applies. When you set this, please be sure to test it to see just how long you want it to be. without the display time delay a value of 16 would be about 60fps.
  • 10 - Loop Count - Finally! This is what allows the movement to happen. Everything that you've specified to now is repeated over and over this many times. It must be a positive number.

Note: Move does not appear to work with sprites created by sp, instead you have to use the sp2 command to display the image.

Example: (Note: don't forget to change the line numbers if needed).

  • 1 = "sp2,1,alice_st01b,400,400,100,100,0,1,100 "
  • 2 = "move,1,0,4,2,2,0,0,3,200 "

A breakdown of the commands can be done by looking at the explanations of the move and sp2 commands

The sp2 command is loading the image to x400 and y400, expanding the picture by 100 pixels in each direction, drawing it on layer 1 with transition 1 (instant) and it takes 100 ms (if there was a transition which that applied)...

THEN the move command is moving layer 1 (of the sp2 layers) with no movement on the x access and increasing the y position by 4 pixels per loop. the size is increasing by 2 on both x and y access to make it get larger, there is no rotation or opacity change, and there's a delay of 3ms per loop. The idea was to make it look like it did in the cave with Alice when she was nervous about the ghosts that may have been present. didn't really work out, but it could with some testing...

Background Music

Background music, to have playing while you are going through the story, works as follows: 1 = "bgm,alice1 " This line has 2 parts:

  • bgm - Signals the game that you want to add background music.
  • alice1 - Selects music you want to have playing, can be found in list_bgm.txt.
    If you want to add your own music you need to place a music file in .ogg format (converter) and use it with 1 = "bgm,somemusic.ogg ".

Now that it's playing, of course you have the issue of stopping the music. This can be done with a single part line:

1 = "bgm_stop"

  • Important things to remember, no spaces. That's it, enjoy the silence. :)

Sound Effects

Sound effects are small pieces of sound that play over the background music. You can have multiple sound effects at a time, while you can only have one background music. Sound effects also have the OPTION to loop (don't HAVE to)

1 = "se,1,bird,loop "

This line has 3 or 4 parts:

  • se -Signals the game that you want to add a sound effect.
  • 1 - Selects the "layer" of the sound effect
  • bird - Selects which sound effects to play, all can be found in list_se.txt and you can use your own in the same way as background music.
  • loop - Makes the sound effects loop. To not loop you just remove the command (the line will look like 1 = "se,1,bird" ). To STOP a looped sound effect use the command 7 = “se_stop,1" , where 1 is the layer again. In a post it is said that if you use own sound effects and you want to stop them immediately, you have go one layer number higher.
  • Just like with backgrounds, it is possible to add your own sound effects. Its very simple to do it, first you have to make sure that sound effect is in proper format which is wav, if its not find and download a converter or use online converter (its lots of them out there). Once done with that just simply drop it to the folder with you story. Very simple, now to use it in a story? Just type in se,1,randomsound.wav . Of course, if you are doing it use a proper sound effect name. Example: se,1,thunder.wav and that's it - you got your own sound effect in your story.

Syasei Command

The syasei command triggers an orgasm during a rape scene. With it, you can make the screen flash, play the "syasei" (orgasm) sound effect, and switch to different rape scene CG all using only one line of code.

"syasei,3,iriasu_h2,0,0"

  • 3 - Indicates which layer the rape CG is appearing on.
  • iriasu_h2 - The filename of the rape CG you want to switch to when the main character orgasms.
  • The first '0' after the filename centers the sprite horizontally. Positive numbers center CG to the right, and negative numbers to the left.
  • The second '0' centers the sprite vertically. Positive numbers center them lower on the screen, and negative numbers center them higher on the screen.

Generally, most rape scenes are already centered, so you can usually just leave both values at 0. This command does not work with in-game rape CG that take up the whole screen, such as most of UN_DO's rape scenes. However, it still works with any custom rape scene CG. Even if they take up the whole screen.


Syasei2 Command

Like the syasei command, the syasei2 command triggers an orgasm during a rape scene. However, the Syasei2 command has the ability to display 2 separate images at once. You know, if you've got a group of monsters enjoying your character.

"syasei2,2,inp_hd8,200,0,3,inp_ha4,-200,0, "

  • 2 - The layer the first rape CG is appearing on
  • inp_hd8 - The first rape CG
  • 200 - The x offset from center
  • 0 - The y offset from center
  • 3 - The layer that the second rape CG is appearing on
  • inp_ha4 - The second rape CG
  • -200 - The x offset from center
  • 0 - The y offset from center

I'm not really sure how often you'll actually want to display 2 rape scenes at once, but the ability to do it is important enough to post this.

Note: Your layers can't be the same, because you can only put one image on a layer. Also, since they're layers keep in mind that the higher number (in this case 3) will overlap the lower number (in this case 2).

Flash Command

This command makes the screen flash. It's typically used if a spell is being cast, or if the main character is falling victim under 'Eyes of Obedience' or similar spell. It can be used whenever a main character orgasms, but the 'syasei' command is generally more efficient at doing that.

"flash,250,500"

  • 250 - How long it takes for the flash to fade in.
  • 500 - How long it takes for the flash to fade out.

There is no limit to how high the numbers can go. But the larger the number, the longer it takes for the flash to fade in or out. Don't use negative numbers or the game crashes.


Quake Command

This command makes the screen shakes, typically after someone lands a powerful attack, such as Ilias smiting someone, or demon skull beheading.

"quake,10,500"

  • 10 - Determines how much the screen shakes.
  • 500 - Determines how long it shakes for.

There is no limit to how large the numbers go. But the higher the number, the more/longer the screen shakes. Don't use negative numbers or the command won't work.


Element Command

This command allows you to display the spirits across the screen, it is used during the game when one of them is trying to get Luka's attention. To make them appear on the screen, use the following line of script.

"element,1"

This line has 2 parts, the first of which is the command itself, the second is a number between 1 and 4.

  • 1 - Sylph
  • 2 - Gnome
  • 3 - Undine
  • 4 - Salamander

Movie Clips

In order to play movie clips in the game, you need to make sure the movie file is encoded in MPEG-2 format (*.mpg).

0 = "movie,your_video_filename.mpg"

This line has 2 parts:

  • movie - Tells the game the file name in the next argument is a movie.
  • your_video_filename.mpg - The name of your video file.

Basic Story Tweaks

In addition to the more advanced things you can do with your story, there are some minor graphic modifications you can do as well to change the way your story is viewed by the user. I'm creating a section for these, because... well... none of them are listed...

Wait

wait,500

  • wait - The command
  • 500 - How long to wait (in milliseconds; 1000 = 1 second)

There really isn't much to say about the wait command, it makes the game pause for a specified amount of time. You might want to do this if you want the player to actually pay attention to something written on the screen vs clicking through to see what happens next, especially if they're just running through for pictures...

I would suggest against using it frequently, because if someone's already played your story they're going to have to wait at each of these when skipping through the text to where they were last.

Anten

anten

You only need the command; there are no options with it. Running this command essentially clears the screen; all sprites and the background image fade to black and the music stops.

Good time to do this might be when your character becomes unconscious, either temporarily or when the story ends.

Note: anten switches everything to the monochromatic palette for it's transition, however at the end of the transitions monochromatic is turned off, so everything returns to color.

Monochrome

Monochrome means there are no colors at all except for black, white, and the shades in gray in between.

Monochrome effects can have a huge visual impact on the viewer / user. Sometimes, it just seems like a monochromatic kind of moment... so run with it :)

There are two monochrome commands you can access from side story development... They'll be explained here, though there isn't really much to them...

monocro_on

monocro_on

There are no options for this one, and it doesn't work with a trailing space.

When you use the monocro_on command, the screen switches to monochrome mode, specific shading is #888888, but that's not all that important. There is no transition, it just happens.

You may want to use this for flash backs or maybe character insight into future events.

Since there is no transition, you might want to initiate it with a solid colour background change (black / white?) then build your scene (perhaps using anten would be a good initiation?).

if you use the monocro_on command, please ensure to use the monocro_off command before the end of your side story, otherwise it will not turn back off when you leave the story and other side stories will load in monochrome.

monocro_off

monocro_off

There are no options for this, and it doesn't work with a trailing space.

When you use the monocro_off command, the screen switches back to normal mode, there is no transition, no wait time.

To make it look right, you might want to black out the screen first (or white it out) with a solid color background change. then rebuild the scene in normal mode.

Using this command is critical if you've used the monocro_on command; otherwise when your story ends the next loaded stories will be loaded in monochrome

text window

Missingwinset

Somebody forgot to input the win_set command. Oopsie daisy.

win_set

Winset

How sprites added with the 'sp2' command should look, once 'win_set' is turned on.

win_set is a very basic command.  It creates a dialog box at the bottom of the screen.  It may seem like a redundant command since there's always a dialog box whether you use this command or not.  But if you're adding sprites using the sp2 command, it's absolutely necessary. Because sprites added with the sp2 command always appear on top of the dialog box, as pictured here.  The win_set command creates a dialog box that appears on top of these sprites.  You only need this command if you plan on adding sprites using the sp2 command.  Otherwise, it's not needed. 

win_del

win_del deletes the dialog box that win_set creates.

More advanced tools.

Battle Making

Battle making is the most difficult thing about making a side story,in order to do so i recommend using this tutorial: http://www.mediafire.com/?5e2oenm6yrmdfno

Long after this section was created, a battle page was added to the wiki. You can find it here: Side Stories - Battle Commands

Additionally, if you want to look at battle script in use, as well as every other command, check out Side Stories - Putting it all together and follow the restart links.

Choices and skipping

To have the player choose an answer you have to enter the following line:
646 = "select,Erubetie ,slime,Humanity ,man,Both ,both"
This line will show you 3 choices and is made out of 3 or 7 parts (7 if you count the multiple answers)

  • select - This will signal the game that you want to have option boxes pop up
  • Erubetie - The TEXT of the first answer. This is what is shown on the button, and need to be ended with a space.
  • slime - The IDENTIFIER of the first answer. This is the "route" the game will take when you choose this answer.

The other 4 parts are the same as these last two.

After a choice, there is usually a small bit different, and then it is back to the main story line. To not have to make large parts dubble, you can also skip certain pieces of text, so you can go back to the main line, that goes for every choice.

However if the choice also changes things further down in the story it is wise to when you duplicate large pieces of text, to still make it into new sections to improve readability if you need to change something.

If you want the game to skip to another part you need to input the line:

543 = "goto,op1a"

This line has 2 parts:

  • goto - This will signal the game that you want it to go to the part after the comma.
  • op1a - The name of the section you want the game to go to.

Here is an example of both the more advanced tools:


[story]
0 = "some story "
...
654 = "select,Option 1 ,op1,Option 2 ,op2"
[op1] 0 = "story after option 1 " 1 = "more story " 2 = "goto,op1m1"
[op2] 0 = "story after option 2 " 1 = "more story " 2 = "goto,op2m1"
[op1m1] 0 = "Part of main story that has slight changes because option 1 was chosen " 1 = "more story " 2 = "goto,end"
[op2m1] 0 = "Part of main story that has slight changes because option 2 was chosen " 1 = "more story " 2 = "goto,end"
[end]
0 = "Last part of the story, where the options don't matter " 1 = "finalizing " 2 = "end"

In this example you can see the start of a story line, 2 options, 2 continuations with slight story differences, and then back to the main story line / ending.

As you probably also have noticed, the numbering goes back to 0 at the start of each new section.

Variables and Variable Use

So you're writing a side story... By now, you've probably discovered just how limited your actions in writing a side story can be. I mean, you can only really have 1 fight in a story file, since it has required [chapter] names for it to work, and without using so much redundancy that your head spins, you can't really have your story interact with the user... So how do we fix this? Variables...

There are 10 variables that can be accessed when creating a side story: v0, v1, v2, ..., v9. You can put numbers into these variables, you can base your stories movements on these variables. Once you know how they work, it's pretty straight forward.

There are 6 specific variable functions that we can use from side stories. All functions are being listed in lower case, so l is not I, it's L...

  • var_ld - Loads a value into a variable
  • var_cpa - Tests a variable against a value
  • var_jump - Conditional goto (if condition is met in var_cpa)
  • var_cal - Allows calculations to be made with variables (v0-v9)
  • var_out - Allows the value of a variable to be displayed.
  • var_dice - Creates a random number in a specified variable with a maximum specified value...

var_ld

var_ld,v0,2

  • var_ld - the command
  • v0 - the variable to change (v0 - v9 are available)
  • 2 - the value to change it to

After running this in your script, the variable v0 will have a value of 2.

var_cpa

var_cpa,v0,=,1

  • var_cpa - the command
  • v0 - the variable to test
  • = - we're checking if the variable equals to test value
    • = - variable is equal to value
    • > - variable is greater than value
    • >= - variable is greater than or equal to value
    • <= - variable is less than or equal to value
    • < - variable is less than value
    • != - variable does not equal value
  • 1 - the value we're checking for

var_jump

var_jump,story2

  • var_jump - the command
  • story2 - the [chapter] to jump to... [story2]

var_jump is a conditional goto. It checks the flags set by var_cpa and jumps to the section of your script that you labeled. For instance, if in your story your character is next to a pond, he sees some frogs. You then give your character the choice of talking to the frogs, ignoring the frogs, or fighting the frogs. If they decide that fighting the frogs is the best way to go, continues on through your story, then later returns to the pond; they're presented with the option of talking to the frogs, ignoring the frogs, or fighting the frogs... but the frogs are already sealed... so...

[story]
...
100 = "var_cpa,v0,=,1,0"
101 = "var_jump,pondFrogs"
102 = "var_cpa,v0,=,2,0"
103 = "var_jump,pond"
...
1000 = "end"
[pondFrogs]
0 = "name,"
1 = "You're at a pond, in the reeds you see 2 frog women."
2 = "select,Talk to them ,pondFrogsTalk,Ignore them ,pondFrogsIgnore,Fight Them! ,pondFrogsFight "
...
1000 = "end"
[pond]
0 = "name,"
1 = "You're at a pond, it's tranquil and quiet... though you feel you've been here before... "
...
1000 = "end"
[pondFrogsFight]
0 = "var_ld,v0,2"
1 = do your battle stuffs and whatever else here...

Anyway, what it does is allow you to go through your story knowing what the user has done, well; assuming you've set the variables accordingly...

var_cal

var_cal,v0,+,v1,0

var_cal,v0,+,42,0

  • var_cal - the command
  • v0 - first variable
  • + - plus
    • + - Add
    • - - subtract
    • * - mutiply
    • / - divide
    •  % - mod
  • v1 - second variable
    • in the second example a numeric value is used instead of a variable, using fixed numbers makes this command a lot more functional for side story development.
  • 0 - This determines if a flag is set. 0 yes, 1 no. Very similar to var_cpa in that respect, though I'm not entirely sure why you'd want to set a flag after using this... NOTE: You don't need to have this last section...

var_cal allows you to do calculations with the variables that you've set... it only works with the variables v0 - v9, but at some point you may wish to do some calculations with these...

Only example I can think of off the top of my head is with bitwise things, so if you were to have a series of items in your side story, you could have an item in your right hand and an item in your left hand, then you could determine which by combining the two. by assigning the values 1, 2, 4, 8, 16, 32, etc to your items, combining them would make unique boolean numbers. For instance, item 2 and 8 make 10 which is 1010 in binary, so you can identify the items you presently have.

You may have all sorts of ideas for it's use, hopefully so. Aside from the binary thing I'm not really seeing a lot of use for it at present. Using it in combination with var_dice however could be awesome. I'll have that documented a little later on... :)

  • notes: now that I know you can use numeric values instead of just variables, the uses of this increase for navigation through long select (choice) sequences...
select sequence example
[doNav]
0 = "select,Previous Page ,goPrevious,Current Page ,doCurrent,Next Page,goNext,Exit Menu ,doExit"
1 = "end"
[goPrevious]
0 = "var_cal,v0,-,1,1"
1 = "var_cpa,v0,<,0,0"
2 = "var_jump,goNext"
3 = "goto,showPage"
4 = "end"
[goNext]
0 = "var_cal,v0,+,1,1"
1 = "var_cpa,v0,>,3,0"
2 = "var_jump,goPrevious"
3 = "goto,showPage"
4 = "end"
[showPage]
0 = "var_cpa,v0,=,0,0"
1 = "var_jump,page0"
2 = "var_cpa,v0,=,1,0"
3 = "var_jump,page1"
4 = "var_cpa,v0,=,2,0"
5 = "var_jump,page2"
6 = "var_cpa,v0,=,3,0"
7 = "var_jump,page3"
8 = "end"
[doCurrent]
0 = "var_cpa,v0,=,0,0"
1 = "var_jump,doPage0"
2 = "var_cpa,v0,=,1,0"
3 = "var_jump,doPage1"
4 = "var_cpa,v0,=,2,0"
5 = "var_jump,doPage2"
6 = "var_cpa,v0,=,3,0"
7 = "var_jump,doPage3"
8 = "end"
[showPage]
0 = your code
99 = "goto,doNav"
100 = "end"
[doExit]
0 = "end"

Note: page0 - page3 are supposed to display basic information about something (whatever you want to be able to select... for instance, a battle against a specific enemy... page 0 could be slime girl... this section displays that but nothing else... doPage0 - doPage3 are the more advanced set... for instance, if you had slime girl on page 0, doPage0 would start the battle with slime girl... :) fun stuffs...

var_out

var_out,some text ,v0, some more text

  • var_out - the command
  • some text - a string... anything you want...
  • v0 - a variable, you can use v0 to v9, you should set it's value first...
  • some more text - another string, anything you want...
    • example of use
    • var_ld,v0,56
    • var_out,the value of v0 is ,v0,!!! cool eh?
    • output
    • the value of v0 is 56!!! cool eh?

var_out allows you to display the value of a variable...

It's designed to display the variable wrapped in text, however you can avoid this by not using strings... for example:

var_out,,v0,

would just display 56.

Note: var_out does not stop the text after it's use, there is no pause. If you want to have one, add @ to the line. In some cases (not all apparently) var_out does not include a line return either; and I've had It immediately write the next line of scripted side story right after it on the same line, or on the next line in the text window.

var_dice

var_dice,v0,6

  • var_dice - the command
  • v0 - the variable (v0 to v9)
  • 6 - the max value of v0 (the variable we're using)

I used 6 because it's called dice... anyway, var dice generates a random number and multiplies by the number you provide (6 in this case) providing a number between 0 and 5, then it adds 1 to it, creating 1 to 6 as your possible results.

Use this in your side story to add some chaos to the events, basing things on outcomes that are decided at run time vs when you're scripting, and still left out of the users hands. Combining var_dice with var_cal might help you to create a gambling type system in a side story if you wanted to be really creative... might be a fun version of MGQ Strip Poker... :> Mind you, with a max use of 10 variables, you're kind of stuck on making something overly complicated... could be used for 2 hands though :)

[rollDice] 0 = "var_dice,v0,6" 1 = "var_dice,v1,6" 2 = "var_out, You rolled a ,v0, and " 3 = "var_out, a ,v1, !@ " 4 = "var_cal,v2,+,v0,1" 5 = "var_cal,v2,+,v1,1" 6 = "var_out, For a total of .v2, !@\" 7 = "..." 8 = "end"

Restart

restart,mystory\section1

  • restart - the command
  • mystory\section1 - the path
    • mystory - the path to your side story
    • section1 - a sub folder with a new side story

notes: Restart allows you to run a side story from within your side story. By which I mean, you can create a multisection side story and run them all (as chapters) in one story. Major advantage of this for anyone's use, even in a short story, is that you can have as many battles as you want in the same story. Since you can sub link any other side story you create, your maximum length goes up through the roof as well.

Alright, so you've run restart, you're now in mystory\section1\ and you want to get back, well just run restart,mystory and you're good to go.

Running multiple sections is great and all, but when you go back to your original side story, in order to bypass the autojumps into these sections (or questions about returning to them) you're going to have to use variables (var_ld, var_cpa, var_jump)

Troubleshooting

Common Bugs/Technical Issues

There are a few common glitches writers can easily encounter when scripting their sidestories. Here are a few to keep in mind.

  • In older versions, writers could use the "@" character to add breaks in their dialog. It no longer functions in newer versions (including Part 3). Don't use it.
  • Add an extra space at the end of each line of dialog. Some of the newer nscripts have a (minor) bug that "devours" the last character at the end of every spoken line. As a result, when players play the mod, some sentences have missing punctuation. To keep that from happening, just add an extra space after the last period/question mark etc.
  • Don't write too much dialog at a time. If you try to add too much dialog all at once, you'll overload the text box and crash the game. This is particularly easy to do in some of the newer updates, and is the reason why some mods that worked for Parts 1 and 2 no longer work for Part 3. Either write shorter dialog, or break it into smaller chunks. Generally speaking, a single line of dialog can't have more than 200 characters (spaces included).

Game Crashes

When the game crashes, the first thing you get is a confusing error message written in a mix of Japanese and hard-to-understand English. However, there's only one or two things you really need to understand to when an error message pops up. When the game crashes, it's often because either there's too much dialog being spoken, or it can't find a file.

  • If the game crashes as someone's speaking, your dialog is too long. Go to the line where the game is crashing, and either shorten and/or break it up.
Glitch1

The only thing you need to understand is bg174 is missing.

  • If the game crashes as new backgrounds, sprites, or sounds are being introduced, the game can't find the file you're specifying. Go back and make sure you spelled the missing filename correctly. If you're using custom sprites/backgrounds/SFX, make sure they're in the mod folder, and make sure you remember to add their file extensions in the script. The error message will at least tell you which file is missing.
  • IF you're making a side story and experiencing crashes, please ensure that you're not setting transition times to 0. 0 transition time seems to crash the game in relation to adding sprites, deleting sprites and changing backgrounds. I've not testing anything else as of yet.

Gamers can avoid the second error by playing mods on the most recent release. Note the game will never crash if it can't find the right BGM. Instead, it'll either play the title music or the monsterpedia soundtrack.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.