Problem with edited TBullets/Tlaser files

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Problem with edited TBullets/Tlaser files

Post by Kvalyr » Sat, 1. Oct 05, 22:43

After editing the TBullets & TLaser files in my mod, a glitch started occurring with every edited weapon save for one.

All on the IREs, PACs, HEPTs & PPCs:

The only values I changed in TBullets were:

Hull Damage
Shield Damage
Energy Used
Lifetime
Speed

On the IREs I also changed:

Bullet type from 0 to 2 (taken from Kyons)
and the Body types of the IREs to be the same as the corresponding Kyons.

in Tlasers i changed:
Rate of Fire
Energy
Charge Rate

The problem is that in-game, only the Alpha IREs seem to work, all other edited weapons (B/G IRE, A-G PAC, A-G HEPT, A-G PPC) 'fire' and create their sound, but instead of spawning their projectile, they just create a weird, cartoony-looking 3D blue 'explosion' effect on the ship's guns.

If anyone can tell me what I may have screwed up to cause this problem and how to fix it, I'd greatly appreciate it.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 02:00

Update: For some reason the Mass Driver & Ion Disruptor now have the same glitch, even though I didn't edit those weapons...

Galaxy613
Posts: 3285
Joined: Tue, 28. Dec 04, 02:19
x4

Post by Galaxy613 » Sun, 2. Oct 05, 02:15

My suggestion is to go back to the standard one and slowly change everything one variable at a time. Then see whats screwing it up. PLEASE someone with more knowlage of this chime in...
10,000 Lightyears of awesomeness

ShadowX
Posts: 173
Joined: Wed, 24. Mar 04, 20:49
x2

Post by ShadowX » Sun, 2. Oct 05, 02:33

I have had couple of times problems like this, which is: things work out to certain item number(first in this case) and then weird things occur.

The fact that MD and IOND had similar problems(although you hadn't change them) gives me the reason to suspect that there are probably additional or missing ";", or some other characters that affect the outcome.

Solution would be either you check the number of ";" for each line or make your changes again to an unmodified file. Changing the things you mentioned should not cause effects you described.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 02:58

Hmm, I used Doubleshadow's editor so it shouldn't have caused any problems with the number of ; in the files..

However, I was saving the pcks directly back into the cat instead of saving them out as txt and going through all the gzip->crypt->pack crap, could that have corrupted the mod file and caused this glitch?

If so; would simply editing the files again from an unmodified source and saving them out the proper way work?

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

tools

Post by Harlock776 » Sun, 2. Oct 05, 03:46

What are you packing your mod with and how are you packing it?

There might be more than one tbullets and tlaser files in there based on the way you are repacking the file.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 03:49

I had been saving the edited TBullets.pck & TLaser.pck directly back into the catalog from Doubleshadow's editor, instead of saving out to text files, gzipping, x2tool-crypting to pcks and x2tool-packing to mods.

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

processes

Post by Harlock776 » Sun, 2. Oct 05, 06:30

Why are you doing things the hard way? It's much easier to simply make some mod folders and arrange them in a group, then use X2Archiver 1.02 and just drag them all into an empty archive and let X2Archiver do all that conversion work for you. I know some people knock this program a lot but I've been using it since day one of my modding experiences.

I've made 3 versions of my mod and they were all made with this program. It was so easy to just copy the name of the archive and then delete the archive and right click and select new X2Archive and then rename it with the copied file name info and then drag my folders into it and a few seconds later it was done.

Copy mod files to mods directory and I'm done til I find something else to change. All that command line stuff takes way too much time and using mod manager requires you to fill out a new cat file sometimes manually. Who has time for that when there is a program that does all that tedious stuff automatically.

Just because egosoft says you have to do something a certain way doesn't mean that is the only way to do it.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 11:09

X2Archiver? I hadn't heard of that.... Hmm.
Time to google it and get myself a copy.

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

doubleshadow

Post by Harlock776 » Sun, 2. Oct 05, 11:19

It's over at doubleshadow's site under misc downloads section I think.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 11:27

I got the ModManager from Doubleshdow's site and repacked my mod using new, clean versions of my TBullets & TLaser files, but the glitch still occurs and the AIRE is still the only weapon which seems to work..

Any more ideas, anyone?

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

nope

Post by Harlock776 » Sun, 2. Oct 05, 11:39

Mod manager is also making everything into pck files and you have to be some sort of guru to use it. Try the X2Archiver instead it makes everything use .pbd and that works for some reason. You can leave the files as text or bod it doesn't matter they still work as long as you use X2Archiver. Oh btw that program is a right click function program only. You don't run it like other programs but instead use it from the right click menu in windows. I know it's weird at first but once you get used to it your mod packing will go much faster and you can focus on other things like making the mod lol.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 12:26

Tried it with the X2Archiver now as well (I can see what you mean about it being handy, but I don't like programs that needlessly install new crap into windows' context-menu either :P ).
Glitch still occurs - AIREs work, every other weapon produces a weird blue 3d shape at the guns on the ship and does nothing else.

Any more ideas?
This glitch is driving me mad..

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

reboot

Post by Harlock776 » Sun, 2. Oct 05, 14:32

have you tried replacing the tbullets and tlasers files with those from the 1.4 cat&dat files? If you do this and still have the problem then you might have to backpedal through everything you have done to see what the problem is.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 15:01

Yeah, I had done exactly what you suggested just a few minutes before I read your post ;)

It works fine when I revert to non-edited 1.4 files.

Now I'm changing values step-by-step until I find the problem.

EDIT: The problem isn't connected to TLasers.pck - I edited that, added to the mod and so far everything is ok.


EDIT 2: Edited the Hull damages for all the weapons in TBullets.pck - The glitch now occurs.

I've been using doubleshadow's editor to change the values, is it possible that it's causing errors in the TBullets file?




Problem solved!!

Since the AIRE was the only weapon which was working, I figured that the error was either with the AIRE or the next weapon after it in the list.

I had used a value of 12.5 for the AIRE's hull damage, and apparently the system doesn't like decimals for hull damage.
I changed it to 13 and now everything works.

Thanks to anyone who helped ;)

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Sun, 2. Oct 05, 15:19

even if X2 is 2 years old, we still learn many new things from it's dark, confusing depths of numbers and programming code. Thanks for the heads-up :D

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

values

Post by Harlock776 » Sun, 2. Oct 05, 15:28

Lol decimals can be dangerous hehe:-) Better to use whole numbers for damage like 100 or 200 or something like that instead of 221520 cuz it's kind of annoying to X2 and also it makes for more difficult weapon balancing later on when your tweaking the mod before release.

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 15:39

And now my mod is back on-schedule! :D


Weapon rebalancing is the main goal of my mod so I have to get it right from the start....or as close to 'right' as I can. ;)

I've surprised myself with this already though, after initial testing it would seem I got Hull/Shield damage, Rate of Fire, projectile velocity and range all fairly close to 'balanced' with regards to each other, first-time.

Now to re-balance the prices of the weapons... that may be trickier to get 'right'.

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Sun, 2. Oct 05, 15:50

indeed. Dont forget about the produce cycles and resource requirements, if you're willing to go that far into balancing :lol:

Kvalyr
Posts: 336
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Sun, 2. Oct 05, 17:02

I'll have to see about stuff like that, since the economy is basically broken anyway - it might not make a huge difference.
Hmm, I wonder if it'll screw up the economy further for the NPC stations if i don't change those? or would it only really matter to the player & player-stations?..
Most players just build SPPs anyway :P

Return to “X²: The Threat - Scripts and Modding”