[MOD][WIP] Extra scoop of vanilla

Discuss and distribute tools and methods for modding. Moderator - Grognak
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby Whale Cancer » Tue Oct 09, 2012 9:56 pm

cogitator wrote:Looking through the code I've come up with a new question for you smart people out there. Sometimes in the code there is a choice hidden tag that does not seem to actually hide the choice.


The hidden tag hides the reward you receive from selecting that option. If a choice that grants a reward does not have this tag, the reward is listed in parenthesis after the choice itself. It has nothing to do with hiding the choice from the player (that can only be done with 'req').
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
User avatar
Kieve
Posts: 952
Joined: Tue Sep 18, 2012 2:21 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby Kieve » Wed Oct 10, 2012 2:03 am

Whale Cancer wrote:
cogitator wrote:Looking through the code I've come up with a new question for you smart people out there. Sometimes in the code there is a choice hidden tag that does not seem to actually hide the choice.


The hidden tag hides the reward you receive from selecting that option. If a choice that grants a reward does not have this tag, the reward is listed in parenthesis after the choice itself. It has nothing to do with hiding the choice from the player (that can only be done with 'req').


Not entirely accurate.
A hidden tag does two things - the first as you said above.
The second is, it will hide a choice the player does not meet the requirements of. If a choice has requirements but not hidden, it'll be grayed out.
cogitator
Posts: 35
Joined: Sat Oct 06, 2012 1:04 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby cogitator » Wed Oct 10, 2012 7:24 pm

Okay, last night I tried a test run before things get too serious. Using grognak's mod manager and .ftl files, everything is fine at first. The mod manager repacks the data no problem. Then I open FTL and after loading is complete,it freezes and gives me a c++ error.

I read around a bit and found it could be the encoding I was using... tried ANSI and UTF8 to no avail. Double checked all my syntax, no loose bits or anything there. So I tried with ftldat, unpacked, added my events to the end of events.xml, repacked.

Same c++ error! Any insight? I'm happy to load the .ftl if that helps.
First playable release of Extra Scoop is out! Download Link!
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby Icehawk78 » Wed Oct 10, 2012 9:21 pm

cogitator wrote:Okay, last night I tried a test run before things get too serious. Using grognak's mod manager and .ftl files, everything is fine at first. The mod manager repacks the data no problem. Then I open FTL and after loading is complete,it freezes and gives me a c++ error.

I read around a bit and found it could be the encoding I was using... tried ANSI and UTF8 to no avail. Double checked all my syntax, no loose bits or anything there. So I tried with ftldat, unpacked, added my events to the end of events.xml, repacked.

Same c++ error! Any insight? I'm happy to load the .ftl if that helps.

Could you post the error? That might give some insight.

Also, verify that:

1) You don't have any XML errors
2) Every <choice> tag has an immediate child <event> tag (even if it's just an <event/>)
3) You didn't misspell any tag/attribute names
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby Whale Cancer » Wed Oct 10, 2012 11:03 pm

Kieve wrote:
Whale Cancer wrote:
cogitator wrote:Looking through the code I've come up with a new question for you smart people out there. Sometimes in the code there is a choice hidden tag that does not seem to actually hide the choice.


The hidden tag hides the reward you receive from selecting that option. If a choice that grants a reward does not have this tag, the reward is listed in parenthesis after the choice itself. It has nothing to do with hiding the choice from the player (that can only be done with 'req').


Not entirely accurate.
A hidden tag does two things - the first as you said above.
The second is, it will hide a choice the player does not meet the requirements of. If a choice has requirements but not hidden, it'll be grayed out.


I tip my hat to you, sir.

It seems counter-intuitive (to me) that the same tag does two relatively different things, but I suppose it is more efficient.
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
cogitator
Posts: 35
Joined: Sat Oct 06, 2012 1:04 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby cogitator » Thu Oct 11, 2012 3:34 am

Icehawk78 wrote:(...)
Also, verify that:

1) You don't have any XML errors
2) Every <choice> tag has an immediate child <event> tag (even if it's just an <event/>)
3) You didn't misspell any tag/attribute names


All good advice.

1) I have already checked my xml, unless there is something I'm just not seeing everything should be good to go. The only bits that are slightly weird are copied over from the original game files. Beyond that, everything is in pairs, open/close, etc.
2) Ah, at first I thought it might be this problem, which I discovered thanks to a post by Justin a while ago. But no, I am not (that) noob-ish.
3) This one had me for a sec because I realized I didn't know what the sensors were referred to in the xmls... then I looked and found they are called sensors. So good on that, too.

Image

Pretty darn generic error. Most of my events are built using other pre-existing examples as reference, so I think they are mostly right.

https://www.dropbox.com/s/dpqmn4nmx597l75/newvents.xml

There's a link to the version that I am currently trying to get to work. Any help is much appreciated folks!
First playable release of Extra Scoop is out! Download Link!
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby Icehawk78 » Thu Oct 11, 2012 3:42 am

Silly question, but... is it actually called "newvents.xml" rather than "newevents.xml"? Additionally, aren't the START_GAME and START_BEACON events originally in "events.xml" not "newevents.xml"? (I'm not certain that either of these are the issue, but those are my first two guesses.)

Also, are you using a full copy of the original XML, or using the .xml.append files? If the latter, could you instead post one of those? (So we can see only the changes you're making, rather than looking at the entire file.) If not... why not? :P
cogitator
Posts: 35
Joined: Sat Oct 06, 2012 1:04 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby cogitator » Thu Oct 11, 2012 3:54 am

Ah yes. The file I've been working on is called newvents.xml, but for the transfer over, it is renamed to events.xml.append, zipped, and renamed with .ftl as the extension.

Believe it or not, all I've posted is the stuff which I have changed. There is some duplicate text in there because I still want to include the original events without replacing them all with my new work.

If you look towards the bottom you'll find the start events. For now I am using the code from the no-pursuit mod in order to give me more time to explore and test the mod... if I can get it to work.
First playable release of Extra Scoop is out! Download Link!
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: [MOD][WIP] Extra scoop of vanilla

Postby Icehawk78 » Thu Oct 11, 2012 4:04 am

cogitator wrote:Ah yes. The file I've been working on is called newvents.xml, but for the transfer over, it is renamed to events.xml.append, zipped, and renamed with .ftl as the extension.

Believe it or not, all I've posted is the stuff which I have changed. There is some duplicate text in there because I still want to include the original events without replacing them all with my new work.

If you look towards the bottom you'll find the start events. For now I am using the code from the no-pursuit mod in order to give me more time to explore and test the mod... if I can get it to work.

Ah, okay. I'll have to look a little closer in a bit - I skipped over most of it, thinking it was just the original XML. My apologies!
Old Uncle Midwinter
Posts: 14
Joined: Thu Oct 11, 2012 3:59 am

Re: [MOD][WIP] Extra scoop of vanilla

Postby Old Uncle Midwinter » Thu Oct 11, 2012 5:07 am

I'm not planning to log on to this forum more then once or twice a week - my sciatica aches at social interaction :lol: - but I would like to contribute to this mod however I can. To me, it's not only that the choices in-game are cut and dry; most of them, even on my first run seemed inane. My favorite example is one where, upon boarding a slaveship, the slaves looked at my (inept, but Kirkish) captain and asked if they would be free. I had the option to press-gang one of three people into my crew as "... you need more crew..." despite having had a full compliment since quadrant three. And as someone who tries to actually create a story, the fact I had no option but to press-gang a former slave into service didn't sit quite right with me.

I'd add:

Code: Select all

<choice>
               <text>Release all the slaves.</text>
               <event>The slaves stare at you, in confusion and blank exhaustion at first; then a growing feeling of celebration washes over the recently abandoned - re-purposed, you should say - slaver craft. You try to slip away quietly after making sure engines and shields will get the liberated to somewhere as safe as can be in this sector, when a tug at your shoulder stops you. A Engi wearing the shreds of a military uniform mentions a previous career in the Federation military, and a possible safe-house you should check out. Flush with a possible lead as well as having made the galaxy a little bit brighter, you step back onto the bridge.</event>
                <WhateveraddsaQuestBeaconInThisSector,Here>
<text>One or more could be rebel sympathizers. Shoot out the airlocks.</text>
<event>A feeling of intense guilt washes over you, but you brush it off. Closing your eyes, you send an order to Fire Control to hit the airlocks. After some time, the confusion and yelling has died down and you have opened your eyes - a boarding party is sent to explore the eerily silent remains, purged of slaver and slave alike. They find nothing of value, save for a beacon navpoint located amongst the corpse of an Engi in a badly tattered military uniform. Once the party is back on board, you give the order to fire on the ship - a burial at sea is the least you can give the dead. </event>
<WhateveraddsaQuestBeaconInThisSector,Here2>
</choice>


Now these two events each give you an extra choice that flags a hopefully near-by beacon, though with a differing flag for each option. Upon visiting the quest-marked beacon if you liberated all the slaves...

Code: Select all

<eventList name="Federation Outpost Mozambique">
   <event>
      <text>Following the beacon route obtained from the freed Engi, you soon set sights on what appears to be a relatively sparse and inhabitable planetoid. A deep scan reveals a network of artisan wells and bases deep below the planet surface, however. The route guides you over to what appears to be a sparse crater...</text>
      <choice>
      <random_chance 1 %75, 2 %10, 3 %10, 4 %5>
         #1<event>
            <text>... and Federation navigation lights rise out of seeming emptiness to guide you home. For the first time in a long time, your crew has the luxury of showers, hydroponically grown food that tastes like something other than dessicated protein tablets, and conversation about something other than the impending rebel fleet. But the moment is over soon enough, and as your ship is refitted and repaired the base gives you what resources they can and offer to sell you anything you can afford.</text>
<repair_hull_full>
</repair_hull_full>
<item_modify>
               <item type="scrap" amount="28"/>
<item_modify>
               <item type="fuel" amount="3"/>
<open_shop>
                </open_shop>

            <crewMember amount="1">Charlie</crewMember>
         </event>
#2<event>
            <text>... and observe the destruction visible even from above. This base has long since been cleared out by the Rebels or pirates; you are glad the Engi is not here to see what happened to the base. You send a team to search for supplies, and find nothing but some personal recordings and effects of the previous occupants. You take them as a memoir for when this war is over, and prepare to FTL jump. There is nothing for you here.</text>
#3<event>
            <text>... and are surprised as a Rebel Cruiser jumps out of hiding! It was a trap, an ambush! You realize the Engi's uniform was damaged so badly you could not make out the Rebel insignia... Cursing yourself and hoping the ship still made it away safely, your crew has already gotten engines hot and weapons ready. It looks like only this Cruiser was here right now. [i]Perhaps,[/i] you think grimly to yourself [i]this will be a little blessing in disguise after all.[/i]</text>
             <trigger_battle "REBELCRUISER">
             </trigger_battle>
                   <event>
                    <text>After defeating the cruiser, you not only plunder it but search the base - luckily for you, most of it's strike force were out on missions, making mop-up easy even for your skeleton crew. Not only do you find navigation coordinates for the rest of the sector, there is a large store of fuel and munitions lying around! And on top of that, one of your crew added a little something the next time the Rebels dock in to refuel!</text>
<beacon_awareness_sector>
</beacon_awareness_sector>
<delay_rebel_fleet>
</delay_rebel_fleet>
<item_modify>
 <item type="fuel" amount="6"/>
               </item_modify>
<item_modify>
 <item type="missiles" amount="8"/>
               </item_modify>
#4<event>
            <text>... and to your dismay realize that the base is a Rebel outpost. As you are about to silently jump away, however, a hail comes through to your craft - hesitantly, you answer. "Hello, Captain. We've received word you assisted one of our own - normally we would have every right to fire on you, for the good of the Rebellion. However, it also appears circumstances have changed somewhat. If you dock, we can repair your ship and sell you some supplies. Consider it the least we can do." After you leave, the Rebels even throw in some extra fuel - after all, both sides win if you keep moving, right?</text>
<repair_hull_moderate>
</repair_hull_moderate>
<open_shop>
                </open_shop>
                 <item_modify>
 <item type="fuel" amount="4"/>
               </item_modify>
</choice>



But what if you decided to take out every living thing, in the interest of security?

Code: Select all

<eventList name="Unknown Military Outpost">
   <event>
      <text>Following the beacon route obtained from the corpse of an Engi enlistee, you set course for a desolate world composed of high pressure and ice; you are unsure what military operation would see fit to set up camp here, as even though you doubt the Rebellion would come looking for anyone in this wasteland, the costs and safety risks for such a base are nightmarish... To say the least. Something comes drifting onto communications - something peculiar.</text>
      <choice>
      <random_chance 1 %15, 2 %25, 3 %25, 4 %15, 5 %20>
         #1<event>
            <text>A series of numbers looping endlessly in a sequence. It appears to be an espionage missive or code of some kind, though your team can't make any sense out of it, where it came from, or it's purpose. Even the sender - Federation, Rebellion, some unknown party - remains an enigma. The voice repeating the numbers, that of a young child sounding entirely too happy, begins to grate on the nerves of your crew and you give the orders to jump.</text>
</event>
#2<event>
            <text>The worried voice and blurry image of a Zoltan science officer asks you who you are, how you found this location, and where Askelion. The words blur together into a run-on sentance, and you have the unpleasant feeling you know who Askelion is. Honesty and your duty to the Federation compel you to give an honest answer, and the Zoltan goes quiet. There is no further communication; it would probably be best for you to leave.</text>
</event>
#3<event>
            <text>The communication is from a Rebel science base! Being unarmed and somewhat amused that you've stumbled upon their locale, they make clear that they have no intent of hostile engagement. In the atmosphere such as this, it would likely be suicide for both you, anyway. Though they are curious to hear how you arrived here, you decline to tell them, a pang of guilt making you wonder if you've just lived up to the rumors of some Federation officers you hear tell of in the ports. After some small talk, they offer you some cautious well-wishes (considering the circumstances), fuel, and non-lethal weaponry, and usher you on your way.</text>
               <item_modify>
 <item type="fuel" amount="3"/>
               </item_modify>
              <item_modify>
 <item type="random_ion_weapon" amount="1"/>
               </item_modify>
</event>

#4<event>
            <text>After some time aligning video and sound quality, you are able to establish that this is a Federation forward base! Excitement washes over the crew as you establish communications with the leader of a small, elite military recon team. It is in those feverish moments that the explanation of exactly how you discovered the base slip out of your mouth, almost as if you aren't even speaking them. The comm goes dead, for what seem like hours. The only sound you hear is the sound of ice grinding against ice and shattering into thousands of pale blue shards. "... Get out of here." The words contain more venom than you have heard even in the threats of pirate scum and Rebel commandants. You wait hesitantly, and the recon leader repeats it. Feeling nauseous, you make plans to jump into FTL.</text>
</event>

#5<event>
            <text>A rebel forward base? On this desolate hunk of ice? It'd be almost humorous, if the atmosphere weren't suddenly so tense. What makes it more shocking is that they knew you were coming. Apparently, an Engi rebel had been sent into deep recon to monitor and crush the local slaver threat... And send you here if discovered by Federation forces. The base has no weaponry however - and the unpleasant garrison commander keeps laughing like a hyena. "So you killed the double agent... Who would've tried to kill you..! It's just, it's just too funny!" One of your crew silent signals you; you have some options. Do you loot the base for whatever scrap it might have, or simply set course and leave?</text>
                             <choice>
                                  <text>Set fire to the jackals and take what scrap you can.</text>
                                    <event>
                                       <text>Your crew silently eradicates the rebel base and procures quite a bit of scrap from the wreckage. No one says a word, and all of you remain deep in thought. Still, the scrap will be useful - perhaps the detour wasn't pointless, though it did bring with it new doubts and reawaken lingering ones...
                                         </text>
                                       </event
                                     <text>Leave. They have no high-range comm equipment. This place has nothing for you.
                                      </text>
                                         <event>
                                            <text>The Rebel commander goes silent as you fire up your engines, then pages you through the comm, one last time. "We're all going to die here, you know. You, me, everyone. Everyone, dead. You're just prolonging it by running. So run! Run as far as you can! Soon, there won't be anywhere left to run!" His laughter is the last thing you here as you jump out of the sector... Though you detect the strange feeling of lingering regret.</text>
                                             <delay_rebel_fleet>
                                              </delay_rebel_fleet>

                                          </event>
                                           </choice>
</event>


And there you have it; my code is sloppy and I don't know what goes where or what stands for what in this, but I'm sure it'll be easy enough to clean up. Good luck, commodore. I'm looking forward to some more delicious vanilla!