[Done!] Adding a new laser...
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
[Done!] Adding a new laser...
Hey there.
I need to get the info here, my german colleagues over in the german forums are unable to help me.
I don't know why but they are not helping me, instead, they only give me "hints" or one sentence replys ... ridiculous.
So I ask here:
I wanted to add a new laser to the game, a plan that is not easily assembled, as I have experienced.
First, there was the developed laser and it's bullet but the weapon appeares in no list [e.g. in the TShips-weaponlist].
So I digged depper.
Voila, there was weapon #29 now, my weapon... great.
Then I had some problems, getting the weapon into my ship, because
I don't know how to script and what to script... but I even got over this problem after a while.
I had the new laser into my Nova Raider and wanted to test it... result:
it didn't fire a single shot. Further it seems, that the created bullet for that laser stick to a fixed direction, even if i roll or pitch the ship... the bullet, which is very small [too small] and only visible directly on the weapon dummy of the nova, still sticks to the fixed direction. But it seems not to be a real shot/bullet either, because it don't do any damage, not on my ship or on any other object, although the energy for the shots is allready consumed... a part seem to work.
And this is the point, I don't understand.
Later I even had found an unused bullet body which fits perfect to my weapon, and so I tried to use it, but same result.
I even set the new weapon as product of the HEPT Complex, but it do not appear there as product... maybe if I start the game anew.
I made a few screenshots, for you to see the attributes... maybe it helps you to analyze the error.
Here they are:
http://mitglied.lycos.de/Crreetschaa/LProject1.jpg
http://mitglied.lycos.de/Crreetschaa/LProject2.jpg
http://mitglied.lycos.de/Crreetschaa/LProject3.jpg
http://mitglied.lycos.de/Crreetschaa/LProject4.jpg
and same goes of course for 04.cat, as you can see here:
http://mitglied.lycos.de/Crreetschaa/LProject5.jpg
I really hope you could help me with that...
I need to get the info here, my german colleagues over in the german forums are unable to help me.
I don't know why but they are not helping me, instead, they only give me "hints" or one sentence replys ... ridiculous.
So I ask here:
I wanted to add a new laser to the game, a plan that is not easily assembled, as I have experienced.
First, there was the developed laser and it's bullet but the weapon appeares in no list [e.g. in the TShips-weaponlist].
So I digged depper.
Voila, there was weapon #29 now, my weapon... great.
Then I had some problems, getting the weapon into my ship, because
I don't know how to script and what to script... but I even got over this problem after a while.
I had the new laser into my Nova Raider and wanted to test it... result:
it didn't fire a single shot. Further it seems, that the created bullet for that laser stick to a fixed direction, even if i roll or pitch the ship... the bullet, which is very small [too small] and only visible directly on the weapon dummy of the nova, still sticks to the fixed direction. But it seems not to be a real shot/bullet either, because it don't do any damage, not on my ship or on any other object, although the energy for the shots is allready consumed... a part seem to work.
And this is the point, I don't understand.
Later I even had found an unused bullet body which fits perfect to my weapon, and so I tried to use it, but same result.
I even set the new weapon as product of the HEPT Complex, but it do not appear there as product... maybe if I start the game anew.
I made a few screenshots, for you to see the attributes... maybe it helps you to analyze the error.
Here they are:
http://mitglied.lycos.de/Crreetschaa/LProject1.jpg
http://mitglied.lycos.de/Crreetschaa/LProject2.jpg
http://mitglied.lycos.de/Crreetschaa/LProject3.jpg
http://mitglied.lycos.de/Crreetschaa/LProject4.jpg
and same goes of course for 04.cat, as you can see here:
http://mitglied.lycos.de/Crreetschaa/LProject5.jpg
I really hope you could help me with that...
Last edited by Lh_J on Wed, 22. Feb 06, 17:18, edited 1 time in total.
"If my father wants something, it's like sex with Kobe Bryant: You can kick and scream all you want, but it's ... it's gonna happen."
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
Hi,
if I recall correctly, this is the second time somebody is complaining about guys on the german forum for not being too helpful...
So here go the professionals
to help you
First of all: you seem to be little missinformed about the lasers.
To add new a weapon type (a.k.a. "new laser"), you have to do two things:
create new entry in TLasers
create new entry in TBullets (must have the same index as the newly created laser)
That's all what is required to introduce new weapon to X3. (of course you also have to alter some ship to be able to carry the new weapon)
Bullets - simply said, it doesn't matter which "bullet" your laser will shoot, just copy the record from some existing gun. The "bullet" is in no way directly connected with laser - the bullet doesn't have to "fit" to your laser in any way as, at T files level, there is no geometry.
TWareList - it is absolutely not necessary and probably even unwanted to add entries into ware list unless you really know what you are doing.
Ware list is used solely in Jobs.txt and - unless you want NPC ships flying around with your "secret laser" - you don't need to mess with it.
I didn't even realized that someone will use X3E to alter the ware list. the only reason you are able to open the file is because X3E had to be able to read the file in order to display the "shopping baskets" while viewing Jobs. There is no GUI associated with the TWareList and the "raw view" is confusing as it in fact doesn't trully display the content of the file.
Anyway back to your laser. The only reason I can think of why laser doesn't fire is when you are creating new gun body (i.e. new gun in 3ds max/gmax). There are two reasons why such new gun may not fire:
- it does not have its "laser" part coordinates exported in types\Components.txt
- there is wrong body id or path index in TShips
However unless you made a new gun body and altered the Argon Nova Raider's scene, this doesn't concern you.
The conclusion: I don't know
Try to start again from scratch, make copy of (for example) beta HEPT and its bullet, then alter one of the ships to be able to equip it (I'm always using the Split Mamba for my tests as I can then simply start Bankrupt Assasin game and I already have the ship and 2 beta HEPTs istalled). Then run the script editor and write yourself "Install ware" (or "add ware") script. Run it and add the new lasers. They will have the same names as the "original" ones, you will have to try which is the new new one. You should be able to fire them. You must equip the lasers via the HUD weapon incons as the new weapons cannot be added via the "weapon screen".
if I recall correctly, this is the second time somebody is complaining about guys on the german forum for not being too helpful...

So here go the professionals


First of all: you seem to be little missinformed about the lasers.
To add new a weapon type (a.k.a. "new laser"), you have to do two things:
create new entry in TLasers
create new entry in TBullets (must have the same index as the newly created laser)
That's all what is required to introduce new weapon to X3. (of course you also have to alter some ship to be able to carry the new weapon)
Bullets - simply said, it doesn't matter which "bullet" your laser will shoot, just copy the record from some existing gun. The "bullet" is in no way directly connected with laser - the bullet doesn't have to "fit" to your laser in any way as, at T files level, there is no geometry.
TWareList - it is absolutely not necessary and probably even unwanted to add entries into ware list unless you really know what you are doing.
Ware list is used solely in Jobs.txt and - unless you want NPC ships flying around with your "secret laser" - you don't need to mess with it.
I didn't even realized that someone will use X3E to alter the ware list. the only reason you are able to open the file is because X3E had to be able to read the file in order to display the "shopping baskets" while viewing Jobs. There is no GUI associated with the TWareList and the "raw view" is confusing as it in fact doesn't trully display the content of the file.
Anyway back to your laser. The only reason I can think of why laser doesn't fire is when you are creating new gun body (i.e. new gun in 3ds max/gmax). There are two reasons why such new gun may not fire:
- it does not have its "laser" part coordinates exported in types\Components.txt
- there is wrong body id or path index in TShips
However unless you made a new gun body and altered the Argon Nova Raider's scene, this doesn't concern you.
The conclusion: I don't know

Try to start again from scratch, make copy of (for example) beta HEPT and its bullet, then alter one of the ships to be able to equip it (I'm always using the Split Mamba for my tests as I can then simply start Bankrupt Assasin game and I already have the ship and 2 beta HEPTs istalled). Then run the script editor and write yourself "Install ware" (or "add ware") script. Run it and add the new lasers. They will have the same names as the "original" ones, you will have to try which is the new new one. You should be able to fire them. You must equip the lasers via the HUD weapon incons as the new weapons cannot be added via the "weapon screen".
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
Ah, professional help is always welcome 
2. Partially done... the body Id of the bullet was the same, as from the alpha HEPT, then from the beta HEPT and then from a unsued bullet body, I found between the objects\v\ files.
Same effect no matter what body ID I used...
Further I edited the WareTemplate.pck to let the Argon/Paranid HEPT Complex produce my weapon as a product ... lol
Seems I exaggerated the editing a little ... ^^
Well... this would double the difficulty level ^^
It's not possible to edit this file in your editor.
I just refer to existing ones, as you can see in my screenshots from the editor. All weapons refer to body ID 27... and so do mine.
I will try the whole thing again.
But I have a little question: do I have to edit both file versions in 04.cat and 05.cat every time ?
Or does it long, if I only edit one version of the file in one .cat file ?
but thanks for help anyway

Yeah.... the first time... that was me, tooif I recall correctly, this is the second time somebody is complaining about guys on the german forum for not being too helpful...

1. Done.1. create new entry in TLasers
2. create new entry in TBullets (must have the same index as the newly created laser)
2. Partially done... the body Id of the bullet was the same, as from the alpha HEPT, then from the beta HEPT and then from a unsued bullet body, I found between the objects\v\ files.
Same effect no matter what body ID I used...
Thats done, too. I edited the TCockpits and TShips File, so that the Nova and Nemisis are able to carry the laser.That's all what is required to introduce new weapon to X3. (of course you also have to alter some ship to be able to carry the new weapon)
lol... I just thought, it would be better to mention my new weapon there, too... for the game to recognize, that it is there.TWareList - it is absolutely not necessary and probably even unwanted to add entries into ware list unless you really know what you are doing.
Further I edited the WareTemplate.pck to let the Argon/Paranid HEPT Complex produce my weapon as a product ... lol
Seems I exaggerated the editing a little ... ^^
Ware list is used solely in Jobs.txt and - unless you want NPC ships flying around with your "secret laser" - you don't need to mess with it.
Well... this would double the difficulty level ^^
I only opened the Warelists in your editor, but edited it manually, after extracting the file from the .cat.I didn't even realized that someone will use X3E to alter the ware list. the only reason you are able to open the file is because X3E had to be able to read the file in order to display the "shopping baskets" while viewing Jobs. There is no GUI associated with the TWareList and the "raw view" is confusing as it in fact doesn't trully display the content of the file.
It's not possible to edit this file in your editor.
Nope, I didn't do a new gun model.Anyway back to your laser. The only reason I can think of why laser doesn't fire is when you are creating new gun body (i.e. new gun in 3ds max/gmax). There are two reasons why such new gun may not fire:
- it does not have its "laser" part coordinates exported in types\Components.txt
- there is wrong body id or path index in TShips
I just refer to existing ones, as you can see in my screenshots from the editor. All weapons refer to body ID 27... and so do mine.
Yap. I don't wanted to do the whole thing again... but now I think I have no choice.Try to start again from scratch, make copy of (for example) beta HEPT and its bullet, then alter one of the ships to be able to equip it (I'm always using the Split Mamba for my tests as I can then simply start Bankrupt Assasin game and I already have the ship and 2 beta HEPTs istalled).
I will try the whole thing again.
But I have a little question: do I have to edit both file versions in 04.cat and 05.cat every time ?
Or does it long, if I only edit one version of the file in one .cat file ?
but thanks for help anyway

"If my father wants something, it's like sex with Kobe Bryant: You can kick and scream all you want, but it's ... it's gonna happen."
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
TruthLh_J wrote:I only opened the Warelists in your editor, but edited it manually, after extracting the file from the .cat.
It's not possible to edit this file in your editor.

Well the body ID from TLasers has nothing to do with it as it is not used anymore in X3 and in X2 it was specifying which model to show when the laser was flying in space (as ware). If you look at objects\v\00027.bod you will see that it is a crate.Nope, I didn't do a new gun model.
I just refer to existing ones, as you can see in my screenshots from the editor. All weapons refer to body ID 27... and so do mine.
That's what I don't like on X3 - there is no weapon model (body) associated with TLaser entry. Insetad the "weapon" is part of the ship scene. Originally Egosoft wanted to substitude the "weapon dummy" in ship's scene with the "real" body based on what weapon is currently equipped, but they probably didn't have enough time. Maybe we will finally get it in next patch

I will try to make a new laser to check whether it will work, but don't recall any problems when I did it last time.
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
The next patch... the big hope ^^That's what I don't like on X3 - there is no weapon model (body) associated with TLaser entry. Insetad the "weapon" is part of the ship scene. Originally Egosoft wanted to substitude the "weapon dummy" in ship's scene with the "real" body based on what weapon is currently equipped, but they probably didn't have enough time. Maybe we will finally get it in next patch
Maybe the problem lies within that weapondummy stuff ?
Maybe I have to asociate, somehow, my new weapon with a weapon dummy or a shipscene to work properly ?
An so do I.I will try to make a new laser to check whether it will work
It would be helpful, if this is answered....But I have a little question: do I have to edit both file versions in 04.cat and 05.cat every time ?
Or does it long, if I only edit one version of the file in one .cat file ?

"If my father wants something, it's like sex with Kobe Bryant: You can kick and scream all you want, but it's ... it's gonna happen."
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
OopsLh_J wrote:It would be helpful, if this is answered....But I have a little question: do I have to edit both file versions in 04.cat and 05.cat every time ?
Or does it long, if I only edit one version of the file in one .cat file ?

Strictly speaking - neither of them. You are supposed to make a mod and place the modified files there. See How to make a Mod.
However it is always the last catalog you need to modify. X3 is always using the "latest version" of every file - that means the file from the highest catalog.
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
By the way: I think I found the problem.
This is all about the Laser ID. After changing the Index 1 & 2 of the new laser to 29, to appear as a new laser without overwriting another, it turns out that it doens't work. Same problem as ever... no bullet comes out and the barrelfire effect sticks to that fixed direction again.
Changing the index 1 & 2 back to 5, for example, the weapon works properly.
So what do I have to do, to make Index 29 work properly as well ?
[Edit] I found out, that only Index 2 is the source of the problem. If turned to 29, the weapon won't work.
Second discovery is, that, although I have created a new bullet for the weapon with a specific color, the bullet color and effect is taken from the beta HEPT... the weapon on which basis I created the new one [via copy & paste]. It seems that the only thing, that is taken from the new created bullet, is the bullet body, because it's the specific one I've chosen.
What causes this mixture of the body from the new bullet and all the other attributes from the beta HEPT ?
Any ideas ?
This is all about the Laser ID. After changing the Index 1 & 2 of the new laser to 29, to appear as a new laser without overwriting another, it turns out that it doens't work. Same problem as ever... no bullet comes out and the barrelfire effect sticks to that fixed direction again.
Changing the index 1 & 2 back to 5, for example, the weapon works properly.
So what do I have to do, to make Index 29 work properly as well ?
[Edit] I found out, that only Index 2 is the source of the problem. If turned to 29, the weapon won't work.
Second discovery is, that, although I have created a new bullet for the weapon with a specific color, the bullet color and effect is taken from the beta HEPT... the weapon on which basis I created the new one [via copy & paste]. It seems that the only thing, that is taken from the new created bullet, is the bullet body, because it's the specific one I've chosen.
What causes this mixture of the body from the new bullet and all the other attributes from the beta HEPT ?
Any ideas ?
"If my father wants something, it's like sex with Kobe Bryant: You can kick and scream all you want, but it's ... it's gonna happen."
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
-
- Posts: 1604
- Joined: Tue, 13. Dec 05, 21:55
I cant change the texture of the bullet either, but i have no problem in using index 29 for bullet purposes.
Stupid questions but i need to asked:
1. Have you made a new entry in TBullets?
2. Are you running any mods? Because if you are, any Tfiles in the mod will override the Tfiles in the catalogue files.
Hope this helps a little...
Stupid questions but i need to asked:
1. Have you made a new entry in TBullets?
2. Are you running any mods? Because if you are, any Tfiles in the mod will override the Tfiles in the catalogue files.
Hope this helps a little...
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
1.: look at my screenshots... they are showing everything ...
2.: Nope... no Mod and no extra permanent scripts are running...
Would be nice if doubleshadow could tell me finally, wheather his weapon creation experiment was successfull or not.
If he got problems too, with creating a weapon like mine ... then I conclude, that it is impossible to make one new, without overwriting an old one ... for now.
2.: Nope... no Mod and no extra permanent scripts are running...
Would be nice if doubleshadow could tell me finally, wheather his weapon creation experiment was successfull or not.
If he got problems too, with creating a weapon like mine ... then I conclude, that it is impossible to make one new, without overwriting an old one ... for now.
"If my father wants something, it's like sex with Kobe Bryant: You can kick and scream all you want, but it's ... it's gonna happen."
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
I'm almost afraid to tell but... I forgot at youLh_J wrote:1.: look at my screenshots... they are showing everything ...
2.: Nope... no Mod and no extra permanent scripts are running...
Would be nice if doubleshadow could tell me finally, wheather his weapon creation experiment was successfull or not.
If he got problems too, with creating a weapon like mine ... then I conclude, that it is impossible to make one new, without overwriting an old one ... for now.

But I will try today - promise

-
- Posts: 1604
- Joined: Tue, 13. Dec 05, 21:55
I tried doing the same as you and after looking through my screens and your screens and comparing them.
I think your problem is in the TBullets.
I haven't tried using the unused bullet type, but i have no problem in using any of the other types.
If you want, i can try and post a screenshot of my TBullets for comparison.
(I made my weapon use the BHEPT bullet but with a straight line effect like the Kyons!)
I think your problem is in the TBullets.
I haven't tried using the unused bullet type, but i have no problem in using any of the other types.
If you want, i can try and post a screenshot of my TBullets for comparison.
(I made my weapon use the BHEPT bullet but with a straight line effect like the Kyons!)
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
I allready found out what causes the problem in my case, I even posted it here.
Using the bodyfile of an unsued bullet is no problem, I've modified
the alpha HEPT to proof that.
Also there is nothing, you really could do wrong with the bullets.
Using the bodyfile of an unsued bullet is no problem, I've modified
the alpha HEPT to proof that.
Also there is nothing, you really could do wrong with the bullets.
"If my father wants something, it's like sex with Kobe Bryant: You can kick and scream all you want, but it's ... it's gonna happen."
-
- Posts: 240
- Joined: Sat, 7. Jan 06, 23:06
Okay... with doubleshadow's great support I was able to make the weapon finally work.
I'm now working on the HEPT Complex to make it sell my weapon and be available to the player at some Shipyard's for own production of all 3 types.
I'm now working on the HEPT Complex to make it sell my weapon and be available to the player at some Shipyard's for own production of all 3 types.
"If my father wants something, it's like sex with Kobe Bryant: You can kick and scream all you want, but it's ... it's gonna happen."