OpenXcom Forum
OpenXcom Forks => OXCE Bugs => OpenXcom Extended (OXCE) => OXCE Bugs FIXED => Topic started by: Extremator on March 18, 2025, 01:00:55 pm
-
Modders actively use the negative cost of demolishing structures for their own insidious purposes!
If a negative price is specified, then you can destroy the structure by losing more money than you had. Is it possible to somehow prevent this and block this type of operation?
As an option: At the game engine level, change "Return -$100000" to "Costs $100000" if the cost of this action is less than 0.
-
Might also be useful to colorize the cost number red or green.
-
I support this!
As well as the ability to enter colortags for text.
|c00ff0000to_red_text|r or [ color=#ff0000]to_red_text[ /color] > to_red_text
-
Is it possible to somehow prevent this and block this type of operation?
Read, and don't click the button?
Might also be useful to colorize the cost number red or green.
There is no red or green text color in basescape.
The only available colors are:
- UFO: white, lightblue, gold, pink, purple
- TFTD: white, lightblue, lightgreen
-
Read, and don't click the button?
I can't build structures if I don't have the money for them. But I can make "improvements" if I don't have the money for them. Do you understand the difference? Or am I expressing myself incorrectly?
(I am not a student of English, sorry...)
-
There is no red or green text color in basescape.
Elaborate. The "dismantleFacility" has only those 5 colors defined for the elements but, isn't it possible to add more colors to an interface? The basescape palette does have red and green colors, no?
-
Elaborate. The "dismantleFacility" has only those 5 colors defined for the elements but, isn't it possible to add more colors to an interface? The basescape palette does have red and green colors, no?
the UFO basescape palette has only 5 text colors (or better said color ranges):
1. white: 208 (209-213)
2. lightblue: 218 (219-223)
3. gold: 213 (214-218)
4. pink: 241 (242-246)
5. purple: 246 (247-251)
All other color ranges were not meant for text and look like shit (or worse).
-
Here visually.
-
Please note that the original discussion was not about a color palette for text, but about a message about "return -$100,000", which I would like to replace with "need $100,000". And if nothing is returned - then a completely different text (as an alternative for styling the mod).
Also, I would like to draw attention to the fact that sometimes some items are needed, and this is visible during construction. Is it possible to expand and add this information in case of demolition of buildings? (show what will be returned)
And what about negative expenses for the maintenance of buildings? Is it possible to also replace the display of this line with "Income" and remove the negative sign? ;)
-
One solution I would see is simply add optional transnational like:
translation = "STR_REFUND_VALUE";
negative_translation = "STR_REFUND_VALUE_NEGATIVE";
if (tr(negative_translation).exist() and value < 0)
{
value *= -1;
translation= negative_translation;
}
setText(tr(translation).arg(value));
-
I can't build structures if I don't have the money for them. But I can make "improvements" if I don't have the money for them. Do you understand the difference? Or am I expressing myself incorrectly?
Yes, understood.
It will be fixed.
Please note that the original discussion was not about a color palette for text, but about a message about "return -$100,000", which I would like to replace with "need $100,000".
Can be done.
And if nothing is returned - then a completely different text (as an alternative for styling the mod).
When nothing is returned, nothing is shown, for vanilla backwards-compatibility.
Also, I would like to draw attention to the fact that sometimes some items are needed, and this is visible during construction. Is it possible to expand and add this information in case of demolition of buildings? (show what will be returned)
Yes, it is possible.
Please note that the original discussion was not about this.
And what about negative expenses for the maintenance of buildings? Is it possible to also replace the display of this line with "Income" and remove the negative sign? ;)
Yes, it is possible.
Please note that the original discussion was not about this.
I support this!
As well as the ability to enter colortags for text.
|c00ff0000to_red_text|r or [ color=#ff0000]to_red_text[ /color] > to_red_text
Not doable.
Please note that the original discussion was not about this.
-
Here visually.
I see. So we'd need to extend the existing Text surface, because it's currently hardcoded (https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Interface/Text.cpp#L557) to 5(4?)-size color ranges, but the two color ranges that are interesting (red and green) have 16 colors each.
-
Please note that the original discussion was not about this.
Yes, I understand that.
I have a lot of ideas, but I can't describe them all in detail and separately. So I mention something close in meaning.
-
I see. So we'd need to extend the existing Text surface, because it's currently hardcoded (https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Interface/Text.cpp#L557) to 5(4?)-size color ranges, but the two color ranges that are interesting (red and green) have 16 colors each.
Not text surface, surface have 255 colors like any other graphic, problem is font have limited range of values set, and if you apply offset to mach some range
of colors from 255, only one that Meridian show look right as they where designed to used by fonts.
Final color of font character color is `common_offset + pixel` and fonts have `pixel` range of 0-4 values. Offset can be `200` or different depending what color you want.
If I understand correctly to allow other colors we would need add multiplier to `pixel` to have it bigger range than now to have better gradient.
-
Fixed: https://github.com/MeridianOXC/OpenXcom/commit/94d3f3825b31a84167fe2db05e319dce25f82733
STR_REFUND_VALUE: "Sales value> {ALT}{0}"
STR_REFUND_VALUE_NEGATIVE: "Expenses> {ALT}{0}"
-
Doesn't it seem logical to you to add variations for the name of dismantling?
If the money is returned - it's dismantling. But if the money needs to be spent - what to call it?
Is it possible to add an alternative name only if dismantling causes the appearance of another structure?
Is it possible to add variations of such names for each type of structure separately?
Should I write about all this separately? :D
-
dismantling building usually need money as it require labor to take things apart, and in many cases you do not get anything worth from it, maybe scraps.
-
1. Doesn't it seem logical to you to add variations for the name of dismantling?
2. If the money is returned - it's dismantling. But if the money needs to be spent - what to call it?
3. Is it possible to add an alternative name only if dismantling causes the appearance of another structure?
4. Is it possible to add variations of such names for each type of structure separately?
5. Should I write about all this separately? :D
1. to me, no
2. also dismantling... when you dismantle an old house you inherited from your grandmother to build a new one in its place it also costs you money, no? quite a lot of money actually
3. yes
4. yes
5. you can, but I do modding requests only for modders, so don't expect much/anything to happen: https://openxcom.org/forum/index.php?topic=11631.msg166226#msg166226