ENDLESS™ Space 2 is turn-based 4X space-strategy that launches players into the space colonization age of different civilizations within the ENDLESS™ Universe. Your Vision. Their Future.
The correct solution is the second one, putting two <QuestTrigger> in a single <Triggers> entry. <Action_ChooseOutcome> merely chooses the outcome, it does not break the sequence. If another outcome has already been chosen, it will replace it. In any case, the chosen outcome will be triggered when the sequence terminates.
Just want to post an update on the quest modding tutorials.
I'm going to start working on them in early January, after we have our quest mod polished and completely functional, just to make sure I explain things in the best possible way.
I'm probably going to structure it as modules, so that I can break up the information a little bit.
If someone else beats me to it, or puts out some alternative guides/tutorials--and there are some great ones up already by @Cyrob and others here, here and here--then that is absolutely wonderful too! The easier and more approachable we can make modding ES2, the more people can get creative and explore their ideas and modding fantasies. I'd love see our little modding community explode! <3
One last question I have about quests is triggering multiple quests as one outcome.
I'm not sure if I could write two outcomes, and then put two Choose Outcome Actions in the Sequence; would that call both outcomes, or just break the sequence at the first choose outcome?
And again, I am set. We're building out our mod now, and things are so organized and easy and everything is working. You have all exceeded my wildest dreams in terms of attention and support.
I don't even know a graceful way of expressing just how thankful and grateful I am. So I'll leave it at that.
You guys are just trying to dazzle @MarechalBanane. I think it's a new forum battle card you're playing, a Blitzkrieg of amazingness!
I understand a lot of what's going on now, and you guys have answered every question I've asked. I will definitely put together a guide on modding the quests (and a sample project) so other people can benefit from all of your wonderful knowledge.
A lot of the more complicated aspects of writing quests involve interacting with the world (spawning systems, fleets, setting objectives, etc.) which I'm going to wisely avoid!
I'm going to focus on more narrative quests, with few objectives; a lot closer to your events with their event effects.
But I will definitely put something together. I might even go through all your quests to pull examples of everything you guys have in the game for a guide.
The only thing I could possibly ask you for, in the long term, is if you had any sort of internal reference document for all the decorator and action arguments. I don't need that to do what I'm doing, but I would definitely be willing to mark up an example project with all that information so people could do more complicated things with the quest system if they really want to.
I'm arriving a bit late, but I'm really glad you are interested in modding the quests!
You might have already figured things out yourself, but for the sake of clarity, I'll just try to fill in on some details if I can, even though Quaedam pretty much nailed everything in their answer.
Q1. I do see what's going on in QuestTriggeringMutualExclusionDefinitions.xml and QuestTriggeringProbabilityDefinitions.xml. Can I create my own categories and subcategories?
Q1b. There is no data type for QuestTriggeringMutualExclusionDefinitions. Is this not something we can edit, or was it maybe omitted from the data types reference?
Just one precision : both the QuestTriggeringMutualExclusionDefinitions and the QuestTriggeringProbabilityDefinitions both refer to the quest SubCategory, not the quest Category. The quest Category is a more general classification, because quests are used for all sorts of purposes in our game. For instance, quests with the Category "Event" are considered as "Narrative Events", which means that the notifications will look different, and they will appear in the side panel of the quest screen.
Q4. Is there somewhere that I can globally store my own values? For example, could I enter a new property into <SimulationDescriptor Name="ClassEmpire"> to track something?
Yes, as Quaedam said, you can alter the simulation the way you want, but it can cause compatibility issues between mods that modify the same file. One way to get around it is to use the quests to apply or remove simulation descriptors dynamically. There is a quest action just for that, <Action_ApplyDescriptor>. Another possibility is to resort to global quest variables, whose syntax is described in Quaedam's post.
Q5. Is there a better location to store a variable or am I able to create a completely new structure to hold my data?
I'm afraid quest variables do not allow you to build your own data structures, they merely allow you to retrieve lists of "entities" (such as empires, systems, planets, fleets, etc.), filter and sort them if necessary.
They can also contain integer values (=numbers) or strings (=text) if you declare them this way :
<Var VarName="$One" IntValue="1"/>
or
<Var VarName="$PlanetName" StringValue="Hekim"/>
Depending on what you need to do, quest variables could be enough, or you could resort to using the simulation if you need more freedom in defining your data. If you have a specific problem or example, do not hesitate to ask.
Q8. What do Input_GUID and Output_GUID do; I assume it has to do with bringing up the quest GUI, but I'm not sure
That's more of a technical detail, but GUID stands for "Globally Unique Identifier". It's an ID that each of the "entities" (as mentioned above in Q5) in our game has. Sometimes we use this ID as a reference to the actual entity. Most of the quest "nodes" (the Decorators, Conditions and Actions) can take in input an entity itself OR its GUID, and the ones that create entities give you the GUIDs or the created entities in output (as in Quaedam's example of the <Action_SpawnFleets>).
More generally, if you need reference, while it's far from perfect, you can take a look at the QuestDefinitions[test].xml file located in the Public\Quests folder. It contains test quests that we used to test quest features during development. A majority of the quest actions, decorators and conditions have their own test quest. It's a good way to see what attributes and arguments they can take, both in input and in output.
Good luck on writing your modding guide! Once again, do not hesitate if you have questions! :)
I looked through all the modding threads for ES2; I might look at the EL forums, since I know a lot of things are similar between games.
I'm working on creating a new quest mod, and I'm going to be heavily commenting my mod so that others can use it to learn how to better work with quests. I might also be willing to turn this post into a smallish guide and/or help answer questions for those who follow when it comes to modding in new quests and events. I promise to return any help that you guys can offer back to help enrich the community.
---
With that said, this is what I'm thinking of doing, along with some questions that I have:
I would like to create a group of quests (maybe with my own categories and subcategories).
Q1. I do see what's going on in QuestTriggeringMutualExclusionDefinitions.xml and QuestTriggeringProbabilityDefinitions.xml. Can I create my own categories and subcategories?
Q1b. There is no data type for QuestTriggeringMutualExclusionDefinitions. Is this not something we can edit, or was it maybe omitted from the data types reference?
I can understand most of the syntax in the game's current quests.
Q2. Is there a specific language being used here in these xml documents (that I can find resources for), or is it some kind of Amplitude-specific syntax? You can assume that I'm moderately fluent in C# and C++, if it helps to explain anything.
I would like to trigger a quest on a specific turn (which I understand how to do), and then have the next step in the quest line continue every x number of turns.
Q3. How do I trigger a quest after a certain number of turns? Is there a way to "hold" a quest up until I'm ready for the next step to be given? Could this be accomplished with a quest effect? Is <Decorator_QuestEffectFinished> what I'm after?
I'd also like to maybe store some values from one quest to the next.
Q4. Is there somewhere that I can globally store my own values? For example, could I enter a new property into <SimulationDescriptor Name="ClassEmpire"> to track something?
If it's possible, I do understand that that would not be a very compatible place to make an edit (in case there's an update, or someone is running another mod that edits the classempire).
Q5. Is there a better location to store a variable or am I able to create a completely new structure to hold my data?
Additionally:
Q6. Can I limit quests to only non-AI players? Where would I set this?
Q7. What does QuestContextSolo do; is it passing a variable to a new quest?
Q8. What do Input_GUID and Output_GUID do; I assume it has to do with bringing up the quest GUI, but I'm not sure.
Depending on the answers, I think this is everything I need to figure out in order to get started. Thank you so much for any help (even partial answers, ideas, or thoughts) you might have to share on these questions!
Some answers. I hope I'm clear enough :) Don't hesitate to ask for more details :)
Q1. I do see what's going on in QuestTriggeringMutualExclusionDefinitions.xml and QuestTriggeringProbabilityDefinitions.xml. Can I create my own categories and subcategories?
So, that’s a little bit technical, so let me know if my answer is not clear.
QuestTriggeringProbabilityDefinitions.xml defines the triggering probability of a pool of quests. It allows you (us too J ) to create appearance periods depending on quest categories. For example, political events are triggered mainly during the last part of the game, contrary to the Exploration quests.
If you create a new category, as long as there is no link with something in the file QuestTriggeringProbabilityDefinitions.xml its triggering probability will only depend on the quest definition. (Notice that Faction quests are not influenced by this file).
QuestTriggeringMutualExclusionDefinitions.xml
This file (again based on the quest’s category) was made to prevent several side quests/events from being launched through the same game event. For example, if you discover a curiosity only 1 “Exploration” quest could spawned or 1 “Curiosity” Event. Notice that a Faction/Academy quest can be launched for example.
Q1b. There is no data type for QuestTriggeringMutualExclusionDefinitions. Is this not something we can edit, or was it maybe omitted from the data types reference?
You can edit it, to add your SubCategory to the “QuestTriggeringMutualExclusionDefinition” if you think it’s interesting. Notice that if you want to mutually exclude 2 specific quests, you should modify directly the quest definition.
Q2. Is there a specific language being used here in these xml documents (that I can find resources for), or is it some kind of Amplitude-specific syntax? You can assume that I'm moderately fluent in C# and C++, if it helps to explain anything.
Sorry, only Amplitude-specific syntax is allowed. :/
Q3. How do I trigger a quest after a certain number of turns? Is there a way to "hold" a quest up until I'm ready for the next step to be given? Could this be accomplished with a quest effect? Is <Decorator_QuestEffectFinished> what I'm after?
OK, so that’s a little bit tricky but doable: J
You want to trigger the second chapter on a specific turn:
Put the turn in MinimumTurn
Add special Prerequisite, QuestStatePrerequisite which will allows you to be sure the first chapter has been done
You want to leave X turns between those two chapters. Maybe scaled with the Gamespeed:
Between your 2 quest definitions create a “ghost” quest. This will be triggered by the Chapter1 and will trigger the Chapter2
In this quest, with a decorator_wait with the duration you like (IntValue ou Interpreted var) which you have to define in this quest’s variable
Notice that you can also use a “Decorator_BeginTurn” with a Loop J
Those ghost quests don’t need a GUI but you shall tag them as “Hidden”
For example, “SophonsQuest-Chapter0” is a ghost quest
Decorator_QuestEffectFinished
Is only used to track the end of the Event Effects. ^^
Q4. Is there somewhere that I can globally store my own values? For example, could I enter a new property into <SimulationDescriptor Name="ClassEmpire"> to track something?
If you want to create your own properties, you can duplicate the targeted file entirely. Like SimulationDescriptor[Empire] and add your property. Notice that two mods can’t be launched at the same time if they both modify the same file.
Q5. Is there a better location to store a variable or am I able to create a completely new structure to hold my data?
Hum, I don’t really understand your question. Would you give me an example of what you want to do with it?
Q6. Can I limit quests to only non-AI players? Where would I set this?
Hum that’s not possible, but the AI could ignore them if you don’t add an IA_Hint to the quest objectives. Notice that AI Empire can complete it “by mistake” though! xD
Q7. What does QuestContextSolo do; is it passing a variable to a new quest?
It only defines that the quest is a solo quest and not a multiplayer one. :)
If you want to keep a variable from on quest to another, add IsGlobal="true” to the variable definition.
Note that you have to add IsGlobal="true” on all the occurrences of this variable.
Note also that it’s really important to have a different name for all global variables in the game. You can find Global variable on the quest ExplorationQuest18.
Q8. What do Input_GUID and Output_GUID do; I assume it has to do with bringing up the quest GUI, but I'm not sure
GUID stuff creates an ID to game entities. For example, when you spawn a fleet, this fleet doesn’t exist in the game before:
<Action_SpawnFleets>
<Input_Empire VarName="$AIEmpire"/>
<Input_Locations VarName="$FirstSystem"/>
<Input_DroppableFleet VarName="$Fleet01"/>
<Output_FleetGUIDs VarName="$Fleet01GUID"/>
</Action_SpawnFleets>
Thanks to the output, you will be able to find this fleet through it GUID and use it in the rest of the quest for example.
From @Quaedam on QuestTriggeringMutualExclusionDefinition:
QuestTriggeringMutualExclusionDefinition is a list of subcategories, where only one quest can be active from that list at a time > That's not perfectly right. In fact, two quests from the same list cannot be trigger at the same time. I mean: on "BeginTurn" only an Exploration quest OR a curiosity quest OR a event (etc) can be launched. But next turn, another quest/event can be triggered. Is that clear ? xD
So basically, that list just stops two quests from triggering on the same turn, which isn't something I would need to mess with.
Adding to Q4, I can see that there are variables being stored in Simulation\SimulationDescriptors[Empire].xml and that they are being modified in Simulation\SimulationDescriptors[Quest].xml
Also, if anyone has any of their own questions about the quest system at all, I will do my best to help you out also. I'm pretty active here, and I plan to be pretty good at this by the end of the week.
I'm getting started this morning, and I just found a new question, which I added to the OP:
Q1b. There is no data type for QuestTriggeringMutualExclusionDefinitions. Is this not something we can edit, or was it maybe omitted from the data types reference?
Thanks so much @SpyBoy for putting your knowledge into this. I am super grateful that you decided to help out, especially given that you have experience with your super awesome new mod which specifically does quests!
And then define the new category and subcategory in QuestTriggeringMutualExclusionDefinitions.xml and QuestTriggeringProbabilityDefinitions.xml. What I hope would happen is that I could set a refill rate specifically for "MyNewQuestPool" so that they would refill and trigger just those quests. Additionally, if I set the subcategory "MyNewQuests" to be it's own mututallyy exclusive list, then you would only ever get one of the quests in the pool at a time.
For Q2, that's a good point. Yeah, I think most people use C# in Unity. It doesn't really look like C#, though. I don't know how they do it exactly, but from what I can remember, you can use encoders to read/write variables to xml. Maybe that's what's happening here.
For Q3, I'd like to trigger a new quest off of the first quest after a certain number of turns. So I'd like to be able to start MyNewQuest-ChapterOne on any given turn and then after you make a choice, I'd like to have MyNewQuest-ChapterTwo pop up exactly 10 turns later. They do something like this with some of their discoveries or events, where a 2nd window pops up later on to tell you that an effect ended, or what random reward you recieved for your decision, etc.
A lot of the current quest chains have objectives that advance them. I think the key to triggering the quests in this way might have to do with waiting for a hidden event to finish.
For Q4/5, I know about the variable section. I'm pretty sure those variables are only local to that quest definition. A lot of the properties that we modify are basically other variables that exist outside of that quest definition. I'm wondering if we can create variables (aka properties of some class/structure) somewhere else and then have them exist over the course of the entire game. Like, if I wanted to have a property that kept track of a quest score of some kind, over the cours of an entire quest chain, is that possible.
For Q6, I saw that that was how the AI finished some of their quests. I think that's how I would handle it if it came to it. Ultimately, though, I'm pretty mean to the AI and I don't care about them. It would make my life better if I could just exclude them from all the fun!
---
Thank you so much, @Spyboy. I completely took a look at your mod, btw. You put a lot of work into it, and it's one of the first quest mods I've seen for ES2. It's a big accomplishment, doing something new, and it looks awesome. I really appreciate your input and help a lot!
And one other thing I can suggest, because I never see it mentioned, is that EL (and maybe some of the other games) had a similar system to ES2, and a lot seems to have been carried over from game to game. One really nice resource is the modding guide that Pikou (is she still around these days?) put out for EL. Not everything is the same (which is why they probably don't want to confuse people with it), but a lot of things carry over. I also probably will go back through the EL forums to look for some more clues.
I'm also going to start experimenting tomorrow morning. So at worst, I might be able to answer some of these questions through trial and error.
And some of these questions are a bit advanced (or not easily answered), so it might be something that a dev would need to explain.
I'll try to answer some other questions with what i find,
For Question 1 in the ExampleQuest Mod on the first line there is : "Category="ExampleQuest" SubCategory="Mod"" on my mod I made Category=AurigaQuest so I presume you can make your own
For Question 2 I know that they use Unity to make their games and so I guess it's on C# but i might be wrong, either way, I don't know how to interact with it with mods.
For Question 3 there is this in the first line (example from my mod) :
You can say Minimum turn = X and also a probability of the quest to trigger (0.2 or 0.5 or 1, etc) by adding : "TriggeringProbability="0.2""
Q4/5 : To store Values I only know the Variables <Vars></Vars> but I don't know if it's what you're looking for...
I don't know for Question 6 and the AIs but what I think is that quests are for solo players only but you can add "AIHint" at some places to make them do what you want :
I'll go ahead and edit the original post with any info that you guys can provide; maybe I'll even turn it into a resource/guide on how to mod quests! Thanks again for any help you can offer!
lilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancelDEVMarechalBanane
Dev
DEVMarechalBanane
Dev
6 800g2g ptsReport comment
Why do you report MarechalBanane?
Are you sure you want to block MarechalBanane ?
BlockCancelAre you sure you want to unblock MarechalBanane ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancelDEVMarechalBanane
Dev
DEVMarechalBanane
Dev
6 800g2g ptsReport comment
Why do you report MarechalBanane?
Are you sure you want to block MarechalBanane ?
BlockCancelAre you sure you want to unblock MarechalBanane ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancelDEVquaedam
Dev
DEVquaedam
Dev
31 900g2g ptsReport comment
Why do you report quaedam?
Are you sure you want to block quaedam ?
BlockCancelAre you sure you want to unblock quaedam ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancelSpyboy
Spy in Disguise
Spyboy
Spy in Disguise
21 400g2g ptsReport comment
Why do you report Spyboy?
Are you sure you want to block Spyboy ?
BlockCancelAre you sure you want to unblock Spyboy ?
UnblockCancellilyophelia
Shadow Lord
"For every complex problem there is an answer that is clear, simple, and wrong." -H. L. Mencken
lilyophelia
Shadow Lord
14 000g2g ptsReport comment
Why do you report lilyophelia?
Are you sure you want to block lilyophelia ?
BlockCancelAre you sure you want to unblock lilyophelia ?
UnblockCancel