aliens

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

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #45 on: August 18, 2015, 04:07:15 am »
you'll need to delete all the raceweights, not just "" them out. and that includes the weights in missionScripts (as applicable)

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #46 on: August 18, 2015, 05:18:04 am »
Thanks, Warboy! It now seems so obvious! It appears the problem lied right here, what I had done was (snippet example):

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    points: 0
    raceWeights:
      0:
        STR_SECTOID: 70
        STR_GAZER: 10
        STR_WASPITE: 20

I thought I was replacing STR_SNAKEMAN with STR_GAZER (and FLOATER with WASPITE)! Clearly not, as I was merely adding into the original 'raceWeights' which already included Snakeman and Floater by default. How silly of me. So what I have now done was keep Snakeman & Floater but gave them 0 chance of being triggered by the game:

Code: [Select]
  - type: STR_ALIEN_RESEARCH
    points: 0
    raceWeights:
      0:
        STR_SECTOID: 70
        STR_GAZER: 10
        STR_WASPITE: 20
        STR_SNAKEMAN: 0
        STR_FLOATER: 0

This seems to have finally fixed the problem. I've been able to last 5+ months without inconveniences before I lost the game due to multiple failures to intercept/crash UFOs and flagrant avoidance of terror attacks :P

PS: Out of curiosity now, why is it that if I evade or abort a terror site, all UFO activity ceases next month and the only thing that occurs is another terror attack?

PPS: And where did Arthanor go?!
« Last Edit: August 18, 2015, 05:31:17 am by Orz »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #47 on: August 22, 2015, 12:37:14 am »
PS: Out of curiosity now, why is it that if I evade or abort a terror site, all UFO activity ceases next month and the only thing that occurs is another terror attack?

gonna put that down to confirmation bias. there probably are UFOs that you're simply not detecting.
you can check this at any time by making a save and opening it in a text editor to see how many UFOs are in flight/etc.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #48 on: August 28, 2015, 05:40:58 am »
gonna put that down to confirmation bias. there probably are UFOs that you're simply not detecting.
you can check this at any time by making a save and opening it in a text editor to see how many UFOs are in flight/etc.

Will do that next time!

Now I'm back with a quick question :P

I cannot make the "we can now research: item" message pop-up for any of the three last HWPs (ie. Tank/Laser & the 2 Hovertanks). What I'm doing is giving each tank an independent research of their own, rather than having them become immediately available after researching other items in vanilla. So, I can make the research appear after certain dependencies are fulfilled. That's easy. Works on anything else if I'm fiddling with the research tree. For example, I could make a Sectoid Soldier research unlock Alien Grenade for research, and I will get the  "we can now research: Alien Grenade" message as normal.

However, for some reason that's eluding me, this does not occur with the tanks :/

What I'm doing:

Code: [Select]
research:
  - name: STR_HOVERTANK_PLASMA
    cost: 450
    points: 15
    dependencies:
      - STR_HEAVY_PLASMA_CLIP
      - STR_NEW_FIGHTER_CRAFT

Again, it does become researchable (it will appear in the lab's research list), but I do not get the "we can now research: Tank/Laser" notification.

What am I missing?

PS: Oh, just to compare with a more successful example: I've made it so that Alien Containment requires previous research and that works just fine. After researching the required item, I'll get the message: "we can now research: Alien Containment" without problem. So I don't know what it is with the tanks.
« Last Edit: September 07, 2015, 03:01:20 am by Orz »

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #49 on: September 07, 2015, 03:45:30 am »
So after extensively and painstakingly modding UFO/EU to my satisfaction and playing it from beginning to end to ensure it works to perfection (*) over the past couple weeks, I've resumed my original TFTD mod. I dropped modding TFTD originally because it was not fully mod-friendly, so I thought I'd give it some time to become more stable. The following issue is probably due to this mod-support issues, but just to be completely sure I figured I'd ask here.

Basically, the game crashes when certain units (in my units.rul) get killed. So far I've encountered this problem with all Coelacanths, Displacers and Deep Ones. The strange thing is I hadn't even edited those units yet (that is, the unit in question appears exactly the same as the original file, copy/pasted and unedited). I've tested this several times already to be sure.

This is my (as of yet unedited) Deep One:

Code: [Select]
units:
  - type: STR_DEEP_ONE_TERRORIST
    race: STR_DEEP_ONE
    rank: STR_LIVE_TERRORIST
    stats:
      tu: 50
      stamina: 90
      health: 35
      bravery: 90
      reactions: 55
      firing: 50
      throwing: 58
      strength: 40
      psiStrength: 50
      psiSkill: 0
      melee: 70
    armor: DEEP_ONE_ARMOR0
    standHeight: 21
    kneelHeight: 16
    value: 12
    deathSound: 56
    intelligence: 4
    aggression: 2
    livingWeapon: true

And this is the original Deep One (Nightly 2015-09-05 06:03):
Code: [Select]
units:
  - type: STR_DEEP_ONE_TERRORIST
    race: STR_DEEP_ONE
    rank: STR_LIVE_TERRORIST
    stats:
      tu: 50
      stamina: 90
      health: 35
      bravery: 90
      reactions: 55
      firing: 50
      throwing: 58
      strength: 40
      psiStrength: 50
      psiSkill: 0
      melee: 70
    armor: DEEP_ONE_ARMOR0
    standHeight: 21
    kneelHeight: 16
    value: 12
    deathSound: 56
    intelligence: 4
    aggression: 2
    livingWeapon: true

Took me a while to figure out what was actually causing the crash (I thought it was something missing in the armor.rul at first, but that was not it): if I completely delete my Deep One from my items.rul and test it again on a random battle, then Deep Ones will die without crashing the game. It really makes no sense, considering the unit in question is an unedited copy/paste of the original.

What's more, I have other units which are actually slightly edited, like Gillmen (which come along Deep Ones, so I can test them together), but I have no problems with those. So the issue must be with the OpenXCom/TFTD engine itself. In short: some units simply cannot be overwritten (without crashing the game), even if the overwriting ruleset is a duplicate of the original.

Any suggestions? Perhaps (I hope!) I'm simply overlooking something terribly stupid.

Thanks :)


(*) I still have that HWP UFOpedia issue mentioned in my previous post unresolved, though, so any help would be highly appreciated!
« Last Edit: September 07, 2015, 03:48:52 am by Orz »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #50 on: September 07, 2015, 04:59:04 pm »
Copy-pasting will not save you from the modding issues, as they are still separate mods and the game will judge them differently. It could be anything as simple as a death sound or object sprite falling into the danger zone.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #51 on: September 13, 2015, 10:54:15 pm »
Copy-pasting will not save you from the modding issues, as they are still separate mods and the game will judge them differently. It could be anything as simple as a death sound or object sprite falling into the danger zone.

Well, I see it all seems to be fixed now :D



In other (old) news: I apologize for being so insistent here, but I would still like some help with this issue I'm having regarding HWP research topics.

Very simply, this is what I'm doing:

Code: [Select]
research:
  - name: STR_TANK_LASER_CANNON
    cost: 300
    points: 15
    dependencies:
      - STR_HEAVY_LASER
  - name: STR_HOVERTANK_PLASMA
    cost: 450
    points: 15
    dependencies:
      - STR_HEAVY_PLASMA_CLIP
      - STR_NEW_FIGHTER_CRAFT
  - name: STR_HOVERTANK_LAUNCHER
    cost: 500
    points: 15
    dependencies:
      - STR_BLASTER_BOMB
      - STR_NEW_FIGHTER_CRAFT

Their respective manufacture and ufopaedia rulesets have been tweaked accordingly. I have no problem with that (once research is done, I'll get the notice I can now manufacture the tank in question and the UFOpedia entry will pop-up as normal). My only issue is that—let's take the above Tank/Laser for example—once I complete Heavy Laser research, it will unlock Tank/Laser research, but it will not notify me "we can now research Tank/Laser" as with any other unlocked research.

In other words, after finishing Heavy Laser I can go into the lab, open up the list of topics, and lo and behold: Tank/Laser is available for research. However, I never get the pop-up notification.

And I've done this same thing with Alien Containment, like so:

Code: [Select]
research:
  - name: STR_ALIEN_CONTAINMENT
    cost: 300
    points: 25
    dependencies:
      - STR_ALIEN_FOOD
      - STR_ALIEN_REPRODUCTION

Yet I have no trouble with it. Once I research Alien Food, I will get "we can now research Alien Containment" message as normal.

So what's the problem with the tanks? It eludes me!

This is probably the last thing that I'm missing to call my mod 100% complete.

Thanks, as always  :)
« Last Edit: September 14, 2015, 05:15:08 am by Orz »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #52 on: September 16, 2015, 01:25:28 am »
Should be fixed now.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #53 on: September 16, 2015, 04:16:49 pm »
Should be fixed now.

Thanks! Tested and so far so good. Didn't know that was a bug (?). I thought I was missing something in my rulesets :P

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions
« Reply #54 on: September 25, 2015, 07:39:56 am »
So I am play-testing my TFTD mod and The Latest Flying Sub research changes are not taking effect. Tested several times. I've done the exact same thing on my UFO/EU mod and had no problems whatsoever.

Code: [Select]
  - name: STR_THE_LATEST_FLYING_SUB
    cost: 900
    points: 30
    requires:
      - STR_NEW_FIGHTER_TRANSPORTER
    dependencies:
      - STR_THE_LATEST_FLYING_SUB_DEP
  - name: STR_THE_LATEST_FLYING_SUB_DEP
    cost: 0
    dependencies:
      - STR_AQUATOID_COMMANDER
      - STR_AQUATOID_NAVIGATOR
      - STR_AQUATOID_TECHNICIAN
      - STR_GILLMAN_COMMANDER
      - STR_GILLMAN_NAVIGATOR
      - STR_GILLMAN_TECHNICIAN
      - STR_TASOTH_COMMANDER 
      - STR_TASOTH_NAVIGATOR 
      - STR_TASOTH_TECHNICIAN 
      - STR_LOBSTERMAN_COMMANDER
      - STR_LOBSTERMAN_NAVIGATOR
      - STR_LOBSTERMAN_TECHNICIAN

In this case, it was an Aquatoid Navigator which I was researching (and yes, I already had HAMMERHEAD so the pre-requisite had already been fulfilled). And yes, all pertaining aliens (listed above) have the unlocking of STR_THE_LATEST_FLYING_SUB_DEP
 listed under their respective strings.

I even reverted back to vanilla:

Code: [Select]
  - name: STR_THE_LATEST_FLYING_SUB
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_TRANSPORTER
      - STR_LOBSTERMAN_COMMANDER

And just swapped Lobsterman Commander for Aquatoid Navigator:

Code: [Select]
  - name: STR_THE_LATEST_FLYING_SUB
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_TRANSPORTER
      - STR_AQUATOID_NAVIGATOR

Yet it still doesn't work. Seems to be something "hard-coded" about Lobsterman Commander  ???


Just to compare notes, this is what I had done in my UFO/EU mod and it worked as it should (and play-tested twice):

Code: [Select]
  - name: STR_ULTIMATE_CRAFT
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_TRANSPORTER
      - STR_ULTIMATE_CRAFT_DEP
  - name: STR_ULTIMATE_CRAFT_DEP
    cost: 0
    dependencies:
      - STR_SECTOID_COMMANDER
      - STR_SECTOID_LEADER
      - STR_SECTOID_ENGINEER
      - STR_WASPITE_COMMANDER
      - STR_WASPITE_LEADER
      - STR_WASPITE_ENGINEER
      - STR_GAZER_COMMANDER
      - STR_GAZER_LEADER
      - STR_GAZER_ENGINEER
      - STR_ANTHROPOD_COMMANDER
      - STR_ANTHROPOD_LEADER
      - STR_ANTHROPOD_ENGINEER
      - STR_MUTON_COMMANDER
      - STR_MUTON_LEADER
      - STR_MUTON_ENGINEER
      - STR_ETHEREAL_COMMANDER
      - STR_ETHEREAL_LEADER
      - STR_ETHEREAL_ENGINEER

Warboy or anyone, care to lend a hand?  ;)

PS: Don't know if I should post this on OpenXcom Bug Tracker instead.
« Last Edit: September 25, 2015, 07:43:05 am by Orz »

Offline Neo23

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #55 on: September 25, 2015, 03:55:27 pm »
Some entries in the rulesets cannot be simply overridden. The research dependencies are such a case. Your own entries will only add to all the vanilla entries without overwriting
or deleting them.
To make this work, you must delete the entire vanilla research topic from the game and add it as a new one in your mod, which is pretty easy to do:

Code: [Select]
  - delete: STR_THE_LATEST_FLYING_SUB

  - name: STR_THE_LATEST_FLYING_SUB
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_TRANSPORTER
      - STR_THE_LATEST_FLYING_SUB_DEP

The first line "- delete: STR_THE_LATEST_FLYING_SUB" removes the topic from the game. After that you can re-add it with new dependencies.
This will also delete the original pre-counted listorder for this item. You can sort it again by adding the listorder parameter.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #56 on: September 25, 2015, 04:52:07 pm »
The first line "- delete: STR_THE_LATEST_FLYING_SUB" removes the topic from the game. After that you can re-add it with new dependencies.
This will also delete the original pre-counted listorder for this item. You can sort it again by adding the listorder parameter.

Forgot to mention yesterday, I had already done that too and it didn't work either. So far I've only successfully used that to delete and redefine Ethereal Soldier's and Aquatoid Technician's psi-skills (since I was giving the ability to just Navigators/Leaders & Commanders) which seemed to be hard-coded even if you made the value 0. And also to delete Medi-Kit and Detector/Sensor in order to make them available from the start. So I know how it works, but "delete: STR_ID" just won't work in this particular instance.

PS: Just to be clear, it's the "requires" field which doesn't work, not the dependencies. Don't worry about it, it's not that big of a deal, I'll just keep dependencies instead. I just wanted dependencies to come into effect only after the requirement was fulfilled, just a fastidious little detail :P
« Last Edit: September 25, 2015, 06:35:40 pm by Orz »

Offline Neo23

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #57 on: September 25, 2015, 11:48:06 pm »
I had much trouble with the "required" parameter already too and try to avoid it. From my own ruleset experience it seems this only works correct if a zero cost dep-research is used as required, but these must be unlocked with dependencies and not with get one free or unlock. Complicated stuff which cost me hours already (the famous no "you can now research" message bug for example).
As you said, try to use dependencies only and make switch researches with zero cost and you should be fine.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #58 on: September 28, 2015, 04:35:14 pm »
I had much trouble with the "required" parameter already too and try to avoid it.

Indeed, I'm just sticking to dependencies only now.


Question!

I'm trying to edit the list order of facilities in the "build facility" list at the base. I cannot seem to affect the order unless I edit the main file. In other words, reordering facilities in my own facilities.rul has no effect on the game. Any way to work around this so I don't have to manually overwrite the main ruleset every time after downloading a nightly?
« Last Edit: September 28, 2015, 04:38:01 pm by Orz »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Ruleset Editing Questions (& Some mOrz Qestions)
« Reply #59 on: September 29, 2015, 02:49:00 am »
use the listOrder