aliens

Author Topic: Ruleset Editing Questions (& Some m'Orz Qestions)  (Read 45734 times)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Research & Facilities
« Reply #15 on: August 09, 2015, 09:16:02 pm »
Ah, that's extremely good to know!

You also answered another question I had in mind: I was thinking dependencies fulfilled prior to the requirement would still count towards unlocking said project/topic, but you are basically saying that's not the case (ie. dependencies must be researched—again, if necessary—after the requirement is met). Gotta keep that in mind.

Yup, otherwise the requirement would be no different from an extra dependency. Take something that has dependencies on A and B, but requires C.

If you could get dependencies at any time, it would be the same as "Depends on A, B and C" since all that really matters is getting all 3 of them.

What actually happens is "Requires C first, then A and B in any order", which is very different. That's why, for example, if you research an alien leader before having researched Alien Origins, you need to research another one. The first one did not satisfy the dependency, since the requirement had not been met.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Research & Facilities
« Reply #16 on: August 10, 2015, 05:31:34 am »
the missing S in the research was fixed days ago, make sure you're using the up-to-date ruleset.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re:
« Reply #17 on: August 10, 2015, 11:18:03 pm »
the missing S in the research was fixed days ago, make sure you're using the up-to-date ruleset.

Wonderful. Will do.

Now I got some mOrz questions! :P

If I wanted to remove Deep One's dependencies from Aqua Plastics, would this do the trick? (I know I could simply edit it out of the base rulset, but I'd like to understand how modular rulsets are applied to the base ruleset here—and more specifically, how to use "" and [])

Code: [Select]
  - name: STR_AQUA_PLASTICS
    dependencies: ""

Would that nullify STR_DEEP_ONE_CORPSE?

Next question (getting more complicated). If I wanted to remove a list of dependencies instead of just one, whilst adding my own dependencies, how would I do that? Let's take TFTD Alien Origin's, for example. This is how it appears:

Code: [Select]
    dependencies:
      - STR_AQUATOID_COMMANDER
      - STR_AQUATOID_NAVIGATOR
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_SOLDIER
      - STR_CALCINITE_TERRORIST
      - STR_HALLUCINOID_TERRORIST
      - STR_GILLMAN_COMMANDER
      - STR_GILLMAN_TECHNICIAN
      - STR_GILLMAN_SQUAD_LEADER
      - STR_GILLMAN_SOLDIER
      - STR_DEEP_ONE_TERRORIST
      - STR_XARQUID_TERRORIST
      - STR_TASOTH_SQUAD_LEADER
      - STR_TASOTH_SOLDIER
      - STR_TENTACULAT_TERRORIST
      - STR_BIODRONE_TERRORIST
      - STR_TRISCENE_TERRORIST
      - STR_LOBSTERMAN_COMMANDER
      - STR_LOBSTERMAN_NAVIGATOR
      - STR_LOBSTERMAN_TECHNICIAN
      - STR_LOBSTERMAN_SQUAD_LEADER
      - STR_LOBSTERMAN_SOLDIER

If I just wanted to remove all of that and just add the 4 non-Terrorist races instead, would this work?

Code: [Select]
- name: STR_ALIEN_ORIGINS
dependencies: []
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN

Last question (for now). This is a silly question perhaps, but just to be completely clear: when I list any dependencies on my own modular ruleset without removing any from the base ruleset, does it nullify the original dependencies or does it add to them?

For example, let's say this is what I want to modify:

Code: [Select]
- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_A
- STR_ITEM_B

If I do:

Code: [Select]
- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_C

Does it already override the base ruleset's dependencies or does it add ITEM_C to the list?


Bonus question:

If I want to completely delete something entirely, would this work?

Code: [Select]
- facilities:
- delete: STR_ALL_YOUR_BASE_ARE_BELONG_TO_US


Bonus question #2

Does 'needItem: true' just means you must have item in storage first, so that even if dependencies are already met (or even if some other item 'unlocks' this one), you must have the item regardless?
« Last Edit: August 10, 2015, 11:21:55 pm by Orz »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re:
« Reply #18 on: August 10, 2015, 11:42:05 pm »
No idea about the quotes and square brackets, I haven't seen them used anywhere in rulesets (except quotes for extraStrings).. As for the rest:

Now I got some mOrz questions! :P
Alright! Let's see...

Quote
If I wanted to remove Deep One's dependencies from Aqua Plastics, would this do the trick? (I know I could simply edit it out of the base rulset, but I'd like to understand how modular rulsets are applied to the base ruleset here—and more specifically, how to use "" and [])

Code: [Select]
  - name: STR_AQUA_PLASTICS
    dependencies: ""

Would that nullify STR_DEEP_ONE_CORPSE?[/quote[
I don't think this would work, no. You can define a new list, which will overwrite the old one, but I don't think you can define an empty list. I think it might be better to just have
Code: [Select]
research:
    - delete: STR_AQUA_PLASTICS
    - name: STR_AQUA_PLASTICS
      cost: ???
      points: ???
      needItem: true

Quote
Next question (getting more complicated). If I wanted to remove a list of dependencies instead of just one, whilst adding my own dependencies, how would I do that? Let's take TFTD Alien Origin's, for example. This is how it appears:

Code: [Select]
    dependencies:
      - STR_AQUATOID_COMMANDER
      - STR_AQUATOID_NAVIGATOR
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_SOLDIER
      - STR_CALCINITE_TERRORIST
      - STR_HALLUCINOID_TERRORIST
      - STR_GILLMAN_COMMANDER
      - STR_GILLMAN_TECHNICIAN
      - STR_GILLMAN_SQUAD_LEADER
      - STR_GILLMAN_SOLDIER
      - STR_DEEP_ONE_TERRORIST
      - STR_XARQUID_TERRORIST
      - STR_TASOTH_SQUAD_LEADER
      - STR_TASOTH_SOLDIER
      - STR_TENTACULAT_TERRORIST
      - STR_BIODRONE_TERRORIST
      - STR_TRISCENE_TERRORIST
      - STR_LOBSTERMAN_COMMANDER
      - STR_LOBSTERMAN_NAVIGATOR
      - STR_LOBSTERMAN_TECHNICIAN
      - STR_LOBSTERMAN_SQUAD_LEADER
      - STR_LOBSTERMAN_SOLDIER

If I just wanted to remove all of that and just add the 4 non-Terrorist races instead, would this work?

Code: [Select]
- name: STR_ALIEN_ORIGINS
dependencies: []
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN

The reason it is done this way is that there is some kind of interplay between having project A as a dependency of project B if A unlocks B. As you have it listed now, STR_ALIEN_ORIGINS will require you to research all 4 races. You could potentially make the racial projects unlock alien origins, but that becomes a really long chain: research line alien -> get alien race project -> unlock alien origins. in this case it was judged simpler to have "A gives B and unlocks C" than "A gives B that unlocks C". But to answer the question, yes, defining a new list will overwrite the old list.

Quote
Last question (for now). This is a silly question perhaps, but just to be completely clear: when I list any dependencies on my own modular ruleset without removing any from the base ruleset, does it nullify the original dependencies or does it add to them?

For example, let's say this is what I want to modify:

Code: [Select]
- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_A
- STR_ITEM_B

If I do:

Code: [Select]
- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_C

Does it already override the base ruleset's dependencies or does it add ITEM_C to the list?
Defining your list will overwrite the previous list. Unfortunately lists are not additive. If you want to add to a list, you have to define the whole thing. So for your example, you would need:

Code: [Select]
- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_A
- STR_ITEM_B
- STR_ITEM_C


[quote[Bonus question:

If I want to completely delete something entirely, would this work?

Code: [Select]
- facilities:
- delete: STR_ALL_YOUR_BASE_ARE_BELONG_TO_US
[/quote[
Yup, that removes it. In some cases it is the only way to do things, such as the deleting and redefining I suggested above for Aqua Plastics.


[quote[Bonus question #2
Does 'needItem: true' just means you must have item in storage first, so that even if dependencies are already met (or even if some other item 'unlocks' this one), you must have the item regardless?
The "needItem: true" means exactly that, you need the item to be able to do the research. The only exception I can think of would be:

Code: [Select]
- name: STR_MY_SUPER_GUN
  needItem: true
- name: STR_ALIEN_GENIUS
  getOneFree:
    - STR_MY_SUPER_GUN
In which case the project is given for free, regardless of dependencies and presumable "needItem". If STR_MY_SUPER_GUN has a "requires", then I am not sure how that would interact with the "getOneFree" however.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re:
« Reply #19 on: August 11, 2015, 12:27:00 am »
The "needItem: true" means exactly that, you need the item to be able to do the research.

Then does 'needItem: true' become the single determining factor to gain access to certain research topics? In other words, does it work with dependencies or other variables or not?

For example, Vibro Blade has Calcinite Corpse as dependency. Does that mean I do not need to have Vibro Blade (the item in question) in order to unlock the research?

Code: [Select]
  - name: STR_VIBRO_BLADE
    cost: 300
    points: 10
    dependencies:
      - STR_CALCINITE_CORPSE

What if I add 'needItem: true' to it? What happens then?


As for the nullifying of dependencies or requirements without using "" or []

https://www.ufopaedia.org/index.php?title=Rulesets_%28OpenXcom%29#Modular_Rulesets
Quote
If you need to specifically erase a field, for example to clear requirements for something (like making an item or research available from the start of the game), you can use "" for an empty string, [] for an empty list and {} for an empty map.

Say, you wanted to remove Deep One Corpse dependency from Aqua Plastics (thereby making Aqua Plastics available for research upon acquisition).

Code: [Select]
  - name: STR_AQUA_PLASTICS
    cost: 400
    points: 30
    needItem: true
    dependencies:
      - STR_DEEP_ONE_CORPSE

How would you go about it?

And does Deep One Corpse's 'unlock' need to be removed as well?

Code: [Select]
  - name: STR_DEEP_ONE_CORPSE
    cost: 180
    points: 50
    lookup: STR_DEEP_ONE_AUTOPSY
    needItem: true
    unlocks:
      - STR_AQUA_PLASTICS

To rephrase it differently: if Aqua Plastics no longer has Deep One Corpse dependency, can Deep One Corpse still unlock it just because it has 'unlocks: - STR_AQUA_PLASTICS'? Or does negating one negate the other?

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re:
« Reply #20 on: August 11, 2015, 12:51:45 am »
Then does 'needItem: true' become the single determining factor to gain access to certain research topics? In other words, does it work with dependencies or other variables or not?

For example, Vibro Blade has Calcinite Corpse as dependency. Does that mean I do not need to have Vibro Blade (the item in question) in order to unlock the research?

Code: [Select]
  - name: STR_VIBRO_BLADE
    cost: 300
    points: 10
    dependencies:
      - STR_CALCINITE_CORPSE

What if I add 'needItem: true' to it? What happens then?

If a research has a "needItem: true", it simply means that this item needs to be in storage for the research to be available. It is in addition to other dependencies or requirements, which also have to be met. If you have the item in storage when the project's last dependency is satisfied, you should get the "We can now research" popup. If you didn't, but later on acquire one, you will never get a popup but it will be there next time you check after acquiring the item.

If you were you add "needItem: true" to the vibro blade, you would need to research a calcinite corpse, and then, then next time you go in the lab while having a vibro blade in your storage, you will see the research topic. Note that this doesn't work in this case, since aliens don't use the vibro blade, so you will never have one in storage before you made one, but you will never make one before researching it, but you will never research it before having one, etc.


Quote
As for the nullifying of dependencies or requirements without using "" or []

https://www.ufopaedia.org/index.php?title=Rulesets_%28OpenXcom%29#Modular_Rulesets
Say, you wanted to remove Deep One Corpse dependency from Aqua Plastics (thereby making Aqua Plastics available for research upon acquisition).

Code: [Select]
  - name: STR_AQUA_PLASTICS
    cost: 400
    points: 30
    needItem: true
    dependencies:
      - STR_DEEP_ONE_CORPSE

How would you go about it?
Uh.. well well.. Never noticed that :P I guess it would work. As I mentioned before, I would otherwise have deleted the whole project and redefined it straight away. I have never been in a situation to remove dependencies, just add more, so I didn't know about that!

Quote
And does Deep One Corpse's 'unlock' need to be removed as well?

Code: [Select]
  - name: STR_DEEP_ONE_CORPSE
    cost: 180
    points: 50
    lookup: STR_DEEP_ONE_AUTOPSY
    needItem: true
    unlocks:
      - STR_AQUA_PLASTICS

To rephrase it differently: if Aqua Plastics no longer has Deep One Corpse dependency, can Deep One Corpse still unlock it just because it has 'unlocks: - STR_AQUA_PLASTICS'? Or does negating one negate the other?

If a research "unlocks" something, you will usually see it as a dependency for the projects it unlocks. This is done because otherwise, the unlocked project would have no dependency so could be researched from the beginning. In general, many things unlock a project, and that project will have many dependencies. (Unlock makes the project available regardless of dependencies and is used to bypass all the not-yet-satisfied ones).

In this case, since there is only one project that can unlock Aqua Plastics, I honestly don't see why the corpse would need to unlock it. As soon as the Deep-One Corpse project is finished, all (of one) dependencies of Aqua Plastics have been satisfied and it should become available any ways.

If you remove the dependency, you should also remove the unlock, yes. More for simplicity and "cleanliness" than because it is needed in this case, but in others where there could be new dependencies defined, having an odd unlock will probably still unlock the project and mess up your research tree.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #21 on: August 11, 2015, 01:13:58 am »
If a research has a "needItem: true", it simply means that this item needs to be in storage for the research to be available. It is in addition to other dependencies or requirements, which also have to be met. If you have the item in storage when the project's last dependency is satisfied, you should get the "We can now research" popup. If you didn't, but later on acquire one, you will never get a popup but it will be there next time you check after acquiring the item.

That's exactly what I wanted to find out.

Quote
If you were you add "needItem: true" to the vibro blade, you would need to research a calcinite corpse, and then, then next time you go in the lab while having a vibro blade in your storage, you will see the research topic.

Great, as I figured!

EDIT: just to be clear, STR_CALCINITE_CORPSE would mean just having a corpse in storage, correct? Not the same as STR_CALCINITE_AUTOPSY.

Quote
Note that this doesn't work in this case, since aliens don't use the vibro blade, so you will never have one in storage before you made one, but you will never make one before researching it, but you will never research it before having one, etc.

Are you sure about that? Maybe it's because I have never played vanilla TFTP, only TFTDextender, but I am 100% certain aliens do carry drill-type weapons quite a lot. In fact, I've gotten all 3 types of drills way before I even begun research on them.

Quote
As I mentioned before, I would otherwise have deleted the whole project and redefined it straight away.

Well, that may perhaps be less troublesome! So, I do ask you again, just to have an idea, what would you do code-wise to delete the project and then redefine it? I still don't quite see how it should look like in my mind. An example would be appreciated :)

Quote
If a research "unlocks" something, you will usually see it as a dependency for the projects it unlocks. This is done because otherwise, the unlocked project would have no dependency so could be researched from the beginning.

Ah, so I noticed. That's why I was wondering if there was a mutual relationship between 'unlocks' and 'dependencies' where canceling one would cancel the other out.

Quote
In this case, since there is only one project that can unlock Aqua Plastics, I honestly don't see why the corpse would need to unlock it. As soon as the Deep-One Corpse project is finished, all (of one) dependencies of Aqua Plastics have been satisfied and it should become available any ways.

Exactly, that's why I was/am a bit confused.

Quote
If you remove the dependency, you should also remove the unlock, yes. More for simplicity and "cleanliness" than because it is needed in this case, but in others where there could be new dependencies defined, having an odd unlock will probably still unlock the project and mess up your research tree.

Right, I'll play it safe. Just wanted to understand the "logic" behind it.
« Last Edit: August 11, 2015, 01:33:48 am by Orz »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #22 on: August 11, 2015, 02:01:24 am »
EDIT: just to be clear, STR_CALCINITE_CORPSE would mean just having a corpse in storage, correct? Not the same as STR_CALCINITE_AUTOPSY.
uh?! If you have a project that has:

Code: [Select]
- name: STR_VIBRO_BLADE
  dependencies:
      - STR_CALCINITE_CORPSE
  needItem: true

In order to research the vibroblade, you do not need to have a calcinite corpse at your base, but you need to already have researched a calcinite corpse (which is different from getting a calcinite autopsy article from an alien medic, you need to have researched the actual corpse). You also need to have a vibroblade in your storage at the base.

Quote
Are you sure about that? Maybe it's because I have never played vanilla TFTP, only TFTDextender, but I am 100% certain aliens do carry drill-type weapons quite a lot. In fact, I've gotten all 3 types of drills way before I even begun research on them.

Well well.. my memory playing tricks on me! Looking back in the ruleset, you are very right that the aliens also use the same melee weapons as XCom. I did not remember that! Sorry.

Quote
Well, that may perhaps be less troublesome! So, I do ask you again, just to have an idea, what would you do code-wise to delete the project and then redefine it? I still don't quite see how it should look like in my mind. An example would be appreciated :)

Previously, I would have done:
Code: [Select]
- delete: STR_AQUA_PLASTICS
- name: STR_AQUA_PLASTICS
  cost: 400
    points: 30
    needItem: true[/quote]

I believe that what you said is better, so knowing that now, I would do:
[code]- name: STR_AQUA_PLASTICS
  dependencies: []

Since  the second one is much cleaner.

Ouf.. anything else?  ;D

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #23 on: August 11, 2015, 02:40:04 am »
In order to research the vibroblade, you do not need to have a calcinite corpse at your base, but you need to already have researched a calcinite corpse (which is different from getting a calcinite autopsy article from an alien medic, you need to have researched the actual corpse). You also need to have a vibroblade in your storage at the base.

You are of course absolutely right. I just realized it, but you beat me to it! I was thinking CORPSE meant the actual item in storage (which didn't make too much sense, but I was willing to go with that), when in fact it means the "Alien Corpse" research topic unlocked (which invariably unlocks the corresponding UFOpaedia article). Everything makes much more sense now.

Code: [Select]
- delete: STR_AQUA_PLASTICS
- name: STR_AQUA_PLASTICS
  cost: 400
    points: 30
    needItem: true

That doesn't look bad at all. I was worried the second would conflict with the first and get itself deleted too :P

By the way, does it matter in which order they are listed? What if you did "delete: STR_ID" after "name: STR_ID"? Or is "delete" just removing the previous/older iteration (which would be found in the base ruleset) regardless?

Code: [Select]
- name: STR_AQUA_PLASTICS
  dependencies: []

And if I did the above to replace old dependencies for new ones, would it still work? Like this:

Code: [Select]
- name: STR_AQUA_PLASTICS
  dependencies: []
  - STR_SONIC_PISTOL

Would that cancel out Deep-One Corpse and add in Sonic Pistol?

Or perhaps I should just stick to the good ol' "delete: STR_ID" method!


I do have totally different question now: when I change weapon stats, does that reflect in the corresponding UFOpedia entry or do I have to update the UFOpedia file separately? Like, if I change Dart Gun's meager power value of 16 to 24 or whatever, would UFOpaedia show this?

PS: One more question. Does 'unlock' override 'needItem'? Or do I still need to have said item before 'unlock' can come into effect? For example, Sonic Pistol could have Zrbite, Aqua Plastics and Gilman dependencies while research on Gilman Corpse can independently 'unlock' Sonic Pistol. But if Sonic Pistol has 'needItem', does Gilman Corpse research till 'unlock' it or do I have to have Sonic Pistol first?


By the way, Warboy (or anyone else working on OpenXcom), by the time I write this it may have already been fixed, but I found this:

Code: [Select]
- name: STR_MAGNETIC_NAVIGATION
cost: 450
points: 30
needItem: true
- name: STR_ION_BEAM_ACCELERATORS
cost: 450
needItem: true

ION_BEAMS is missing its 30 points research value.
« Last Edit: August 11, 2015, 03:03:41 am by Orz »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #24 on: August 11, 2015, 03:44:24 am »
That doesn't look bad at all. I was worried the second would conflict with the first and get itself deleted too :P

By the way, does it matter in which order they are listed? What if you did "delete: STR_ID" after "name: STR_ID"? Or is "delete" just removing the previous/older iteration (which would be found in the base ruleset) regardless?

Well, it looks worse than the other way ;) And as far as I can tell, things are executed in order from top to bottom, so if you did:

Code: [Select]
- name: STR_AQUA_PLASTICS
  dependencies: []
- delete: STR_AQUA_PLASTICS

you would first redefine the dependency, but then remove the project altogether after. That's not a good place to be!

Quote
And if I did the above to replace old dependencies for new ones, would it still work? Like this:

Code: [Select]
- name: STR_AQUA_PLASTICS
  dependencies: []
  - STR_SONIC_PISTOL

Would that cancel out Deep-One Corpse and add in Sonic Pistol?

Or perhaps I should just stick to the good ol' "delete: STR_ID" method!
If you define new dependencies, they automatically replace the previous one. So if you want the sonic pistol to replace the corpse, all you need to do is:

Code: [Select]
- name: STR_AQUA_PLASTICS
  dependencies:
    - STR_SONIC_PISTOL

No need to delete anything. Since a new definition overwrites the old one, if you want both the Deep One and the Sonic Pistol, you need to do:

Code: [Select]
- name: STR_AQUA_PLASTICS
  dependencies:
    - STR_DEEP_ONE_CORPSE
    - STR_SONIC_PISTOL


Quote
I do have totally different question now: when I change weapon stats, does that reflect in the corresponding UFOpedia entry or do I have to update the UFOpedia file separately? Like, if I change Dart Gun's meager power value of 16 to 24 or whatever, would UFOpaedia show this?
The UFOPaedia section of the game is very well done and goes to get all its own data. If you change stats (or pictures) of an already existing item, the UFOPaedia article will automatically load the new data. Nothing to else to do. The only exception is for things like weight, which are NOT displayed generally but some modders add it to the flavour text. If you do that and then change the weight, you need to update the flavour text yourself.

Quote
PS: One more question. Does 'unlock' override 'needItem'? Or do I still need to have said item before 'unlock' can come into effect? For example, Sonic Pistol could have Zrbite, Aqua Plastics and Gilman dependencies while research on Gilman Corpse can independently 'unlock' Sonic Pistol. But if Sonic Pistol has 'needItem', does Gilman Corpse research till 'unlock' it or do I have to have Sonic Pistol first?

What unlock does is make it so that the dependencies of a given research project count as being fulfilled, regardless of if they actually were. It does not work if there is also a requires that has not been satisfied yet. It also does not interact at all with needItem, so you will still need the item. So if you have:

Code: [Select]
- name: STR_ITEM_C
  dependencies:
    - STR_PROJECT_A
    - STR_PROJECT_B
  needItem: true

- name: STR_PROJECT_B
  unlocks:
    - STR_ITEM_C

Researching project B will make item C researchable even if you haven't completed project A, but you will still need to have item C in your storage, otherwise the project will not show up. All that unlocks does is get rid of dependencies if there is no require.

Good catch on the research. It does not seem to have been corrected. For reference, if you want to see the most up to date code without having to update, you can go to the git repository and look there for the ruleset in bin/standard/xcom2.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #25 on: August 11, 2015, 06:00:35 pm »
Researching project B will make item C researchable even if you haven't completed project A, but you will still need to have item C in your storage, otherwise the project will not show up. All that unlocks does is get rid of dependencies if there is no require.

Fabulous. Well, I believe you've answered all my questions!

Now, you wouldn't happen to know how AP, HE & Incendiary/Phosphorous actually differ from each other, would you? :P To make it simple: what does more damage; an AP round of power value 60, an HE round of 60, or a In/Ph round of 60? (I'm asking about direct hit damage—AOE or subsequent fire damage aside.)

Oh, actually: this is not terribly important, but can I use two getOneFree's in order to unlock 2 random UFO files at a time, as an example, instead of just 1? Or would they come in conflict with each other? I wouldn't think there'd be a problem, but just to be sure.

And would you happen to know where the repair, fuel, rearm order for crafts is located? I haven't been able to find it...

Quote
Good catch on the research. It does not seem to have been corrected. For reference, if you want to see the most up to date code without having to update, you can go to the git repository and look there for the ruleset in bin/standard/xcom2.

Awesome, will keep an eye on it!

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #26 on: August 11, 2015, 06:29:37 pm »
OK, mOrz questions.

If I wanted to remove the New Fighter Flying Sub from Coelacanth/Gauss' dependencies (to make it more worthwhile), but leave Gauss Cannon intact, would this do it?

Code: [Select]
  - name: STR_COELACANTH_GAUSS    #Coelacanth/Gauss #
    requires:
     - STR_GAUSS_CANNON

In other words: whatever I list under 'requires' (even if multiple items, or same items as the base ruleset but with additions or omissions) would override the 'requires' found in the base ruleset, correct?

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #27 on: August 11, 2015, 08:54:24 pm »
Fabulous. Well, I believe you've answered all my questions!

Now, you wouldn't happen to know how AP, HE & Incendiary/Phosphorous actually differ from each other, would you? :P To make it simple: what does more damage; an AP round of power value 60, an HE round of 60, or a In/Ph round of 60? (I'm asking about direct hit damage—AOE or subsequent fire damage aside.)

With the TftD damage rule, both AP and Explosives do 50% to 150% of listed damage on impact (at ground zero for the explosive, which also means it is hitting under armor instead of whatever facing was hit). That means 30 to 90 damage on hit (neglecting damage modifiers and armor).

With EU damage rule, AP does 0% to 200% damage, so 0 to 120 damage for your 60 listed power. By opposition, explosives still do 50% to 150% damage. On average, they both do 60, in practice, the HE is a lot more reliable, especially since at ground zero it is hitting under armor which is generally lower.

For both formulas, In/Ph rounds do variable damage on hit, about 6 on average, and will do damage over time. The only thing that the listed power does is determine the size of the area to be covered in fire.

Quote
Oh, actually: this is not terribly important, but can I use two getOneFree's in order to unlock 2 random UFO files at a time, as an example, instead of just 1? Or would they come in conflict with each other? I wouldn't think there'd be a problem, but just to be sure.

No, getOneFree will be executed once, and if you have two defined in the ruleset the second should overwrite the first. It's not getTwoFree :P

Quote
And would you happen to know where the repair, fuel, rearm order for crafts is located? I haven't been able to find it...

I believe that this is hard coded.

If I wanted to remove the New Fighter Flying Sub from Coelacanth/Gauss' dependencies (to make it more worthwhile), but leave Gauss Cannon intact, would this do it?

Code: [Select]
  - name: STR_COELACANTH_GAUSS    #Coelacanth/Gauss #
    requires:
     - STR_GAUSS_CANNON

In other words: whatever I list under 'requires' (even if multiple items, or same items as the base ruleset but with additions or omissions) would override the 'requires' found in the base ruleset, correct?
You mean in the manufacture section I guess? Yes, that should work. The option to manufacture the Coelacanth should pop when you research the gauss canon. Note that you will need to also change the dependencies of the USOPaedia article if you want to get that at the same time.

It is a bit different since the coelacanth does not have its own research project. If it did, with dependencies on the cannon and sub construction, and both the manufacture and UFOPaedia had depended on that research topic, all you would have had to do is change the dependencies, but alas ;)

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #28 on: August 11, 2015, 09:51:50 pm »
With the TftD damage rule, both AP and Explosives do 50% to 150% of listed damage on impact (at ground zero for the explosive, which also means it is hitting under armor instead of whatever facing was hit). That means 30 to 90 damage on hit (neglecting damage modifiers and armor).

With EU damage rule, AP does 0% to 200% damage, so 0 to 120 damage for your 60 listed power. By opposition, explosives still do 50% to 150% damage. On average, they both do 60, in practice, the HE is a lot more reliable, especially since at ground zero it is hitting under armor which is generally lower.

For both formulas, In/Ph rounds do variable damage on hit, about 6 on average, and will do damage over time. The only thing that the listed power does is determine the size of the area to be covered in fire.

Alright, that answers everything pretty nicely! I was aware of the 50-150% of TFTD and the 0-200% of EU. Also knew HE's quirk (other than AOE) is that it hits under armor (which is usually weaker). I did not understand how In/Ph worked, though. The damage value is quite misleading! No wonder I couldn't kill anything with Phosphorous when I first played TFTD! So there's basically little benefit other than illuminating big patches of terrain with it, right? It's not like you can count on 6 points of damage per turn to kill the enemy for you... (which is a shame, because I would have wanted it to have a more compelling reason to actually be useful)

And while I'm at it, I might as well ask: does smoke damage (like making Dye Grenade do 60 smoke damage instead of 10) also determine blast radius, or is there something else to it? Actually, is there any smoke health damage at all, or is does it only build up stunning over time? I'm a bit confused now since armor's damage modifiers do list smoke as if a unit could be strong/weak against it somehow. I can understand 0.0 would mean totally invulnerable, but to what exactly? In other words, what does smoke really do, damage-wise?

Quote
No, getOneFree will be executed once, and if you have two defined in the ruleset the second should overwrite the first. It's not getTwoFree :P

Ah, would've been nice if it worked. On a tangential note, can 2 or more UFOpaedia articles pop-up at the same time? For example, you research an Aquatoid Medic and get the Aquatoid UFOpaedia entry proper (provided you never research any Aquatoid before) + some random autopsy due to the Medic's 'geOneFree'? Does this happen or do you get both unlocked but just one pops up? I do not recall getting any more than one at once...

Quote
I believe that this is hard coded.

I do not know where I had read this, but I remember refuel, repair and rearming priorities could be re-ordered...?

Quote
You mean in the manufacture section I guess? Yes, that should work. The option to manufacture the Coelacanth should pop when you research the gauss canon. Note that you will need to also change the dependencies of the USOPaedia article if you want to get that at the same time.

It is a bit different since the coelacanth does not have its own research project. If it did, with dependencies on the cannon and sub construction, and both the manufacture and UFOPaedia had depended on that research topic, all you would have had to do is change the dependencies, but alas ;)

Right. Same with making Medi-Kit and Particle Disturbance Sensor available from the start (which is what I've just done): remove ('delete: STR_ID') their research, manufacture and UFOpedia entries.

Well, I've exhausted all my questions for now! I should be back with some mOrz later :P

Thanks for all the help.
« Last Edit: August 11, 2015, 10:00:03 pm by Orz »

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #29 on: August 11, 2015, 11:17:34 pm »
Digressing momentarily back to the UFOpedia question:

I noticed Disruptor Pulse Launcher shows 75% TU Cost in UFOpedia, but it's actually 66% in the code:



Code: [Select]
    compatibleAmmo:
      - STR_DISRUPTOR_AMMO
    accuracyAimed: 120
    tuAimed: 66
    battleType: 1


Similarly, Displacer/Sonic shows a Weapon Power of 130, but it's actually 110:



Code: [Select]
  - type: STR_DISPLACER_SONIC
    size: 6
    costSell: 980000
    transferTime: 96
    bigSprite: 54
    bulletSprite: 8
    fireSound: 36
    hitSound: 31
    power: 110
    damageType: 5

So why did UFOpedia get that wrong?

Thanks :)
« Last Edit: August 11, 2015, 11:56:29 pm by Orz »