aliens

Author Topic: Modding Info - Tutorials request  (Read 3997 times)

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Modding Info - Tutorials request
« on: September 11, 2014, 08:15:46 pm »
Hello!

I would like to know if there is documentation, tutorials, how-to guides, etc... aboutthe following modding topics:

1) Some days ago I read thet one of the nightlies was implementing the possibilty to mod dual-weapon HWPs... Where is this new feature documented? By the way, is there any place where a more or less detailed explanation about what are the changes included by each new nightlie are explained?

2) Include a new Alien Race: I would like to implement a "Muton Guard", an improved stats elite soldiers (with among other improvements, more resistence to psi-attacks) for late game... By the way, can any race armor be given a psi strenght boost?
What sections of the ruleset must be modded to include a new race, and make it appear in the late game?


3)  Include new late game Alien weapons... Again what sections need to be modded to make aliens use those new weapons?

Are any of the mods already current particularly instructive about how to achieve goals numeber 2 amd 3 where I can learn from?

Thanks!!!  8)

Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: Modding Info - Tutorials request
« Reply #1 on: September 11, 2014, 08:29:51 pm »
Are any of the mods already current particularly instructive about how to achieve goals numeber 2 amd 3 where I can learn from?

Look at the raceweights in the alienDeployments in regards to controlling late game appearances (the Gazer Aliens MOD may be a good example, they don't show up till July)

Also in the deployment are lists of weapons layouts which correspond to item levels which is how the game determines what weapons are used.(There's an alien item levels mod that may be useful as it focuses on this.)

This is invaluable as a reference: https://www.ufopaedia.org/index.php?title=Ruleset_Reference_%28OpenXcom%29


Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11454
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Modding Info - Tutorials request
« Reply #2 on: September 12, 2014, 10:13:21 am »
Bear in mind that adding more item levels will make the game incompatible with any mod containing alienDeployments section, like for example the Men in Black mod.

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: Modding Info - Tutorials request
« Reply #3 on: September 12, 2014, 03:18:48 pm »
"Au Contraire"... I want the most of compatibilty... What are ItemLevels and how to include a new (derivative) alien race without making it incompatible? For example, in the FMP modpack there is a section called itemLevels, which has ten number strings (as the ruleset reference says it should be), and with 34 lines if I counted right. To add Itemlevels is to make a ruleset with more than those 34 lines for example? Or what? What if I am not including that section in the .rul file for the new race... Will it "take" the info from a previously loaded ruleset (be it the main Xcom1 Ruleset or any other, for example the FMP one?)

This is the part of the ruleset I am looking at:

Code: [Select]
alienItemLevels:
  - [0, 0, 0, 0, 0, 0, 0, 1, 2, 3]
  - [0, 0, 0, 0, 0, 1, 1, 2, 2, 3]
  - [0, 0, 0, 1, 1, 1, 2, 2, 3, 3]
  - [0, 0, 0, 1, 1, 2, 2, 3, 3, 3]
  - [0, 0, 1, 1, 1, 2, 2, 2, 3, 3]
  - [0, 0, 1, 1, 2, 2, 2, 3, 3, 3]
  - [0, 0, 1, 1, 2, 2, 2, 3, 3, 3]
  - [0, 1, 1, 2, 2, 2, 3, 3, 3, 3]
  - [0, 1, 1, 2, 2, 2, 2, 3, 3, 3]
  - [0, 0, 1, 1, 2, 2, 3, 3, 3, 3]
  - [0, 1, 1, 2, 2, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 2, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 2, 2, 3, 3, 3, 3]
  - [0, 0, 1, 1, 1, 2, 2, 2, 3, 3]
  - [0, 1, 1, 1, 1, 1, 2, 2, 3, 3]
  - [0, 0, 1, 1, 1, 1, 2, 2, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 2, 3, 3]
  - [0, 1, 1, 1, 1, 1, 2, 2, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 1, 1, 2, 2, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 2, 2, 2, 3, 3, 3]
  - [0, 0, 1, 1, 2, 2, 3, 3, 3, 3]
  - [0, 1, 1, 1, 2, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 1, 1, 2, 2, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 2, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 1, 1, 2, 2, 3, 3]
  - [0, 1, 1, 1, 2, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 1, 2, 2, 2, 3, 3]
  - [0, 1, 1, 2, 2, 2, 2, 3, 3, 3]
  - [0, 1, 1, 1, 2, 2, 2, 3, 3, 3]

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: Modding Info - Tutorials request
« Reply #4 on: September 12, 2014, 03:21:53 pm »
Oh! And people, thanks for the assistance!

By the way... Any clue about information about the new HWP dual weapon feature? How to mod it in the game?

Thanks again!

Offline XOps

  • Colonel
  • ****
  • Posts: 193
  • Guy who drowns first
    • View Profile
Re: Modding Info - Tutorials request
« Reply #5 on: September 12, 2014, 04:53:09 pm »
2) Include a new Alien Race: I would like to implement a "Muton Guard", an improved stats elite soldiers (with among other improvements, more resistence to psi-attacks) for late game... By the way, can any race armor be given a psi strenght boost?
What sections of the ruleset must be modded to include a new race, and make it appear in the late game?


3)  Include new late game Alien weapons... Again what sections need to be modded to make aliens use those new weapons?

Are any of the mods already current particularly instructive about how to achieve goals numeber 2 amd 3 where I can learn from?

2) I actually have done this exact thing. Psi strength can be given to race armor or the race stats themselves. Either one works. Just be careful not to give the alien Psi Skill with Psi Strength or they will start using panic and mind control attacks. I have attached some code from my mod as an example.
Code: [Select]
units:
- type: STR_MUTON_GUARD
    race: STR_MIXED
    rank: STR_LIVE_SOLDIER
    stats:
      tu: 80
      stamina: 150
      health: 175
      bravery: 110
      reactions: 80
      firing: 70
      throwing: 75
      strength: 80
      psiStrength: 150
      psiSkill: 0
      melee: 90
    armor: MUTON_GUARD_ARMOR
    standHeight: 21
    kneelHeight: 16
    value: 19
    deathSound: 6
    intelligence: 6
    aggression: 2
    energyRecovery: 50
armors:
  - type: MUTON_GUARD_ARMOR
    spriteSheet: MUTONGUARD.PCK
    spriteInv: inventory_MUTON_GUARD
    corpseBattle:
      - STR_MUTON_GUARD_CORPSE
    frontArmor: 80
    sideArmor: 60
    rearArmor: 60
    underArmor: 30
    drawingRoutine: 10
    damageModifier:
      - 1.0
      - 0.6
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 0.0
    loftempsSet: [ 3 ]
alienRaces:
  - id: STR_MIXED #Renamed elite Cydonia guard since races are hardcoded to missions right now
    retaliation: false
    members:
      - STR_MUTON_GUARD
      - STR_ETHEREAL_COMMANDER
      - STR_MUTON_WARLORD
      - STR_CHRYSSALID_TERRORIST
      - STR_MUTON_COMMANDO
      - STR_ARMORED_SECTOID_COMMANDER
      - STR_SECTOPOD_TERRORIST
      - STR_CYBERDISC_TERRORIST
You also need a BIGOBS corpse, FLOOROBS corpse, a corpse item, a live alien item, and modify the alienMissions to make sure they appear in the mission list.

As for 3. You need the alienItemLevels and alienDeployments to get new items into the Alien's hands. Be aware that you can only give them one plasma weapon, but any number of grenades or other gear. Again I have attached some code from my mod.

Code: [Select]
alienDeployments:
  - type: STR_SMALL_SCOUT
    data:
      - alienRank: 5
        lowQty: 1
        highQty: 1
        dQty: 0
        percentageOutsideUfo: 50
        itemSets:
          -
            - STR_ALIEN_PLASMA_PISTOL
            - STR_ALIEN_PLASMA_PISTOL_CLIP
            - STR_ALIEN_PLASMA_PISTOL_CLIP
            - STR_ALIEN_COMM
            - STR_MIND_PROBE
          -
            - STR_ALIEN_PLASMA_RIFLE
            - STR_ALIEN_PLASMA_RIFLE_CLIP
            - STR_ALIEN_PLASMA_RIFLE_CLIP
            - STR_ALIEN_COMM
            - STR_ALIEN_GRENADE
            - STR_MIND_PROBE
          -
            - STR_ALIEN_PLASMA_SNIPER_RIFLE
            - STR_ALIEN_PLASMA_SNIPER_RIFLE_CLIP
            - STR_ALIEN_PLASMA_SNIPER_RIFLE_CLIP
            - STR_ALIEN_COMM
            - STR_ALIEN_GRENADE
            - STR_MIND_PROBE
            - STR_ELLERIUM_LAMP
          -
            - STR_ALIEN_PLASMA_PISTOL
            - STR_ALIEN_PLASMA_PISTOL_CLIP2
            - STR_ALIEN_PLASMA_PISTOL_CLIP2
            - STR_ALIEN_COMM
            - STR_MIND_PROBE
          -
            - STR_ALIEN_PLASMA_RIFLE
            - STR_ALIEN_PLASMA_RIFLE_CLIP2
            - STR_ALIEN_PLASMA_RIFLE_CLIP2
            - STR_ALIEN_COMM
            - STR_ALIEN_GRENADE
            - STR_MIND_PROBE
          -
            - STR_ALIEN_PLASMA_SNIPER_RIFLE
            - STR_ALIEN_PLASMA_SNIPER_RIFLE_CLIP2
            - STR_ALIEN_PLASMA_SNIPER_RIFLE_CLIP2
            - STR_ALIEN_COMM
            - STR_ALIEN_GRENADE
            - STR_MIND_PROBE
            - STR_ELLERIUM_LAMP
          -
            - STR_ALIEN_PLASMA_PISTOL
            - STR_ALIEN_PLASMA_PISTOL_CLIP2
            - STR_ALIEN_PLASMA_PISTOL_CLIP3
            - STR_ALIEN_PLASMA_PISTOL_CLIP1
            - STR_ALIEN_COMM
            - STR_MIND_PROBE
          -
            - STR_ALIEN_PLASMA_RIFLE
            - STR_ALIEN_PLASMA_RIFLE_CLIP2
            - STR_ALIEN_PLASMA_RIFLE_CLIP3
            - STR_ALIEN_COMM
            - STR_ALIEN_GRENADE
            - STR_MIND_PROBE
          -
            - STR_ALIEN_PLASMA_SNIPER_RIFLE
            - STR_ALIEN_PLASMA_SNIPER_RIFLE_CLIP3
            - STR_ALIEN_PLASMA_SNIPER_RIFLE_CLIP3
            - STR_ALIEN_COMM
            - STR_ALIEN_GRENADE
            - STR_MIND_PROBE
            - STR_ELLERIUM_LAMP
    width: 40
    length: 40
    height: 4
alienItemLevels:
  - [0, 0, 0, 0, 0, 0, 0, 1, 1, 2]
  - [0, 0, 0, 0, 0, 1, 1, 1, 2, 2]
  - [0, 0, 0, 1, 1, 1, 1, 2, 2, 2]
  - [0, 0, 1, 1, 1, 1, 2, 2, 2, 2]
  - [0, 0, 1, 1, 1, 2, 2, 2, 2, 2]
  - [0, 1, 1, 1, 2, 2, 2, 2, 2, 2]
  - [3, 1, 1, 1, 4, 2, 2, 2, 2, 5]
  - [3, 1, 1, 4, 4, 2, 2, 2, 5, 5]
  - [3, 1, 1, 1, 4, 4, 2, 2, 5, 5]
  - [6, 1, 1, 4, 4, 7, 2, 2, 5, 5]
  - [6, 1, 1, 4, 7, 2, 2, 5, 8, 2]

Note that the numbers in alienItemLevels corresponds to each entry in the alienDeployments section.

"Au Contraire"... I want the most of compatibilty... What are ItemLevels and how to include a new (derivative) alien race without making it incompatible? For example, in the FMP modpack there is a section called itemLevels, which has ten number strings (as the ruleset reference says it should be), and with 34 lines if I counted right. To add Itemlevels is to make a ruleset with more than those 34 lines for example? Or what? What if I am not including that section in the .rul file for the new race... Will it "take" the info from a previously loaded ruleset (be it the main Xcom1 Ruleset or any other, for example the FMP one?)

Not completely sure if I follow you here. Item levels are not needed to include a new race (new races are added via alienRaces section and alienMissions), only new gear for the Aliens. As others have said, this is incompatible will all mods that have their own version of alienItemLevels. If there are two item levels in two rulesets, then the game will only use one I'm afraid. I know the game will pick a modded alienItemLevels over the core rules though. However you can add new alien races just fine though. For other examples of this, look at the MIB mod as it does both item levels and a new alien race. You could look at my mod too, but my code is horribly bloated and impossible to figure out :P. Also I have no idea about the HWP duel weapon feature.

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: Modding Info - Tutorials request
« Reply #6 on: September 12, 2014, 08:44:52 pm »
Xops, thenks for your clear explanations and examples! And I was thinking that "Muton Guard" was an original race name... :-( I have downloaded your mod, but did not check its internals...
By the way, also thank you very much for sharing your mod works!! 8)

Also I think is a good thing that it is possible to add races and weapons without messing with alien ItemLevels, that way I make sure to avoid compatibility issues.
« Last Edit: September 12, 2014, 08:57:28 pm by guille1434 »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11454
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Modding Info - Tutorials request
« Reply #7 on: September 12, 2014, 08:52:49 pm »
ItemLevels aren't terribly complicated. Let me explain briefly:

- Rows represent months. The first row is Jaunary 1999, the second is February 1999 and so on. Once the game runs out of rows because it's running for a long time), the last one is used.

- Each row has 10 slots. Each slot must be filled by a number, corresponding to a loadout configuration (see below), and represents a 10% chance for this loadout to occur. For example a row that says [0, 0, 0, 1, 1, 1, 1, 2, 2, 3] means that there is 30% chance for loadout 0, 40% chance for loadout 1, 20% chance for loadout 2 and 10% chance for loadout 3.

- The numbers (0, 1, 2 and 3 in this case) denote loadouts for this particular alien rank, as determined in the alienDeployments section. For example let's have a look at the soldier (alien rank 5 normally denotes soldiers) in a terror mission:

Code: [Select]
        itemSets:
          -
            - STR_PLASMA_PISTOL
            - STR_PLASMA_PISTOL_CLIP
            - STR_PLASMA_PISTOL_CLIP
          -
            - STR_PLASMA_RIFLE
            - STR_PLASMA_RIFLE_CLIP
            - STR_ALIEN_GRENADE
            - STR_PLASMA_RIFLE_CLIP
          -
            - STR_PLASMA_SNIPER_RIFLE
            - STR_PLASMA_SNIPER_RIFLE_CLIP
            - STR_ALIEN_GRENADE
            - STR_PLASMA_SNIPER_RIFLE_CLIP
          -
            - STR_HEAVY_PLASMA
            - STR_HEAVY_PLASMA_CLIP
            - STR_ALIEN_GRENADE
            - STR_HEAVY_PLASMA_CLIP

In this case it means that if loadout 0 is rolled, the alien has a plasma pistol (with ammo); if loadout 1 is chosen, he gets a plasma rifle and a grenade; for 2, he gets a plasma sniper rifle and a grenade; and if it's 3, it's a heavy plasma gun and a grenade.

That's all! I hope it helps. :)

(Note that I was referring to the Final Mod Pack, since that was what you've asked about; the original file only has 3 loadouts per alien, being 0, 1 and 2.)