https://wiki.opensurge2d.org/w/api.php?action=feedcontributions&user=Wi-chi&feedformat=atomOpen Surge Engine Wiki - User contributions [en]2024-03-28T21:13:15ZUser contributionsMediaWiki 1.25.6https://wiki.opensurge2d.org/w/index.php?title=Quests&diff=2267Quests2013-04-25T22:52:43Z<p>Wi-chi: /* Overview */</p>
<hr />
<div>== Overview ==<br />
Quests are lists of levels. More precisely, quests are human-readable .qst files, located at the ''quests/'' folder, which contain a list of levels which will be played in the specified order by the game engine. They are used when you want to provide your end-users with a customized experience without forcing them to go to the level selector, making the whole affair a more continuous one.<br />
<br />
Facts:<br />
* when the engine starts, the ''Introduction Quest'', located at '''quests/intro.qst''', is started.<br />
* whenever you select ''START GAME'' at the main menu, the ''Default Quest'', located at '''quests/default.qst''', is executed;<br />
<br />
== Loading an arbitrary quest ==<br />
<br />
=== Basic ===<br />
What if, as a player, you want to load an arbitrary quest? Older versions of the engine featured an "EXTRAS" option at the main menu. That is no longer the case. You may still access the list of available quests by going at the options screen, highlighting the "Stage select" option and then pressing LEFT three times. You will hear a sound effect. Then you press ENTER.<br />
<br />
=== Advanced ===<br />
Alternatively, you may use the command line to load a quest of your choice. In a terminal, type:<br />
opensurge --quest quests/my_quest.qst<br />
<br />
If you're script-savvy, you can load a quest through scripting. See: [[API Reference]].<br />
<br />
== Case Study: Examining a quest file ==<br />
In this example, we will be examining a quest file to determine what the game engine reads from it. '''Note''': This is not a true quest file, it is one which was written as an example. If you wish to examine quest files which are currently in use in the game, please look in the quests folder of your opensurge directory.<br />
<br />
// -----------------------------------------------------<br />
// example.qst<br />
// Originally designed for: Open Surge Lunar Mod<br />
// Version 1.0<br />
// Author: lunarrush<br />
// -----------------------------------------------------<br />
<br />
// quest properties<br />
name "Example Quest"<br />
author "lunarrush"<br />
version "1.0"<br />
description "An example of a quest"<br />
image "images/null.png" // because we don't have any specific image<br />
<br />
// level list (in order of appearance)<br />
level "levels/level1.lev"<br />
level "levels/cutscene1.lev"<br />
level "levels/level2.lev"<br />
// ... these can go on to the n-th level<br />
<br />
Some things you may note:<br />
* '''comments''': All lines which begin with // are ignored by the engine.<br />
* '''name''': This is the name of the quest.<br />
* '''author''': This is the place where the authors of the levels should receive recognition. (Note that in the above example there are two author lines, one which is commented and one which isn't. As a convention, the one which isn't should display the name of the level designer and the commented one should display the name of the person who wrote the quest file.)<br />
* '''version''': The version of the quest.<br />
* '''description''': When people scroll over your quest within the game this will be the flavour text they see.<br />
* '''image''': This will be the image which is displayed when people scroll over your quest. Its size must be 100x75 pixels.<br />
* '''level''': These are the defined levels. They are placed in the order in which they will appear.<br />
In the above example, we have defined the list of levels as "level1", "cutscene1", and "level2"; that means that the engine will load those levels in that order. Remember, one mistake in the quest will change the order in which the user will see your levels, so ensure that you have them in the order in which you wish them to be displayed.<br />
<br />
The word '''hidden''' may be included, if you don't want your quest to appear in the quest selection screen.<br />
<br />
[[Category:MODs]]<br />
[[Category:Quests]]</div>Wi-chihttps://wiki.opensurge2d.org/w/index.php?title=Introduction_to_Modding&diff=2266Introduction to Modding2013-04-25T22:47:49Z<p>Wi-chi: /* Introduction */</p>
<hr />
<div>== Introduction ==<br />
If you're an absolute beginner and want to start hacking Open Surge, this place is for you.<br />
<br />
Open Surge is an open source game developed to allow user created content as much as possible. The modding scene has been around since the early 90's when people hacked games, found out how the content was generated and substituted its content with their own.<br />
<br />
In Open Surge, it is fairly easy to modify any game content you wish. It ranges in difficulty from replacing sprite files and adding images to actually modifying the source code to add functionality to the engine. A popular way of adding new functionalities to Open Surge is via scripting.<br />
<br />
Open Surge is highly modifiable. Early modifications (a.k.a. MODs) made by our users ranged from simple sidescrollers to platformers with ninjas and RPG elements. Although the engine is focused on platformers, other types of games, such as racing games or even space shooters, can also be made. You just need to imagine something, study the engine and work hard to make your idea become a reality.<br />
<br />
This wiki contains documentation on how to modify Open Surge. Besides the documentation, it's useful to study the modifications other users make, so you can learn from them. The place they can be found is in our [http://opensnc.sourceforge.net/forum community].<br />
<br />
== Study guide ==<br />
<br />
There are many ways of hacking Open Surge. We'll subdivide the hacking mechanism into a series of steps: from the most basic to the most advanced ones.<br />
<br />
=== Step #1: the level editor ===<br />
<br />
Learning how to use the level editor is perhaps the most important part of hacking Open Surge.<br />
<br />
We recommend reading: [[How to make a level]]<br />
<br />
=== Step #2: hacking the built-in game content ===<br />
<br />
==== Hacking the sprites ====<br />
<br />
Once you learn how to edit existing levels and how to make new simple ones, you can take one step further and learn how to modify the built-in sprites. In order to simplify the speech, we define sprites as the graphics of the objects of the game: characters, items, etc.<br />
<br />
We recommend reading: [[Sprites]]<br />
<br />
==== Hacking other game contents ====<br />
<br />
Not only sprites are modifiable. Other game contents such as sounds can also be hacked.<br />
<br />
We recommend reading: [[Sound effects]], [[Musics]], [[Fonts]], [[Characters]], [[Menus]]<br />
<br />
=== Step #3: advanced level making ===<br />
<br />
You already know how to use the level editor and how to modify the built-in game content, but what if you want to create whole new worlds? This demands a bit more of studying than the previous two steps.<br />
<br />
We recommend reading: [[Bricksets]], [[Backgrounds]], [[Groups]], [[Quests]], [[Level specification]]<br />
<br />
=== Step #4: scripting ===<br />
<br />
With scripting, you can use whatever is generated by your imagination to create completely new elements, including, but not limited to: enemies, items, bosses, weather effects, cutscenes, custom user interfaces, non-playable-characters, and much more. Scripting demands some serious studying, but it really pays off.<br />
<br />
We recommend reading: [[Introduction to objects]], [[API Reference]], and all the case studies in the front page.<br />
<br />
=== Step #5: beyond scripting ===<br />
<br />
Beyond scripting, the only way to change the way the game acts is to modify the source code directly. This is fairly difficult and requires knowledge of programming, so it isn't recommended for the faint of heart. Be aware that this approach imply on licensing (GPL) and multi-platforming issues. Not only that, but after you make your MOD you will have to find some way to distribute the entire executable instead of just a simple script. Still, if you want to try it, you can find the source in the src/ folder in your game directory. After you modify the source code, you will have to recompile the game to make the change take effect.<br />
<br />
Regular users should not worry about this, as the mechanisms we talked about in the previous steps give enough power to make a wide range of MODs with ease. Open Surge is an open source game written in C language. Programming experts may want to hack the source code directly to see how it works and to add new features to it. Those who want to port Open Surge to diverse hardware systems must also deal with the source code.<br />
<br />
[[Category:MODs]]</div>Wi-chi