aliens

Author Topic: [OLD] Old OXCE discussion thread  (Read 673136 times)

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1080 on: December 23, 2016, 10:11:47 pm »
Earnest request, specify the option, or come up with a way to turn off the aliens berserk. And just berserk. Since the aliens at Berserker still attack the nearest target player and from their usual activities, in this case, the berserker no different. Panic option in MC destroyer, totally and absolutely useless. In addition, strongly tired explosions berserk inside the ships, which deprive prisoners of frags and valuable.

Spoiler:
Убедительная просьба, указать опцию, или придумать способ отключения берсерка у пришельцев. Причём только берсерка. Поскольку пришельцы при берсерке всё равно атакуют ближайшую цель игрока и от обычных их действий, в этом случае, берсерк не отличается ничем. Опция паники в МК разрушителе, полностью и абсолютно бесполезна. Кроме того, сильно надоели взрывы берсеркующих внутри кораблей, которые лишают фрагов и ценных пленных.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3207
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1081 on: December 23, 2016, 11:00:34 pm »
I interested in adding gameplay mechanics than removing ones. I see little value in only removing berserker. I could only do something like this as part of bigger change, but right now I don't have plans do anything around this parts of game.

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1082 on: December 23, 2016, 11:22:42 pm »
I interested in adding gameplay mechanics than removing ones. I see little value in only removing berserker. I could only do something like this as part of bigger change, but right now I don't have plans do anything around this parts of game.

It is a pity. But I meant no total elimination berserk, and the option to "units.rul" like "noBerserk: true", which can be switched on and off at will.
By the way, if you develop the idea and "noBerserk:" add "noPanic:" and "noMindControl:", It can get interesting combinations. For example Mouton is so fierce that he never panic, just go crazy. And so on.

Spoiler:
Очень жаль. Но я имел ввиду не тотальную ликвидацию берсерка, а опцию для "units.rul" вроде "noBerserk:: true", которую пожно включить и выключить по желанию.
Кстати, если развить мысль и к "noBerserk:" добавить "noPanic:" и "noMindControl:", могут получится интересные комбинации. Например Мутоны настолько свирепы, что никогда не паникуют, а только сходят с ума. И так далее.
« Last Edit: December 23, 2016, 11:46:48 pm by Ethereal »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1083 on: December 24, 2016, 06:35:54 pm »
Yup, overall `if (!_nodes.empty())` condition is bit dodgy. It hard to say if `_mapDataSets.clear();` should be cleared or not in that case of `case MSC_RESIZE:` in "BattlescapeGenerator.cpp".
initMap is also triggered on stage changes, so better safe than sorry. MSC_RESIZE is only intended to be used at the start anyways.
« Last Edit: December 24, 2016, 06:39:39 pm by SupSuper »

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1084 on: December 30, 2016, 12:53:38 pm »
I tried to give some alien units a personal light with
Code: [Select]
    personalLight: 15    #solder light radius.
but it had no effect.

Does the "personalLight" intentionally works only for units controlled by the player?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8616
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1085 on: December 30, 2016, 05:46:59 pm »
Hi Yankes,

another nasty bug in oxce or vanilla, where I need your help: https://openxcom.org/forum/index.php/topic,4058.msg76911.html#msg76911

In the meantime, I will try to reproduce:
- in vanilla (no piratez) using oxce
- in vanilla (no piratez) using oxc ... and report to warboy, if it happens there too

Thanks for any help.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3207
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1086 on: December 30, 2016, 09:05:20 pm »
Hi Yankes,

another nasty bug in oxce or vanilla, where I need your help: https://openxcom.org/forum/index.php/topic,4058.msg76911.html#msg76911

In the meantime, I will try to reproduce:
- in vanilla (no piratez) using oxce
- in vanilla (no piratez) using oxc ... and report to warboy, if it happens there too

Thanks for any help.
This is very similar to bug with stunning flying unit on edge of map, I will try fix it.

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1087 on: January 02, 2017, 02:15:16 pm »
Happy New Year! New ideas, opportunities and mods!

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3207
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1088 on: January 04, 2017, 02:11:50 am »
I plan in this or next week release new version. Probably biggest change will be scripts that will be able to change how damage is apply to unit.
Possible usage:
a) Hand held shield that will boost front armor
b) Personal force field (armor or item in hand, limited use)
c) Toxin that work only on some units
d) Paint that will expose invisible units
e) Poison that will last couple of turn
f) Energy pack that will boost laser power when held in other hand
g) Laser weapons will have soft ammo limit after that it will do less damage (battery will run low, better buy some based on elerium :D )

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8616
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1089 on: January 09, 2017, 06:53:54 pm »
Ok new version 3.3 is ready:

New light system.
Option for reserving more space for mod in common surface/sound sets.
Visibility scripts that determine visibility of targets.

The mod size feature doesn't work 100% yet.
Attached is a simple mod for vanilla that will crash (make sure it's the first/topmost mod in the list when testing).

I have prepared a fix too: https://github.com/MeridianOXC/OpenXcom/commit/258581e6378f53994e67364eda51e307bf4917be
Could you review if it's OK?

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3207
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1090 on: January 09, 2017, 09:20:45 pm »
Code: [Select]
if (!modInfo.isMaster() && !modInfo.getMaster().empty() && modInfo.getMaster() != curMaster)
This `&&` are correct there? because you update `maxSize` when:
Code: [Select]
modInfo.isMaster() || modInfo.getMaster().empty() ||  modInfo.getMaster() == curMaster
If mod is not master but still will bump up `maxSize`.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8616
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1091 on: January 09, 2017, 09:35:39 pm »
Yes, that is correct.
There's one more check above, so together it is:

Code: [Select]
modIsEnabled && ( modInfo.isMaster() || modInfo.getMaster().empty() ||  modInfo.getMaster() == curMaster )

That means, maxSize is updated from:
- current (enabled) master
- all (enabled) mods without a master ("*" in metadata.yml)
- all (enabled) mods of the current master

PS: I copypasted these two conditions from mapResources() method

If mod is not master but still will bump up `maxSize`.

Yes, the idea is that the "root master" must have the same size as the biggest mod (regardless if the biggest mod is a master or not).

Example:
- root master = xcom1 = size 1
- piratez master by dioxine = piratez = size 3
- someone's mod for piratez = somecode = size 7

In this example, it is necessary to set the size of the root master (xcom1) to 7.
« Last Edit: January 09, 2017, 09:40:43 pm by Meridian »

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3207
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1092 on: January 09, 2017, 10:06:38 pm »
Ok, now I understand intend of this code. Over all code look fine, I will pull it to next release.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1093 on: January 10, 2017, 08:55:53 pm »
Hey Yankes, I'm trying to use your scripts to change a weapon's sprites based on the ammunition it has loaded.  I've got it working for Bigobs in the inventory screen, but not the ones in the Battlescape UI or for Handobs.  Is it possible to change handobs and the left/right hand weapon sprites not in the inventory with extended scripts?  Here's what I have for the Bigobs:

Code: [Select]
extended:
  tags:
    RuleItem:
      XPIRATEZ_ISRPG: int
      XPIRATEZ_ISBABYNUKE: int
      XPIRATEZ_ALTHANDOB: int
      XPIRATEZ_MOD_OFFSET: RuleList
   
  scripts:
    selectItemSprite:
      - offset: 1
        code: |
          var ptr BattleItem ammoItem;
          var ptr RuleItem weaponRuleset;
          var ptr RuleItem ammoRuleset;
          var int rpgTag;
          var int nukeTag;
          var int modOffset;

          if or eq blit_part blit_item_big eq blit_part blit_item_lefthand eq blit_part blit_item_righthand;
            item.getRuleItem weaponRuleset;
            weaponRuleset.getTag rpgTag Tag.XPIRATEZ_ISRPG;

            if eq rpgTag 1;
              item.getAmmoItem ammoItem;
              ammoItem.getRuleItem ammoRuleset;
              ammoRuleset.getTag nukeTag Tag.XPIRATEZ_ISBABYNUKE;

              if eq nukeTag 1;
                weaponRuleset.getTag sprite_index Tag.XPIRATEZ_ALTHANDOB;
                weaponRuleset.getTag modOffset Tag.XPIRATEZ_MOD_OFFSET;
                rules.getSpriteOffsetBigobs sprite_index modOffset;
                return sprite_index;

              end;

            end;

          end;

          return sprite_index;

items:
  - type: STR_RPG
    tags:
      XPIRATEZ_ISRPG: 1
      XPIRATEZ_ALTHANDOB: 0
      XPIRATEZ_MOD_OFFSET: current
  - type: STR_BABY_NUKE
    tags:
      XPIRATEZ_ISBABYNUKE: 1

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3207
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1094 on: January 10, 2017, 10:07:31 pm »
Ok, I look in code and I see that I didn't call script in that case. Sorry for that, I will fix in next release.