in this little tutorial I will teach you the basics of how to use my mod Orion to create your own RPG maps. Orion is a powerful and highly configurable mod that can easily be used in any of your StarCraft II maps to add RPG and basic shooter functionality.
So far, this tutorial only describes the basics of the mod. I will add some explanation for various high-level features (such as the quest system) later. You'll see that by using Orion, you can get a basic RPG setup (WASD movement, free camera rotation, character panel and action bar) within 5 to 10 minutes.
Have fun reading the tutorial. If you have any questions, found some bugs, or want to give feedback, feel free to do so in this thread!
- Sanktoras.
Preparations
Installing the Mod
There are two ways to use the mod: You can either use the version on Battle.net or you can download a local copy of it. The latter has the advantage that you'd be able to modify the mod and that you'd not need an internet connection to work on your map. However, if you want to publish the map you'll need an online version of the mod (if you modified it, you'd have to upload the modified version).
If you want to use the online mod, skip the next few lines. Otherwise, do the following:
Open the StarCraft II editor and click on File -> Open...
In the "Open Document" dialog, select the "Battle.net" tab, login to battle.net, and locate the Orion mod in the list (its name is "[Mod] Orion". Open it.
Click on File->Save to save this mod in your "<StarCraft II Programs Directory>/Mods" directory (the "Save Document As" dialog will automatically present the "Maps" directory, so make sure you change it!). Choose whatever name you like.
Creating a Sample Map
For the purpose of this tutorial, we'll create a minimal sample map. If you already have a map on which you want to use Orion, skip the next few lines.
In the editor, click on File -> New, choose "Arcade Map", click on "Next" twice, then choose the texture set "Braxis Alpha" and press "Ok".
Save the map (that's always a good thing to do).
In the terrain module, create a marine for player 1. This will be our character.
In the trigger module, delete the "Melee Initialization" trigger.
Adding Orion to your Map's Dependencies
To make Orion available in your map, you have to add it to the map's dependencies:
Make sure your map ist opened in the editor and save it.
Click on File -> Dependencies.... In the "Document Dependencies" dialog, click on "Add Other..."and locate Orion (either on Battle.net or on your computer, whatever you have chosen above).
Apply the changes by pressing "Ok" and save the map (again, saving the map is never a bad thing to do).
Character and Mode
In this section you will learn two basic concepts: Character and Mode. At the end of this section you will have created a simple RPG game in which the player can control the marine with W, A, S, D and rotate the camera with the mouse buttons. It will look like this:
Although Orion is quite complex, its core can be accessed fairly easily. For every player in the map, Orion stores two basic values:
Character: The character is the unit that is controlled by a player. Basically, that's the unit which moves if you press W, A, S, or D.
Mode: The mode determines how the player can control his character. You can create up to eight different modes, three of them being predefined as "RPG" (WoW-like controls), "RPG Multi" (SCU-like controls), and "TPS" (shooter-like controls). There is also a mode "TPS Cursor" which is used by the "TPS" mode (yep, modes can use other modes), a "Cinematics" mode (use this for - well - cinematics; basically, the player cannot control the character and the camera in this mode), and a "Profile Selection" mode (used internally for the profile selection).
All we have to do is to set the character of player 1 to the marine and the mode to "RPG". That's quite simple, actually:
In the trigger module, create a new trigger. Call it "Initialization".
Add a "Map Initialization" event to this trigger so that it will be executed when the map starts.
Add a "Set Player Character" action to the trigger. Specify the parameters as follows: Player to "1", Character to the marine, Duration to "Immediate" or "0.0".
Add a "Set Player Mode" action to the trigger. Specify the parameters as follows: Player to "1", Mode to "RPG", Duration to anything you want.
Start the map. VoilĂ , there you are. You have just created a simple RPG!
Introduction to Controls
Lets start adding some additional controls to the game. For every key on the keyboard, Orion stores two types of values: a set of "Control Flags" which determine basic behavior such as "Move Forward" or "Rotate Camera", and an "Action", such as casting an ability or using an item. As you usually don't need to change the control flags of the keys, I'll focus completely on actions in this tutorial.
Stim on R
In tihs part we'll put the marine's stimpack ability on the R key. All we have to do is to setup the action of the R key correctly:
In the trigger module, go to the "Initialization" trigger and add an action of type "Set Control Key Action". Specify the parameters as follows: Key to "R", Mode to "RPG", Type to "Ability", ID to "Convert Ability to Action ID" with parameter Ability set to "Marine - Stimpack". The action should now look like
Controls - Set the action of key R of mode RPG to a Ability action with ID (Action ID(Marine - Stimpack))
Start the map. When you press R, nothing happens. The reason for this is that the marine cannot use stimpack because the necessary upgrade has not been researched in the tech lab. Currently, Orion does not support such requirements on abilities which means that no error is displayed.
To fix this, we can disable all tech tree requirements:
In the "Initialization" trigger, add an action of type "Enable/Disable Tech Tree Requirements". Specify the parameters as follows: Enabled to "Disable", Player to "1".
Start the map again. Now, if you press R, the marine uses his stimpack:
Note also that the stimpack buff is displayed in the upper right of the screen.
Action Type and Action ID
Now that you have configured your first action, it is time to give you some background information: An action consists of two values:
Action Type: The type determines what the action basically does. The available types are: "Ability" (cast an ability), "Weapon" (attack with a weapon), "Item" (use an item), "Slot" (use an action bar slot - see below), "Mode" (change the player's mode).
Action ID: The action Id is a string that provides additional information and whose interpretation depends on the action type being used. E. g., if the action is of type "Ability" then the action Id stores a reference to the ability that is casted. For "Ability", "Weapon" and "Item" actions, there are three different ways to store such a reference:
Store it directly. That's what we did above: we told Orion to use the "Stimpack" ability.
Store it as an index. I.e. tell Orion to use the n-th ability/weapon/item of the character. In this case, the Id gets the form "#n" where n is the index. This is especially useful when the character only has one ability/weapon/item.
Store it as a category. This is useful if you want to put a ranged weapon on a specific key and a melee weapon on another. A "category" is just a prefix of an ability/weapon/item's Id in the data editor, e.g. if you give your weapon the Id "MeleeMySword" than it would be in the "Melee" category. A category is stored as "_c" in the action id, where c is the category name.
Look through the various options of the ID parameter in the "Set Control Key Action" action to see what's possible.
Attacking with the Gauss Rifle
Lets make the F key attack something which should be quite easy now:
In the "Initialization" trigger, add another action of type "Set Control Key Action" and specify the parameters as follows: Key to "F", Mode to "RPG", Type to "Weapon", ID to "Convert Index To Action ID" with parameter Index set to "1". It should look like
Controls - Set the action of key F of mode RPG to a Weapon action with ID (Action ID(1))
In the terrain module, create a zergling for player 15 (hostile) somewhere near the marine.
Start the map. Then click on the zergling (note that a target panel is displayed at the top left of the screen) and hit F. You'll probably have to move some steps towards the zergling as the marine's weapon range is very short.
Interaction Table
There is a much cleaner way to implement attacking in RPG mode. As you might know from WoW (or from some other MMORPG's as well), the easiest way to interact with a game object (such as an enemy, a friendly NPC, a chest, ...) is to right click on it. Orion provides a similar feature.
In the predefined "RPG" mode, the right mouse button is configured to select the object under the cursor and then to interact with it ("Select" and "Interact" control flags). How a player interacts with an object is specified in the interaction table. This is basically a list of interaction entries, each storing the following information:
A "Filter": This filter consists of an ordinary unit filter (where the check marks on the bottom - "Ally", "Enemy", ... - must be activated) and an alliance filter. When the player interacts with an object (i.e., a unit), then the first entry which matches the unit and alliance filter of the target is applied.
"Control Flags" and an "Action": These determine what happens if the entry is used for an interaction.
We need to specify the first interaction entry such that it reacts to a hostile unit:
In the "Initialization" trigger, remove the action we created last (the one which puts the weapon action on F).
Create an action of type "Set Interaction Table Entry" and specify the parameters as follows: Index to "1", Mode to "RPG", Filter to "(No Filter)" (just click on the parameter and press Ok without changing anything), Alliance Type to "Hostile", Control Flags to "No Options" (click on the parameter and press Ok without changing anything), Action Type to "Weapon", Action ID to "Convert Index To Action ID" with parameter Index set to "1". The action should now look like
Controls - Set interaction table entry 1 of mode RPG: Interact if target matches (No Value) and is Hostile, then apply No Options and execute a Weapon action with ID (Action ID(1))
Start the map. Now you can attack the zergling by right-clicking on it.
To Be Continued ...
That's it so far. I know it's not much, and I'm going to extend the tutorial to include some of the various features Orion offers. Let me know if you're interested in something specific, such as
How to use the action bar?
How to create items and an inventory?
How does Orion's window system work? How can I create a character window (similar to that in WoW)?
How to create quests?
How to save and load character profiles?
All these questions lead to features that are more or less supported by Orion and thus can be easily used in your own map!
Great tutorial so far. ive done what u mentioned here today and the only problem im having is targeting/attacking a enemy with the "RPG" mode. ive been using the marine he will not attack at all but when i used the marauder i can mostly target and attack. i am relly starting to enjoy Orion. please keep up with these tutorials i hope to see more added soon.
All of these would be nice
How to use the action bar?
How to create items and an inventory?
How does Orion's window system work? How can I create a character window (similar to that in WoW)?
How to create quests?
How to save and load character profiles?
All of these links come from the tutorial link in my signature. I encourage you to explore some others to get a better understanding. The UI parts especially, you will really just have to learn how to make dialogs, and once you learn the basic concept, it's easy to customize it until it looks how you want. On a side note, looking through these tutorials gave me a few ideas for my own tutorial series, so thanks haha.
Sorry for the late reply, I totally forgot about this thread. I can extend the tutorial soon (hope you are still interested). Regarding the marine attack problem: Does it give you any error message, like out of range? The default attack range of a marine is very low when viewed in RPG perspective.
Regarding the other tutorials that fishy77 mentioned: The idea of Orion is that you don't have to spend a lot of time on all the technical stuff and can start creating your own game right away. Orion is intended to be as general as possible, so that it should fit all your needs; in particular, it offers very general and powerful solutions to many systems you would want in an RPG. For example, Orion implements its own dialog item type for creating inventories; using this dialog item type, you can create inventory slots whereever you want (this is btw how you would create the character window). Similarly, the quest system allows you to create any quest you want, and I made it in a way that forces the user to implement the quests in a "clean" way.
Edit: Seems like in RPG mode the track cursor function does not work properly, i.e. you cannot properly click on units. I guess this function broke with some SC2 patch ... I will investigate this now.
Edit 2: I figured out why the track cursor function does not work. In some patch, Blizzard changed the functionality of "CameraGetTarget" so that this function will not return the camera target if the camera is following a unit. I will implement a "fix" for this by tomorrow.
Hi SC2Mapster community,
in this little tutorial I will teach you the basics of how to use my mod Orion to create your own RPG maps. Orion is a powerful and highly configurable mod that can easily be used in any of your StarCraft II maps to add RPG and basic shooter functionality.
So far, this tutorial only describes the basics of the mod. I will add some explanation for various high-level features (such as the quest system) later. You'll see that by using Orion, you can get a basic RPG setup (WASD movement, free camera rotation, character panel and action bar) within 5 to 10 minutes.
Have fun reading the tutorial. If you have any questions, found some bugs, or want to give feedback, feel free to do so in this thread!
- Sanktoras.
Preparations
Installing the Mod
There are two ways to use the mod: You can either use the version on Battle.net or you can download a local copy of it. The latter has the advantage that you'd be able to modify the mod and that you'd not need an internet connection to work on your map. However, if you want to publish the map you'll need an online version of the mod (if you modified it, you'd have to upload the modified version).
If you want to use the online mod, skip the next few lines. Otherwise, do the following:
Creating a Sample Map
For the purpose of this tutorial, we'll create a minimal sample map. If you already have a map on which you want to use Orion, skip the next few lines.
Adding Orion to your Map's Dependencies
To make Orion available in your map, you have to add it to the map's dependencies:
Character and Mode
In this section you will learn two basic concepts: Character and Mode. At the end of this section you will have created a simple RPG game in which the player can control the marine with W, A, S, D and rotate the camera with the mouse buttons. It will look like this:
Although Orion is quite complex, its core can be accessed fairly easily. For every player in the map, Orion stores two basic values:
All we have to do is to set the character of player 1 to the marine and the mode to "RPG". That's quite simple, actually:
Start the map. VoilĂ , there you are. You have just created a simple RPG!
Introduction to Controls
Lets start adding some additional controls to the game. For every key on the keyboard, Orion stores two types of values: a set of "Control Flags" which determine basic behavior such as "Move Forward" or "Rotate Camera", and an "Action", such as casting an ability or using an item. As you usually don't need to change the control flags of the keys, I'll focus completely on actions in this tutorial.
Stim on R
In tihs part we'll put the marine's stimpack ability on the R key. All we have to do is to setup the action of the R key correctly:
Start the map. When you press R, nothing happens. The reason for this is that the marine cannot use stimpack because the necessary upgrade has not been researched in the tech lab. Currently, Orion does not support such requirements on abilities which means that no error is displayed.
To fix this, we can disable all tech tree requirements:
Start the map again. Now, if you press R, the marine uses his stimpack:
Note also that the stimpack buff is displayed in the upper right of the screen.
Action Type and Action ID
Now that you have configured your first action, it is time to give you some background information: An action consists of two values:
Look through the various options of the ID parameter in the "Set Control Key Action" action to see what's possible.
Attacking with the Gauss Rifle
Lets make the F key attack something which should be quite easy now:
Start the map. Then click on the zergling (note that a target panel is displayed at the top left of the screen) and hit F. You'll probably have to move some steps towards the zergling as the marine's weapon range is very short.
Interaction Table
There is a much cleaner way to implement attacking in RPG mode. As you might know from WoW (or from some other MMORPG's as well), the easiest way to interact with a game object (such as an enemy, a friendly NPC, a chest, ...) is to right click on it. Orion provides a similar feature.
In the predefined "RPG" mode, the right mouse button is configured to select the object under the cursor and then to interact with it ("Select" and "Interact" control flags). How a player interacts with an object is specified in the interaction table. This is basically a list of interaction entries, each storing the following information:
We need to specify the first interaction entry such that it reacts to a hostile unit:
Start the map. Now you can attack the zergling by right-clicking on it.
To Be Continued ...
That's it so far. I know it's not much, and I'm going to extend the tutorial to include some of the various features Orion offers. Let me know if you're interested in something specific, such as
All these questions lead to features that are more or less supported by Orion and thus can be easily used in your own map!
Great tutorial so far. ive done what u mentioned here today and the only problem im having is targeting/attacking a enemy with the "RPG" mode. ive been using the marine he will not attack at all but when i used the marauder i can mostly target and attack. i am relly starting to enjoy Orion. please keep up with these tutorials i hope to see more added soon.
All of these would be nice
How to use the action bar? How to create items and an inventory? How does Orion's window system work? How can I create a character window (similar to that in WoW)? How to create quests? How to save and load character profiles?
All of those are doable yourself if you feel confident enough to be able to make pretty looking UI.
Inventory and Items
Charactrer Window
Quests
Save/Load
All of these links come from the tutorial link in my signature. I encourage you to explore some others to get a better understanding. The UI parts especially, you will really just have to learn how to make dialogs, and once you learn the basic concept, it's easy to customize it until it looks how you want. On a side note, looking through these tutorials gave me a few ideas for my own tutorial series, so thanks haha.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Hey,
Sorry for the late reply, I totally forgot about this thread. I can extend the tutorial soon (hope you are still interested). Regarding the marine attack problem: Does it give you any error message, like out of range? The default attack range of a marine is very low when viewed in RPG perspective.
Regarding the other tutorials that fishy77 mentioned: The idea of Orion is that you don't have to spend a lot of time on all the technical stuff and can start creating your own game right away. Orion is intended to be as general as possible, so that it should fit all your needs; in particular, it offers very general and powerful solutions to many systems you would want in an RPG. For example, Orion implements its own dialog item type for creating inventories; using this dialog item type, you can create inventory slots whereever you want (this is btw how you would create the character window). Similarly, the quest system allows you to create any quest you want, and I made it in a way that forces the user to implement the quests in a "clean" way.
Edit: Seems like in RPG mode the track cursor function does not work properly, i.e. you cannot properly click on units. I guess this function broke with some SC2 patch ... I will investigate this now.
Edit 2: I figured out why the track cursor function does not work. In some patch, Blizzard changed the functionality of "CameraGetTarget" so that this function will not return the camera target if the camera is following a unit. I will implement a "fix" for this by tomorrow.
I've fixed the issue with the cursor, as promised.