You need to name blueprints.xml as blueprints.xml.append.TeamEXAngus wrote:I can't seem to get it working! Anyone know what could be going wrong?
File
(Mod Name)/data/blueprints.xml
[Tutorial] New Guide on creating weapons
- Arfy
- Posts: 206
- Joined: Mon Apr 11, 2016 4:14 am
Re: [Tutorial] New Guide on creating weapons
Discord: ATLAS#9226
-
- Posts: 48
- Joined: Thu May 17, 2018 5:38 am
Re: [Tutorial] New Guide on creating weapons
I tried that too. I worked out the problem though. When I turned the file into a .zip file, it renamed data to (mod name)Arfy wrote:You need to name blueprints.xml as blueprints.xml.append.TeamEXAngus wrote:I can't seem to get it working! Anyone know what could be going wrong?
File
(Mod Name)/data/blueprints.xml
-
- Posts: 48
- Joined: Thu May 17, 2018 5:38 am
Re: [Tutorial] New Guide on creating weapons
anyone know what's wrong with this? It won't work.
Code: Select all
<weaponBlueprint name="MASS_DRIVER">
<type>MISSILE</type>
<title>Mass Driver Cannon</title>
<short>Mass Driver</short>
<tip>tip_beams</tip>
<desc>This weapon fires an explosive ball surrounded with Plasma.</desc>
<tooltip id="weapon_BEAM_3_tooltip" />
<damage>4</damage>
<sp>5</sp>
<speed>10</speed>
<missiles>1</missiles>
<fireChance>0</fireChance>
<breachChance>10</breachChance>
<cooldown>25</cooldown>
<power>4</power>
<cost>150</cost>
<bp>12</bp>
<rarity>5</rarity>
<explosion>explosion_random</explosion>
<image>missile_hull</image>
<launchSounds>
<sound>smallExplosion</sound>
</launchSounds>
<weaponArt>beam_3</weaponArt>
<iconImage>missile</iconImage>
</weaponBlueprint>
- mr_easy_money
- Posts: 625
- Joined: Fri May 29, 2015 9:05 pm
Re: [Tutorial] New Guide on creating weapons
here is your problem:TeamEXAngus wrote:anyone know what's wrong with this? It won't work.
"MISSILE" is not a possible value for the 'type' stat -- it needs to be "MISSILES", one of the 5 weapon types the game will recognize (the other ones being: BEAM, LASER, BOMB, and BURST).TeamEXAngus wrote:Code: Select all
... <type>MISSILE</type> ...

Advanced Limited Time Offer! | Star Wars B-Wing Starships v1.6.1 | Garbage Bag v1.1b | Captain Surreal
Constructive criticism, not offensive criticism
-
- Posts: 48
- Joined: Thu May 17, 2018 5:38 am
Re: [Tutorial] New Guide on creating weapons
Now the game crashes when I fire it. Any ideas why?mr_easy_money wrote:here is your problem:TeamEXAngus wrote:anyone know what's wrong with this? It won't work."MISSILE" is not a possible value for the 'type' stat -- it needs to be "MISSILES", one of the 5 weapon types the game will recognize (the other ones being: BEAM, LASER, BOMB, and BURST).TeamEXAngus wrote:Code: Select all
... <type>MISSILE</type> ...
- mr_easy_money
- Posts: 625
- Joined: Fri May 29, 2015 9:05 pm
Re: [Tutorial] New Guide on creating weapons
oh in my haste, I didn't see something essential -- the weapon is missing a <shots> stat. I've had this 'weapon crashes when trying to fire' problem before and this was exactly the problem. no <shots> specified and the game doesn't know what you mean by firing the weapon -- what is there to fire?TeamEXAngus wrote:Now the game crashes when I fire it. Any ideas why?
in case of confusion, the <missiles> tag specifies how many missiles (the resource) the weapon uses per shot, not how many missiles are fired.
also, you should add <hitShipSounds>, <hitShieldSounds> and <missSounds>, for what happens in those cases. otherwise, the weapon will only make noise when it fires -- nothing when it hits its target or misses.

Advanced Limited Time Offer! | Star Wars B-Wing Starships v1.6.1 | Garbage Bag v1.1b | Captain Surreal
Constructive criticism, not offensive criticism
-
- Posts: 48
- Joined: Thu May 17, 2018 5:38 am
Re: [Tutorial] New Guide on creating weapons
thanksmr_easy_money wrote:oh in my haste, I didn't see something essential -- the weapon is missing a <shots> stat. I've had this 'weapon crashes when trying to fire' problem before and this was exactly the problem. no <shots> specified and the game doesn't know what you mean by firing the weapon -- what is there to fire?TeamEXAngus wrote:Now the game crashes when I fire it. Any ideas why?
in case of confusion, the <missiles> tag specifies how many missiles (the resource) the weapon uses per shot, not how many missiles are fired.
also, you should add <hitShipSounds>, <hitShieldSounds> and <missSounds>, for what happens in those cases. otherwise, the weapon will only make noise when it fires -- nothing when it hits its target or misses.
- Kacpo
- Posts: 9
- Joined: Tue May 22, 2018 10:13 pm
Re: [Tutorial] New Guide on creating weapons
Hey, thanks for help.
There are 2 more things I want to know tho:
1st: How to change the colour of the BEAM or change the LASER projectile. I found the originals in unpacked files, and I can make my own models, but I don't know how to put them into the mod then.
Should I create another file in my_weapon/img?
2nd thing:
While I know how to pack a file into an .ftl file, I noticed that guide states:
There are 2 more things I want to know tho:
1st: How to change the colour of the BEAM or change the LASER projectile. I found the originals in unpacked files, and I can make my own models, but I don't know how to put them into the mod then.
Should I create another file in my_weapon/img?
2nd thing:
While I know how to pack a file into an .ftl file, I noticed that guide states:
so, how should I do this? Pack these two into seperate .ftl files and thne put them together into My_weapon folder, AND THEN add it as a mod?Dont simply pack your my_weapon folder directly or else you have the worng structure within the package. GMM needs to have the files in the right directory and a my_weapon directory he will ignore rendering your entire work useless.
- mr_easy_money
- Posts: 625
- Joined: Fri May 29, 2015 9:05 pm
Re: [Tutorial] New Guide on creating weapons
no problemKacpo wrote:Hey, thanks for help.

by adding a <color> stat. let's look how it's done in the vanilla Anti-Bio Beam, which is orange:Kacpo wrote:1st: How to change the colour of the BEAM
Code: Select all
<weaponBlueprint name="BEAM_BIO">
<type>BEAM</type>
...
<color> <!-- Color only works for beams -->
<r>255</r>
<g>110</g>
<b>0</b>
</color>
...
</weaponBlueprint>
so basically you are asking, how do I load a new image for the projectile?Kacpo wrote:how to change the LASER projectile. I found the originals in unpacked files, and I can make my own models, but I don't know how to put them into the mod then.
yes, you'll need to make a new file. it would have been nice if we could just add a <color> stat like with BEAM but this is not the case. note also that you should create a folder in my_weapon/img called "weapons" and place the file there. I'll cover this later on.Kacpo wrote:Should I create another file in my_weapon/img?
let's look at the Basic Laser's projectile. first we'll need to look at its weaponBlueprint:
Code: Select all
<weaponBlueprint name="LASER_BURST_1"> <!-- 1 shot 1power-->
<type>LASER</type>
...
<image>laser_light1</image>
...
</weaponBlueprint>
Code: Select all
<animSheet name="laser_light1" w="200" h="20" fw="50" fh="20">weapons/laser_light_strip4.png</animSheet>
<anim name="laser_light1">
<sheet>laser_light1</sheet>
<desc length="4" x="0" y="0"/>
<time>0.5</time>
</anim>
- w: the width of the entire image (in pixels)
- h: the height of the entire image (in pixels)
- fw: the width of one frame of the image (in pixels)... therefore, each frame must have the same dimensions
- fh: the height of one frame of the image (in pixels)... therefore, each frame must have the same dimensions
- [the value of the animSheet]: the location of the image, with its path starting from the "img" folder. that's why first it says weapons/, then it says the image name (with extension), because from the "img" folder, we go into the "weapons" folder to find the image.
- sheet: the name of the animSheet which describes the image itself. convention is for the animSheet to have the same name as the anim.
- desc: how many frames the image has. in this case, the length is 4, because the image has 4 frames. multiplying this number by the frame width should yield the image width. 4*50 = 200, which is the image width.
- time: the duration of the animation, in seconds.
let's suppose you wanted to make a version of the Basic Laser that has a red projectile. you recolor the projectile image to red. so then in our mod, we'll create a folder called "img" next to "data". inside the "img" folder we'll make a folder called "weapons", and place the recolored image there. let's just call it "laser_light_strip4_red.png".
next, we'll add the following to a new file we make in the "data" folder called "animations.xml.append":
Code: Select all
<animSheet name="laser_light1_red" w="200" h="20" fw="50" fh="20">weapons/laser_light_strip4_red.png</animSheet>
<anim name="laser_light1_red">
<sheet>laser_light1_red</sheet>
<desc length="4" x="0" y="0"/>
<time>0.5</time>
</anim>
Code: Select all
<weaponBlueprint name="LASER_BURST_1_EVIL">
<type>LASER</type>
...
<image>laser_light1_red</image>
...
</weaponBlueprint>



if you wanted to create and load a new image for the weapon itself (not the projectile), it is quite similar (looking at <weaponArt> now, not <image>) except it does not reference an anim, but instead a weaponAnim. everything else is pretty similar if not the same.
all this is saying is that you need to pack the folders within "my_weapon" into a .zip archive:Kacpo wrote:2nd thing:
While I know how to pack a file into an .ftl file, I noticed that guide states:so, how should I do this? Pack these two into seperate .ftl files and thne put them together into My_weapon folder, AND THEN add it as a mod?Dont simply pack your my_weapon folder directly or else you have the worng structure within the package. GMM needs to have the files in the right directory and a my_weapon directory he will ignore rendering your entire work useless.
Code: Select all
my_weapon -> data
-> img
-> mod-appendix
---
I endeavour to completely and thoroughly answer any questions posted. if you have any further questions, if I missed something or if something I said is unclear, please let me know.


Advanced Limited Time Offer! | Star Wars B-Wing Starships v1.6.1 | Garbage Bag v1.1b | Captain Surreal
Constructive criticism, not offensive criticism
- Kacpo
- Posts: 9
- Joined: Tue May 22, 2018 10:13 pm
Re: [Tutorial] New Guide on creating weapons
Ok, that third file: "mod-appendix" is something I see first time.
What is it? What does it contain? What it's for?
As for the animation process: There's a thing:
Just to get this out of the way, so we're clear and there's no misunderstandings
I want to change the image of a weapon itself (the gun) and the projectile (the shell, laser, missile, etc.)
I also want to make the weapon animation (charging, firing), BUT the projectile is a single picture (a single frame)
How should I go about this, because I found myself confused with which part of a animations.xml is supposed to refer to gun and which to projectile.
The file (this is animations.xml) I have right now looks like:
the Railgun is the name of Weapon animation strip

and Rod is the name of the projectile pic.

Is that correct (and I'm almost certian it is not), or should I create another paragraph within file, or new file altogether?
(The clearest explanation I think would be an example code with
codecodecode <---this is about projectile
code <---this is about weapon
codecode
code
codecode
code)
sort of thing.
And one last thing:
How should I save the files as?
Because the guide mentiones Filename.xml.append, while unpacked game files I found them simply saved as Filename.xml or some even simply as .txt
Is there a significant difference between .xml and .xml.append ?
P.S: Yes, I remember to have my_weapon/img/weapons subfolder.
What is it? What does it contain? What it's for?
As for the animation process: There's a thing:
Just to get this out of the way, so we're clear and there's no misunderstandings
I want to change the image of a weapon itself (the gun) and the projectile (the shell, laser, missile, etc.)
I also want to make the weapon animation (charging, firing), BUT the projectile is a single picture (a single frame)
How should I go about this, because I found myself confused with which part of a animations.xml is supposed to refer to gun and which to projectile.
The file (this is animations.xml) I have right now looks like:
Code: Select all
<animSheet name="rod" w="50" h="10" fw="50" fh="10">weapons/rod.png</animSheet>
<weaponAnim name="railgun">
<sheet>railgun</sheet>
<desc length="11" x="0" y="0"/>
<chargedFrame>7</chargedFrame>
<fireFrame>11</fireFrame>
<firePoint x="15" y="22"/>
<mountPoint x="2" y="65"/>
</weaponAnim>

and Rod is the name of the projectile pic.

Is that correct (and I'm almost certian it is not), or should I create another paragraph within file, or new file altogether?
(The clearest explanation I think would be an example code with
codecodecode <---this is about projectile
code <---this is about weapon
codecode
code
codecode
code)
sort of thing.
And one last thing:
How should I save the files as?
Because the guide mentiones Filename.xml.append, while unpacked game files I found them simply saved as Filename.xml or some even simply as .txt
Is there a significant difference between .xml and .xml.append ?
P.S: Yes, I remember to have my_weapon/img/weapons subfolder.