aliens

Author Topic: Quick "items: battleType: " question  (Read 9182 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Quick "items: battleType: " question
« on: June 17, 2014, 12:10:45 pm »
Here https://www.ufopaedia.org/index.php?title=Ruleset_Reference_%28OpenXcom%29
it says:
Battletype:
10 - corpse

But then on Xcom1Ruleset.rul file, provided with OpenXcom, all the alien corpses use:
    battleType: 11

Is it 11 or 10? And if 11, what is missing from the ruleset reference's list?

Thanks


Edit:
Extra question

What is the
units:
    rank:
needed for?
« Last Edit: June 17, 2014, 12:19:12 pm by robin »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Quick "items: battleType: " question
« Reply #1 on: June 17, 2014, 12:51:45 pm »
each race consists of multiple ranks 2 terrorist-ranks and 5 other (soldier,medic,commander,...)
the rank can have different values (sectoid commander can do psi, soldier can not) and armour values (e.g. there are 3 different floater armours)
in the source i found:
enum BattleType { BT_NONE, BT_FIREARM, BT_AMMO, BT_MELEE, BT_GRENADE, BT_PROXIMITYGRENADE, BT_MEDIKIT, BT_SCANNER, BT_MINDPROBE, BT_PSIAMP, BT_FLARE, BT_CORPSE };
=> wiki is wrong psi amp is missing  - i fixed it in the wiki
« Last Edit: June 17, 2014, 12:54:54 pm by Falko »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Quick "items: battleType: " question
« Reply #2 on: June 17, 2014, 03:57:15 pm »
each race consists of multiple ranks 2 terrorist-ranks and 5 other (soldier,medic,commander,...)
the rank can have different values (sectoid commander can do psi, soldier can not) and armour values (e.g. there are 3 different floater armours)
Yeah but all the things you cite are set by other entries, for example:
- the psy powers are enabled by the "psySkill:  " entry, rank is (or seems) irrelevant.
- armor values are directly set to the specific unit by the "armor: " entry, rank again is (or seems) totally irrelevant.

My problem is that the live (stunned) enemy units of my men in black mod, are not recoverable. They're not listed in the score summary for the mission and you don't bring back to the base.
I've tried everything I could (the items for the live units were missing) but I wasn't able to fix it.
"rank: " is the only piece I feel I'm missing, and since all the values for it have the "_LIVE_" word, I was wondering if it was somehow involved in my problem.

So what is "rank: " needed for in concrete, what does it "do"?

in the source i found:
enum BattleType { BT_NONE, BT_FIREARM, BT_AMMO, BT_MELEE, BT_GRENADE, BT_PROXIMITYGRENADE, BT_MEDIKIT, BT_SCANNER, BT_MINDPROBE, BT_PSIAMP, BT_FLARE, BT_CORPSE };
=> wiki is wrong psi amp is missing  - i fixed it in the wiki
Thanks.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Quick "items: battleType: " question
« Reply #3 on: June 17, 2014, 06:03:31 pm »
Yeah but all the things you cite are set by other entries, for example:
- the psy powers are enabled by the "psySkill:  " entry, rank is (or seems) irrelevant.
- armor values are directly set to the specific unit by the "armor: " entry, rank again is (or seems) totally irrelevant.
there is a rank mechanism to give alien/rank-combos different values thats the reason for "rank" in units they are different units and "rank" connects STR_SECTOID_SOLDIER to STR_LIVE_SOLDIER = (iirc = position 6 in rank list of alienraces) so a muton soldier takes the place where normaly a commander is

i now played around a bit with your mod and i could not capture live alien-mib-personal i could stun them but no live aliens for me :(

adding rank
Code: [Select]
  - type: STR_MIB_LEADER
    race: STR_MIB
    rank: STR_LIVE_LEADER
did not help,
copying stats and damagevalues of sectoids did not help
dis/enabling live alien sale was no help
adding
Code: [Select]
  - type: STR_MIB_SOLDIER
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 60000
was no help
also making the corpses recoverable didnt change a thing :(

perhaps you are interested in
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    points: 0
    raceWeights:
      0:
          STR_MIB: 100
          STR_SECTOID: 0
          STR_SNAKEMAN: 0
          STR_FLOATER: 0
          STR_MUTON: 0
      1:
          STR_MIB: 100
          STR_SECTOID: 0
          STR_SNAKEMAN: 0
          STR_FLOATER: 0
          STR_MUTON: 0
      3:
          STR_MIB: 100
          STR_SECTOID: 0
          STR_SNAKEMAN: 0
          STR_FLOATER: 0
          STR_MUTON: 0
      5:
          STR_MIB: 100
          STR_SECTOID: 0
          STR_SNAKEMAN: 0
          STR_FLOATER: 0
          STR_MUTON: 0
      7:
          STR_MIB: 100
          STR_SECTOID: 0
          STR_SNAKEMAN: 0
          STR_FLOATER: 0
          STR_MUTON: 0
facilities:
- {buildTime: 2, aliens: 100, type: STR_ALIEN_CONTAINMENT}
that gives a guaranteed mib mission as the first mission of a new game+a fast alien containment

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Quick "items: battleType: " question
« Reply #4 on: June 17, 2014, 07:18:18 pm »
Yeah, I tried all those things too, but none worked.
I don't know what to do anymore.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Quick "items: battleType: " question
« Reply #5 on: June 17, 2014, 10:54:19 pm »
"rank" used to be for translations but now it's mostly obsolete, only really used to check for terrorist units.

For a live alien to be recoverable, it needs to have a research topic with the same name that hasn't been researched yet, otherwise he is deemed useless and promptly killed/sold for science.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Quick "items: battleType: " question
« Reply #6 on: June 17, 2014, 10:58:37 pm »
"rank" used to be for translations but now it's mostly obsolete, only really used to check for terrorist units.

For a live alien to be recoverable, it needs to have a research topic with the same name that hasn't been researched yet, otherwise he is deemed useless and promptly killed/sold for science.
lol

However, they all have a research topic with the same name.

items:
  - type: STR_MIB_AGENT
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 10000
  - type: STR_MIB_SOLDIER
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 10000
  - type: STR_MIB_MEDIC
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 10000
  - type: STR_MIB_DEMOMAN
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 10000
  - type: STR_MIB_LEADER
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 20000
  - type: STR_MIB_COMMANDER
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 20000

units:
  - type: STR_MIB_AGENT
    race: STR_MIB
    [...]
  - type: STR_MIB_SOLDIER
    race: STR_MIB
    [...]
  - type: STR_MIB_MEDIC
    race: STR_MIB
    [...]
  - type: STR_MIB_DEMOMAN
    race: STR_MIB
    [...]
  - type: STR_MIB_LEADER
    race: STR_MIB
    [...]
  - type: STR_MIB_COMMANDER
    race: STR_MIB
    [...]

research:
  - name: STR_MIB_AGENT
    lookup: STR_MIB_ACTIVITY
    cost: 180
    points: 30
    needItem: true
  - name: STR_MIB_SOLDIER
    lookup: STR_MIB_ACTIVITY
    cost: 180
    points: 30
    needItem: true
  - name: STR_MIB_MEDIC
    lookup: STR_MIB_ACTIVITY
    cost: 180
    points: 30
    needItem: true
    getOneFree:
      - STR_SECTOID
      - STR_FLOATER
      - STR_SECTOID_CORPSE
      - STR_FLOATER_CORPSE
  - name: STR_MIB_DEMOMAN
    lookup: STR_MIB_ACTIVITY
    cost: 180
    points: 30
    needItem: true
  - name: STR_MIB_LEADER
    lookup: STR_MIB_IDENTITY
    cost: 192
    points: 50
    needItem: true
  - name: STR_MIB_COMMANDER
    lookup: STR_MIB_IDENTITY
    cost: 192
    points: 50
    needItem: true
    getOneFree:
      - STR_SMALL_SCOUT
      - STR_MEDIUM_SCOUT
      - STR_LARGE_SCOUT
  - name: STR_MIB_ACTIVITY
    points: 50
    needItem: true
  - name: STR_MIB_IDENTITY
    points: 50
    needItem: true

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Quick "items: battleType: " question
« Reply #7 on: June 17, 2014, 11:05:08 pm »
This by Dioxine, since he had the same "problem" while doing PIRATEZ mod:
Quote
you need research topics for BOTH the corpses and the live MiBs else they won't be recovered. You also need research topics for Race and Autopsy (basically 4 topics required: corpse, autopsy, live enemy, enemy race). See original races like Sectoids for reference and abide to what you find religiously.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Quick "items: battleType: " question
« Reply #8 on: June 18, 2014, 12:53:42 am »
i tested it
you need:
the live alien -item and the corpse item
and for the corpse here you dont need revover:true BUT "battleType: 11" is important!
Code: [Select]
  - type: STR_MIB_AGENT
    size: 0.0
    recover: true
    liveAlien: true
    costSell: 60000
the live alien research object is needed:
Code: [Select]
  - name: STR_MIB_AGENT
    cost: 180
    points: 30
    needItem: true
    unlocks:
      - STR_MIB_ACTIVITY
you dont need the race or the corpse as research object!

so you need 3 things
item live/corpse (battletype:11), researchobject for alien-rank (not race/corpse)

ahh yes unit, armor, alienrace entry,... of course but there i did not play around with


Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Quick "items: battleType: " question
« Reply #9 on: June 18, 2014, 01:02:59 am »
Ah yeah, also Battletype 11 for the corpse. On top of the stuff I've listed. Recover: true is the default setting. And people like Falko were saying that I don't need research topics, but it's not their mods which kept crashing if I omitted those.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Quick "items: battleType: " question
« Reply #10 on: June 18, 2014, 01:10:25 am »
- corpse item (with "battleType: 11")
- unit (live) item
- unit research

are all things I *already* have. And it didn't work (my testing was unsuccessful) .

Basing on what Dioxine said I should add (if I understood correctly):
- corpse research
- autopsy research
- race research
« Last Edit: June 18, 2014, 01:12:04 am by robin »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Quick "items: battleType: " question
« Reply #11 on: June 18, 2014, 01:14:34 am »
i say you dont need the corpse/race research
and if you doint recover the corpse you dont need the research
i tried like 30 combinations in the last hour

i donwloaded your mod some hours ago and there was no battletype:11 in these files

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Quick "items: battleType: " question
« Reply #12 on: June 18, 2014, 01:22:11 am »
i donwloaded your mod some hours ago and there was no battletype:11 in these files
Yes, the version online is outdated (there should be no live items in it too).
The version on my hdd has battleType for the corpses an the live items.

I'll try again in the next days and see how it goes...

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Quick "items: battleType: " question
« Reply #13 on: June 19, 2014, 01:51:00 am »
Nothing, I didn't manage to make it work. Scrapped the researches.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Quick "items: battleType: " question
« Reply #14 on: July 05, 2014, 12:06:54 am »
the modtester does now recoverychecks
you need research objects for your alien ranks
and you need recoverable corpses
Spoiler:
Code: [Select]
('logicproblem', 'items', 'STR_MIB_AGENT', [('alien cant be recovered/no research object', 'STR_MIB_AGENT')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB_SOLDIER', [('alien cant be recovered/no research object', 'STR_MIB_SOLDIER')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB_MEDIC', [('alien cant be recovered/no research object', 'STR_MIB_MEDIC')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB_DEMOMAN', [('alien cant be recovered/no research object', 'STR_MIB_DEMOMAN')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB_LEADER', [('alien cant be recovered/no research object', 'STR_MIB_LEADER')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB_COMMANDER', [('alien cant be recovered/no research object', 'STR_MIB_COMMANDER')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'armors', 'MIB_ARMOR0', [('corpseBattle not in itemlist/ or recover: False', 'STR_MIB0_CORPSE', 'MIB_ARMOR0')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'armors', 'MIB_ARMOR1', [('corpseBattle not in itemlist/ or recover: False', 'STR_MIB1_CORPSE', 'MIB_ARMOR1')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'armors', 'MIB_ARMOR2', [('corpseBattle not in itemlist/ or recover: False', 'STR_MIB2_CORPSE', 'MIB_ARMOR2')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'armors', 'MIB_ARMOR3', [('corpseBattle not in itemlist/ or recover: False', 'STR_MIB3_CORPSE', 'MIB_ARMOR3')], 'totest/mib/Ruleset/men_in_black.rul')
fixed that now 2. test with modtester
these recoverable corpses need a recoveryPoint >0
Spoiler:
Code: [Select]
('logicproblem', 'items', 'STR_MIB0_CORPSE', [('recoverable corpse need recoverypoints', 'STR_MIB0_CORPSE', 'STR_MIB0_CORPSE')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB1_CORPSE', [('recoverable corpse need recoverypoints', 'STR_MIB1_CORPSE', 'STR_MIB1_CORPSE')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB2_CORPSE', [('recoverable corpse need recoverypoints', 'STR_MIB2_CORPSE', 'STR_MIB2_CORPSE')], 'totest/mib/Ruleset/men_in_black.rul')
('logicproblem', 'items', 'STR_MIB3_CORPSE', [('recoverable corpse need recoverypoints', 'STR_MIB3_CORPSE', 'STR_MIB3_CORPSE')], 'totest/mib/Ruleset/men_in_black.rul')