Jump to content

How To Build A Custom Quest


Lemon

Recommended Posts

So I've gotten quite a few requests for information on how to build quests. So this is an attempt to put everything I know down in one place for people who are interested in learning from my mistakes. Please understand that this is continually under construction, and subject to change at any time as I discover new things. Please, if I missed something point it out. I won't be (too) offended. If you have a question, others probably have the same one and are too shy to ask.

Software
To make a quest you need to have the proper software, or you will quickly get hopelessly lost if you don't give up right away. This section will be WAY too long if I include instructions on how to set up everything, so you'll need to go and find the rest of that on your own. What you will need is a working copy of QEdit, as well as a private server. You can get QEdit here or here. To get a private server up and running, I would advise looking at the Tethealla project here. You will want the private server clients to point to 127.0.0.1 as an IP address. This refers to your local computer, and since you will be running your server off that (or so this guide assumes) that will connect you with your test server.

Let's familiarize ourselves with QEdit now. When you first load it up, it will look like this.
Untitled_zpskifquhei.jpg
The box on the left shows which floors are in use, and what map is assigned to them. The two boxes on top display all object objects and all monster objects on the selected floor. The box on the bottom displays a wire-frame of the selected floor's map. If that made no sense to you, don't worry. We haven't gotten to talk about how PSO is set up.

How PSO sets things up
Before we can dive in and start making things for PSO, we need to understand how PSO actually works. First thing that should be pointed out is that PSO was not created to be edited. Lots of things are unacceptable, and SEGA didn't exactly plan on letting other people mess with their game. This means that if you run into a bug, there will be no help from anything SEGA released. However, given the nature of the PSO community, a helpful website was created to organize all the great information that was found in the area of building custom quests... and then promptly dropped. I will be pulling data from that source, listed below, as well as from other places and my own tests.

Quests are made up of a combination of objects, map data, floors, map events, and pasm script combined together with a properties file. We will explore each of these separately in the subsections below.

Objects
Every entity on a given floor is an object. The boxes in Forest 1... objects. The doors in Ruins 3... objects. De Rol le... an object. QEdit helps us out here by separating and parsing the giant list of objects. It separates them into two categories; Objects and monsters. It then removes all illegal objects for the selected floor. This means that you can't put forest doors in the tower because that is an illegal placement dictated by PSO. Objects include everything other than NPC's and Monsters that can go on a given map. To add an object to a given floor in Qedit, simply press the "Add object" button. Then select the object you wish to add, and click "Add". The window will close, and the object will appear at 0,0,0 and move where you next click on the map. All objects have properties, each unique. To view and edit these properties, click on the object, either via the map or the object list, and press the "Edit data" button. I will put extended information on specific objects at the bottom of this page for reference.

Monsters are all NPC's and attackable monsters in the game, including bosses. These are just like objects, however they also have two wave numbers (keep these the same). We will discuss the wave numbers in more depth in the map events section. Different monsters have different values that can be changed. eg. Zol Gibbon has the option for Jump Appear, whereas a Sino Berill does not.

Floors
Each quest is made up of a given number of floors. These floors are assigned a map value from this table in the pasm script function 0 (we'll go over this a little later).

 


Hex Name
00000000 Pioneer 2
00000001 Forest 1
00000002 Forest 2
00000003 Cave 1
00000004 Cave 2
00000005 Cave 3
00000006 Mine 1
00000007 Mine 2
00000008 Ruins 1
00000009 Ruins 2
0000000A Ruins 3
0000000B Dragon
0000000C De Rol Le
0000000D Vol Opt
0000000E Falz
0000000F Lobby
00000010 BATTLE spaceship
00000011 BATTLE temple
00000012 Labo
00000013 Temple alpha
00000014 Temple beta
00000015 Space Ship alpha
00000016 Space Ship beta
00000017 CCA
00000018 Jungle east
00000019 Jungle north
0000001A Mountains
0000001B Seaside
0000001C Seabed upper
0000001D Seabed lower
0000001E Gal Gryphon
0000001F Olga Flow
00000020 Barba ray
00000021 Gol dragon
00000022 Seaside night
00000023 Tower
00000024 Wilds route 1
00000025 Wilds 2
00000026 Wilds 3
00000027 Wilds 4
00000028 Crater
00000029 Desert 1
0000002A Desert 2
0000002B Desert 3
0000002C EP4 Boss
0000002D EP4 Pioneer 2


These floors then contain that map data, as well as all map event data, as well as object data. Each map assigns rooms a "Map Section" or "Room ID" number. Thus, a given monster\object is within a wave within room within a floor. To handle all the spawns, PSO uses what are called "map events". Each map event is assigned a number (by you) for easy organization. To create a map event, click the "View map event" button. It will open a window with a blank textbox. This textbox will display all your map events after you've made some. Enter the pound sign (#) and a number, then close the window. Reopen the window, and some code will be auto-generated for you. It should look like this:

#0
    Section: 0
    Wave: 0
    Delay: 0

The section value refers to the Room ID \ Map Section that you wish to trigger an event in. Wave corresponds to the wave number of monsters you wish to spawn. This and Section should be left at 0 if you do not wish to spawn any waves. Delay specifies how long to wait before spawning the monsters (this is how the delbiters are on a delayed spawn in raid on central tower).  Delay uses frames as it's units.  PSO is based at 30 frames per second.  After this, you may add your own commands to be executed after the wave is defeated. If there is no wave to spawn, it will immediately run your commands. Below is a list of all the commands that I have found and how they work (Hurray for no documentation).

 


unlock <DoorID>
This command will unlock all locked doors with the property "Switch ID" set the the given number. There is as of yet no way to re-lock these doors that I have found yet, though it is possible. (I need to look at how Path to Salvation does this)

call <Wave>
This command will run the event with the given number. This is useful when you wish to spawn a wave after another wave finishes. If you wish to spawn 2 or more waves at once, simply string together the call commands for those waves, and wall of them will be run at the same time.

unhide <Room> <Wave>
This will reveal all hidden objects in the room specified with the Appear flag of <Wave>. Objects are hidden if their Appear flag property is set to anything over 0.




Script
This is the real kicker that turns people off to quest creation. The pasm script is the code that runs in the background that makes a quest function. This is what allows you to collect gold from the guild lady, talk with NPC's, warp to the correct location, run out of time, appear on the correct map, etc. In this section of the guide, I will go over the barebones function 0, and how to set a quest completion flag. I implore you to look at qedit.info and Rika's guides (found here). These resources have a HUGE amount of information on different commands and how to use them.

 

// The quest automatically runs function 0 on loading
// Our first command will set the episode to Ep 2 (numbering always starts at 0)
0:      set_episode 00000001

        // These next 4 commands setup the flags for winning\losing the quest.
        // We really only care about set_qt_success and set_qt_failure
        // They all assign functions to run on success\fail\exit\cancel
        // Thus, if R255 is set to 1, then the quest is successful,
        // and when you talk to the guild lady function 20 will run.
        set_qt_exit 1
        set_qt_cancel 1
        set_qt_success 20
        set_qt_failure 30

        // These next commands are the bread and butter of the script
        // set_floor_handler <floor> <function>
        // will run <function> whenever a player enters <floor>
        // THIS IS NEEDED EVEN IF YOU DON'T WANT ANYTHING TO RUN
        // These are floor numbers, not map numbers
        set_floor_handler 00000000, 1
        set_floor_handler 00000003, 1
        set_floor_handler 00000007, 1

        // BB_Map_Designate <floor> <map> <variant> 00
        // Will set a floor to a given map
        // Check the wiki for map numbers
        BB_Map_Designate 00, 0012, 00, 00 // labo
        BB_Map_Designate 03, 0015, 00, 00 // spaceship alpha
        BB_Map_Designate 07, 0019, 00, 00 // Jungle North
        BB_Map_Designate 04, 0008, 00, 00 // Ruins 1

        // This determines which floor the players will spawn in
        // On most quests this is 0 (labo or pioneer2 by convention)
        initial_floor 00000007

        // This assigns a map to the main warp
        // in this case, we don't want them going anywhere
        set_mainwarp 00000000

        // These just gather information for later use
        // and stores them in registers (places to store data)
        // To access this data later, you simply have to read from R#
        get_slotnumber R250
        get_number_of_player1 R251
        get_difflvl2 R252

        // Starts the check to see if quest is complete
        thread 101

        // ret ends the function
        ret

// Since we are required to have floor handlers, the convention
// is to make function 1 a single return statement, and use that
// as a "do-nothing" function.
1:      ret

// FUNCTION 101 taken from qedit wiki
// it's all kinda mumbo jumbo unless you have the floor data in front of you
// This is the way that you have triggered text events and check to see if players have killed the boss
101:    sync // Waits 1 frame (PSO is set to run 30 frames / 1 second
        // If register 1 equals 1 end the loop
        jmpi_= R1, 00000001, 1

        // Sets register 2 equal to 3 (for floor ID)
        // Then set register 3 to 10 (for room ID)
        leti R2, 00000003
        leti R3, 0000000A
        // If room id 10 on floor id 3 has been cleared of enemies set register 1 equal to 1
        if_zone_clear R1, R2

        // If we haven't cleared the room, loop back to the beginning
        // Otherwise we will force all clients to make register 1 equal to 1
        // and loop back around for the breakout jump
        jmpi_= R1, 00000000, 101
        sync_register R1, 00000001
        jmp 101



Testing your Quest
Once you have all your ducks in a row. Save your quest as a "Server Quest File(BB)". Then copy and paste it into this folder of your server's directory tree.

.\ship\quest\ep#\MyQuests\

Where ep# is the episode you created the quest to run in (determined via the script). You will have to make the MyQuests folder. After that is completed, create a text file in that room, and add the file name of your quest to that file. MAKE SURE THERE ARE NOT BLANK LINES OR FILE NAMES THAT ARE NOT IN THE FOLDER. Then save that text file as 'quest.lst' and reload your server. You should then be able to access it at the Guild Lady in the MyQuests folder.


Good luck and have fun!

Additional resource:

Spoiler

If it doesn't work, try adding 0x1000 to it.

 


All numbers not listed just remove the map fog
Dec	Hex	Description
009	0009	Dim. But seemed less so than 127.
010	000A	flashing red
011	000B	Seemed dim but less than 9.
012	000C	Really similar to 11.
015	000F	Green Fog
017	0011	Dark room, but less so than 127/63.
030	001E	Foggy look. slightly greenish
031	001F	Seemed dim but even less than 11/12.
032	0020	Slightly more dim than 31.
040	0028	Bright. Blueish tint.
042	002A	Mid-range Dimness. Between 126/17.
041	0029	Dim. Greenish tint.
045	002D	Flashing Blue
061	003D	Bright
062	003E	Yet another level of dimness.
063	003F	Similar to 127. super dark.
067	0043	looked like a stronger version of the ambient cave lighting
069	0045	seemed foggy + dim
071	0047	seemed foggy + dim. less so than 69
072	0048	Pale Green Fog with oscillating thickness *epilepsy warning* 
076	004C	foggy
077	004D	fog going in and out
081	0051	yet another level of dimness
089	0059	bright fog 
103	0067	Pale pink fog (very thin)
104	0068	Blue ambient light
109	006D	Thinner White Fog
111	006F	Thin white fog
125	007D	Thin white Fog
126	007E	Black in distance.  Large ring of visibility
127	007F	Full Black.  Can't see walls or floor
133	0085	White Ambient Light
134	0086	Thinner White Fog
137	0089	Thick Orange Fog, Large Ring of visibility
140	008C	VERY dim green ambient light
151	0097	Thin purple\white fog
152	0098	Dark Red Light
153	0099	Blue\Green thin fog
160	00A0	Faint purple light

4113	1011	Same as 17, but for rooms
4159	103F	Same as 63, but for rooms

 

 

The hunting consideration of quest creation

 

r-78 brought up a good point to me earlier that I should take hunting into account while designing quests. I personally don't do much of it, so he kindly provided me with a list of enemies that shouldn't be stacked right at the beginning of a quest.

--------------------------------------------------------------------------------
 
Forest
 
Hildebear : heaven punisher, syncesta
★ Rag Rappy : HP, mind material
 
--------------------------------------------------------------------------------
 
Cave
 
Pal Shark : red sword
Guil Shark : red sword
Poison Lily : psycho wand
Pofuilly Slime : lavis cannon
 
--------------------------------------------------------------------------------
 
Mine
 
Sinow Gold : s-red's arms
Garanz : baranz parts
 
--------------------------------------------------------------------------------
 
Ruins
 
La Dimenian : spread needle
Chaos Bringer : bringer's right arm
Dark Falz : red ring
 
--------------------------------------------------------------------------------
 
VR Temple
 
Rag Rappy : event egg, jack'o'lantern, present
★ La Dimenian : luck material
★ Poison Lily : addslot
★ Hildebear : trigrinder
 
--------------------------------------------------------------------------------
 
VR Spaceship
 
Garanz : panzer faust
 
--------------------------------------------------------------------------------
 
CCA&Tower
 
Gi Gue : sealed j-sword
Mericarol : monkey king bar
Merikle : monkey king bar
Mericus : yasminkov 7000v
Delbiter : three seals
Del Lily : psycho wand
Epsilon : wedding dress
 
--------------------------------------------------------------------------------
 
Seabed
 
Sinow Zoa : zanba
Sinow Zele : zanba
Delbiter : three seals
Morfos : yasminkov 7000v
 
--------------------------------------------------------------------------------
 
Crater
 
Sand Rappy : glide divine
Zu : v101
Boota : daylight scar
Ze Boota : centurion/ability
Ba Boota : blue odoshi violet nimaidou
Astark : v502, limiter
Dorphon : lame d'argent, mother garb+
 
--------------------------------------------------------------------------------
 
Sub Desert
 
Sand Rappy : glide divine
Zu : v101
Pyro Goran : heaven striker
Goran Detonator : slicer of fanatic
Girtablulu : limiter, mothergarb +
Saint Milion : rupika
Shambertin : wedding dress
Kondrieu : limiter
 
Quote
 
The more ☆ there are, the more you have to pay attention to the monster, I took into account the demand and value of the best drop, its rate and the current available quests to hunt (for instance there is only MA4's boring beginning for Glide hunt, 9-8, PoD for bosses, Today's rate and MA4's beginning again for mil lilies as the rare boost only affects first rooms and Girtablulus are hard to kill ...)
 
There are some good enemy drops I didn't mention because people don't care enough to hunt them so we need to make them more accessible like Kasami Bracer, DF Field, Flowen Sword 3084, Handgun Guld; Nei and Rika's Claw ...
Some even deserve to be spawned in giant amount like monsters which drop ID cards for instance, those drops are way too rare for not such good items.
 
I did not include ultima exclusive event drops like hidoom (godric) vol opt (glide v00) sinow beat (centurion/arms) morfos (psycho black crystal) deldepth (sue's coat) etc as it would be too much.
 

Of course, having several stars does not mean you shall put only a few of this monter in quest, but to split them, not to stack them in the first rooms / waves (which would make people repetitively spam the beginning of your quest, as most of people do in MA4DMD

Edited by Lemon
  • Like 17
Link to comment
Share on other sites

Hello Lemon!

I apologize if my question is stupid, I haven't tested that told yet.

Can monsters be added on bosses battle fields? Like for example while fighting Gaal, can monsters waves be added in there?

I just wanted to know if there are limitations regarding adding or removing stuff depending to game scenarios. I have been in private servers where depending on the quest, they include 3 or 4 de rol les at the same time, but I have been wondering if regular monsters can be included as well.

Link to comment
Share on other sites

No. See the section on objects. On the maps for bosses, the only legal monsters are those bosses.

You may be able to swap out the skin number on a boss object to that of a different monster, but from my tests with NPCs, this does not work.

Edit: it should also be noted that multiple bosses at once are not advised, as it seems to play the intro movie for each one without freezing them.

Edited by Lemon
Link to comment
Share on other sites

  • 2 weeks later...

Me and r-78 have been talking about quest creation, and the topic of taking hunts into consideration came up. So I asked if he'd put together a list of enemies that are popularly hunted that quest creators should watch out for when making their quests. Obviously this doesn't mean that you can't put any of these mobs in, but having 16 of them in the first room really isn't that good an idea. So I've added his list to the first post. Keep in mind that this is very subjective, and fluctuates based on events and the economy. But for people like me who don't hunt at all, this will help give you a frame of reference on what to avoid.

Link to comment
Share on other sites

  • 3 years later...
On 3/17/2016 at 5:17 PM, Lemon said:

No. See the section on objects. On the maps for bosses, the only legal monsters are those bosses.

You may be able to swap out the skin number on a boss object to that of a different monster, but from my tests with NPCs, this does not work.

Edit: it should also be noted that multiple bosses at once are not advised, as it seems to play the intro movie for each one without freezing them.

Can you use the electric gates to contain both the players and land based bosses? Do you control where on the boss map the bosses spawn?

 

I was imagining a gate locking in the players where they spawn so they cant abuse the contained bosses, and also surrounding the bosses with the same gate so they cant attack the players while frozen. 

 

Put the switch in the cage where the players spawn. 

 

Sorry if that doesnt make sense, drunk and reading through this interesting thread :3

  • Like 1
  • Haha 1
Link to comment
Share on other sites

19 hours ago, applesaucin said:

Can you use the electric gates to contain both the players and land based bosses? Do you control where on the boss map the bosses spawn?

 

I was imagining a gate locking in the players where they spawn so they cant abuse the contained bosses, and also surrounding the bosses with the same gate so they cant attack the players while frozen. 

 

Put the switch in the cage where the players spawn. 

 

Sorry if that doesnt make sense, drunk and reading through this interesting thread :3

Only players are effected by laser gates.  Monsters can pass right through them.

 

Also as far as I know, laser gates do not render on boss floors, but I've never tried.

 

EDIT:
You might be able to do something like this to freeze gameplay during the death animations.  I've never tried though so I can't guarantee it'll work.  Not sure if 0xF829 updates on kill assists and enemies you didn't assist in killing.  There might be a better opcode for this.

10: // Floor handler for boss
(0xF829) get_player_kills R1, R250 // get the number of enemies killed
let R2, R1 // set initial monsters killed count
thread_stg 100 // Start loop, but only for this map
ret // exit the floor handler

100: // our main loop
sync // wait 1 frame (this prevents freezing)
(0xF829) get_player_kills R1, R250 // get the number of enemies killed
jmp_= R1, R2, 100 // if we haven't killed a boss since last loop, keep waiting.
let R2, R1 // update bosses killed counter
freeze_everything // stop everything
call 101 // wait for animation to finish
unfreeze_everything // open play back up
jmp 100 // keep waiting

101: // Syncs to wait duration of death animation
// 30 * sec_of_animation
ret

 

Edited by Lemon
Link to comment
Share on other sites

  • 2 weeks later...
20 minutes ago, Dante44 said:

do these quests have to be approved?

If you want to play your quests on Ultima then yes. If you play on your own server then no.

Link to comment
Share on other sites

  • 1 month later...

Are there any standards or quality check you guys would recommend hitting for custom quests?  I'm into programming and this idea really interests me but id like to know what type of thing I'm shooting for for possible approval?  I can easily set up my own server and have a group of friends to test with as well.  

  • Like 1
Link to comment
Share on other sites

As far as custom quests go CCC or Cals Clock Challenge is the top of the bar. Others like Christmas Fiasco series, Sweep-Up series, and Malicious Uprising series (kinda) are really good. Quests like Path to Salvation, Max Attack S, TTF Ultima, Hazardous Dimension, or generally any monster riddled quest without spawn design are looked down on as very poor quality. You’ll wanna reference the good sega spawns to understand what’s interesting/fun/playable. 

Edited by Saber +7
Link to comment
Share on other sites

18 hours ago, Chris Hyme said:

Are there any standards or quality check you guys would recommend hitting for custom quests?  I'm into programming and this idea really interests me but id like to know what type of thing I'm shooting for for possible approval?  I can easily set up my own server and have a group of friends to test with as well.  

For once, I agree with Willy there. Path to Salvation is a great example of what not to do in a quest, which is add as much monsters as possible, in a straight line and spawning at the same specific spot, having to use glitches to enter a secret room and probably the worst of them, just adding megid traps near warps and other important locations for the lulz. 

Edited by bobshlibidich
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...