Author Topic: OXCE (OpenXcom Extended) main thread  (Read 595427 times)

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1005 on: February 08, 2022, 04:40:13 pm »
I'm not aware of such limitation.

Well, I spawn units from fuse grenade item, I set its side to xcom (`spawnUnitFaction: 0`), and I can't target it with medkit...

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9098
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1006 on: February 08, 2022, 05:34:01 pm »
Well, I spawn units from fuse grenade item, I set its side to xcom (`spawnUnitFaction: 0`), and I can't target it with medkit...

the `bleedImmune` default for summoned player units is true;
you can manually set it to false on their armor;
then it will work

Code: [Select]
bool BattleUnit::isWoundable() const
{
return !_armor->getBleedImmune(!(_type=="SOLDIER" || (Options::alienBleeding && _originalFaction != FACTION_PLAYER)));
}

Offline Komandos

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1007 on: February 09, 2022, 12:23:41 am »
How to implement the function: for the successful completion of tasks, the player receives a new military rank, which allows an additional number of bases (1-2-4-8) and receives additional types of troops at his disposal?

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1008 on: February 09, 2022, 12:56:37 am »
the `bleedImmune` default for summoned player units is true;
you can manually set it to false on their armor;
then it will work

Code: [Select]
bool BattleUnit::isWoundable() const
{
return !_armor->getBleedImmune(!(_type=="SOLDIER" || (Options::alienBleeding && _originalFaction != FACTION_PLAYER)));
}

Thank you very much!

Another question, I'm sure it's a pretty newbie one. I am not sure how it supposes to work, but it looks like enemy units ignore patrol node connections. For instance, I created several zones and I want enemy units to stay there. So i made patrol nodes disconnected, but it does not help at all. What actually node connections do?
I remember playing vanilla, and I think on many crafts high rank aliens were waiting me inside the UFO at the second floor. How should I isolate them in this case?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9098
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1009 on: February 09, 2022, 09:00:11 am »
Another question, I'm sure it's a pretty newbie one. I am not sure how it supposes to work, but it looks like enemy units ignore patrol node connections. For instance, I created several zones and I want enemy units to stay there. So i made patrol nodes disconnected, but it does not help at all. What actually node connections do?
I remember playing vanilla, and I think on many crafts high rank aliens were waiting me inside the UFO at the second floor. How should I isolate them in this case?

Sorry, I don't remember how it works.
Your best bet is to ask Warboy; or trace the AI code line by line.

How to implement the function: for the successful completion of tasks, the player receives a new military rank, which allows an additional number of bases (1-2-4-8) and receives additional types of troops at his disposal?

The tasks can give unique items.
The unique items can be researched to unlock various things, for example additional types of troops.
The unique items can also be used as a material to construct a special base facility, which is needed to construct every other base facility, thus limiting number of bases.
« Last Edit: February 09, 2022, 09:36:07 am by Meridian »

Offline Komandos

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1010 on: February 10, 2022, 09:58:27 pm »
The tasks can give unique items.
The unique items can be researched to unlock various things, for example additional types of troops.
The unique items can also be used as a material to construct a special base facility, which is needed to construct every other base facility, thus limiting number of bases.
Many thanks.

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1011 on: February 11, 2022, 03:52:54 pm »
Meridian, pay attention to these cards. To avoid crashes from the preview in ufopedia, I advise you to enter them into the base assembly. Just for the convenience of those who like to play without modifications.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9098
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1012 on: February 12, 2022, 11:27:02 am »
Meridian, pay attention to these cards. To avoid crashes from the preview in ufopedia, I advise you to enter them into the base assembly. Just for the convenience of those who like to play without modifications.

People who play without modifications, should only see the Preview button on Skyranger, Lightning and Avenger.
Firestorm and Interceptor don't show the Preview button, because they don't have any space for the crew.

I guess there are mods, which have a crew just for pilots and not for landing/battle... I'll update the Preview button to appear only if the craft maps are properly defined too.

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1013 on: February 12, 2022, 05:52:03 pm »
People who play without modifications, should only see the Preview button on Skyranger, Lightning and Avenger.
Firestorm and Interceptor don't show the Preview button, because they don't have any space for the crew.

I guess there are mods, which have a crew just for pilots and not for landing/battle... I'll update the Preview button to appear only if the craft maps are properly defined too.

Yes, I completely forgot about my pilots. Just in case, it is worth making an option to turn off the preview. Binding to "allowLanding" is not necessary. Let modmakers have access to both options for solving the problem.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1014 on: February 12, 2022, 07:25:33 pm »
I'd say "allowLanding: false" is a direct instruction, that this craft has nothing about battlescape, thus no need to have a preview.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9098
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1015 on: February 12, 2022, 07:51:24 pm »
I'd say "allowLanding: false" is a direct instruction, that this craft has nothing about battlescape, thus no need to have a preview.

Correct, but I will still only add conditions, which are directly required to prevent crashes here.

For now, these are:
1. unit capacity > 0 (`soldiers` > 0)
2. map must be defined (`battlescapeTerrainData` is defined)

If we need more conditions in the future, they can be added.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1016 on: February 12, 2022, 08:40:39 pm »
How do I use this?
Code: [Select]
Name: visibility_mode                         var       BattleUnitVisibility.Tag

Sorry, the description is not obvious...

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1017 on: February 13, 2022, 02:00:15 am »
This do nothing if you do not add new tags for this, idea was you can define different and each script can interact with each other based on this value, like you have normal visibility bonus script but it should not work for infrared visibility. This value allow to check if you should apply bonuses or not.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1018 on: February 13, 2022, 02:15:52 am »
This do nothing if you do not add new tags for this, idea was you can define different and each script can interact with each other based on this value, like you have normal visibility bonus script but it should not work for infrared visibility. This value allow to check if you should apply bonuses or not.

Thanks, I think I get the basic idea, but I cant figured out the proper syntax  for that. Could you pls provide a script example of this? Like for instance, how do I apply a bonus to night vision, that comes from soldier bonus tag?

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1019 on: February 14, 2022, 12:34:40 am »
Can AI use sprint if this option is on for the player?