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

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

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

Postby NarnKar » Wed Feb 25, 2015 1:54 am

Make it really fast or make it a bomb.
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

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

Postby WhiteWeasel » Wed Feb 25, 2015 2:30 am

NarnKar wrote:Make it really fast or make it a bomb.

Eh, I guess being able to bypass defense drones I's are good enough. Now for another meissile launcher I made what does it mean when you can't see the projectile sprites? (despite using vanilla images). EDIT: NVM. I made a typo.
Image
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

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

Postby WhiteWeasel » Wed Feb 25, 2015 12:41 pm

Is there a way to edit the width of a beam like how the glaive beam is thicker than the normal beam weapons?

EDIT: Also I keep getting this error when trying to make a custom artillery weapon for the federation cruiser.

~ Strict XML Parser Issues:
! Fix this and try again:
org.jdom2.input.JDOMParseException: Error on line 942: Attribute name "artillery" associated with an element type "mod-overwrite:systemlist" must be followed by the ' = ' character.
~ ~ ~ ~ ~
<mod-overwrite:systemlist artillery power="1" room="6" weapon="ARTILLERY_FED" />
~ ~ ~ ~ ~

! Sloppy XML Parser Issues:
! Fix this and try again:
org.jdom2.input.JDOMParseException: Error on line 942: At line 942, column 2: Strange attributes.
~ ~ ~ ~ ~
<mod-overwrite:systemlist artillery power="1" room="6" weapon="ARTILLERY_FED" />
~ ~ ~ ~ ~


Code: Select all

<mod:findName type="shipBlueprint" name="PLAYER_SHIP_FED">
   <mod-overwrite:systemList= artillery power="1" room="6" weapon="ARTILLERY_FED_MISSILE" />
   </mod-overwrite:systemList>
   <mod-overwrite:weaponList count="1" missiles="5">
      <weapon name="LASER_RAIL_2"/>
   </mod-overwrite:weaponList>
</mod:findName>
Image
User avatar
RAD-82
Posts: 796
Joined: Sat Nov 09, 2013 12:16 am

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

Postby RAD-82 » Thu Feb 26, 2015 1:49 am

The width of a beam is based on the damage it does. You can't alter it without altering the damage.

Code: Select all

<mod:findName type="shipBlueprint" name="PLAYER_SHIP_FED">
   <mod:findLike type="systemList">
      <mod-overwrite:artillery power="1" room="6" weapon="ARTILLERY_FED_MISSILE" />
   </mod:findLike>
   <mod-overwrite:weaponList count="1" missiles="5">
      <weapon name="LASER_RAIL_2"/>
   </mod-overwrite:weaponList>
</mod:findName>
Image
Junkyard has FTL mods, mostly ships and a few other things.
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

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

Postby WhiteWeasel » Thu Feb 26, 2015 3:07 am

RAD-82 wrote:The width of a beam is based on the damage it does. You can't alter it without altering the damage.

Code: Select all

<mod:findName type="shipBlueprint" name="PLAYER_SHIP_FED">
   <mod:findLike type="systemList">
      <mod-overwrite:artillery power="1" room="6" weapon="ARTILLERY_FED_MISSILE" />
   </mod:findLike>
   <mod-overwrite:weaponList count="1" missiles="5">
      <weapon name="LASER_RAIL_2"/>
   </mod-overwrite:weaponList>
</mod:findName>

Thank you. just curious, Is there a tutorial on how to make an artillery weapon?
Image
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

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

Postby NarnKar » Thu Feb 26, 2015 6:22 am

There's not really a tutorial on Artillery Weapons, since the Artillery system is basically just a tiny bit of code wrapped around a weapon.

But the artillery system basically works like this: you stick it on a ship somewhere, and specify in the system tag which weapon it has as a...weapon. 1 power bar is 1.25x the cooldown listed on the weapon's blueprint, 2 power bars is 1, 3 power bars is .75x, 4 power bars is .5x, 5 power bars (impossible without modding) is .25x, and 6 power bars is instant fire.
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

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

Postby WhiteWeasel » Thu Feb 26, 2015 10:18 pm

As for sound editing, what do I do if my custom weapon sound is too loud/quiet? EDIT: Resolved with the amplify function in audacity.

EDIT2: So just change this like I would any other weapon?

Code: Select all

<weaponBlueprint name="ARTILLERY_FED">
   <type>BEAM</type>
   <title>Artillery Beam</title>
   <short>Artillery</short>
   <desc>Powers a slow, high-powered beam that pierces all shields and does one damage per room hit. More power means faster cooldown.</desc>
   <tooltip>Artillery: Beam that automatically fires a 1 damage beam that pierces all shields</tooltip>
   <damage>1</damage>
   <sp>5</sp>
   <fireChance>1</fireChance>
   <breachChance>0</breachChance>
   <speed>13</speed>
   <cooldown>40</cooldown>
   <power>1</power>
   <cost>0</cost>
   <bp>5</bp>
   <rarity>0</rarity>
   <image>beam_contact</image>
   <length>500</length>
   <launchSounds>
      <sound>beam1</sound>
      <sound>beam1_2</sound>
   </launchSounds>
   <weaponArt>artillery_fed</weaponArt>
</weaponBlueprint>


EDIT3: So is the artillery weapon limited to one projectile? I wanted to make one that fires a large volley of missiles.
EDIT4: Awwww Damn, it's true. I put the same blueprint as a regular weapon and it did what I wanted it to.
Image
redstonetorches
Posts: 21
Joined: Sat Jan 10, 2015 4:11 pm

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

Postby redstonetorches » Sat Feb 28, 2015 8:21 pm

I'm trying to make some custom weapons for a mod and I've finished the code and stuff, but when i try to patch it SMM gives me this:

Patching failed: org.jdom2.JDOMException: While processing "Engi Weapons.ftl:data/animations.xml.append (wrapped)", strict parsing failed, then sloppy parsing failed: Error on line 2: At line 2, column 1: Strange attributes.

Here's my animations.xml:

Code: Select all

<animSheet name="ENGI_ACCEL" w="1254" h="59" fw="22" fh="59">weapons/Engi_Accelerator.png</animSheet>
<animSheet name="ENGI_DISRUPT" w="161" h="33" fw="23" fh"33">weapons/Engi_Disruptor.png</animSheet>

<weaponAnim name="ENGI_ACCEL">
   <sheet>ENGI_ACCEL</sheet>
   <desc length="57" x="0" y="0"/>
   <chargedFrame>51</chargedFrame>
   <fireFrame>54</fireFrame>
   <firePoint  x="12" y="10"/>
   <mountPoint x="3" y="44"/>
</weaponAnim>

<weaponAnim name="ENGI_DISRUPT">
   <sheet>ENGI_DISRUPT</sheet>
   <desc length="7" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>2</fireFrame>
   <firePoint  x="16" y="8"/>
   <mountPoint x="5" y="26"/>
</weaponAnim>


I'm not too great at finding errors in code, and I'm not sure where line 2, column 1 is... (It might be how big the accelerator strip is)
Now if you'll excuse me, I'm going to go do things that I probably don't need to be doing.
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

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

Postby kartoFlane » Sat Feb 28, 2015 8:56 pm

Line and column refer to the position of the offending character(s) in the specified file. Though sometimes it points slightly wrong, as is the case here.

Your problem is that in the second <animSheet> tag, there's no equals character ( = ) between fh and "33".
Superluminal2 - a ship editor for FTL
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

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

Postby NarnKar » Sat Feb 28, 2015 9:53 pm

<animSheet name="ENGI_DISRUPT" w="161" h="33" fw="23" fh="33">weapons/Engi_Disruptor.png</animSheet>

Somehow the = sign went missing, and that's the only reason your mod failed to load.

However, I think it's good practice to name your weapons Engi_Disruptor_stripX, where X is the number of frames. That's how FTL does it. I'm not sure if it has any effect or not, but you should try it, just to be safe.

EDIT: Ah, damn, kartoFlane beat me to the punch while I wasn't looking. :U