Kacpo wrote:Hey, thanks for help.
no problem
Kacpo wrote:1st: How to change the colour of the BEAM
by adding a <color> stat. let's look how it's done in the vanilla Anti-Bio Beam, which is orange:
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>
where <r>, <g>, <b> are your RGB (Red Green Blue) values. you can find a "color picker" online or use some image editing software to determine the perfect color.
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.
so basically you are asking, how do I load a new image for the projectile?
Kacpo wrote:Should I create another file in my_weapon/img?
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.
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>
the <image> stat tells us the name of the "anim" that will be found in the animations files. the "anim" will reference an "animSheet", which describes the image's dimensions and such. so let's have a look at the "anim" named "laser_light1":
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>
let's first look at the animSheet, because this describes the image. NOTE: the animSheet of an anim must always come before the anim itself, otherwise the anim will be unable to find it, and the game will break. the animSheet has 5 stats:
- 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.
next we'll look at the anim, which references the animSheet. the anim has 3 stats:
- 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.
now that we know what all of this means, we can create our own projectile images and load them in correctly. but let's just go over that anyway.
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>
then, in our weaponBlueprint, we'll make sure to reference the new anim:
Code: Select all
<weaponBlueprint name="LASER_BURST_1_EVIL">
<type>LASER</type>
...
<image>laser_light1_red</image>
...
</weaponBlueprint>
there, we've made an Evil Basic Laser

... well okay not really...
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.
Kacpo wrote:2nd thing:
While I know how to pack a file into an .ftl file, I noticed that guide states:
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.
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?
all this is saying is that you need to pack
the folders within "my_weapon" into a .zip archive:
Code: Select all
my_weapon -> data
-> img
-> mod-appendix
so here you'd select the "data", "img", and "mod-appendix" folders and add them to a .zip archive. it's saying that you should NOT be selecting the "my_weapon" folder and adding it to a .zip, because then there will be an intermediate folder and Slipstream will just ignore the "my_weapon" folder entirely , so then when you patch the mod nothing will change.
---
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.
