OpenXcom Forum

Modding => Released Mods => The X-Com Files => Topic started by: Thermite on April 10, 2020, 04:53:34 pm

Title: How do I make a subMod?
Post by: Thermite on April 10, 2020, 04:53:34 pm
I had this idea for a XCF submod, actually more like a few features, but I don't know how I would do them, could someone help me? It would involve a few recipes and techs.
Title: Re: How do I make a subMod?
Post by: vadracas on April 11, 2020, 12:17:21 am
Alright, here's how-
1. Make the mod
2. put the folder with the rulesets in another folder
3. Add metadata.yml to the same folder hierarchy as the ruleset folder.
4. Configure metadata .yml to something similar to my attached metadata.yml.


P.S. obviously based on the description this mod is intended for both xcomfiles and xpiratez. To do that, you need to change the x-com-files inside to a *.
Title: Re: How do I make a subMod?
Post by: Thermite on April 11, 2020, 08:53:18 am
Alright, here's how-
1. Make the mod
2. put the folder with the rulesets in another folder
3. Add metadata.yml to the same folder hierarchy as the ruleset folder.
4. Configure metadata .yml to something similar to my attached metadata.yml.


P.S. obviously based on the description this mod is intended for both xcomfiles and xpiratez. To do that, you need to change the x-com-files inside to a *.

But how would I work around the rule sets?
This would be my first mod...
>_<
Is there a guide anywhere?
*screms*
Title: Re: How do I make a subMod?
Post by: TheCurse on April 11, 2020, 09:51:08 am
well if its your first modding attempts, i´d suggest trying something easier than customizing xcf.
in the modding section is most stuff described you need to know.
however, most of starting to mod is figuring stuff out.
so get to it and read and try stuff ^^
Title: Re: How do I make a subMod?
Post by: vadracas on April 11, 2020, 12:54:09 pm
But how would I work around the rule sets?
This would be my first mod...
>_<
Is there a guide anywhere?
*screms*

There is the ruleset reference, it's stickied in the OXCE sub-forum. However, if you want to mod, you will have to work with rulesets in some form or another.
Title: Re: How do I make a subMod?
Post by: Solarius Scorch on April 11, 2020, 06:15:06 pm
Here's you new bible :)
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)

I would start with analysing other mods and copying them.

What exactly are you trying to do, by the way? We can show you the ropes.
Title: Re: How do I make a subMod?
Post by: Thermite on April 12, 2020, 12:57:32 am
Here's you new bible :)
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)

I would start with analysing other mods and copying them.

What exactly are you trying to do, by the way? We can show you the ropes.

I want to make two things: a mod that allows you to breed domesticated strange creatures (rats, gilldogs and hellhounds).

And another one that would allow you to have a sort of "blood donation" system for the more intelligent zombies (vampires, ghouls and mummies) since they seem to be able to be reasoned with.
Title: Re: How do I make a subMod?
Post by: vadracas on April 12, 2020, 01:19:10 am
First idea is pretty simple if you want it to be, make a manufacturing project along the ruleset guidelines, put 2 strange creatures of whatever type as input and 3+ as output.
Or, if you want it more complicated, you could set up a random production system, outputting only 1(net loss), 2(failed breeding, 3(successful breeding), 4(extra successful breeding).

The second idea needs to be clarified first. What exactly do you mean by a blood donation system?
Title: Re: How do I make a subMod?
Post by: Thermite on April 12, 2020, 01:32:13 am
The second idea needs to be clarified first. What exactly do you mean by a blood donation system?

Creature goes in, price and work is done, creature goes out + blood plasma.
Possibly a way to purchase it, at a hefty price, from the buy list too?
Title: Re: How do I make a subMod?
Post by: vadracas on April 12, 2020, 02:58:31 am
Heres a sort of template for the second one, using a zombie boomer(shamelessly copied and edited from the live zombie boomer blood plasma extraction in xcomfiles).

  - name: STR_BLOOD_PLASMA_DONATION_ZOMBIE_BOOMER_LIVING
    category: STR_BIOEXTRACTION
    requiresBaseFunc: [BIOLAB]
    requires:
      - STR_MUTANT_BLOOD_PLASMA
      - STR_ZOMBIE_BOOMER
    space: 3
    time: 50
    cost: 100
    requiredItems:
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    producedItems:
      STR_MUTANT_BLOOD_PLASMA: 2
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    listOrder: 207915


I hope most of the values in this are self-explanatory
Title: Re: How do I make a subMod?
Post by: Solarius Scorch on April 12, 2020, 06:22:27 pm
Yep, the code looks fine at a glance.

But please kindly use the "code" marking in the future, otherwise it's impossible to copy and paste without messing up the indentation - like this:

Code: [Select]
  - name: STR_BLOOD_PLASMA_DONATION_ZOMBIE_BOOMER_LIVING
    category: STR_BIOEXTRACTION
    requiresBaseFunc: [BIOLAB]
    requires:
      - STR_MUTANT_BLOOD_PLASMA
      - STR_ZOMBIE_BOOMER
    space: 3
    time: 50
    cost: 100
    requiredItems:
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    producedItems:
      STR_MUTANT_BLOOD_PLASMA: 2
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    listOrder: 207915
Title: Re: How do I make a subMod?
Post by: vadracas on April 12, 2020, 07:37:53 pm
Yep, the code looks fine at a glance.

But please kindly use the "code" marking in the future, otherwise it's impossible to copy and paste without messing up the indentation - like this:

Code: [Select]
  - name: STR_BLOOD_PLASMA_DONATION_ZOMBIE_BOOMER_LIVING
    category: STR_BIOEXTRACTION
    requiresBaseFunc: [BIOLAB]
    requires:
      - STR_MUTANT_BLOOD_PLASMA
      - STR_ZOMBIE_BOOMER
    space: 3
    time: 50
    cost: 100
    requiredItems:
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    producedItems:
      STR_MUTANT_BLOOD_PLASMA: 2
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    listOrder: 207915


Thank you, never posted a code snippet up here before :)
Title: Re: How do I make a subMod?
Post by: Thermite on April 13, 2020, 12:53:24 am
Thanks you all.
All of this was lovely.
xoxo
Title: Re: How do I make a subMod?
Post by: Thermite on April 13, 2020, 01:12:31 am
Heres a sort of template for the second one, using a zombie boomer(shamelessly copied and edited from the live zombie boomer blood plasma extraction in xcomfiles).

  - name: STR_BLOOD_PLASMA_DONATION_ZOMBIE_BOOMER_LIVING
    category: STR_BIOEXTRACTION
    requiresBaseFunc: [BIOLAB]
    requires:
      - STR_MUTANT_BLOOD_PLASMA
      - STR_ZOMBIE_BOOMER
    space: 3
    time: 50
    cost: 100
    requiredItems:
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    producedItems:
      STR_MUTANT_BLOOD_PLASMA: 2
      STR_ZOMBIE_BOOMER_TERRORIST: 1
    listOrder: 207915


I hope most of the values in this are self-explanatory

How did you figure out the list Order, btw?
Title: Re: How do I make a subMod?
Post by: vadracas on April 13, 2020, 01:40:14 am
The list order is completely arbitrary based on where you want this project to appear in the manufacturing screen. As stated earlier, I copied most of the ruleset code from Solar's blood plasma extraction projects and this was the list order he had assigned to zombie boomer extraction.
Title: Re: How do I make a subMod?
Post by: Solarius Scorch on April 13, 2020, 02:42:34 am
ListOrder is also completely optional.
Title: Re: How do I make a subMod?
Post by: Thermite on April 14, 2020, 01:32:04 am
Here's you new bible :)
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)

I would start with analysing other mods and copying them.

What exactly are you trying to do, by the way? We can show you the ropes.

Is there a reference for the metadata file?
Title: Re: How do I make a subMod?
Post by: Thermite on April 14, 2020, 04:33:05 am
How do I edit a ruleset without editing the file directly?
Title: Re: How do I make a subMod?
Post by: vadracas on April 14, 2020, 01:24:17 pm
How do I edit a ruleset without editing the file directly?

What do you mean? You can edit or reference the sea object/item in a different .rul file but other than that you pretty much always have to open the file to edit it??
Title: Re: How do I make a subMod?
Post by: Solarius Scorch on April 14, 2020, 01:58:38 pm
Is there a reference for the metadata file?

I don't know, but in most cases altering an existing metadata file is good enough.

What do you mean? You can edit or reference the sea object/item in a different .rul file but other than that you pretty much always have to open the file to edit it??

I hope it's not about editing vanilla files... ;)
Title: Re: How do I make a subMod?
Post by: vadracas on April 14, 2020, 04:57:06 pm
or an already compiled .exe 🥶.
Title: Re: How do I make a subMod?
Post by: Thermite on April 14, 2020, 07:27:02 pm
What do you mean? You can edit or reference the sea object/item in a different .rul file but other than that you pretty much always have to open the file to edit it??

I want the STR_GILLDOG, the STR_BLOODHOUND and the STR_GIANT_RAT to unlock my research, so I have to only have one of them researched.
Title: Re: How do I make a subMod?
Post by: Thermite on April 14, 2020, 08:24:25 pm
I don't know, but in most cases altering an existing metadata file is good enough.

I wanted to know if there was a "requiredMasterVersion" namespace.
Title: Re: How do I make a subMod?
Post by: Meridian on April 14, 2020, 09:16:16 pm
I wanted to know if there was a "requiredMasterVersion" namespace.

No.
Title: Re: How do I make a subMod?
Post by: vadracas on April 14, 2020, 09:27:24 pm
I want the STR_GILLDOG, the STR_BLOODHOUND and the STR_GIANT_RAT to unlock my research, so I have to only have one of them researched.

Code: [Select]
  - name: STR_GIANT_SPIDER
    cost: 0
    points: 50
    needItem: true
    unlocks:
      - STR_STRANGE_CREATURE
      - STR_RANDOM_ANIMAL_RESEARCHED
  - name: STR_RANDOM_ANIMAL_RESEARCHED
    cost: 0
    points: 500 


I think that should work...
Title: Re: How do I make a subMod?
Post by: Thermite on April 15, 2020, 01:13:52 am
Code: [Select]
  - name: STR_GIANT_SPIDER
    cost: 0
    points: 50
    needItem: true
    unlocks:
      - STR_STRANGE_CREATURE
      - STR_RANDOM_ANIMAL_RESEARCHED
  - name: STR_RANDOM_ANIMAL_RESEARCHED
    cost: 0
    points: 500 


I think that should work...

Even if it is defined on the XCF files?
Title: Re: How do I make a subMod?
Post by: vadracas on April 15, 2020, 02:10:32 am
Even if it is defined on the XCF files?

I really am not sure on how a sub-mod would interact with this, but I think so long as you redefine each of the researches involved FULLY in your submod exactly as they were in xcom-files but with your modifications it should work.

Bear in mind that I'm not someone who works heavily with modding.
Title: Re: How do I make a subMod?
Post by: Thermite on April 15, 2020, 11:40:11 pm
I really am not sure on how a sub-mod would interact with this, but I think so long as you redefine each of the researches involved FULLY in your submod exactly as they were in xcom-files but with your modifications it should work.

Bear in mind that I'm not someone who works heavily with modding.

Thanks