OpenXcom Forum

Modding => OXCE Suggestions NEW => OpenXcom Extended => OXCE Suggestions Abandoned => Topic started by: Finnik on April 22, 2022, 11:00:08 am

Title: [ABANDONED] RuleSoldier property to define consumed living space
Post by: Finnik on April 22, 2022, 11:00:08 am
Abandon reason: not worth the effort; and not enough interest

Currently, we have rather simple logic to calculate consumed base's living space. That's fine for vanilla, but in OXCE mods we have a lot of pretty different creatures, from tiny AI-controlled drones to giant monsters.
What do you think about adding a new property to define using space? For instance, we could make `requiredLivingSpace: int`, from 0 for tiny drones to 4 for monsters, with 1 as default value.
I think it is not so hard to add  :)
Title: Re: [SUGGESTION] RuleSoldier property to define consumed living space
Post by: Meridian on April 24, 2022, 04:49:43 pm
Don't know how difficult it would be, I imagine it's used on quite a lot of places and finding all related "count = count + 1" and "count++" will not be very trivial.
Still, it's feasible, even if maybe painful.

As for whether it's needed, let's wait for some feedback from modders...
Title: Re: [SUGGESTION] RuleSoldier property to define consumed living space
Post by: Finnik on April 24, 2022, 05:35:08 pm
Don't know how difficult it would be, I imagine it's used on quite a lot of places and finding all related "count = count + 1" and "count++" will not be very trivial.
Still, it's feasible, even if maybe painful.

Indeed, that part of the code was never designed to be developed further, all that increases from all parts of the game is pain for coding.
Title: Re: [SUGGESTION] RuleSoldier property to define consumed living space
Post by: The Reaver of Darkness on May 11, 2022, 11:03:55 pm
I don't know what it would be like trying to code it but it seems to me like it would be simple enough. You could leave all defaults at 1 and allow specific units (including prisoners) to be given multipliers.
I imagine it's used on quite a lot of places and finding all related "count = count + 1" and "count++" will not be very trivial.
Perhaps encase the whole property in each specific case, so for example a "count+X"= becomes "count+X"= *2 for a unit type with size 2.

I would have been interested in it if it had been implemented a few years back, but I won't likely use the feature at this point. However it seems highly useful. I just got used to not having it. I approve of adding it.
Title: Re: [SUGGESTION] RuleSoldier property to define consumed living space
Post by: Meridian on May 11, 2022, 11:14:31 pm
On a conceptual level, it is indeed trivial.
Title: Re: [SUGGESTION] RuleSoldier property to define consumed living space
Post by: Finnik on May 12, 2022, 09:50:28 pm
the problem is that some base properties were not meant to be expanded above what it is in vanilla, so done in easy way. Now you have to either overhaul a bunch of logic, or fix all cases where game looks or changes that value. And when you start doing that you realize, that it used in so many places (transfer, die, hire, fire...).
Title: Re: [SUGGESTION] RuleSoldier property to define consumed living space
Post by: Yankes on May 12, 2022, 11:52:09 pm
And handling corner cases too, some features once done work fine for years, other are pain in a** for many years and need multiple interventions to fix things that get broken.
Title: Re: [SUGGESTION] RuleSoldier property to define consumed living space
Post by: Finnik on May 15, 2022, 09:04:08 pm
Ok, I guess, it can be considered as rejected. I've asked modders in chats and PM, no big interest compared to dev pain =)
Thanks for your time!

UPD: Hope you don't mind, that I've changed topic header to rejected
Title: Re: [REJECTED] RuleSoldier property to define consumed living space
Post by: N7Kopper on July 14, 2022, 02:37:27 pm
Would it be possible to use scripts to do something hackish to alter the current number of personnel on base? Such as if you recruit a goliath who takes up two spots, every one comes with an imaginary "other employee" that takes one space, and mysteriously disappears when the goliath dies.

Same with a tiny pixie who take no space - every one comes with some improvement that adds one capacity to the living quarters of any base they're in, which dies with them. (Or at the very least, implement pixies as 0.1 sized cargo with soldier stats? I think that's possible? Maybe only HWPs work that way?)

Maybe the former is possible but not the latter.
Title: Re: [REJECTED] RuleSoldier property to define consumed living space
Post by: Yankes on July 14, 2022, 02:52:35 pm
Script will not be solution, engine will need be aware and have support of things like this.

Consider simple fact you can move this unit to other base, what will happen with this bonus spot? what when unit is transformed? what if transformed unit have different size?