Weather Control Device Detected

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
User avatar
Chrono Vortex
Posts: 275
Joined: Thu Jun 25, 2015 8:51 pm

Weather Control Device Detected

Post by Chrono Vortex »

I'm going to try something interesting on my old Allied ship...

Image

I want too add an augment which works like CE's combat augments. The idea is if you encounter a ship while you have the Weather Control Device you get a blue option to activate it and start a hazard at the beacon. I have no idea how to make a hazard which can do something like throw lightning bolts at the enemy ship (or how to make any hazard for that matter), and I haven't looked into the event coding at all so I'm not sure how I'll accomplish this. I'll try to learn some stuff about that area of the xml files from both vanilla and CE FTL, but in the meantime help is welcome.
Last edited by Chrono Vortex on Tue Jul 21, 2015 8:49 pm, edited 3 times in total.
ImageImageImageImageImageImageImageImage
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: Brainwave Overload

Post by NarnKar »

Any image larger than 2000x2000 doesn't function properly for some people, with things getting sort of glitchy the closer you get to that limit. No one's really tried to go past it yet, so I assume that the further you go, the less stable it becomes.

The artillery launch sound thing is unfixable without using flak, sorry.

As for the artillery charged frame--since you've already made custom weapons before, I assume you know how they work. It's a rookie mistake to assume the frames go from, say, 1-7 (they really go from 0-6), but I assume you already know that...without looking at the files, that's pretty much the only guess I have. And I can't look at the files at the moment.

I might also suggest kartoFlane's FTL Error Checker for code problems.
User avatar
Chrono Vortex
Posts: 275
Joined: Thu Jun 25, 2015 8:51 pm

Re: Brainwave Overload

Post by Chrono Vortex »

NarnKar wrote:Any image larger than 2000x2000 doesn't function properly for some people, with things getting sort of glitchy the closer you get to that limit. No one's really tried to go past it yet, so I assume that the further you go, the less stable it becomes.
That's really disappointing, this thing was so close to looking like it came straight out of RA2.
NarnKar wrote:As for the artillery charged frame--since you've already made custom weapons before, I assume you know how they work. It's a rookie mistake to assume the frames go from, say, 1-7 (they really go from 0-6), but I assume you already know that...without looking at the files, that's pretty much the only guess I have. And I can't look at the files at the moment.
I do know that it starts at zero, but the game treats the "first" frame like it doesn't even exist. When I tell it the charged frame is 1, it jumps to 2. I could just add an extra frame but that would be kind of sloppy.

Thanks for taking the time to reply, I really appreciate the help.
ImageImageImageImageImageImageImageImage
User avatar
Chrono Vortex
Posts: 275
Joined: Thu Jun 25, 2015 8:51 pm

Re: Weather Control Device Detected

Post by Chrono Vortex »

I'm bumping this post because I've left it laying around being useless and because I've turned it into something else entirely. I would've put it in one of the more often used threads but this doesn't really fit into Previews from the impatient or Inquiries.
ImageImageImageImageImageImageImageImage
User avatar
stylesrj
Posts: 3638
Joined: Tue Jul 08, 2014 7:54 am

Re: Weather Control Device Detected

Post by stylesrj »

I don't think you can create hazards from whole-cloth. Even something like a minefield is just dummy weapons being fired from offscreen.

Even though a Weather Control Device would be awesome!
User avatar
TaxiService
Posts: 204
Joined: Mon Dec 23, 2013 6:04 pm

Re: Weather Control Device Detected

Post by TaxiService »

Look into MTE's code for how to make hazards spawn, and also in CE's code for advanced stuff like custom hazards (which i have got no clue on how to do, lol)

Still, we're here if you have any doubts!

EDIT: actually, i guess i could have just pasted the hazard spawner's code here.

Code: Select all

<event name="MTE_HAZARD_PICKER">
	<text>What environmental hazard do you want to spawn?</text>
	<choice>
		<text>An asteroid field.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="asteroid"/>
			</event>
	</choice>
	<choice>
		<text>A nebula.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="nebula"/>
			</event>
	</choice>
	<choice>
		<text>A plasma storm.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="storm"/>
			</event>
	</choice>
	<choice>
		<text>A sun.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="sun"/>
			</event>
	</choice>
	<choice>
		<text>A pulsar.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="pulsar"/>
			</event>
	</choice>
	<choice>
		<text>An enemy anti ship battery.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="PDS" target="player"/>
			</event>
	</choice>
	<choice>
		<text>An allied anti ship battery.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="PDS" target="enemy"/>
			</event>
	</choice>
	<choice>
		<text>An indiscriminate anti ship battery.</text>
			<event>
				<text>Hazard spawned successfully.</text>
				<environment type="PDS" target="all"/>
			</event>
	</choice>
</event>
These should be all the vanilla AE hazards. Event editing might be tricky at first, but it's easier than it looks!

As a general rule, you can't have an <event> inside another <event>, but you can have an <event> inside a <choice>, and a <choice> inside an <event>. So you can (and must..!) alternate events and choices like this:

Code: Select all

<event>
	<choice>
		<event>
			<choice>
				<event/>
			</choice>
			<choice> <!-- you can put multiple choices inside a single event -->
				<event/>
			</choice>
			<choice>
				<event/>
			</choice>
		</event>
	</choice>
</event>
Oh, also i guess every event and choice must have a <text> inside it. >_> isn't there a tutorial on event editing somewhere?
ImageImageImageImageImage
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: Weather Control Device Detected

Post by NarnKar »

@Taxi

The sad thing, there ISN'T an event-editing tutorial anywhere. The only one I've found never details the nitty-gritty of event text, it only says "we'll add a custom sector to make our events in" and it makes the custom sector but it never freaking makes the custom events!!!
Post Reply