Oriental Empires

Oriental Empires

Not enough ratings
Creating Custom Scenarios
By FlappyJak
Guide to creating your own custom scenarions for use in maps created with the new map editor. Learn step by step how to make the simplest possible scenario, with some discussion on further possibilities.
   
Award
Favorite
Favorited
Unfavorite
Introduction
On top of the release of the map editor, we also got the ability to create custom scenarios. Either with the base maps or with our own created maps. But there's been little information about how to use them, and a fair few questions. The lack of support for this is probably because it's only a temporary situation, and proper tools for creating and editing scenarios will appear in the future. But for the time being, I am creating this guide to help with the basics and maybe give you a head start even for when we do get more tools!
Running the examples
There are some examples we can look at and test to get started, these will be located in your Steam games folder like so: Steam\steamapps\common\Oriental Empires\Oriental Empires_Data\StreamingAssets\Scenario Design Examples. In there is an example map and an example scenario, as well as the 2 main campaign scenario files. Scenario files are in XML format, so they're human readable and you can edit them.

To actually use these files though, we need to move them somewhere else. The folder the game actually gets the files from is in your Documents folder: C:\Users\*yourname*\Documents\My Games\Oriental Empires\Scenarios. So move/copy the ExampleMap.bytes files and the Example Scenario.xml files there. These will now be visible to the game.

If you now go into the game and go to Single Player > Custom Game > Load Map you will see the map there. And to see the scenario, go to Single Player > Load Scenario File and you will see that too. Note that the scenario file uses the map file, if the map file isn't there then the game will hang when you try and play it.


Making A Scenario (Part 1): Creating The File
To make your own scenario, you simply need to create your own XML file. It's easier if you're familiar with XML as this guide will not explain the ins-and-outs of that. But I will supply all the code needed. Either way, check out the example files in a text editor, preferably one that can do syntax highlighting for XML, such as NotePad++.

Note that there's also an XSD file, this file basically defines the rules for what you put in the XML. It can do some minor error checking, etc. You don't scrictly need it, and I won't be including it here. So don't panic about that!

The first thing you'll need is to define the XML prolog on the FIRST LINE. After that it's down to the important stuff. We need a <Scenario> tag, now XML requires that every tab has an end tag or "self closes", like so: <Scenario>more tags in here!</Scenario> and <selfClosing/>, so don't forget that. You're starting file should look like this:

<?xml version="1.0" encoding="utf-8"?> <Scenario> </Scenario>
Making A Scenario (Part 2): Setting A Map
Now we will define the map. The <Map> goes inside the <Scenario> tag and has several attributes:

FileName is the name of the map to use, it should just be the name with no path.

RandomResources is obvious, whether to randomly place resources on the map, if false you can place some manually. This tag is optional.

FactionSelectionImage defines the "map" image you see in the top right when selecting a faction. These are located in Steam\steamapps\common\Oriental Empires\Oriental Empires_Data\StreamingAssets\FrontEnd\Low_Resolution. You can add your own images here and use them on the faction selection screen. Best to only ADD files and not change the existing ones. The image is 450x240 and is a PNG. The name you provide should contain no path OR file extension. Leaving you with this:

<Map FileName = "MyCustomMap.bytes" RandomResources = "true" FactionSelectionImage = "OE_FE_Map_01"/>
Making A Scenario (Part 3): Adding Resources
If you turned RandomResource off when defining the map, you can still place them manually (or along side the randomly generated ones). The <MapResource> tags is withing the <Scenario> tag but after the <Map> tag. You can define as many as you like, or none:

<MapResource Type = "Wild Horses" X = "29" Y = "84"/>
<MapResource Type = "Gold" X = "108" Y = "107"/>
Making A Scenario (Part 4): Custom Factions
So this is the juicy, albiet most complicated, bit, custom factions! You can create as many custom factions as you like. Please note that this is also the least detailed part in terms of information given about customizing factions, I'll write up what I can but some things may be mistaken. Firstly, create a <CustomFaction> tag, this tag has a single attribute called ID, this is the custom name of the faction:

<CustomFaction ID = "Murica"> </CustomFaction>

Then inside this tag we can define the specifics:

<CustomFaction ID = "Murica"> <BasedOn Faction = "Wei"/> <Start Money = "2000" LeadersIncome = "200" Era = "0" PreferredClimate = "Northern China"/> <Selection Selectable = "Any" ShowPositionMarker = "false" FactionImage = "OE_FE_FactionElement_GenericWS_01"/> </CustomFaction>

<BasedOn> basically provides another faction as a template. It causes the custom faction to inherit the skills/modifiers, and flag graphic of that faction.

<Start> determines your starting money, base income, starting Era. PreferredClimate may have something to do with the AI or placement during random generation.

<Selection> is all about the setup screen:

Selectable is whether you can play as this faction; "Any" being always and "LockedTurns" to only unlock after x amount of turns have been played (just like the other factions).

ShowPositionMarker is whether this faction's icon is visible on the map image (as defined by FactionSelectionImage previously), I set to false because you don't need it.

FactionImage determines the image to show OVER the map image when this faction is selected. This is usually the picture of the soldier holding some faction relevant weapon. Note that the faction image is wider than the map image, it's 512x240. If you don't want that, and you want a flat opaque image over the map, then it also needs to be 512x140 but with a transparent area on the right so it's VISUALLY only 450x240. If it's not 512 then it will stretch.

There are two more parameters not used in the example: XPos and YPos determined where on the map the faction icon should appear if using ShowPositionMarker.
Making A Scenario (Part 5): Adding Settlements
Factions need settlements. Again, you can have as many of these as you like, or as will fit on your map! Here's a basic settlement:

<Settlement Name = "MyTown" X = "158" Y = "56" Template = "Chinese Town" TiledRoof ="false"> <Walls WallLevel = "0" WallTech = "0" TowerUpgrade = "0"/> <Population Number = "10" Flocks = "0"/> </Settlement>

The <Settlement> tag has a Name, a position on the map X/Y, a Template which is the like the size/theme of the town, and TiledRoof which determines if the town roofs are tiled (I believe this is linked to the tech) and has an effect of the roof textures.

Inside that, we can set what our walls are like with the <Wall> tag, which has; WallLevel that sets the walls the settlement has, WallTech which I believe is the wall upgrade like tiled roofs, and TowerUpgrade which is the towers.

You can also set the population and number of flocks with the <Population> tag, using Number and Flocks respectively.

It is also possible to add buildings to the settlement and improvements to the land. As per these tags and examples:

<Building Type = "Palace"/> <FarmImprovements> <Pos X = "161" Y = "57"/> <Pos X = "161" Y = "56"/> </FarmImprovements> <ClearanceImprovements> <Pos X = "150" Y = "56"/> </ClearanceImprovements> <RoadImprovements> <Pos X = "159" Y = "56"/> <Pos X = "160" Y = "56"/> <Pos X = "160" Y = "57"/> <Pos X = "161" Y = "58"/> <Pos X = "161" Y = "59"/> </RoadImprovements>
Making A Scenario (Part 6): Adding Forces
It's likely you'll also want to start with some armies. These are only a little simpler than settlements:

<Force X = "163" Y = "60" Facing = "30"> <Unit Type = "WS Heavy Chariot Bodyguard"> <Leader FirstName = "Dave" LastName = "" PortraitIndex = "6" AgeInYears = "38" Energy = "3" Virtue = "2" Leader = "true"/> </Unit> <Unit Type = "WS Army Dagger Axemen L2"/> <Unit Type = "WS Army Dagger Axemen L2"/> <Unit Type = "WS Heavy Chariot L2"/> </Force>

In the <Force> tag you provide the starting position and facing direction. Then you have all the individual units each defined with the <Unit> tag. You can assign your faction leader here, by placing him within a <Unit> tag. Funnily, you can assign your leader to any type of unit. And a bodyguard unit doesn't require a character. Note that you can't have more than 8 units, any more than that and the rest will be ignored.

Regarding the <Leader> tag. If you want the leader to be your faction heir, remove the "Leader" attribute (Not the tag) and replace it with "Heir".
Making A Scenario (Part 7): Testing!
Now that's pretty much all you NEED. You should end up with a simple file that looks something like this:

<?xml version="1.0" encoding="utf-8"?> <Scenario> <Map FileName = "MyCustomMap.bytes" RandomResources = "true" FactionSelectionImage = "OE_FE_Map_01"/> <CustomFaction ID = "Murica"> <BasedOn Faction = "Wei"/> <Start Money = "2000" LeadersIncome = "200" Era = "0" PreferredClimate = "Northern China"/> <Selection Selectable = "Any" ShowPositionMarker = "false" FactionImage = "OE_FE_FactionElement_GenericWS_01"/> <Force X = "163" Y = "60" Facing = "30"> <Unit Type = "WS Heavy Chariot Bodyguard"> <Leader FirstName = "Dave" LastName = "" PortraitIndex = "6" AgeInYears = "38" Energy = "3" Virtue = "2" Leader = "true"/> </Unit> <Unit Type = "WS Army Dagger Axemen L2"/> <Unit Type = "WS Army Dagger Axemen L2"/> <Unit Type = "WS Heavy Chariot L2"/> </Force> <Settlement Name = "MyTown" X = "158" Y = "56" Template = "Chinese Town" TiledRoof ="false"> <Walls WallLevel = "0" WallTech = "0" TowerUpgrade = "0"/> <Population Number = "10" Flocks = "0"/> </Settlement> </CustomFaction> </Scenario>

Remember to have this and you map files in the Documents folder as specified previously. Then go into the game and load your scenario! Then you're ready to play around and make what you want!
Finally:
Not EVERYTHING is explained here. There's some things that don't seem to work, or that I haven't figured out how they work yet and so they are not included here. And somes things, like building and unit names I will list here in the future. However, for building/unit names you can also find them via the "cheat" console in game.

I hope this guide helped you if you were looking to create scenarios, feedback would be helpful if you need further help or feel I didn't explain something well enough, and help me improve the guide! :)
1 Comments
Sandboi 23 Jul, 2023 @ 7:02am 
is this the only way to make a scenario ?