OK, another problems. I tried to create a new pearl, and made the following changes to the default files. All code below is essentially for debugging, there’s no real content. Basically, the idea was that I needed a bit more time before they get caught to explain some things, so they get lost before being captured with goods from the caravan. (skip past to see the issue):
maps/index.xml:
in <pearl_data> (after pearl id 1, as this was intended to go between 1 and 2)
<pearl id="57" level="Walking in Circles" level_id="1_2b_lost" description="$MCG" _x="150" _y="145" _type="battle"/>
in <reward_data> (after pearl id 1, as this was intended to go between 1 and 2)
<reward pearl_id="57" diff="easy" win_type="normal" type="progress" value=""/>
<reward pearl_id="57" diff="easy" win_type="perfect" type="gold" value="100"/>
<reward pearl_id="57" diff="med" win_type="normal" type="xp" value="75"/>
<reward pearl_id="57" diff="med" win_type="perfect" type="gold" value="200"/>
<reward pearl_id="57" diff="hard" win_type="normal" type="xp" value="150"/>
<reward pearl_id="57" diff="hard" win_type="perfect" type="gold" value="500"/>
<plus_reward pearl_id="57" diff="easy" win_type="normal" type="progress" value=""/>
<plus_reward pearl_id="57" diff="easy" win_type="perfect" type="xp" value="1100"/>
<plus_reward pearl_id="57" diff="med" win_type="normal" type="xp" value="2000"/>
<plus_reward pearl_id="57" diff="med" win_type="perfect" type="gold" value="10000"/>
<plus_reward pearl_id="57" diff="hard" win_type="normal" type="xp" value="3000"/>
<plus_reward pearl_id="57" diff="hard" win_type="perfect" type="xp" value="5000"/>
data_game_progression.xml: (instead of being captured after pearl 1, they wander aimlessly, THEN get captured in lost_outro, so this just slides in between getting 50 scrap and being caught as looters)
<element name="1_2_outro_2" next="lost_intro">
<requirements>
<requirement type="have_scrap" value="1" />
</requirements>
<actions>
<action type="show_cutscene" value="useless_scrap"/>
<action type="suppress_music_change"/>
</actions>
</element>
<element name="lost_intro" next="lost_outro">
<requirements>
<requirement type="start_pearl" value="1_2b_lost"/>
</requirements>
<actions>
<action type="show_cutscene" value="lost_intro"/>
<action type="suppress_music_change"/>
</actions>
</element>
<element name="lost_outro" next="1_3_intro">
<requirements>
<requirement type="complete_pearl" value="1_2b_lost"/>
</requirements>
<actions>
<action type="show_cutscene" value="lost_outro"/>
<action type="suppress_music_change"/>
</actions>
</element>
data_fake_save.xml:
in <progress> (between pearls 1_2 and 1_3)
<pearl id="1_2b_lost" diff="easy" status="perfect" />
(between cutscenes useless_scrap and coliseum_intro)
<cutscene id="useless_scrap" watched="true"/>
<cutscene id="lost_intro" watched="true"/>
scripts.xml: (between talk_berserker and caught_by_ozimal, just placeholders)
<scene name="useless_scrap" title="Useless Scrap" background="caravan_empty" foreground_left="rock_left" music="loop_town" act="1" scene="2">
<enter image="mcg_look_back_talk" side="left" instant="true" light="back_center,0.75,multiply"/>
<enter image="ber_bored" side="right" instant="true" light="back_edge,0.75,multiply"/>
<line character="$MCG" text="Useless Scrap" side="left"/>
</scene>
<scene name="lost_intro" title="Lost 1" background="pit" foreground_left="rock_left" music="loop_town" act="1" scene="2">
<enter image="mcg_look_back_talk" side="left" instant="true" light="back_center,0.75,multiply"/>
<enter image="ber_bored" side="right" instant="true" light="back_edge,0.75,multiply"/>
<line character="$MCG" text="Lost 1" side="left"/>
</scene>
<scene name="lost_outro" title="Lost 2" background="pit" foreground_left="rock_left" music="loop_town" act="1" scene="2">
<enter image="mcg_look_back_talk" side="left" instant="true" light="back_center,0.75,multiply"/>
<enter image="ber_bored" side="right" instant="true" light="back_edge,0.75,multiply"/>
<line character="$MCG" text="Lost 2" side="left"/>
</scene>
<cutscene id="lost_outro" watched="true"/>
Hope that made sense. At first, after 1_2_outro played, but before receiving scrap, it crashed saying it failed to save. I added the text into fake_save, now it says the same thing in a different way:
AN ERROR HAS HAPPENED!
Error #1125
context: Main.writesave(1)
message: error #1125
stack trace:
null
I assume this is an issue in generating the pearl straight after the first outro from the previous map. Is there another place I need to add code? Have I stuffed up anywhere? I basically took existing code and adapted it to my needs for everything so far, and it’s all worked (except for what I believe is a known bug that cutscenes don’t use edited images in the mods folder) until I tried to add a new pearl. If I have to, I’ll just use existing pearls, but I was hoping to add bits and pieces where I felt it would be useful, and so I’m not just following the same exact storyline.