Slipstream Mod Manager v1.9.1 (2018-01-07)

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby 5thHorseman » Wed Jul 01, 2015 5:53 am

I may need my answers in dummy captain speak.

I'm playing around with the mod: tags and some things work while others don't. What I'm trying to do (and this is just to test how it works, I understand the RP pitfalls to trying to do this) is modify all crewMember tags with one big mod: replacement. This:

Code: Select all

<mod:findLike type="event">
   <mod-append:Foo>
   <test>Test!</test>
   </mod:append>
</mod:findLike>

works just fine. It appends <Foo><test>Test!</test></Foo> to every event.

This however does NOT work:

Code: Select all

<mod:findLike type="crewMember">
   <mod-append:Foo>
   <test>Test!</test>
   </mod:append>
</mod:findLike>


Nor does this:

Code: Select all

<mod:findLike type="event">
   <mod:findLike type="crewMember">
      <mod-append:Foo>
      <test>Test!</test>
      </mod:append>
   </mod:findLike>
</mod:findLike>


Is what I'm trying to do not possible? Is it possible but I'm just being thick?

Oh, and a HUGE thanks for that sandbox. It's makin learning this stuff not just easier, but actually possible.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
RAD-82
Posts: 796
Joined: Sat Nov 09, 2013 12:16 am

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby RAD-82 » Wed Jul 01, 2015 7:44 am

5thHorseman wrote:What I'm trying to do is modify all crewMember tags with one big mod: replacement.

Is what I'm trying to do not possible? Is it possible but I'm just being thick?
...
...
...
I want to say something, but it just seems so complicated.

I assume you want to make it so all crew that you find are ghosts, because I can't think of any other reason to edit all crewMember tags. This is possible, but it will require more effort than "one big mod: replacement." You'll have to use multiple search parameters multiple times, because crewMember tags are in multiple levels of code. The crewMember tag has to be in an event tag, but the event tag could be inside a choice tag (which is in another event tag), an eventList tag, or no tag at all. There is also another hurdle I noticed when searching through events.xml. I'll address that issue some other time, if necessary.
Image
Junkyard has FTL mods, mostly ships and a few other things.
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby 5thHorseman » Wed Jul 01, 2015 8:48 am

RAD-82 wrote:I assume you want to make it so all crew that you find are ghosts, because I can't think of any other reason to edit all crewMember tags. This is possible, but it will require more effort than "one big mod: replacement." You'll have to use multiple search parameters multiple times, because crewMember tags are in multiple levels of code. The crewMember tag has to be in an event tag, but the event tag could be inside a choice tag (which is in another event tag), an eventList tag, or no tag at all. There is also another hurdle I noticed when searching through events.xml. I'll address that issue some other time, if necessary.


Your post triggered a eureka moment for me. Suddenly I get it. If you want to change a crewMember tag within an Event tag within a Choice tag that is itself within an Event tag, then you have to nest them. The outer search will only find things on the top. So you need:

Code: Select all

<mod:findLike type="event">
   <mod:findLike type="choice">
      <mod:findLike type="event">
         <mod:findLike type="crewMember">
         <mod-append:Foo>
         <test>Test!</test>
         </mod:append>
      </mod:findLike>
   </mod:findLike>
</mod:findLike>


Thank you!
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
karadoc
Posts: 25
Joined: Mon Jan 27, 2014 12:01 pm

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby karadoc » Wed Jul 01, 2015 8:50 am

I generally don't like having java installed on my computer, so I've created a standalone version of Slipstream Mod Manager v1.6 by compiling it with "Excelsior JET".

So if you want a native windows binary, which doesn't require any java installation, here it is. I've uploaded it to Atomic Gamer because it's too big to upload as an attachment to this post. (It's much bigger than the normal version because it includes the stuff it needs from java.) The advantage is that you don't need to install java to run it.

Note. This is exactly the same program. I haven't changed any code whatsoever (or even looked at the code). I simply opened the files with Excelsior JET and followed the steps to create a stand alone native windows app. The only difference between this version and the normal version is that this version works without having to install java.

Please let me know if something doesn't quite work right (but does work with the java version) - I've only done the bare minimum of testing and I could easily have missed something. And Vhati, if you disapprove of this version, let me know and I'll remove it.
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby 5thHorseman » Wed Jul 01, 2015 10:36 am

Okay getting more nitty gritty, other than being able to add dummy xml code that doesn't work, I can't seem to get anything to work. So, I figured I'd just state what I want and see if someone can help me with the code. It's a lot of work for me, but hopefully once I see how to do it once I'll be all set.

On the highest level, I want, for each time you'd get a new crew member, to get something else instead. Scrap, a few hull points, whatever I decide. I'll be doing it on an event-by-event basis so I don't need to work on this generally.

Slightly lower level, what it seems I want is to find each <crewMember> tag, remove it (and ideally the text that goes along with it) and replace it with something else. For example, this is a simple eventlist block in the game that gives you a crew member:

Code: Select all

<eventList name="STRANDED_CHARLIES"> <!--DLC!-->
   <event>
      <text>He states that he was a weapons operator before being stranded. He happily offers his services for a time in exchange for "getting off that rock".</text>
      <crewMember weapons="1" amount="1">Charlie</crewMember>
   </event>
   <event>
      <text>He states that he was a shield operator before being stranded. He happily offers his services for a time in exchange for "getting off that rock".</text>
      <crewMember shields="1" amount="1">Charlie</crewMember>
   </event>
   ...etc
</eventList>


I would like, when all done, it to look something like this:

Code: Select all

<eventList name="STRANDED_CHARLIES"> <!--DLC!-->
   <event>
      <text>The stranded crewman takes one look at your ship and says, "Look, you look like nice people and all, but I think I'll take my chances with the next ship. But because you were so willing to help, I've got some spare parts here and can fix up your hull a bit."</text>
      <damage amount="-3"/>
   </event>
   <event>
      <text>The stranded crewman takes one look at your ship and says, "Look, you look like nice people and all, but I think I'll take my chances with the next ship. But because you were so willing to help, Take this bit of scrap from my old crashed ship. Better off with you than just lying around here."</text>
      <autoReward level="LOW">scrap_only</autoReward>
   </event>
   ...etc
</eventList>


Is there a way to do this with the mod: tags that's easier than just going in and changing every event? I'm trying to avoid that for several reasons, one being that I want to learn this stuff and 2 being that I don't like distributing files with a lot of the exact text that's in the game's dat file.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby kartoFlane » Wed Jul 01, 2015 11:57 am

The most straightforward approach would be to remove all of the Charlie variants, and then add your own:

Code: Select all

<mod:findLike type="eventList" name="STRANDED_CHARLIES">
    <mod:findLike type="event">
        <mod:removeTag/>
    </mod:findLike>

    <mod-append:event>
        <text>....</text>
        <damage amount="-3"/>
    </mod-append>
    <mod-append:event>
        <text>....</text>
      <autoReward level="LOW">scrap_only</autoReward>
    </mod-append>
    <!-- etc... -->
</mod:findLike>

(no time to check whether this works/is written correctly, though)
Superluminal2 - a ship editor for FTL
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby 5thHorseman » Wed Jul 01, 2015 1:01 pm

MAJOR EDIT
It works with one modification (that surprise surprise I figured out on my own). That first line should be findName, not findLike.

You're still helping though, I have a much stronger understanding of what mod-append does now. And my ability to fix the problem with the code can only be a good sign.

Though any indication how to use findLike would help. It doesn't seem to do what I expect it to do. I do something like this:

Code: Select all

<mod:findName type="eventList" name="STRANDED">
   <mod:findLike type="event">
      <mod:findLike type="choice" req="medbay">
         <mod:findLike type="event">
            <mod:removeTag/>
         </mod:findLike>
         <mod-append:event>
            <text>You fix him up. He fixes your ship and sends you on your way.</text>
            <damage amount="-5"/>
         </mod-append:event>
      </mod:findLike>
   </mod:findLike>
</mod:findName>


and it seems to me that putting req="medbay" in there should only find choices that have req="medbay" in them. But it doesn't. It finds all the choices. How do I selectively only edit the choice that has req="medbay" in it? Or can I not?
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby kartoFlane » Wed Jul 01, 2015 2:35 pm

You need to put a <mod:selector> tag inside of the findLike; example:

Code: Select all

<mod:findLike ...>
    <mod:selector req="medbay"/>
    <!-- the rest... -->
</mod:findLike>
Superluminal2 - a ship editor for FTL
User avatar
5thHorseman
Posts: 1668
Joined: Sat Mar 02, 2013 2:29 am

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby 5thHorseman » Wed Jul 01, 2015 11:17 pm

kartoFlane wrote:You need to put a <mod:selector> tag inside of the findLike; example:

Code: Select all

<mod:findLike ...>
    <mod:selector req="medbay"/>
    <!-- the rest... -->
</mod:findLike>


EDIT: AHA. I think I see. You don't wrap it in the selector tag, you put it after it. The documentation says to wrap it in the selector tag.

This:

Code: Select all

<mod:findName type="eventList" name="STRANDED">
   <mod:findLike type="event">
      <mod:findLike type="choice">
         <mod:selector req="medbay">
            <mod:findLike type="event">
               <mod:removeTag/>
            </mod:findLike>
            <mod-append:event>
               <text>You fix him up. He fixes your ship and sends you on your way.</text>
               <damage amount="-5"/>
            </mod-append:event>
         </mod:selector>
      </mod:findLike>
   </mod:findLike>
</mod:findName>


...doesn't replace anything.

But this:

Code: Select all

<mod:findName type="eventList" name="STRANDED">
   <mod:findLike type="event">
      <mod:findLike type="choice">
         <mod:selector req="medbay"/>
         <mod:findLike type="event">
            <mod:removeTag/>
         </mod:findLike>
         <mod-append:event>
            <text>You fix him up. He fixes your ship and sends you on your way.</text>
            <damage amount="-5"/>
         </mod-append:event>
      </mod:findLike>
   </mod:findLike>
</mod:findName>


...works like a charm.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
wadusher0
Posts: 5
Joined: Sun Aug 23, 2015 5:24 am

Re: Slipstream Mod Manager v1.6 (2014-10-25)

Postby wadusher0 » Sun Aug 23, 2015 5:41 am

karadoc wrote:So if you want a native windows binary, which doesn't require any java installation, here it is. I've uploaded it to Atomic Gamer because it's too big to upload as an attachment to this post. (It's much bigger than the normal version because it includes the stuff it needs from java.) The advantage is that you don't need to install java to run it.


For some reason my mod manager thinks I don't have java installed and refuses to start, even though I have the latest version. I would like to download this java-independent version of the mod manager, but the site doesn't seem to exist. Can you or somebody who's downloaded this file post a Mediafire link to it?