Need a bit of Mod Help (Simple Choices / Resources on Start)

Discuss and distribute tools and methods for modding. Moderator - Grognak
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: Need a bit of Mod Help (Simple Choices / Resources on St

Postby Icehawk78 » Mon Oct 01, 2012 8:22 pm

Commander Bob wrote:Um, got a small example of that? ;x


Actually, looking at it, it appears each sector aready does have a different START_BEACON_SECTORNAME event. I've not played with this much - do each of these events inherit the root START_BEACON event as well?

(For example, if you added a "give me free stuff" choice to the START_BEACON event, would it load when START_BEACON_PIRATE is loaded, the same way the START_GAME event does?)

If you change every <sectorDescription>'s <startEvent> contents to be CUSTOM_EVENT, and then add this in events.xml:

Code: Select all

<event name="CUSTOM_EVENT">
  <text>Custom Event text</text>
  <choice>
    <text>Custom Event Choice</text>
    <event/>
  </choice>
</event>

<event name="START_BEACON">
  <text>Start Beacon text</text>
  <choice>
    <text>Start Beacon Choice</text>
    <event/>
  </choice>
</event>


Upon entering the second sector, what do you see?
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: Need a bit of Mod Help (Simple Choices / Resources on St

Postby Icehawk78 » Mon Oct 01, 2012 8:31 pm

totalvamp wrote:I'm trying something similar, what I need is nested questions for like an options menu. The problem is; how will I be able to remember what a player chose for fleet disabled? It needs to be saved somewhere.

Also how can you link that many question together? I think we are kind of looking for the same answers.

Question 1: want some extra scrap?
Yes
Skip
Question 2: Want fleet disabled?
Yes
Skip
Question 3: Want extra fuel?
Yes
Skip
Question 4: Want extra missiles?
Yes
Skip
Question 5: Want extra drone parts?
Yes
Skip

This is how I'd envision doing this:

Code: Select all

<event name="BONUS_SCRAP">
   <text>Want more scrap?</text>
   <choice>
      <text>Yes!</text>
      <event>
         <text>You receive some scrap.</text>
         <item_modify>
            <item type="scrap" min="100" max="100" />
         </item_modify>
         <choice>
            <event load="FLEET_DISABLE" />
         </choice>
      </event>
   </choice>
   <choice>
      <text>Nope!</text>
      <event load="FLEET_DISABLE" />
   </choice>
</event>
<event name="FLEET_DISABLE">
   <text>Want more scrap?</text>
   <choice>
      <text>Yes!</text>
      <event>
         <text>The fleet has been disabled for this sector.</text>
         <modifyPursuit amount="-100000"/>
         <choice>
            <event load="NEXT_QUESTION" />
         </choice>
      </event>
   </choice>
   <choice>
      <text>Nope!</text>
      <event load="NEXT_QUESTION" />
   </choice>
</event>

<!-- etc -->
Commander Bob
Posts: 11
Joined: Mon Sep 24, 2012 11:24 pm

Re: Need a bit of Mod Help (Simple Choices / Resources on St

Postby Commander Bob » Tue Oct 02, 2012 1:11 am

Icehawk78 wrote:Upon entering the second sector, what do you see?


I saw Custom Event Choice for every start beacon (including the start of the game).

Seems that I can get something displaying for ALL beacons with that. (Or ones for specific sectors), but I can't have something available ONLY at the start of the game without some wierd augment fiddling or a different approach? It seems the Sector startEvent fires for the very first beacon as well, because of course that's entering a sector like any other. What I'm trying to do is differentiate the start of the game, (as in the very first beacon) from all the others.

I tried putting "Have some free scrap!" in the Start_Game event but that didn't help, never saw it, I only saw "Have some free fuel!" Same for all following sectors. (This code is just for testing btw):

Code: Select all

<event name="START_GAME">
   <text>The data you carry is vital to the remaining Federation fleet. You'll need supplies for the journey, so make sure to explore each sector before moving on to the next. But get to the exit before the pursuing Rebel fleet can catch up!</text>
<choice>
    <text>Have some free scrap!</text>
    <event>
<autoReward level="HIGH">scrap_only</autoReward>
</event>
  </choice>
</event>

<event name="CUSTOM_EVENT">
  <text>Custom Event text</text>
  <choice>
    <text>Have some free Fuel!</text>
    <event>
<autoReward level="HIGH">fuel_only</autoReward>
</event>
  </choice>
</event>

<event name="START_BEACON">
  <text>Start Beacon text</text>
  <choice>
    <text>Start Beacon Choice</text>
    <event/>
  </choice>
</event>

So yeah I'm thinking of the following kind of options, just struggling to implement it hehe:

Start Game ONLY:
  1. Continue... (Vanilla play)
  2. Fleet Delay
  3. Fuel + Scrap.
  4. Fuel + Scrap + Fleet Delay

All Other Beacons:
  1. Continue... (Vanilla)
  2. Fleet Delay
  3. Fuel Only

Also can randomness of damage be implemented? Like it does with some of the in-game events where there's a chance for it to go wrong. I've seen the _List sections of the events, just don't know if I can write my own version of those that the game will automatically pick up on. Basically I'd want to give a random chance for 1 dmg on picking the Fleet Delay option (reactor stress), and 2 dmg on picking the fuel / scrap options. (Mining going wrong). That way it would have an element of risk when trying to choose those options hehe. (But still give the reward). Of course that's only a concept in my mind at the moment, and is for later consideration after I've got this bit working. :)