Enemy slots in a WAD file and their behaviour

builders help builders

Moderator: eTux

Post Reply
User avatar
Anurag
Member
Member
Posts: 700
Joined: 07 Mar 2004 11:19
Location: India
Contact:

Enemy slots in a WAD file and their behaviour

Post by Anurag » 12 Oct 2009 12:49

I would like to know why are these slots used for and difference between these slots

SAS
TROOPS
BADDY_1
BADDY_2

and what are the extra _MIP and MESHSWAP slots used for.

Additionally I would also like to know where can I get information about all the slots and their behaviour, I know its out there somewhere but don't know where exactly :) .

Note: I downloaded an enemy which was meant to be in SAS slot, replaced it in BADDY_1 in my WAD and its appearance got screwed up, I replaced the same object in SAS and it seems to be working fine, so just being curious.

What should I do if there are two enemies required in a map when both in SAS slot by default?
Learning the tricks of the trade ... Shall unleash once I am ready :)
Currently working on : VCI HQ - Unfinished Business -> 5% Done (Currently Shelved :D)
My Walkthroughs For Custom Levels

User avatar
Titak
Member
Member
Posts: 890
Joined: 04 Sep 2003 10:47
Location: Drenthe, The Netherlands

Re: Enemy slots in a WAD file and their behaviour

Post by Titak » 12 Oct 2009 16:35

SAS
This enemie fires at Lara with either a big gun or it shoots grenades.

TROOPS
Basically a friendly "enemie" which will only attack Lara if she fires at it.
It uses guns to fire at Lara.

BADDY1
This is one of the ninja type baddies from TR4. It can climb on blocks, roll and perform summersaults like Lara can.
I think it can even use monkeybars when set up right.
It has uzi's and it also uses a sword.

BADDY2
A similar baddie as BADDY1.
This one also uses uzi's and a sword, but this one can move its sword in front of itself, thus shielding itself from Lara's bullets.

(I might have mixed BADDY1 and BADDY2 up... I didn't bother to check the TR4 wads :blush: )

MIP slots
Used for showing an enemie or animating object from a great distance to save CPU power ingame.
For them to work like this, you will have to place a low-poly version of the enemie or object in the corresponding MIP slot and add an AnimatingMip= line to the script of your level.
They can be used in custom levels but I don't think they hardly ever are used.
(I always put static (non-animating) objects in these slots because they react to the lighting of a room like any other animating object does. :D)

MESHSWAP
Some enemies, like the BADDY1 and BADDY2 use a meshswap object.
In the case of these enemies the handmesh with the gun gets replaced by a hand mesh with the sword.
So if you don't add this object (make sure you use the correct meshswap with each enemie) your enemie will look wierd when the meshswap kicks in, because the effect will kick in, whether or not you have the meshswap in your wad.


NOTE:
As you already found out, you can't put one enemie in another enemie slot.
You'll have to find another similar enemie which has been adjusted to fit in another slot.
I've never done this "adjusting" so I don't know how it works.
Nothing is in contradiction with nature,
only in contradiction with what we know of it.


Image

User avatar
Anurag
Member
Member
Posts: 700
Joined: 07 Mar 2004 11:19
Location: India
Contact:

Re: Enemy slots in a WAD file and their behaviour

Post by Anurag » 13 Oct 2009 15:01

:hi: Titak

Thanks for the reply, I looked up at the MESHSWAP obj in my WAD and I think when I replaced my SAS object in BADDY1 slot, it was the MESHSWAP due to which the baddy looked idiotic.

PS: Can TROOPS be used for AI_AMBUSH and AI_FOLLOW ?? :?
Learning the tricks of the trade ... Shall unleash once I am ready :)
Currently working on : VCI HQ - Unfinished Business -> 5% Done (Currently Shelved :D)
My Walkthroughs For Custom Levels

User avatar
Titak
Member
Member
Posts: 890
Joined: 04 Sep 2003 10:47
Location: Drenthe, The Netherlands

Re: Enemy slots in a WAD file and their behaviour

Post by Titak » 13 Oct 2009 20:43

Erm... I don't know. Never tried it... :blush:

But somebody else might know. :D
Nothing is in contradiction with nature,
only in contradiction with what we know of it.


Image

User avatar
Anurag
Member
Member
Posts: 700
Joined: 07 Mar 2004 11:19
Location: India
Contact:

Re: Enemy slots in a WAD file and their behaviour

Post by Anurag » 03 Nov 2009 18:19

Hi

I had 3 different enemies I wanted in my level, but all were in SAS slot.
I copied the first one from SAS object into BADDY_1 and MESHSWAP3 slots; second one from SAS object into BADDY_2 and MESHSWAP2 slots and the third one is still in SAS slot.

Now I can use all the three without any problems :)

PS: I read somewhere TROOPS are friendly and will follow LARA and shoot enemies if Lara shoots them

Edit: I found out that this DOES NOT work always, I added another BADDY2 and MESHSWAP2 overwriting the previous one and now both the baddies only reload and point the gun they dont shoot
Learning the tricks of the trade ... Shall unleash once I am ready :)
Currently working on : VCI HQ - Unfinished Business -> 5% Done (Currently Shelved :D)
My Walkthroughs For Custom Levels

User avatar
Mulf
Senior Member
Senior Member
Posts: 1396
Joined: 04 Oct 2001 00:41

Re: Enemy slots in a WAD file and their behaviour

Post by Mulf » 04 Nov 2009 17:53

Well...as Titak already pointed out, enemies will not work if you don't put them into the slot for which they were conceived. Each enemy is programmed to behave differently, and typically one type of enemy doesn't have all the animations of the other, and even if it has, their StateIDs and corresponding State Changes will be different. Even if all goes well for a while under laboratory conditions in a test level, there will be bugs and glitches of all kinds in game.
For example, the SAS can only go up or down 1-click slopes, while BADDY_1 and BADDY_2 can climb 4-click blocks. Now, if an SAS copied into one of the baddy slots hits a 4-click block, the engine will make him climb that block, and display the animation that corresponds to the baddy's StateID for climbing blocks, whichever that may be. It's certainly going to look awkward, and chances are that this SAS-turned-baddy will get stuck forever, simply because there's no such StateID at all.
Mind that this is just one example. Just about anything can, and typically will, go wrong.
That said, there are exceptions to this rule, namely in cases where the objects are very similar, if for example one has been developed on the basis of the other, as seems to be the case with SAS and TROOPS. You can, for example, use an SAS in the TROOPS slot (but in no other slot) without problems...but if you do that, he won't ever use any grenades. (BADDY_1 and BADDY_2 are very similar too, but much more complex, and therefore probably more problematic.)

One can of course always try and adapt an enemy to another slot, but this is a very complicated issue (not recommended to dabble with for beginners) and doesn't always work either.

Oh, and yes, TROOPS are friendly as long as Lara doesn't shoot them, and they will attack any enemy if Lara leaves them alone.

Post Reply

Who is online

Users browsing this forum: No registered users and 56 guests