Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by meklozz »

RAD-82 wrote:
fdagpigj wrote: is there any way to test for total number of crew (of all races)?
You need a blueprintList containing all the races to do this.
I don't think specifying the lvl works the same for lists, it might just check whether the number of any of the races in the list satisfies the requirement or not even do anything at all. Meh, I'll give it a try.

@edit
Yeah, adding a level requirement to a list with crew seems to make it impossible to trigger.
sul
Posts: 121
Joined: Sat Jan 30, 2016 4:22 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by sul »

fdagpigj wrote:1. How does a heal bomb know it shouldn't heal enemy crew? Is it hardcoded that negative damage will only affect your crew? If so, does that only apply to persDamage or also normal damage?
2. Do the <locked> tag, which appears on bombs, ion weapons, and drones, and the <bp> tag, which appears on most blueprints, do absolutely nothing (in which case, why the heck are they still on post-AE content?)?
3. What factors (that we can change) affect enemy generation? In particular, how do they pick the weapons/drones - does it go by the same rarity as stores?
4. Does any of the stuff in nameEvents.xml work? After a bit of searching here on the forums it sounds like you can test for the amount of crew of a specific race with something along the lines of <choice req="engi" lvl="2"> with the lvl defining how many crew you need. Can anyone confirm, and if it's true, is there any way to test for total number of crew (of all races)?
3) The crew, weapons and drones are defined in the "shipBlueprint" structure of the enemy (most, but not all, are in autoBlueprints.xml).
Total crewmembers is part random/part depending on how advanced in game you are, but always >=amount and <=max.
Weapons and drones are usually chosen randomly in a list, and how much depends on available power in the system.
rarity does not affect any of those. You can also change augments, ship hull, available power, etc in that structure.

In a few rare cases, there are some override changes to this in the "ship" structure that calls the enemy ship (most are in event_ships.xml). The ship structure is found in events to load the enemy ship during storyline. Sometimes the crew is swapped to certains races with prop, sometimes some weapons are swapped using weaponsOverride. Here is an example of ship structure that does it:
<ship name="SCRSHIP_TEST" auto_blueprint="MANTIS_BOMBER">
<crew><crewMember type="crystal" prop="1"/></crew>
<weaponOverride count="3"><name>ION_STUN</name><name>ION_STUN</name><name>ION_STUN</name></weaponOverride>
</ship>

You can either define new enemy ships (shipBlueprint and ship) or change existing ones. The Slipstream tools (mod-append, modfindLike, etc) are very useful to make some global changes, you can read FASTER WEAPONS for example on my CRAZE page (sorry for blatant advertising) or other mods: http://www.ftlgame.com/forum/viewtopic.php?t=29027
User avatar
RAD-82
Posts: 795
Joined: Sat Nov 09, 2013 12:16 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by RAD-82 »

I'm not quite understanding what meklozz is saying, but I know it can't be to prove me wrong, since I know what I was saying. edit: I'm mistaken, and the rest of this post didn't work how I thought it would.

Example:

Place this in a valid blueprint file:

Code: Select all

<blueprintList name="CREW_COUNT">
	<name>human</name>
	<name>engi</name>
	<name>mantis</name>
	<name>slug</name>
	<name>rock</name>
	<name>crystal</name>
	<name>energy</name>
	<name>anaerobic</name>
	<name>ghost</name>
</blueprintList>
Now you can make choices that can require a specific number of crew, regardless of race:

Code: Select all

<event name="CREWCOUNT_TEST">
	<text>Some examples of choices using a blueprintList as their requirement.</text>
	<choice req="CREW_COUNT" lvl="0" max_lvl="0">
		<text>No crew here.</text>
		<event>
			<text>This ship is AI controlled, unless you lost the last of your crew in the event chain leading up to this point and the game might be waiting for the event chain to end in order to say game over.</text>
		</event>
	</choice>
	<choice req="CREW_COUNT">
		<text>Crew exist here.</text>
		<event>
			<text>There is crew on this ship, but I don't know how many.</text>
		</event>
	</choice>
	<choice req="CREW_COUNT" lvl="4" max_lvl="5">
		<text>Four or five.</text>
		<event>
			<text>In total, there is either four or five crew on this ship.  I don't know what race they are.</text>
		</event>
	</choice>
</event>
Last edited by RAD-82 on Thu Mar 31, 2016 8:10 am, edited 1 time in total.
Image
Junkyard has FTL mods, mostly ships and a few other things.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by meklozz »

RAD-82 wrote:I'm not quite understanding what meklozz is saying, but I know it can't be to prove me wrong, since I know what I was saying.
I realize now I forgot to say 0 or 1 does work, I'm sorry. But I'm not getting any reaction whatsoever from a higher number, just Continue or 'crew exists here' if I leave it around.
That's what I meant by the lists not working the same way (and seems the same for systems) - it can check for their existence, but while normally lvl refers to different kinds of thing like number or power bars, I guess it can't check for anything specific here.
User avatar
RAD-82
Posts: 795
Joined: Sat Nov 09, 2013 12:16 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by RAD-82 »

I thought I've tested this in the past with a list of weapons, but maybe I've remembered wrong. Perhaps lvl can't apply to multiple types of objects. I can't test anymore, so sorry if I gave bad info. Your response clarified the situation for me.
Image
Junkyard has FTL mods, mostly ships and a few other things.
User avatar
stylesrj
Posts: 3638
Joined: Tue Jul 08, 2014 7:54 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by stylesrj »

So anyway, I want to make a replacement for the Federation Artillery for one of my ships but I still want it to count as Federation Artillery for certain events in Captain's Edition...

How would I go about doing that without having to rewrite all those events that require the Federation Artillery?
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by meklozz »

stylesrj wrote:So anyway, I want to make a replacement for the Federation Artillery for one of my ships but I still want it to count as Federation Artillery for certain events in Captain's Edition...

How would I go about doing that without having to rewrite all those events that require the Federation Artillery?
The bad news is you're going to have to rewrite something. Events will be more compatible.

The good news is Slipstream can largely do it for you. Just use the advanced tags to change the req, then put it into some <mod:findLike..> tags on different levels (so it changes them at any depth, whether they're right in the first <event> or deep under several choices). Gencool does it in a couple of mods, like DSTR with the boarders. Then you paste it into any file that has events, done.

You could also just change the whole weapon if you don't care about the ability to play the original fed ships while yours is installed.



A little bit of an example:

Code: Select all

<mod:findLike>
	<mod:findLike type="choice">
		<mod:selector req="ARTILLERY_FED"/>
		<mod:setAttributes req="ARTILLERY_FED_LIST"/>
	</mod>
	<mod:findLike>
		<mod:findLike type="choice">
			<mod:selector req="ARTILLERY_FED"/>
			<mod:setAttributes req="ARTILLERY_FED_LIST"/>
		</mod>
	</mod>
</mod>
User avatar
stylesrj
Posts: 3638
Joined: Tue Jul 08, 2014 7:54 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by stylesrj »

So that'll make anything within the list count as Federation Artillery in terms of events. So where do I put the list the game can then draw upon?

Also, is making the list something like:

Code: Select all

<eventlist>Custom_artillery
Artillery_FED</eventlist>
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by meklozz »

stylesrj wrote:So that'll make anything within the list count as Federation Artillery in terms of events. So where do I put the list the game can then draw upon?

Also, is making the list something like:

Code: Select all

<eventlist>Custom_artillery
Artillery_FED</eventlist>
autoBlueprints.xml.append*

Code: Select all

<blueprintList name="DRONES_COMBAT">
	<name>COMBAT_1</name>
	<name>COMBAT_2</name>
	<name>COMBAT_BEAM</name>
</blueprintList>
*Random copy paste

You should probably also look into the file to consider adding your weapon to some other lists like WEAPONS_BEAM_DAMAGE. Only that I think. Gotta carefully cut those ships out with a death beam you can't aim.
User avatar
stylesrj
Posts: 3638
Joined: Tue Jul 08, 2014 7:54 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Post by stylesrj »

meklozz wrote: autoBlueprints.xml.append*
I always assumed that was the blueprints for an auto ship or something. :oops:

Code: Select all

<blueprintList name="DRONES_COMBAT">
	<name>COMBAT_1</name>
	<name>COMBAT_2</name>
	<name>COMBAT_BEAM</name>
</blueprintList>
*Random copy paste
I see. Thanks, now I know what to use for the Trump Artillery... and possibly even the Riven Artillery (maybe the Federation codes it picked up also give it access to high-ranking supplies)
You should probably also look into the file to consider adding your weapon to some other lists like WEAPONS_BEAM_DAMAGE. Only that I think. Gotta carefully cut those ships out with a death beam you can't aim.
Y'know, you may be on to something there. The Trump Artillery (which launches bombs by the way) makes such "cutting" remarks that it can be used to free pirate ships trapped between some rocks. Heck, it could be used in a wide range of applications that require a beam.
"You're fired asteroid!"
Post Reply