Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Knight and Mysteries of the Sith Editing Forum → Editing existing enemy templates
Editing existing enemy templates
2006-10-10, 9:22 PM #1
I'm messing around with static.jkl, trying to edit the reeyees. I change their templates, and either it has no effect or it works but crashes.

I want to change the speed of their bullets, and for some reason this is escaping me.

Some general template questions:

Say I want to edit an existing weapon, can I simply copy its template and change the details, or do I need to change the name of it and then change the template the cog uses?

Do I need to explicitly (ie include in static.jkl) all of the template definitions that get used in whatever template I want to edit? Say I'm messing with +bryarbolt, then do I need to paste in the definitions of _weapon and _explosion?

Whats with the # of templates at the top? Do I need to count how many new templates I add and adjust this number? What if I'm just redefining an existin template instead of adding one? Is there a limit to how many templates I can add? It doesn't seem to crash on me when I change the number, so I can't figure out wtf it's for.

Is this the right approach for editing details about the AI? Like, if I want to change how fast the reeyees move, can I just edit their maxthrust? Or do I need to edit the level? I can make some of them move faster, but then it crashes on me when I try to respawn, and on top of that, it only affects the black ones with blasters, if I try to overwrite the brown ones it crashes.

I've been testing and fiddling and I can't seem to figure out the rules. I've managed to overwrite the blasterbolt, but I can't overwrite the +eblaster, which I guess is what the reeyees use, and then on top of that, I can't figure out what cog handles their firing code, I'm beginning to suspect it's hard coded.

Any help would be appreciated, thanks.


losder
2006-10-11, 7:47 AM #2
I'd make a new template with +eblaster as parent, changing it's speed and name. Then edit the reeyees line and switch +eblaster with whatever name you have chosen for your own projectile.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2006-10-11, 1:57 PM #3
Originally posted by losder:
I want to change the speed of their bullets, and for some reason this is escaping me. losder

I think that you only need to change the velocity vector to a different number for this.
vel=(0.0/4.0/0.0), obviously a bigger number means faster

Originally posted by losder:
Say I want to edit an existing weapon, can I simply copy its template and change the details, or do I need to change the name of it and then change the template the cog uses? losder

You should not have two templates with the same name. All original JK templates will be loaded, so you should rename any copies

Originally posted by losder:
Do I need to explicitly (ie include in static.jkl) all of the template definitions that get used in whatever template I want to edit? Say I'm messing with +bryarbolt, then do I need to paste in the definitions of _weapon and _explosion? losder

It sounds like you are basically modding. Editing is modding. You can create whole new enemies without using JK Patch Commander, but they have to be of different names.
For modding, it is good practice to create new classes for anything you add up to the "none" class. Like instead of using "_explosion" based on none just make a copy but name it like "_aexplosion" and base your other things on the new one.
IMPORTANT:
Ordering in static.jkl does matter. Make sure that if you have a template based on "_something", that you have already declared what "_something" is higher up in the file.

Originally posted by losder:
Whats with the # of templates at the top? Do I need to count how many new templates I add and adjust this number? What if I'm just redefining an existin template instead of adding one? Is there a limit to how many templates I can add? It doesn't seem to crash on me when I change the number, so I can't figure out wtf it's for. losder

I don't know either. I always make sure it is bigger than the number of templates I need. There is a limit on templates, but I think HellRaiser64 made a patch for it. Don't worry, the limit is still really big and you probably wont reach it. Anything in static.jkl under "templates" should also include what it is based upon.

Originally posted by losder:
Is this the right approach for editing details about the AI? Like, if I want to change how fast the reeyees move, can I just edit their maxthrust? Or do I need to edit the level? I can make some of them move faster, but then it crashes on me when I try to respawn, and on top of that, it only affects the black ones with blasters, if I try to overwrite the brown ones it crashes. losder

I think you have the right idea, editing maxthrust but I'm not entirely certain. As for the crashing, I think it depends on how you test. Like I said, if you merely edit existing templates you have to treat your .gob as a mod and run it through JK Patch Commander. Otherwise you can just copy existing templates under different names for you level, and the original ones will not be affected.
Rule of Thumb: anything changing original content should be tested by JK Patch Commander


Originally posted by losder:
I've been testing and fiddling and I can't seem to figure out the rules. I've managed to overwrite the blasterbolt, but I can't overwrite the +eblaster, which I guess is what the reeyees use, and then on top of that, I can't figure out what cog handles their firing code, I'm beginning to suspect it's hard coded. losder

Originally posted by losder:
losder

Actually, you can open COG files in notepad, and right away it will declare any templates used in the cog. The template itself tells what the weapon template is. For instance, REEYEESGUN (brown) says "weapon=+elaser" Therefore, the red laser you see in game when he shoots something is "+elaser" The file under "aiclass=rydefault.ai" commands how the weapon should be used.

Don't get caught up in the COG programming. It sounds like the editing you want to do can be done without editing the cog files.


Isn't it a pain in the arse when JK crashes?
Anything needing clarification just keep posting.
This is retarded, and I mean drooling at the mouth
2006-10-11, 3:16 PM #4
Well, I know c++, so writing cog script is a breeze. The thing I don't want to get into is making maps, because all the tools are so awful. Which is why my approach is just to edit the existing stuff.

I'm trying to make the reeyees in nar faster and smarter and eventually I'd like to replace them, but my trial and error approach to feeling this out is beginning to give me a headache.

I tried editing the jkl for narshadda in jk1.gob last night, with no effect. I'll try gobbing the stuff up and seeing if that solves my crashing issues, but I don't see why it should.


losder
2006-10-11, 3:26 PM #5
Oi, and like for all the player weapons, you can see where the bullet template is used, but for the reeyees I can't find it. In their actor_rb.cog, there's no mention of their weapons or anything else, it only handles their getting damaged, dropping powerups, or getting attacked by several force powers.

Here's another oddity, say I want to make all the reeyees black, so I change the model variable to blahblah.3do, save and launch, then it changes a couple of them, but there's one brown one still, and half of them are broken + it crashes when I die.

I'm starting to think that I can't edit existing templates, I've got to create new ones derived from the old ones and then use those. The problem I run into with that, is that I can't find where the +elaser gets used in the reeyees cog, so I can't change it to +myElaser or whatever. That's why I've been trying to change the reeeyees directly.

I guess the next smart thing to do would be to derive some new reeyees, and then edit the map? Could I get away with just editing the jkl? I tried it last night and couldn't get any changes to stick, either by sticking the level jkl in the jkl folder or sticking it back in the gob.

More investigating ahead of me.

losder
2006-10-11, 9:03 PM #6
Quote:
I don't know either. I always make sure it is bigger than the number of templates I need. There is a limit on templates, but I think HellRaiser64 made a patch for it. Don't worry, the limit is still really big and you probably wont reach it. Anything in static.jkl under "templates" should also include what it is based upon.

Whatever it is, there is indeed something there sometimes...

I once had a static.jkl that refused to work correctly, until I changed the number of templates from whatever number it was to 1000. Then it worked without a problem at all.
May the mass times acceleration be with you.

↑ Up to the top!