Logo Platform
logo amplifiers simplified

Help

Reply
Copied to clipboard!
4 years ago
Sep 13, 2020, 2:17:41 AM

Hello everyone, I am trying to create a quest mod that creates anomalies when it starts (similar to the second part of the Endless Day event that spawns Dust Halos when it starts) however when I attempt to load the mod the game crashes (same thing happened with trying to edit the Public quest files but it crashed at start up) I'm not sure if this is caused by a logic error or what but any help is highly appreciated.

0Send private message
0Send private message
4 years ago
Sep 13, 2020, 9:03:54 PM
CaptainCobbs wrote:

Please post your code and diagnostics

okay, should I post the entire code of the quest or should I post a specific part.

0Send private message
0Send private message
4 years ago
Sep 13, 2020, 9:16:08 PM
CaptainCobbs wrote:

Just post the entire thing :)

    <QuestDefinition Name="TheGardenofEden" Category="ExampleQuest" SubCategory="Mod" TriggeringProbability="1" MinimumTurn="3">


        <!--============ TAGS ============-->

        <Tags>BeginTurn</Tags>


        <QuestContextSolo/>

        <RepetitionRules  NumberOfOccurrencesPerGame="0"

                          NumberOfOccurrencesPerEmpire="1"

                          NumberOfConcurrentInstances="0"/>


        <!--============ VARIABLES ============-->

        <Vars>

           

            <Var VarName="$CurrentEmpire">

                <From Source="$Empires"/>

                </From>

            </Var>    

        

            <Var VarName="$MyHomeSystem">

                <From Source="$CurrentEmpire.$HomeColonizedStarSystem"/>

                </From>

            </Var> 

         

            <Var VarName="$SpecialAnomalyDefinition" StringValue="PlanetAnomaly49"/>

            </Var>


            <InterpretedVar VarName="$Amount01Start" Target="$(Empire)">

                <Expression>Count(Context, @'ClassEmpire/ClassColonizedStarSystem/ClassImprovement,SubCategoryScience')</Expression>

            </InterpretedVar>


            <InterpretedVar VarName="$Amount01Objective" Target="$(Empire)">

                <Expression>Count(Context, @'ClassEmpire/ClassColonizedStarSystem/ClassImprovement,SubCategoryScience') + 2</Expression>

            </InterpretedVar>

            

            <Var VarName="$Expression1" StringValue="Count(Context, @'ClassEmpire/ClassColonizedStarSystem/ClassImprovement,SubCategoryScience')"/>


            <LocalizationVar LocalizationKey="$Amount01ObjectiveName" Source="$Amount01Objective"/>

        </Vars>


        <!--============ PREREQUISITES ============-->

       

        <Prerequisites Target="$(Empire)">          

            <PathPrerequisite Flags="Prerequisite">EmpireTypeMajor/ClassPopulation,ClassPopulationEmpireAffinityTerrans,PopulationMajor</PathPrerequisite>           

            <InterpreterPrerequisite Flags="Prerequisite">Count(Context, @'ClassEmpire/ColonizedStarSystemStateColony') ge 1</InterpreterPrerequisite>

        </Prerequisites>


        <!--============ STEPS ============-->

        <Steps>

            <!--============ STEP 1 ============-->

            <Step Name="Step1">

                <ObjectiveSet>                   

                    <StartActions>

                        <Action_SpawnAnomaly>

                            <Input_Planets VarName="$MyHomeSystem"/>

                            <Input_AnomalyDefinition VarName="$SpecialAnomalyDefinition"/>

                            <Input_Count VarName="$NeededAmount"/>

                            <Output_Planets VarName="$SelectedPlanet"/>

                        </Action_SpawnAnomaly>

                    </StartActions>

                    <Objective Name="Step1_Objective1" StartValue="$Amount01Start" EndValue="$Amount01Objective">

                        <Sequence>

                            <Decorator_BeginTurn>

                                <Condition_IsProgressionComplete>

                                    <Input_Context VarName="$CurrentEmpire"/>

                                    <Input_EmpireWhoseProgressToUpdate VarName="$CurrentEmpire"/>

                                    <Input_Expression VarName="$Expression1"/>

                                </Condition_IsProgressionComplete>

                            </Decorator_BeginTurn>

                        </Sequence>


                    </Objective>

                </ObjectiveSet>               

                <Reward Droplist="DroplistGenericExample01" Picks="1"/>

            </Step>

        </Steps>

    </QuestDefinition>

    

</Datatable>


Updated 4 years ago.
0Send private message
0Send private message0Send private message
4 years ago
Sep 13, 2020, 10:31:40 PM
CaptainCobbs wrote:

Can you post your logs too?

logs? I'm not very good at modding so I'm sorry if I don't understand what you're saying. I used the Example Quest template for this and based it off the endless day quest (part 2). if you want I can just send the entire mod folder.

0Send private message
4 years ago
Sep 13, 2020, 11:13:08 PM

The diagnostic html files that should be, by default, in C:\Users\$yourUser\Documents\Endless space 2\Temporary Files


Those files, once for every game launch, contain info/warn/error/exception messages provided by the game engine itself and are really usefull for debug purposes

0Send private message
4 years ago
Sep 13, 2020, 11:19:49 PM
Galanthein wrote:

The diagnostic html files that should be, by default, in C:\Users\$yourUser\Documents\Endless space 2\Temporary Files


Those files, once for every game launch, contain info/warn/error/exception messages provided by the game engine itself and are really usefull for debug purposes

ah thank you that could actually prove to be very helpful

0Send private message
4 years ago
Sep 13, 2020, 11:28:09 PM

Okay so I looked into the diagnostic file from my last attempt and it seems like the game was expecting a Var at line 23 however at 23 I already have the code </From> in order to activate another peace of code in this string:

            <Var VarName="$MyHomeSystem">

                <From Source="$CurrentEmpire.$HomeColonizedStarSystem"/>

                </From>     <==="Var" expected here by game engine

            </Var> 

0Send private message
4 years ago
Sep 13, 2020, 11:29:01 PM
W4RDN wrote:

Okay so I looked into the diagnostic file from my last attempt and it seems like the game was expecting a Var at line 23 however at 23 I already have the code </From> in order to activate another peace of code in this string:

            <Var VarName="$MyHomeSystem">

                <From Source="$CurrentEmpire.$HomeColonizedStarSystem"/>

                </From>     <==="Var" expected here by game engine

            </Var> 

Snipaste_2020-09-13_18-24-45.png  Imagine in case you can't see it


0Send private message
4 years ago
Sep 13, 2020, 11:36:39 PM
W4RDN wrote:
W4RDN wrote:

Okay so I looked into the diagnostic file from my last attempt and it seems like the game was expecting a Var at line 23 however at 23 I already have the code </From> in order to activate another peace of code in this string:

            <Var VarName="$MyHomeSystem">

                <From Source="$CurrentEmpire.$HomeColonizedStarSystem"/>

                </From>     <==="Var" expected here by game engine

            </Var> 

Snipaste_2020-09-13_18-24-45.png  Image in case you can't see it



0Send private message
4 years ago
Sep 14, 2020, 12:48:14 AM

Update: I fixed most of the things that caused the game to shut down when i attempted to load the mod. however; in the diagnostic file it's saying that $NeededAmount is not a variable despite the fact this exact line of code is used in the Public Quest file for Endless day.

here is the code it's refering to:

<StartActions>

                        <Action_SpawnAnomaly>

                            <Input_Planets VarName="$MyHomeSystem"/>

                            <Input_AnomalyDefinition VarName="$SpecialAnomalyDefinition"/>

                            <Input_Count VarName="$NeededAmount"/>     <=======this bit of code

                            <Output_Planets VarName="$SelectedPlanet"/>

                        </Action_SpawnAnomaly>

                    </StartActions>

Diagnostic.png picture of diagnostic

Updated 4 years ago.
0Send private message
0Send private message0Send private message0Send private message0Send private message0Send private message
?

Click here to login

Reply
Comment