Author Topic: Possibly dense question about alien item levels & custom weapons  (Read 4818 times)

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile

Hi,

So if I am going through and replacing the existing plasma weapons with renamed/rebalanced 'alien' weapons for a mod, how do these interact with the parameters set in AlienItemLevels.rul?
I can't find any way to set what 'tech level' a given item should be for this purpose.

Or is the answer "it doesn't" and so I'll have to make sure to specify loadouts very thoroughly in deployment scripts?

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Possibly dense question about alien item levels & custom weapons
« Reply #1 on: April 23, 2018, 01:45:30 pm »
Yes, you use alienDeployment entries to determine which weapon is which tech level.
The only thing alienItemLevels does is refer to which "weapom slots" should be used for each 10% chance.

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: Possibly dense question about alien item levels & custom weapons
« Reply #2 on: April 24, 2018, 01:43:33 am »
Right, looked at it again and now it makes sense. Thanks for providing the context I needed to grok that.

Follow-up question- if I wanted to restrict certain weapon loadouts to certain alien units, what's the best way to do that?

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Possibly dense question about alien item levels & custom weapons
« Reply #3 on: April 24, 2018, 11:19:51 am »
If the deployment is the same (like same UFO), there are three options I can see:
1) Make separate UFOs/missions for different races.
2) Use units with fixed weapons. They override alienDeployments.
3) (OXCE only) Make separate deployments by race to the same UFO. It's too complex to describe here, but check my X-Com Files as an example - most vanilla UFOs have separate deployments for various vanilla races.

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: Possibly dense question about alien item levels & custom weapons
« Reply #4 on: April 25, 2018, 08:27:07 am »

Hmm. Can I 'fix' a weapon to a particular unit entry and still have the gun flagged as recoverable/droppable etc?

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Possibly dense question about alien item levels & custom weapons
« Reply #5 on: April 25, 2018, 11:26:16 am »
Yes, it should work, but honestly I have never tried it. Someone has to be the tester. :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Possibly dense question about alien item levels & custom weapons
« Reply #6 on: April 25, 2018, 12:28:46 pm »
Recoverable probably yes.

Droppable not... the definition of "fixed" is "not droppable".

Anyway, I still don't get what you really want to achieve... do you just want e.g. that Heavy Plasma can be used only by Sectoids? If yes, that's quite silly, isn't it... what would the game do if you tried picking up Heavy Plasma into your hands? Just say "cannot pick up this item"?
« Last Edit: April 25, 2018, 12:31:08 pm by Meridian »

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: Possibly dense question about alien item levels & custom weapons
« Reply #7 on: April 25, 2018, 04:38:06 pm »
What I'm trying to do is 'only Sectoid Haberdashers are issued Hat Guns'

Once XCOM have researched Hat Guns I'm fine with them prying it from the cold dead hands of any Sectoid Haberdasher they kill, and if they haven't researched it the game already has behaviours in place for that.

But I don't want the game handing out special weapons to the 'wrong' unit. To extend my analogy let's assume other Sectoids haven't been trained in the safe and stylish use of the Hat Gun.

And I hate to be prickly but I fail to see what's 'silly' about a design consideration that a lot of RPGs and computer games use? I just want some equipment to only start the mission in the hands of a particular alien, and then behave like any other item from then on in.
« Last Edit: April 25, 2018, 04:47:27 pm by Keth01 »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Possibly dense question about alien item levels & custom weapons
« Reply #8 on: April 25, 2018, 05:02:08 pm »
The separate deployments by UFO or race (race in OXCE only) is exactly what you're looking for then.  You decide which rank of the Sectoid race is the 'haberdasher rank,' then make sure only that rank gets the hat guns, but only for the sectoid race.  If you want an example of using different UFO copies to do this by-race deployment, I know Aresenal Expanded does this for practically all UFOs.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Possibly dense question about alien item levels & custom weapons
« Reply #9 on: April 25, 2018, 05:04:07 pm »
I just want some equipment to only start the mission in the hands of a particular alien, and then behave like any other item from then on in.

Thanks for the explanation, helped a lot.
What I understood before is that you don't want xcom (or anyone else) to use it or even be able to pick it up.


As for your question, this is of course possible... it has been in openxcom since the beginning... same way sectoid soldiers carry plasma guns, but sectoid medics carry only small launchers with stun bombs (but never plasma guns). It's defined in the alien deployments.