OpenXcom Forum

Modding => OpenXcom Extended => Topic started by: Varana on May 28, 2017, 12:58:56 am

Title: [DONE] [Suggestion] obsolete tag (ability to block/remove research paths)
Post by: Varana on May 28, 2017, 12:58:56 am
I think it would be great if there was an obsolete tag for entries in the research.rul section. Something like

research:
  - name: STR_OLD_GUN
    cost: 200
    obsolete:
      - STR_NEW_GUN
      - STR_SPECIAL_GUN

And if one of these two is researched, you can still use and sell your old stuff and find it in the pedia (if it was researched before), but you can not buy, manufacture or research that tech/item any more.

... or, if you like it the other way, something like

research:
  - name: STR_NEW_GUN
    cost: 500
    disables:
      - STR_OLD_GUN

Used in a mod that could clean up the lists. And you could make research more interesting, for example research of plasma basics could deactivate research of laser basics, so the player would have to decide how to play this actual game.
Title: Re: obsolete tag
Post by: Warboy1982 on May 28, 2017, 07:45:40 am
interesting...
Title: Re: obsolete tag
Post by: Hobbes on May 29, 2017, 03:19:30 pm
And if one of these two is researched, you can still use and sell your old stuff and find it in the pedia (if it was researched before), but you can not buy, manufacture or research that tech/item any more.

I have mixed thoughts about this idea

This doesn't make much sense when dealing with objects, i.e., because I researched plasma weapons I can't research/build lasers afterwards? How do the scientists know that plasma is superior to lasers, if they haven't researched both in order to compare? And it doesn't really matter if lasers are inferior if there are buyers available: maybe they don't need something as powerful as plasma, maybe XCom's masters don't want to distribute plasmas throughout the world.

However, this might be a great option for RPG based on research. If you have multiple endings possible that you need to unlock through research, then this would be a way to discard the other storyline options after the player has chosen one.

Quote
... or, if you like it the other way, something like

research:
  - name: STR_NEW_GUN
    cost: 500
    disables:
      - STR_OLD_GUN

Used in a mod that could clean up the lists. And you could make research more interesting, for example research of plasma basics could deactivate research of laser basics, so the player would have to decide how to play this actual game.
Title: Re: obsolete tag
Post by: Varana on May 29, 2017, 06:12:10 pm
However, this might be a great option for RPG based on research. If you have multiple endings possible that you need to unlock through research, then this would be a way to discard the other storyline options after the player has chosen one.

If you want to, you could allow the other techtree afterwards, by using "unlocks" tag to unlock a hidden alternative tech when time has come.

Think of New_Civilian's MyMod modpack: there you have to complete gauss tech tree before allowed to research sonics. Now look at FMP: there are multiple branches, from laser to fusion, from mutant to MIB. You could force to complete one branch before allowing the next to be researched. Or you could say, "ok, player got that MIB stormtrooper armor now, so doesn't need synthsuit too. Make good use of what you have."

With this option, you could bring some structure into gameplay, could hide old rubbish in the lists (e.g. FMP AK47 is something nobody wants to buy in later game stages) and make games differ from each other without need to change to a different mod.
Title: Re: obsolete tag
Post by: NeoWorm on May 29, 2017, 06:29:12 pm
I can imagine using this for straight up upgrades to tech. Make laser rifles MKII that are a bit better than normal ones but take the same resources. No point of keeping old versions in manufacturing list because it's just clutter at this point. Or you could use it to outsource tech to civilian companies meaning that after selling the contract you can't build it anymore, but can buy it for same or less money.
Title: Re: obsolete tag
Post by: Meridian on May 29, 2017, 06:46:04 pm
However, this might be a great option for RPG based on research. If you have multiple endings possible that you need to unlock through research, then this would be a way to discard the other storyline options after the player has chosen one.

I have this on my todolist.

I can imagine using this for straight up upgrades to tech. Make laser rifles MKII that are a bit better than normal ones but take the same resources. No point of keeping old versions in manufacturing list because it's just clutter at this point. Or you could use it to outsource tech to civilian companies meaning that after selling the contract you can't build it anymore, but can buy it for same or less money.

If it's just about removing clutter, this will "not work" because people may still be interested in buying/manufacturing old junk... for example for reaction/accuracy training on heavily armored enemies... just as one stupid example (I'm sure people will come up with plenty more).
What I'm trying to say is, it should be the player (not the modder) who decides what stuff to hide... similar to possibility to hide manufacturing projects in OXCE+.
Title: Re: obsolete tag
Post by: NeoWorm on May 29, 2017, 07:30:37 pm
What I'm trying to say is, it should be the player (not the modder) who decides what stuff to hide... similar to possibility to hide manufacturing projects in OXCE+.
Modder should have control over the mod and it's mechanics. It's a game design issue. You may want to pace the game right, make it challenging in a some way or use it in narrative. Buying odsolete equipment for what is a borderline exploit... not so legit.
Title: Re: obsolete tag
Post by: Meridian on May 29, 2017, 07:54:05 pm
Yes, that's why I started the sentence with "If it's just about removing clutter".
Removing clutter is not a game mechanic, it's a UI design.

Btw. I can think only of 1 single game I played (Civilization), which has the concept of "obsolete items/units/etc.". In all other games I ever played, you could buy/see/use everything you have ever unlocked until the end of the game... are there any other examples?
Title: Re: obsolete tag
Post by: Hobbes on May 29, 2017, 07:57:25 pm
Think of New_Civilian's MyMod modpack: there you have to complete gauss tech tree before allowed to research sonics. Now look at FMP: there are multiple branches, from laser to fusion, from mutant to MIB. You could force to complete one branch before allowing the next to be researched.

Yeah, you could, but if I'm a player and I decide halfway that I want to focus research on something else and discover that my research path is locked for no apparent reason (you'd need to explain somewhere to the player how it works for him/her to understand the consequences of the choices), then I'm going to be frustrated.

Quote
Or you could say, "ok, player got that MIB stormtrooper armor now, so doesn't need synthsuit too. Make good use of what you have."

But that's why there's money and alloys/Elerium in game: you can only build what you can afford using the limited resources available. Make good use of what you have, but if there's only 1 item to build since the similar ones are locked out, then you're forcing the player into a single choice. 

For instance, if I choose sonic over gauss, and then later I fail to recover Elerium/alloys from UFOs to build those sonic weapons, then the game design has just placed me in a very difficult tactical position, if not impossible because plan B (gauss) is locked out and all of these Mutons are trashing my soldiers armed only with conventional weapons.

I can imagine using this for straight up upgrades to tech. Make laser rifles MKII that are a bit better than normal ones but take the same resources. No point of keeping old versions in manufacturing list because it's just clutter at this point.

This is a good way to add upgrades to weapons. Research aiming sights and all of the lasers are replaced with improved versions.

Modder should have control over the mod and it's mechanics. It's a game design issue. You may want to pace the game right, make it challenging in a some way or use it in narrative. Buying odsolete equipment for what is a borderline exploit... not so legit.

If you say that the modder needs to have control, then he's also entitled to decide if the borderline exploit should be present or not. And if there's so much of an issue with the exploit, then there are easier ways to fix them by editing the equipment's stats.
Title: Re: obsolete tag
Post by: TKO on May 29, 2017, 10:45:43 pm
I wonder if people are thinking about this the wrong way .. forget the weapons-upgrade stuff .. how about stuff that is outside the players control:

Lets think about alternative storylines and mods.. If a player chooses to take a live "race-x" alien, interrogate them, and end up with a dead "race-x" alien, then all options for researching a peaceful solution or alliance with "race-x" are removed from the board.  (With psychic abilities, they are aware that you have killed one of their own, so aren't willing to negotiate any more.)

This obsolete tag could introduce some genuinely interesting game mechanics. 
Title: Re: obsolete tag
Post by: Meridian on May 29, 2017, 11:31:09 pm
I wonder if people are thinking about this the wrong way .. forget the weapons-upgrade stuff .. how about stuff that is outside the players control:

Lets think about alternative storylines and mods.. If a player chooses to take a live "race-x" alien, interrogate them, and end up with a dead "race-x" alien, then all options for researching a peaceful solution or alliance with "race-x" are removed from the board.  (With psychic abilities, they are aware that you have killed one of their own, so aren't willing to negotiate any more.)

This obsolete tag could introduce some genuinely interesting game mechanics.

That's what Hobbes (and others elsewhere) suggested... and what is on my todo list already.
Title: Re: obsolete tag
Post by: Hobbes on May 30, 2017, 01:42:44 am
I wonder if people are thinking about this the wrong way .. forget the weapons-upgrade stuff .. how about stuff that is outside the players control:

Lets think about alternative storylines and mods.. If a player chooses to take a live "race-x" alien, interrogate them, and end up with a dead "race-x" alien, then all options for researching a peaceful solution or alliance with "race-x" are removed from the board.  (With psychic abilities, they are aware that you have killed one of their own, so aren't willing to negotiate any more.)

This obsolete tag could introduce some genuinely interesting game mechanics.

I think the overall consensus is that such a feature would be great to be available for modders. The discussion is rather more about it should be used ;)
Title: Re: Ability to block research topics/paths
Post by: Meridian on June 02, 2017, 05:09:41 pm
EDIT: deleted old info

EDIT: new details available: https://openxcom.org/forum/index.php/topic,5482.msg86298.html#msg86298
Title: Re: obsolete tag
Post by: Varana on June 02, 2017, 11:01:44 pm
 Fine, thx  8)

One more thing: It would be nice, if there would be a short message, similar to the messages that tell what can be researched or produced now.
Something like "removed: Old tech 1"?
Title: Re: obsolete tag
Post by: Meridian on June 03, 2017, 05:08:10 pm
One more thing: It would be nice, if there would be a short message, similar to the messages that tell what can be researched or produced now.
Something like "removed: Old tech 1"?

That's too late, isn't it?

I want to know BEFORE I start researching something, that it will disable other things:
 - which I may want to keep (if it's something I have already)
 - or which I may want to research instead (if it's a future research, i.e. alternative path)
Title: Re: obsolete tag
Post by: Varana on June 04, 2017, 12:37:38 am
That's too late, isn't it?

I thought of it as a notifier, so nobody should wonder where his tech has gone. Or why the scientists are idle. To avoid stupid bug reports.  ;)

If a modder wants to inform the players before they start the research, the modder could do it with the normal UP info of the tech before.
For example the Laser tech info could contain a sentence, that it will be replaced by better designs once they are researched. Or the containment info could include a sentence, that it might get impossible to live in peace with a tortured alien race...
Title: Re: obsolete tag
Post by: Solarius Scorch on June 04, 2017, 01:02:26 am
Yeah, but it won't always be possible, or elegant, and it's additional work. :P
Title: Re: Ability to block research topics/paths
Post by: Meridian on June 27, 2017, 11:08:21 am
EDIT: definitely not this weekend... there are complications... trying to find a solution, which doesn't require rewrite of research code is not easy... I almost had it, but almost is not enough... I'll keep trying

So, the research code is rewritten... it should be relatively easy now to add this feature.
Title: Re: obsolete tag
Post by: drages on June 28, 2017, 12:35:52 am
I can imagine using this for straight up upgrades to tech. Make laser rifles MKII that are a bit better than normal ones but take the same resources. No point of keeping old versions in manufacturing list because it's just clutter at this point. Or you could use it to outsource tech to civilian companies meaning that after selling the contract you can't build it anymore, but can buy it for same or less money.

This is a good point and I was thinking to ask same thing.

This is a problem with items with many updates. I done the MK thing, at my huge Xenonauts mod. Xenonauts got a command at research code named "replace", this replaces some item to the other item. But it's not good enough and sadly it's only works right at infinity items. With numbered items, only the items in storage replaces and the ones at soldier inventory just disappears. This became huge problems if the item is something important. And the manufacture code gets problem because the manufacture still try to manufacture the old one.

This is mostly for UI problems. You can keep the old version but this means you will have it everywhere even you would never use it. For example you got a weapon tier with 10 weapon inside it. When you want "2" more update to that weapon with all the manufacture and everything will be same but the weapon only will get some buffs, you will have 20 weapons (as MK1 and MK2) without any reason to stay in the game.

Xenonauts does not have different ammo for same weapon, which is one of the worst thing of that game. So you need to update the weapon itself for any kind of buff, you need to make a totally new weapon. So OpenXcom got ammos to help about that but it can't buff all the weapon stats like fire types.

So for that reason, a soft replace code could be usefull. With this code, when you replace the ID, it will replace it at everywhere.. from researches to manufactures.. so you will update the weapon only when you won't need the old one anymore.
Title: Re: Ability to block research topics/paths
Post by: Meridian on August 05, 2017, 03:29:42 pm
So, the research code is rewritten... it should be relatively easy now to add this feature.

Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_DISABLED_BY: "Disabled by:"
      STR_DISABLES: "Disables:"

Code: [Select]
research:
  - name: STR_NEW_TOPIC
    cost: 500
    disables:
      - STR_OLD_TOPIC1
      - STR_OLD_TOPIC2

When STR_NEW_TOPIC is researched (or more specifically when it's added to "discovered" list):
1. STR_OLD_TOPIC1 and STR_OLD_TOPIC2 are removed from "discovered" list, i.e. un-researched/revoked
2. STR_OLD_TOPIC1 and STR_OLD_TOPIC2 are removed from "currently being researched" list, in all bases
3. STR_OLD_TOPIC1 and STR_OLD_TOPIC2 are marked as "NEVER allow research of this topic again", which means:
 a/ they won't be available in the New Research GUI ever again
 b/ they won't be given to you for free via getOneFree/getOneFreeProtected
 c/ they won't be given to you for free via zero-cost unlocks
 d/ they won't be given to you for free via mission bounty
 e/ if they are getOneFree or zero-cost unlock for some other topic, they will be ignored
    - e.g. if Alien Infiltration is disabled and it's the only remaining undiscovered getOneFree for Sectoid Navigator, Sectoid Navigator will not be researchable... since you can't get Alien Infiltration anyway

Additionally keep in mind that:
4. any topics that were (previously) directly or indirectly unlocked via STR_OLD_TOPIC1 or STR_OLD_TOPIC2 remain untouched
   - we disable/revoke only those 2 topics... not everything else that depended on them somehow
5. this whole concept will be completely ignored in the "New Battle" simulator

There are two possible uses of this feature I can think of right now:

A) Ability to make things obsolete (e.g. hide all small guns when big guns are researched)

Code: [Select]
research:
  - name: STR_PLASMA_WEAPONS
    disables:
      - STR_LASER_WEAPONS       # no need for small guns when you have big guns... no matter what modders say/think :P

B) Ability to choose a path in the research tree and block other paths

Code: [Select]
research:
  - name: STR_RED_PILL
    dependencies:
      - STR_MEET_MORPHEUS
    disables:
      - STR_BLUE_PILL           # after taking the red pill, can't take the blue pill anymore
      - STR_NORMAL_FOOD         # no more steaks for you Neo... reality sucks!
    unlocks:
      - STR_SUPERPOWERS         # booyeah!
  - name: STR_BLUE_PILL
    dependencies:
      - STR_MEET_MORPHEUS
    disables:
      - STR_RED_PILL            # after taking the blue pill, can't take the red pill anymore
      - STR_LOVE                # steaks are better than Trinity anyway, no?

Disclaimer #1:
---------------
List of permanently disabled topics is saved in the save file.
That means if you (as a modder) change your decision what disables what between mod versions... the changes won't be applied retrospectively when the player upgrades the mod during a campaign.

So think twice before you start disabling things randomly!

Disclaimer #2:
---------------
The game can't check everything, you can create inconsistent situations... try to keep it simple!
For example:
a/ if topic A gives topic B for free... don't put topic B into "disables" of topic A... makes no sense, right? In this case, the game will actually give you topic B, because getOneFree topic is always processed before the core topic
b/ if topic A gives topic B for free... don't put topic A into "disables" of topic B... this makes even less sense... and in this case after researching topic A, you will get the free topic B, but you will NOT get the core topic A (because it will already be disabled after processing topic B)

So again... use... not abuse!
Title: Re: obsolete tag
Post by: Varana on August 10, 2017, 01:31:44 am
 :-\ "steaks are better than Trinity anyway"  ;D ;D ;D