Jump to content

Sebillian Melee Attack


Recommended Posts

I found it funny that Sebillians, despite how strong they are, don't try to do melee attacks in battle. So I was thinking of giving the basic guards/non-coms the basic 'melee' attack that the xenonauts have, and a deadlier, built-in 'bayonet' of sorts for the warriors/officers.

What do you guys think? I figure it could be done, considering there already is an alien in the game that solely uses melee attacks. So the stuff is already there to work with...

Link to comment
Share on other sites

As far as I can tell there is no way to give an alien two different weapons and the attack type is a function of the weapon, not the wielder.

It would be possible to give Sebillians a melee attack but it would be at the expense of their ranged attack rather than in addition to it.

A single weapon can also not have a long ranged attack and a melee ranged attack set separately as they are treated differently by the game engine.

You could create a melee strike and add it to the list of possible weapons for a specific race though.

That way some Sebillians would have ranged weapons and some would have melee weapons.

Link to comment
Share on other sites

Thought:

Aliens are capable of using a primary weapon and grenades as secondary weapons. As such, perhaps you could work around the issue by having a melee weapon as the primary weapon, but giving the alien as well a grenade-like item which, game mechanics wise, works the same as a gun. I'm not sure how much is tied to the variable that flags grenades as grenades, though, so I don't know if you'd be able to avoid the grenade-like line of fire and bullet trajectories. (Although an 'acid spit' weapon could legitimately be given a grenade-like trajectory, right? That's kind of how the acid spitting aliens in the OG worked, with an arcing trajectory).

Or you could just give melee-equipped aliens grenades as their long range alternative.

Link to comment
Share on other sites

I haven't tried yet but I have been planning to add a stun baton type weapon to the belt item slot for aliens instead of the grenade to see if they will use it.

I don't really know enough about how the belt items are used to know if it will work.

I feel that it won't but there might be ways to work around it.

Maybe a grenade with 1 range and no area damage might be an alternative if it cannot recognise non-grenade items.

Melee items have a range of 1000 so that might also work to disallow ranged attacks with a belt item to simulate a claw attack?

Link to comment
Share on other sites

As I'm in the process of implementing explosive alien kunai, I have some experience in this area. Aliens prefer to use their primary weapon whenever possible. If you make another non-grenade weapon and put it in the belt they will use that in preference to the primary weapon if it is more accurate than the primary weapon, but straight after using the belt item they will use their primary weapon.

EDIT: Note that if the belt weapon is less accurate than the primary weapon, they will almost never use it. Grenade belt items seem to be a special case.

Edited by Max_Caine
Link to comment
Share on other sites

So a high accuracy melee weapon, say 150%, would almost certainly be used if they were in melee range I would guess.

Wonder how that would affect the AI.

Would the AI try to get into melee range if that was its most accurate shot or would it be happy trying to pepper the enemy from range and only use the melee weapon if it accidentally ended up in melee range?

I am guessing you would need the primary weapon to still be the ranged weapon.

If nothing else they would look like they were all armed with the melee weapon but still fire bursts of plasma.

Unless you chose to make a different version of the primary melee weapon to team up with each secondary ranged weapon to reflect the sprite of the ranged weapon...

Should work.

Be interested to see how this works out.

Link to comment
Share on other sites

  • 2 weeks later...
Wouldn't just having them club the Xenonauts with whatever is in their hands be good enough? You could add a pointy part to the existing alien weapons.

That's actually what I originally had in mind. Although the idea of a belt carried club is amusing to me... Can aliens be made to do this? I know Xenonauts can do a melee attack with the butt of their guns. Could I code a sebilian to do this?

Trying to figure out the coding, by the way. This is not the first time I have tried my hand at modding... Hopefully it will go better than THAT first attempt though... I'll start digging through the 'Xenonauts Configuration Files' thread. Any tips for a guy who may be about to go stark raving mad?

Link to comment
Share on other sites

You could add as many pointy parts to weapons as you want but unless the alien AI knows they have the option of a melee attack and how to use it then it will just be a pretty picture.

The belt item for melee isn't really a suggestion of giving them a club on the belt but a suggestion of how to show the AI they are capable of a melee attack and what stats that attack should have.

Set isIntegrated=1 and that melee belt item should not drop or be visible to the player so you can give any reason you want for how the attack is performed, claws, energy bayonet, bad breath etc.

As said above you cannot seem to add a melee attack to a ranged weapon in the files as they have completely different bullettype flags.

The only obvious way round it is to add that melee attack to a different item in the same way grenade attacks are currently linked to a separate item.

You could try asking GJ how reapers handle melee weapons or ask Giovanni if the code is in place to handle an alternative melee attack for aliens and if there is a way to tie the AI to that action.

If you want to go the belt item route then I would suggest looking at the reaper claws in weapons_gc.xml as an example of an integrated melee weapon.

AIprops.xml will list the items carried by the aliens so you would need to edit that file to give your new item to the correct alien.

Items.xml contains entries for how weapons and other ground items are handled, this will probably not be needed if you use an integrated item as they only exist on a living enemy.

You would then need to decide how you want the alien to look when attacking in melee as there do not appear to be any melee attack animations at present.

I am very rusty on animation spectres but I believe you should be able to create a new folder with the name of your new weapon and create a spectre redirecting the game to the proper folder if you want to re-use an existing animation.

You are on your own if you want to create a new animation though, that is outside of my expertise.

Max_Caine might be able to give you some good insight on the difficulties of doing that though.

I am probably missing something out but those files should be a good place to start looking at how things operate.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...