Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New option in options.cfg: canConvertAmmoToElerium #341

Closed
wants to merge 1 commit into from

Conversation

fenyo1
Copy link
Contributor

@fenyo1 fenyo1 commented Feb 24, 2013

Default: OFF

Have you ever dreamed that you can convert your elerium-based ammunition back to elerium? :) Which you got a lot from UFOs of course.

Think about it. The gunpowder can be extracted from a bullet, why can't we simple extract elerium from the elerium-based ammo too?

Now you can do this. :)
Just turn on canConvertAmmoToElerium in options.cfg, and you can manufacture Elerium-115 from Plasma Pistol Clip, Plasma Rifle Clip, etc., and from Alien Grenade. (of course the clip/grenade must be researched first to convert back)
The manufacture time-cost is half of the clip's manufacture time-cost, and money cost is 0 of course. (since we just disassemblying the ammo)

Default: OFF

Have you ever dreamed that you can convert your elerium-based ammunition back to elerium? :) Which you got a lot from UFOs of course.

Think about it. The gunpowder can be extracted from a bullet, why can't we simple extract elerium from the elerium-based ammo too?

Now you can do this. :)
Just turn on canConvertAmmoToElerium in options.cfg, and you can manufacture Elerium-115 from Plasma Pistol Clip, Plasma Rifle Clip, etc., and from Alien Grenade. (of course the clip/grenade must be researched first to convert back)
The manufacture time-cost is half of the clip's manufacture time-cost, and money cost is 0 of course. (since we just disassemblying the ammo)
@SupSuper
Copy link
Member

This looks like the type of feature that would better belong in a ruleset instead of hardcoding it into the game.

@fenyo1
Copy link
Contributor Author

fenyo1 commented Feb 24, 2013

Ruleset itself is not enough for this. (and can't be turned on/off with a single switch) Since one Heavy Plasma Clip contains 3 pieces of Elerium, and can't set 1/3 as required quantity. (1/3 Heavy Plasma Clip -> 1 Elerium)
And all item's convert-back rule is generated automatically with this version. So if some new item comes into the ruleset, it will automatically have its convert-back rule.
And if it would be only a ruleset thing, then those rulesets would not have names. And i think it's not acceptable to make a lot of strings to ALL language files just for a mod.
Now the language-strings are automatically generated, and no need to extend the language files.

@fenyo1
Copy link
Contributor Author

fenyo1 commented Feb 25, 2013

Ok, i'm suspending this PR until #348 got merged. (conflicts)

@fenyo1 fenyo1 closed this Feb 25, 2013
@Warboy1982
Copy link
Collaborator

this is totally a mod. there's a better way to implement it, add a ratio to manufacture items to allow multiple items out from one item in, add some string magic so you can define something like "STR_PLASMA_RIFLE_CLIP -> STR_ELERIUM x3" modifications that will allow this behaviour to be defined in the ruleset would be a much better solution than adding an option switch.

@fenyo1
Copy link
Contributor Author

fenyo1 commented Feb 27, 2013

Ok, suppose i'll do that, and this thing goes to the ruleset. How do you want to make it optional? Ruleset is unique, so this thing would be turned on permanently. Do you want me to make an option which actually removes or keeps rules from the already read-in ruleset?

@Warboy1982
Copy link
Collaborator

just define an ItemsOut field or something in the RuleManufacture, and have it default to 1, so you don't even have to define it in the ruleset. and at the point of adding the newly produced item to the base, factor in this variable.
you may also want to factor it into the available space calculations when assigning a new manufacture

as for the string magic... follow similar logic, set a vector of strings as the "_longName" variable in RuleManufacture, and modify the RuleManufacture->GetName() to include an IF statement to see if it should return the name, or the concatenated _longName strings based on whether or not a _longName is defined.

@SupSuper
Copy link
Member

Rulesets aren't unique, they're modular - http://openxcom.org/forum/index.php/topic,670.0.html - and the ultimate goal is for people to be able to make and pick the combination of rulesets they want, instead of a monolithic approach. Just because this is undocumented unfinished behavior doesn't mean it's not there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants