Oriental Empires

Oriental Empires

View Stats:
Lock technology in custom scenario?
So is it possible to lock certain technologies in the scenario editor or by editing game files? For instance I want to make a Warring States scenario that is more authentic to the period, so I want Warring States techs and troops only, can I disable Imperial Era techs?
< >
Showing 1-10 of 10 comments
Neutron  [developer] 11 Sep, 2023 @ 3:21am 
The easiest thing to do is just to set the timescale in the scenario xml file so that you're unlikely to reach the imperial techs in the amount of time you want the game to last. This will make technological progress much slower.

You could also make a mod (which is actually pretty simple to do) and modify the technology xml file so that the imperial techs aren't available.

Got to go out now, I'll post some more info later.
Dennisr 11 Sep, 2023 @ 4:32am 
Go to Edicts.xml
Edit the "Imperial Era" Edict into this

<Edict ID="Imperial Era" Area="Misc" MayBeCancelled ="false" IssuedInStartingEra="2">
<Requirements>
<Era Value="1"/>
<NumTechs Num="24" Era ="1"/>
<ControlNumSettlements Num="100" Exact="true"/>
</Requirements>
<Effect Type="Cost" Value="1000"/>
<Effect Type="NobleUnrest" Value="15" Turns="10"/>
<Effect Type ="AdvanceEra" Value="2"/>
</Edict>

This requires the player or faction to have 100 settlements to be able to pass into the Imperial Era.
Neutron  [developer] 11 Sep, 2023 @ 8:56am 
yes that's an easy way to mod it
Thank you guys, very helpful. Neutron, thank you for being around to answer questions after so many years, I appreciate your dedication to this game. Another question, is there a tutorial on modding events? I am currently trying to introduce new characters into the game at certain turns, I think the 3K DLC did this?
Neutron  [developer] 12 Sep, 2023 @ 4:59am 
I'm afraid that there isn't a guide for the event system, but you can look through the script files for the Three Kingdoms and Life of Genghis scenarios to see how the event system works. You'll need a bit of familiarity with xml to understand it.

Below is a script file that will add a new leader on turn 25

<?xml version="1.0" encoding="utf-8"?> <Script xmlns="OrientalEmpires" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="OrientalEmpires Scripting.xsd"> <!-- General --> <FactionScript Any="Default Script"> <Event ID="Wen Chou"> <Trigger Time="StartTurn"> <ConditionB Property="FactionStillExists" Condition="=" Parameter="Yuan Shao" Value="true"/> <ConditionF Property="Turn" Condition="=" Value="25" /> </Trigger> <ActionSet OnceOnly="true"> <AddLeader FirstName="Wen" LastName=Chou"" AgeInYears="28" Qi="5" Ren="2" Leader="false" Heir="false" PortraitName="53" PortraitSet="Chinese" X="238" Y="88"/> <NewLeaderMsg FirstName="Wen" LastName="Chou" Title="General New Hero Title" Text="General New Hero Text"/> </ActionSet> </Event> </FactionScript> </Script>


The stuff above the line <!-- General --> is just some XML stuff you always need to include. Then the line

<FactionScript Any="Default Script">

says we're making a script that is run whatever faction the player is playing. You need to put any events that alter the game world inside this script. You can also make scripts that only run if the player is playing a specific faction, but they're only for messages and assigning missions.

After that you define the event, and give it an ID (which can be anything). Trigger says when the game will test if the event occurs, which in this case is the start of the turn. Inside the trigger element are a couple more conditions needed for the event to occur. In this case we just test that the faction still exists and that we've reached turn 25.

ActionSet defines all the actions that occur when this event triggers. It also defines whether the event can only occur once, or multiple times. We have two actions, to add a new leader to the world, and to show a message to inform the player of this.

You can look in the scripting.xsd file to see all the actions that can be performed.
Originally posted by Neutron:
I'm afraid that there isn't a guide for the event system, but you can look through the script files for the Three Kingdoms and Life of Genghis scenarios to see how the event system works. You'll need a bit of familiarity with xml to understand it.

Below is a script file that will add a new leader on turn 25

<?xml version="1.0" encoding="utf-8"?> <Script xmlns="OrientalEmpires" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="OrientalEmpires Scripting.xsd"> <!-- General --> <FactionScript Any="Default Script"> <Event ID="Wen Chou"> <Trigger Time="StartTurn"> <ConditionB Property="FactionStillExists" Condition="=" Parameter="Yuan Shao" Value="true"/> <ConditionF Property="Turn" Condition="=" Value="25" /> </Trigger> <ActionSet OnceOnly="true"> <AddLeader FirstName="Wen" LastName=Chou"" AgeInYears="28" Qi="5" Ren="2" Leader="false" Heir="false" PortraitName="53" PortraitSet="Chinese" X="238" Y="88"/> <NewLeaderMsg FirstName="Wen" LastName="Chou" Title="General New Hero Title" Text="General New Hero Text"/> </ActionSet> </Event> </FactionScript> </Script>


The stuff above the line <!-- General --> is just some XML stuff you always need to include. Then the line

<FactionScript Any="Default Script">

says we're making a script that is run whatever faction the player is playing. You need to put any events that alter the game world inside this script. You can also make scripts that only run if the player is playing a specific faction, but they're only for messages and assigning missions.

After that you define the event, and give it an ID (which can be anything). Trigger says when the game will test if the event occurs, which in this case is the start of the turn. Inside the trigger element are a couple more conditions needed for the event to occur. In this case we just test that the faction still exists and that we've reached turn 25.

ActionSet defines all the actions that occur when this event triggers. It also defines whether the event can only occur once, or multiple times. We have two actions, to add a new leader to the world, and to show a message to inform the player of this.

You can look in the scripting.xsd file to see all the actions that can be performed.
Thanks! this is exactly what I need. Now I can make sure after 300 turns I still have historical characters around not random faces lol.
So I tried to learn everything I can do with a script from studying your 3K scenario script and the scipt xsd file, there`s one major feature I wasn`t able to find a way to implement which is transferring settlements. How do I make faction A take over a settlement from faction B? I am creating a scenario with historical timelines so this is quite essential to show the rise and fall of kingdoms. I want Qin to take a large chunk of Chu`s territory at a certain point if neither is played by the player, because that was what happened in history, I used TakeoverCapital command which worked, but for other settlements I am not able to let Qin take over. I tried to destroy Chu stacks in these cities and add Qin unit to the area so that they can easily capture a defenseless city, but the AI simply refuse to attack these cities and disband the new army I gave it, even though I gave Qin extra income that can no doubt support this army. Is there a way to make the Qin AI more aggressive so they attack? Or a command to simply give them these cities?
Sorry for asking too many questions here, there doesn`t seem to be many other ways for me to figure this out.
Neutron  [developer] 14 Sep, 2023 @ 12:17am 
I don't think there's a command to transfer settlements. You can force two factions to be at war
<Diplomacy Agreement="War" FactionID="Kereits" Target="Merkits"/>

and if the AI isn't doing what you want you could freeze it for a turn
<ChangeFactionRules FactionID="Merkits" BaseType="AIFrozen"/>

and

<ChangeFactionRules FactionID="Merkits" BaseType="Standard"/>

See the life of Genghis script for how to manipulate diplomatic standings
So I was able to achieve this through a barbaric and overly-convoluted way lol. I made Chu issue a modded edict to destroy these settlements and then used CreateSettlement command for Qin to recreate settlements with the same name on the same hex. I had to also add a few buildings and city walls manually so that a giant city doesn`t descend into a small village in the duration of one turn but it worked.
Neutron  [developer] 16 Sep, 2023 @ 6:54am 
Well glad you found a way.
< >
Showing 1-10 of 10 comments
Per page: 1530 50