Creating a mission (setting mission objectives)

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

strude
Posts: 1471
Joined: Wed, 3. Aug 05, 08:15
x4

Post by strude » Wed, 9. Sep 15, 03:46

Is there a continually updated list or group of player owned ships and stations available within the system, or will I need to maintain something like that myself?
Gaming PC: Gigabyte H270M-D3H | i7 7700 | 16Gb DDR4 | Gigabyte GTX1060 6Gb OC | Asus Xonar DGX | Window 10 Home 64bit | Samsung 256Gb SSD

strude
Posts: 1471
Joined: Wed, 3. Aug 05, 08:15
x4

Post by strude » Mon, 14. Sep 15, 11:34

In addition to my above question, if I don't set instantiate="true" for a cue does that mean it will only run one time ever, even if the conditions are met again?
Gaming PC: Gigabyte H270M-D3H | i7 7700 | 16Gb DDR4 | Gigabyte GTX1060 6Gb OC | Asus Xonar DGX | Window 10 Home 64bit | Samsung 256Gb SSD

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Mon, 14. Sep 15, 19:13

1. you have to search for/Find Player Objects every time you need them i think (or implement such a group yourself, its only basic signal usage and updating Groups anyway)

2. Basically yes, but if the parent cue is instantiated it will run once per instance of the parent cue, or you can also use <reset_cue/> if you want to activate it again, here an (untested) usage example:

Code: Select all

   <library name="Payment">
      <params>
        <param name="actor"/>
      </params>
      <actions>
        <do_if value="not $actor.exists">
          <debug_text filter="error" text="'UT_CAC_Lib.Payment canceled because no valid Actor given'"/>
          <cancel_cue cue="this"/>
        </do_if>
        <do_if value="not $actor.$wage">
          <debug_text filter="general" text="'UT_CAC_Lib.Payment fell back to default Wage of 1Cr/h because no valid amount defined on Actor'"/>
          <set_value name="$actor.$wage" exact="1Cr"/>
        </do_if>
        <do_if value="not $actor.$riskbonus">
          <debug_text filter="general" text="'UT_CAC_Lib.Payment fell back to default Riskbonus of hourly Wage per 10min interval because no valid amount defined on Actor'"/>
          <set_value name="$actor.$riskbonus" exact="$actor.wage"/>
        </do_if>
      </actions>
      <cues>
        <cue name="Wage" comment="Wages are paid hourly">
          <actions>
            <!-- ToDo: Check if there is enough Money available and do apporiate steps if not (for example reduce skill or stop working for the Player altogether) -->
            <set_value name="$actor.money" exact="$actor.money - $actor.wage"/>
          </actions>
          <cues>
            <cue name="Wage_reset">
              <delay exact="1h"/>
              <actions>
                <reset_cue cue="Wage"/>
              </actions>
            </cue>
          </cues>
        </cue>
        <cue name="Riskbonus" comment="Risk Bonus is paid every 10 min while $actor.container is under Attack/in danger">
          <conditions>
            <event_object_attacked object="$actor.container"/>
          </conditions>
          <actions>
            <!-- ToDo: Check if there is enough Money available and do apporiate steps if not (for example reduce skill or stop working for the Player altogether) -->
            <!-- ToDo: Check if the Attack is serious by comparing Attack Forces with nearby own Forces - if it is no serious Attack reset this cue without demanding any bonus -->
            <set_value name="$actor.money" exact="$actor.money - $actor.riskbonus"/>
          </actions>
          <cues>
            <cue name="Riskbonus_reset">
              <delay exact="10min"/>
              <actions>
                <reset_cue cue="Riskbonus"/>
              </actions>
            </cue>
          </cues>
        </cue>
      </cues>
    </library>
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

strude
Posts: 1471
Joined: Wed, 3. Aug 05, 08:15
x4

Post by strude » Thu, 17. Sep 15, 12:26

Can someone tell me what would cause this error?

Code: Select all

[=ERROR=] FATAL ERROR (version 3.60 - Code revision: 198327): A fatal error has occurred and X cannot recover:
VideoBaseClass::GetNewRenderQueue() Out of render queues
Version: 3.60 - Code revision: 198327

Please inform EGOSOFT GmbH technical support.
Last item in the log after crash to desktop. Crash occurred when I selected the button to open the mission briefing for one of the upkeep missions I've created.
Gaming PC: Gigabyte H270M-D3H | i7 7700 | 16Gb DDR4 | Gigabyte GTX1060 6Gb OC | Asus Xonar DGX | Window 10 Home 64bit | Samsung 256Gb SSD

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Thu, 17. Sep 15, 12:47

Sounds weird to me.. Can you provide the code creating this mission? My guess that this is caused by a missing video or animation in the briefing menu...
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Thu, 17. Sep 15, 12:48

Sounds weird to me.. Can you provide the code creating this mission? My guess that this is caused by a missing video or animation in the briefing menu...
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

strude
Posts: 1471
Joined: Wed, 3. Aug 05, 08:15
x4

Post by strude » Thu, 17. Sep 15, 12:51

I'll PM you.

EDIT Hopefully you got the PM. I noticed my sentbox was almost full, but it said sent, so I'll assume it did
Gaming PC: Gigabyte H270M-D3H | i7 7700 | 16Gb DDR4 | Gigabyte GTX1060 6Gb OC | Asus Xonar DGX | Window 10 Home 64bit | Samsung 256Gb SSD

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Thu, 17. Sep 15, 13:04

Received, but will look into it later when I am at home

Full sentbox doesn't matter btw - in this case the oldest will be deleted automatically AFAIK
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Post Reply

Return to “X Rebirth - Scripts and Modding”