Skip to content

Basic Tutorial

Bad Listener edited this page Dec 19, 2020 · 10 revisions

Basic Tutorial

In this tutorial, we will be going over how to make basic element to create a captive event for the mod.

Basic Events

Here is a sample of a basic captivity event.

<?xml version="1.0" encoding="UTF-8"?>
<CEEvents xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://CEEventsModal.xsd">

    <!-- SampleEvent -->
    <CEEvent>
        <Name>CE_common_example_1</Name>
     
        <Text>Event Text Here.</Text>
        <BackgroundName>CE_custom_background</BackgroundName>
        <MultipleRestrictedListOfFlags>
            <!-- Category Flag -->
            <RestrictedListOfFlags>Common</RestrictedListOfFlags>
            <!-- Type Flag -->
            <RestrictedListOfFlags>Captive</RestrictedListOfFlags>
            <!-- Location Flags -->
            <RestrictedListOfFlags>LocationTavern</RestrictedListOfFlags>
            <RestrictedListOfFlags>LocationCity</RestrictedListOfFlags>
        </MultipleRestrictedListOfFlags>
        <Options>
            <Option>
                <Order>0</Order>
                <MultipleRestrictedListOfConsequences>
                    <RestrictedListOfConsequences>EmptyIcon</RestrictedListOfConsequences>
                </MultipleRestrictedListOfConsequences>
                <OptionText>Option One.</OptionText>
                <TriggerEventName>CE_common_example_alt_1</TriggerEventName>
            </Option>
            <Option>
                <Order>1</Order>
                <MultipleRestrictedListOfConsequences>
                    <RestrictedListOfConsequences>ChangeHealth</RestrictedListOfConsequences>
                    <RestrictedListOfConsequences>EmptyIcon</RestrictedListOfConsequences>
                </MultipleRestrictedListOfConsequences>
                <OptionText>Option Two.</OptionText>
                <HealthTotal>-10</HealthTotal>
            </Option>
        </Options>
        <ReqCustomCode>true</ReqCustomCode>
        <SexualContent>false</SexualContent>
        <WeightedChanceOfOccuring>20</WeightedChanceOfOccuring>
    </CEEvent>
    <CEEvent>
        <Name>CE_common_example_alt_1</Name>
        <Text>Event Text Here.</Text>
        <BackgroundName>CE_custom_background_2</BackgroundName>
        <MultipleRestrictedListOfFlags>
            <RestrictedListOfFlags>Captive</RestrictedListOfFlags>
            <!-- CanOnlyBeTriggeredByOtherEvent Flag (Make sure this is set for events that you don't want to randomly call) -->
            <RestrictedListOfFlags>CanOnlyBeTriggeredByOtherEvent</RestrictedListOfFlags>
        </MultipleRestrictedListOfFlags>
        <Options>
            <Option>
                <Order>0</Order>
                <MultipleRestrictedListOfConsequences>
                    <RestrictedListOfConsequences>ChangeHealth</RestrictedListOfConsequences>
                    <RestrictedListOfConsequences>EmptyIcon</RestrictedListOfConsequences>
                </MultipleRestrictedListOfConsequences>
                <OptionText>Option One.</OptionText>
                <HealthTotal>10</HealthTotal>
            </Option>
        </Options>
        <ReqCustomCode>true</ReqCustomCode>
        <SexualContent>false</SexualContent>
        <WeightedChanceOfOccuring>20</WeightedChanceOfOccuring>
    </CEEvent>
</CEEvents>

As you may notice it is actually two events. With one event calling another when the player selects the first option.

<Option>
    <Order>0</Order>
    <MultipleRestrictedListOfConsequences>
      <RestrictedListOfConsequences>EmptyIcon</RestrictedListOfConsequences>
    </MultipleRestrictedListOfConsequences>
    <!-- Text of Option -->
    <OptionText>Option One.</OptionText>
    <!-- Trigger is Here (occurs by name) -->
    <TriggerEventName>CE_common_example_alt_1</TriggerEventName>
</Option>

Clone this wiki locally