[Modding] R&D and current findings

Discuss and distribute tools and methods for modding. Moderator - Grognak
chronial
Posts: 15
Joined: Tue Sep 25, 2012 12:17 am

Re: [Modding] R&D and current findings

Postby chronial » Thu Sep 27, 2012 2:53 pm

As a coder I can tell you that this is not "inverse of existent code" – it’s inconsistent, but the FTL devs do not seem to care about that too much in general :).

No, I did not play around with this – just had a very throughout look at the data files and I can guarantee you that FTL never does this. And from what I saw so far I assume that there’s barely any feature in there that works but is not used in the data files.

And well – you obviously already tried all the sensible options ^^.
User avatar
Kieve
Posts: 952
Joined: Tue Sep 18, 2012 2:21 pm

Re: [Modding] R&D and current findings

Postby Kieve » Thu Sep 27, 2012 5:26 pm

Figured posting this here would make the most sense.
In playing around with my Turn The Tide events stuff, I figured out that little hidden="true" tag in the <choice> parameters. Updated the wiki with information since it was out of date, but bottom line is it stops rewards stuff from showing up in the choice.
Example:

Code: Select all

<event name="TRADER_CIV"> <!--Event modified for example purposes -->
   <text planet="PLANET_POPULATED">You arrive at a quiet spaceport and are immediately hailed by another ship at port with a "once in a lifetime deal!"</text>
   <choice>
      <text>Trade.</text>
      <event>
         <item_modify>
            <item type="fuel" min="5" max="10"/>
            <item type="drones" min="-2" max="-1"/>
         </item_modify>
      </event>
   </choice>
   <choice>
      <text>Ignore.</text>
      <event/>
   </choice>
</event>


This returns as:
You arrive at a quiet spaceport and are immediately hailed by another ship at port with a "once in a lifetime deal!"
1. Trade. [Fuel: X, Drones: -X]
2. Ignore.


If the "trade" choice was <choice hidden="true"> then you'd just get:
1. Trade.
2. Ignore.


...and have no idea what you were trading.
It also seems to prevent unselectable "grayed out" options from appearing. IE, if you don't have a teleporter, a choice with req="teleporter" won't show, as opposed to being gray.
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [Modding] R&D and current findings

Postby Whale Cancer » Thu Sep 27, 2012 5:30 pm

Kieve wrote:Figured posting this here would make the most sense.
In playing around with my Turn The Tide events stuff, I figured out that little hidden="true" tag in the <choice> parameters. Updated the wiki with information since it was out of date, but bottom line is it stops rewards stuff from showing up in the choice.
Example:

Code: Select all

<event name="TRADER_CIV"> <!--Event modified for example purposes -->
   <text planet="PLANET_POPULATED">You arrive at a quiet spaceport and are immediately hailed by another ship at port with a "once in a lifetime deal!"</text>
   <choice>
      <text>Trade.</text>
      <event>
         <item_modify>
            <item type="fuel" min="5" max="10"/>
            <item type="drones" min="-2" max="-1"/>
         </item_modify>
      </event>
   </choice>
   <choice>
      <text>Ignore.</text>
      <event/>
   </choice>
</event>


This returns as:
You arrive at a quiet spaceport and are immediately hailed by another ship at port with a "once in a lifetime deal!"
1. Trade. [Fuel: X, Drones: -X]
2. Ignore.


If the "trade" choice was <choice hidden="true"> then you'd just get:
1. Trade.
2. Ignore.


...and have no idea what you were trading.
It also seems to prevent unselectable "grayed out" options from appearing. IE, if you don't have a teleporter, a choice with req="teleporter" won't show, as opposed to being gray.


Awesome find! I deleted that tag from a number of my events and, now that you point it out, I see that it does list amounts now that the tag is gone (I even add in a fake [ 2 Crewman ] to an event that adds two crewman, because it was inconsistent with how the other options were displaying!)
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!
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [Modding] R&D and current findings

Postby Whale Cancer » Thu Sep 27, 2012 5:33 pm

chronial wrote:As a coder I can tell you that this is not "inverse of existent code" – it’s inconsistent, but the FTL devs do not seem to care about that too much in general :).

No, I did not play around with this – just had a very throughout look at the data files and I can guarantee you that FTL never does this. And from what I saw so far I assume that there’s barely any feature in there that works but is not used in the data files.

And well – you obviously already tried all the sensible options ^^.


Have you looked through nameEvents.xml? That seems to be the only other place a function like this could exist.

Edit: That is the file I am currently examining.
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!
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: [Modding] R&D and current findings

Postby swixel » Thu Sep 27, 2012 7:20 pm

Whale Cancer wrote:Have you looked through nameEvents.xml? That seems to be the only other place a function like this could exist.

Edit: That is the file I am currently examining.


You can kill a specific member, but how that member is selected I haven't looked into. But given the prototype takes a string it's more likely to be by name ...
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [Modding] R&D and current findings

Postby Whale Cancer » Thu Sep 27, 2012 7:25 pm

swixel wrote:
Whale Cancer wrote:Have you looked through nameEvents.xml? That seems to be the only other place a function like this could exist.

Edit: That is the file I am currently examining.


You can kill a specific member, but how that member is selected I haven't looked into. But given the prototype takes a string it's more likely to be by name ...


Ok... why are you confident that you can do that? Did you not see my attempts upthread?

ON ANOTHER TOPIC: You can't seem to make <event load=""/> calls in the FLEET_EASY and FLEET_HARD events. FFS. Please someone tell me I am wrong.
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!
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: [Modding] R&D and current findings

Postby swixel » Thu Sep 27, 2012 8:00 pm

Whale Cancer wrote:
swixel wrote:You can kill a specific member, but how that member is selected I haven't looked into. But given the prototype takes a string it's more likely to be by name ...


Ok... why are you confident that you can do that? Did you not see my attempts upthread?


Because I'm detouring (read: actually modding with an injected DLL, and not just playing with data files). And the function exists to kill a specific member. I haven't touched the string-based interface, but I have pushed a pointer to kill them.
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: [Modding] R&D and current findings

Postby Whale Cancer » Thu Sep 27, 2012 8:04 pm

swixel wrote:
Whale Cancer wrote:
swixel wrote:You can kill a specific member, but how that member is selected I haven't looked into. But given the prototype takes a string it's more likely to be by name ...


Ok... why are you confident that you can do that? Did you not see my attempts upthread?


Because I'm detouring (read: actually modding with an injected DLL, and not just playing with data files). And the function exists to kill a specific member. I haven't touched the string-based interface, but I have pushed a pointer to kill them.


Ok, well, goodspeed then. I know a bunch of people are working on these more complex workarounds, but (1) I haven't seen anything useful emerge from this approach yet (this isn't a knock on people doing this, just a statement of fact) and (2) you could probably do any number of things when modding to that level; I think most people in this thread are discussing the basic XML modding we have access to.
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!
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: [Modding] R&D and current findings

Postby swixel » Thu Sep 27, 2012 8:08 pm

Whale Cancer wrote:but (1) I haven't seen anything useful emerge from this approach yet (this isn't a knock on people doing this, just a statement of fact)


Yeah ... there's some weird stuff between the OS builds alone (why am I finding Boost references in one, but not others?!) and the Steam binary is off limits due to protections.

That and I'm only doing it in spare time ... and this isn't exactly a quick study ;)

Whale Cancer wrote:(2) you could probably do any number of things when modding to that level; I think most people in this thread are discussing the basic XML modding we have access to.


You can do anything you want, even add new features. The problem is doing it without crashing the game.

In all seriousness, in many ways it's better to just re-implement than do what I'm doing ... but while I can use C# fairly proficiently, and I'm very capable with SFML, I don't think the Overdrive approach is a good one (C# would make an awesome scripting language being only one of my issues with it).


But my post here was more along the lines of: I've only seen the engine specifies these two functions for crew killing, and while there are other functions which may be used in conjunction, there's nothing "direct" in the parsing which suggests a class based kill, but there is a specific (which was my point).
chronial
Posts: 15
Joined: Tue Sep 25, 2012 12:17 am

Re: [Modding] R&D and current findings

Postby chronial » Thu Sep 27, 2012 11:55 pm

Kieve wrote:Figured posting this here would make the most sense.
In playing around with my Turn The Tide events stuff, I figured out that little hidden="true" tag in the <choice> parameters. Updated the wiki with information since it was out of date, but bottom line is it stops rewards stuff from showing up in the choice.
Example:

Code: Select all

<event name="TRADER_CIV"> <!--Event modified for example purposes -->
   <text planet="PLANET_POPULATED">You arrive at a quiet spaceport and are immediately hailed by another ship at port with a "once in a lifetime deal!"</text>
   <choice>
      <text>Trade.</text>
      <event>
         <item_modify>
            <item type="fuel" min="5" max="10"/>
            <item type="drones" min="-2" max="-1"/>
         </item_modify>
      </event>
   </choice>
   <choice>
      <text>Ignore.</text>
      <event/>
   </choice>
</event>


This returns as:
You arrive at a quiet spaceport and are immediately hailed by another ship at port with a "once in a lifetime deal!"
1. Trade. [Fuel: X, Drones: -X]
2. Ignore.


If the "trade" choice was <choice hidden="true"> then you'd just get:
1. Trade.
2. Ignore.


...and have no idea what you were trading.
It also seems to prevent unselectable "grayed out" options from appearing. IE, if you don't have a teleporter, a choice with req="teleporter" won't show, as opposed to being gray.

Ah, now that you say it i’m surprised I missed that – every (apart from 2 ^^) blue choice has the hidden attribute set. But there is one weird thing about hiding the rewards: the <itemModify> also has a "steal" attribute, that seems to do the same – do you know how they relate?