aliens

Author Topic: Elerium Extraction Mod  (Read 10173 times)

Offline SophiaThe3rd

  • Sergeant
  • **
  • Posts: 23
  • For Love of the Frog
    • View Profile
Elerium Extraction Mod
« on: August 28, 2016, 09:32:17 am »
try and try i cant seem to get my mod into the mod portal, so hopefully this works.

You can now extract precious 115 from all those alien clips you've had on firesale; unlocked late game and balanced to avoid game breaking amounts of 115. This mod creates a new facility that must be unlocked via reasearch before it becomes available for construction. After completion a new manufacturing process is unlocked. The facility will be targeted by aliens during a base defense mission for module destruction.

Requires OpenXcomExtended for now, a version for OpenXCom may be forthcoming pending intrest and my ability to actually upload something.

versions 1.0

Extra Research entries

Extra Facility - Incorporates New Rules (Base Functions), Terrains, Routes, and Maps

Extra Manufacturing entries



Version 1.1

changes to Routes nodes

extraString fixes



Version 1.2

Oops! now correctly formated .zip for easy extraction into mods folder

added metadata



Version 1.3

research changed to require Grav Shield instead of UFO Construction. (for balance and logic)
research added to require knowledge of at least 1 alien clip type beforehand (logical)
more fixes to ROUTES. aliens now behave correctly and changed xcom spawn locations/probabilities
added missing door frames to doors in maps

this work is a free use submisson for anyone for anything
« Last Edit: September 01, 2016, 03:20:50 am by SophiaThe3rd »

Offline Roxis231

  • Colonel
  • ****
  • Posts: 484
  • Catching the feral kitten hiding in my rubish bin
    • View Profile
Re: Elerium Extraction Mod
« Reply #1 on: August 28, 2016, 11:43:16 am »
There are Two other mods that do the same or similar for OpenXcom rather than Extended - You might want to have a look.

The first is is Break2Elerium by Falko (part of Falko's Mod Collection-generating rulesets with python)
     (Fixed versions are in post #25)

The other is my Recycled Elerium Mod (hasn't been updated since June though - You might need to make some changes to get it work)

« Last Edit: August 28, 2016, 11:45:49 am by Roxis231 »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Elerium Extraction Mod
« Reply #2 on: August 28, 2016, 01:17:27 pm »
But this one has a new facility!
And graphics!

Offline SophiaThe3rd

  • Sergeant
  • **
  • Posts: 23
  • For Love of the Frog
    • View Profile
Re: Elerium Extraction Mod
« Reply #3 on: August 29, 2016, 03:52:13 am »
thanks for pointing me to those mods! they use about the same mechanics to accomplish the goal as the prototype of this mod. ultimately, this mod was envisioned (without previous knowledge of the other 2 mods; popular idea!) with the new base facility in mind. after much tinkering, we were unable to find a way to force the buliding of the reactor to unlock the manufacturing that worked at an acceptable level.
- on a side note any pointers on whats involved in adding a right click for the base module in basescape would be much appreciated! the original intent was to perhaps add another right side button for extraction, like research, manufacturing, and purchase/sell, but at this point that looks like too much to chew/not really necessary. Now i'm thinking simply leading to the manufacturing page on a right click should suffice.

Much thanks to SupSuper, Warboy, and Hobbes for various help in IRC on the finer points of how everything fits together.

Offline Roxis231

  • Colonel
  • ****
  • Posts: 484
  • Catching the feral kitten hiding in my rubish bin
    • View Profile
Re: Elerium Extraction Mod
« Reply #4 on: August 29, 2016, 10:14:46 am »
You might want to talk to Dioxine.

His X-Pirates mod for OXE has quite a lot of manufacturing projects that can only be seen/made if a particular facility is in the base,  if that's what you were thinking of.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Elerium Extraction Mod
« Reply #5 on: August 29, 2016, 11:07:13 am »
It's pretty easy.

In the manufacturing entry, you do this:
Code: [Select]
  - name: STR_MUTANT_REAPER
    requiresBaseFunc: [WELL]

And in the facilities you define the function:
Code: [Select]
  - type: STR_WELL
    provideBaseFunc: [WELL]

So this particular project STR_MUTANT_REAPER requires function WELL, which is provided by the facility STR_WELL.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: Elerium Extraction Mod
« Reply #6 on: August 29, 2016, 11:25:58 am »
The mod is already doing that.

Code: [Select]
facilities:
  - type: STR_115_REACTOR
    provideBaseFunc: [ EER ]     
manufacture:
  - name: STR_EEHP
    category: Elerium Extraction
    requiresBaseFunc: [ EER ]

I think the question was about something different, but I don't understand it.
Can you maybe say the below quoted text in different words?

- on a side note any pointers on whats involved in adding a right click for the base module in basescape would be much appreciated! the original intent was to perhaps add another right side button for extraction, like research, manufacturing, and purchase/sell, but at this point that looks like too much to chew/not really necessary. Now i'm thinking simply leading to the manufacturing page on a right click should suffice.

Offline SophiaThe3rd

  • Sergeant
  • **
  • Posts: 23
  • For Love of the Frog
    • View Profile
Re: Elerium Extraction Mod
« Reply #7 on: August 30, 2016, 07:46:39 pm »
sorry for the confusion guys. during basescape, if your base has a PSI-LAB the player is able to hover the mouse over the facility itself. Left click brings up the option to disassemble module.
Right click brings up the associated Psi-Training page where you assign soldiers and view their improvements this month.
Same goes for hangars, labs, workshops, general stores and others; they all have an associated right click page.
I want to link my reactor to the same page as workshops.

Quoted text: "the original intent was to perhaps add another right side button for extraction"

Reworded: I HAD wanted (second guessing now) to place a new button along the right side of basescape along with "build new base,  base information, soldiers, craft, etc." this button would have been called "Extraction" this buttons popup would have been where a right click on the base module itself would bring the player to. Again, this was during the design process IN MY HEAD. I now think that simply cloning the right click functon of workshops(bringing up manufacturing window) is best.
« Last Edit: August 30, 2016, 08:02:00 pm by SophiaThe3rd »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Elerium Extraction Mod
« Reply #8 on: August 30, 2016, 08:12:13 pm »
Try giving it some manufacturing space. This should make it a workshop for basescape purposes and besides, it sort of makes sense.

Offline SophiaThe3rd

  • Sergeant
  • **
  • Posts: 23
  • For Love of the Frog
    • View Profile
Re: Elerium Extraction Mod
« Reply #9 on: August 31, 2016, 04:22:14 am »
@Solarius Scorch: we played with this option a bit as a means of "getting the job done" but it was decided against because:
The reactor facility should enable the extraction process ONLY. Adding workshop space would allow players to potentially manufacture items without having any workshops at all. (although low values could minimize the effects, the behavior is undesirable.)

While it does make sense that the process needs and therefore should accommodate engineers, an author is unable to dictate HOW MANY. Players are apt to assign as many engineers as they have space for. From a "does it make sense?" standpoint, it was felt that having excessive personnel "working" in the reactor itself made for an "unsafe work environment". :P

By referencing various OXCE files and sniffing out entries for the TRAINING facility, several clues can be gathered about what is needed to enable a new right click function (AFAIK, right click is the ONLY way to access the training screen) however, i dont understand much of the code i'm finding. Furthermore, if it's ultimately something that has to be compiled into an .EXE or some such madness, and cant be accomplished by editing, i'm chasing a pipe dream. My imagination can (and does) outpace what i'm actually able to produce.

Thanks for your consideration though!

edit: there IS a button to access training in the Soldiers page, as well a right click function directly linking. As Extraction is it's own category in the (new and lovely!) manufacturing dropdown box, only right click function is of concern.
« Last Edit: August 31, 2016, 04:36:59 am by SophiaThe3rd »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Elerium Extraction Mod
« Reply #10 on: August 31, 2016, 04:49:27 am »
The reactor facility should enable the extraction process ONLY. Adding workshop space would allow players to potentially manufacture items without having any workshops at all.

Not necessarily, you can make all manufacturing projects require Workshop.
But yeah, it's not exactly clean. :3

Offline SophiaThe3rd

  • Sergeant
  • **
  • Posts: 23
  • For Love of the Frog
    • View Profile
Re: Elerium Extraction Mod
« Reply #11 on: August 31, 2016, 05:37:26 am »
Hmmm... do you mean:

add
Code: [Select]
facilities:
  - STR_WORKSHOP
    provideBaseFunc: [ WORK ]
  - STR_115_REACTOR
    workshops: #value
manufacture:
  - STR_THINGS  #every item able to manufacture
    requireBaseFunc: [ WORK ]

if so, then that would prevent building without workshops, but would still allow building in the reactor. (no good)
or do i misunderstand your meaning?

--- posts merged - Solarius Scorch ---

Mod has been updated to version 1.3

The new research entries have been modified to drop requirement of UFO Construction and replace it with Grav Shield. This will force later game development of this branch of the research tree, as well as provide a reasonable human-based artificial gravity base of knowledge the facility implies control of.

A new hidden research dependency provides for requiring previous research of at least 1 type of alien weaponry clip before the research on extraction can begin. Makes sense.

fixes to route nodes and spawn location/probabilities.
« Last Edit: August 31, 2016, 02:21:21 pm by Solarius Scorch »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Elerium Extraction Mod
« Reply #12 on: August 31, 2016, 02:23:39 pm »
Hmmm... do you mean:

add
Code: [Select]
facilities:
  - STR_WORKSHOP
    provideBaseFunc: [ WORK ]
  - STR_115_REACTOR
    workshops: #value
manufacture:
  - STR_THINGS  #every item able to manufacture
    requireBaseFunc: [ WORK ]

if so, then that would prevent building without workshops, but would still allow building in the reactor. (no good)
or do i misunderstand your meaning?

No, that's precisely what I meant. But how would building in the reactor be possible? I mean if you don't have a workshop there. If you do, well, not much I can suggest, but I don't think it's too wrong if one or two Engineers work on these laser cannons in the quiet reactor instead of the workshop. ;)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Elerium Extraction Mod
« Reply #13 on: August 31, 2016, 04:36:58 pm »
The best that can be done right without changing the base code (ie modding instead of creating your own new branch) is:

- Workshop provides function that every manufacturing job requires (having only a reactor on site only allows to extract elerium)
- Reactor provides function that is required for extractions (can't extract elerium without a reactor)
- Reactor provides at least 1 workshop place so that it behaves like a workshop when you click on it

You just have to tell yourself that the extraction of elerium from clips is a mostly mechanical thing but that one key part requires the reactor, instead of everything being done there. Then it makes sense that 100 engineers are working in the workshop at it, and giving stuff to the few engineers working in the reactor to make the finished elerium batch. And when nobody is extracting, the workbenches in the reactor are used for other things because why waste space?

Maybe engineers dismantle the clip in the workshop, which is the time consuming part, but they then need to throw the many little bits of elerium you get from clips into the reactor to combine them into 1 unit of elerium? Elerium is obviously safe to handle in the workshop, either because it's safe to handle or because there are proper facilities there, since there are many other projects that require elerium and are performed there (unless you want to change that as well).

Having 101 engineers working on a project that requires a reactor doesn't mean they're all cramped into the same work space in the reactor. The workshop provide workspace too. If you go to a factory that requires a expensive welding equipment to make cars, is everyone working on the same welding desk or are they spread out and doing different things in different places, with only a few specialized workers doing the special welding?

Alternatively, make a new branch of the OXC code, code a new facility type that provides its own workspace to assign engineers to its own project and is essentially just a duplicated workshop with different projects. Unfortunately, there aren't as many people who can help with that. We have a big modding community but a rather small number of coders.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Elerium Extraction Mod
« Reply #14 on: August 31, 2016, 04:55:06 pm »
Beautifully said, Arthanor-san. :)