Civilization II MGE User Interface Additions (CIV2UIA)

LuKo

The Royal Guard
Joined
Aug 28, 2006
Messages
1,523
Location
Poland
I cannot overstate how happy I am that this project is still being developed. I came back to the forum to download UIA just hoping that it is still available only to be so positively surprised! Keep up the good work!

Do you plan to investigate more bugs of civ2? E.g. whether the luxuries work as intended (black citizens turn teal instead of red), planting nuclear device chance (I've heard it is possible to succeed with spy but never was able to witness that. But I play only for 24 years...), or names of techs (Alphabet should be named Writing and vice versa).
 

FoxAhead

Warlord
Joined
Sep 7, 2017
Messages
168
Do you plan to investigate more bugs of civ2? E.g. whether the luxuries work as intended (black citizens turn teal instead of red), planting nuclear device chance (I've heard it is possible to succeed with spy but never was able to witness that. But I play only for 24 years...), or names of techs (Alphabet should be named Writing and vice versa).
I'm not aware of any of these bugs. Can you provide links with its description or disscussion or give some explanation with screenshots and examples?
 

LuKo

The Royal Guard
Joined
Aug 28, 2006
Messages
1,523
Location
Poland
I'm not aware of any of these bugs. Can you provide links with its description or disscussion or give some explanation with screenshots and examples?
With regards to the luxuries, two cups make one blue citizen teal (0 -> +1), one red citizen blue (-1 -> 0) or one black citizen teal (-2 -> +1), which seems like a programming error. It is known for quite a long time - there is an old thread here about it (https://forums.civfanatics.com/threads/the-black-people.30670/) but it seems that the main decription was hosted on Apolyton site, which is not working anymore...
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,974
Location
Ontario
With regards to the luxuries, two cups make one blue citizen teal (0 -> +1), one red citizen blue (-1 -> 0) or one black citizen teal (-2 -> +1), which seems like a programming error. It is known for quite a long time - there is an old thread here about it (https://forums.civfanatics.com/threads/the-black-people.30670/) but it seems that the main decription was hosted on Apolyton site, which is not working anymore...
I always thought this was a feature. It means that on deity (possibly emperor) with a large civ, it is beneficial to employ some luxuries, even if your government type is despotism or monarchy. It does make larger civs somewhat easier to control, if your strategy is to run a high luxury rate anyway.
 

LuKo

The Royal Guard
Joined
Aug 28, 2006
Messages
1,523
Location
Poland
I always thought this was a feature. It means that on deity (possibly emperor) with a large civ, it is beneficial to employ some luxuries, even if your government type is despotism or monarchy. It does make larger civs somewhat easier to control, if your strategy is to run a high luxury rate anyway.
I came to acceptance with that as well but the fact that moving away a military unit under monarchy may make citizens happier makes me believe that it is a bug. I would put it in the same category as the aggressive AIs (obvious bugs, but after 20+ years we got used to them).
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,974
Location
Ontario
I came to acceptance with that as well but the fact that moving away a military unit under monarchy may make citizens happier makes me believe that it is a bug. I would put it in the same category as the aggressive AIs (obvious bugs, but after 20+ years we got used to them).

I think that's just a weird interaction with the fact that the hanging gardens are applied last, as the last post in the thread you referenced explains. I would have just specified 2 luxuries instead of 'elvis'.

The Gardens acts like an elvis on a city. Now, if you have a troop in the city it might make a very unhappy citizen unhappy. Then adding the elvis effect will make it content. But taking the troop out the city removes the martial law effect, making that citizen very unhappy... the hanging gardens elvis effect thus makes the person happy.

Simple as that.

Having hanging gardens applied last is very important, so an unhappy citizen can be made content via structure/martial law, and then made happy. This can be crucial for meeting WLTKD celebrations, since luxuries have a maximum effectiveness. This is just a weird corner case which has very minimal chances of mattering, since size 1 cities can't celebrate, and in either circumstance the city won't be in disorder. I guess it reduces score.
 

Formula Juan

Chieftain
Joined
Jan 24, 2006
Messages
18
Location
France
Hi,
First of all thank you for this amazing job you did with this mod. I've been using it successfully these days and it is very good :) I sometimes still go for a good Civ2 game so many years after..!
I have one question. Do you think it is possible to integrate a new civ with the brown flag present in Cities.gif so we could play with 8 Civs instead of 7 ? (Brown civs being customized then in the txt files). I found old entries on the forum which concluded it was not possible but a long time ago. But after seeing all the modifications you managed to do I might ask this :)
Thanks!
 

LuKo

The Royal Guard
Joined
Aug 28, 2006
Messages
1,523
Location
Poland
I think that's just a weird interaction with the fact that the hanging gardens are applied last, as the last post in the thread you referenced explains. I would have just specified 2 luxuries instead of 'elvis'.
Sure, but still the interaction happens without Hanging Gardens. E.g. if you have 2 luxuries and red citizen (turned by luxuries to blue) and you settle another city, pushing over the limit and turning the base citizen from red to black, the citizen becomes happier (teal instead of blue).
 

FoxAhead

Warlord
Joined
Sep 7, 2017
Messages
168
Do you think it is possible to integrate a new civ with the brown flag present in Cities.gif so we could play with 8 Civs instead of 7 ?
No. As with number of cities limitation the limit number is tied to many memory variables and depends on their size. For example, known technologies are stored in array of bytes which are 8 bit wide. So every bit represents one civ. To extend it to 16 civs you will need array of words (two bytes). But doing this in existing compiled exe is very difficult. I don't say it is completely impossible, but it will need a lot of effort and will bring so many risks of new bugs. Just imagine how adventurous it is to make such changes having the complete source code of the game, and without it (like in my case) it is even more risky.
 

Formula Juan

Chieftain
Joined
Jan 24, 2006
Messages
18
Location
France
No. As with number of cities limitation the limit number is tied to many memory variables and depends on their size. For example, known technologies are stored in array of bytes which are 8 bit wide. So every bit represents one civ. To extend it to 16 civs you will need array of words (two bytes). But doing this in existing compiled exe is very difficult. I don't say it is completely impossible, but it will need a lot of effort and will bring so many risks of new bugs. Just imagine how adventurous it is to make such changes having the complete source code of the game, and without it (like in my case) it is even more risky.
Thank you for your accurate answer :)
I have some maps I have customized with specific civs (regional for example - info modified in the txt files) and I always wondered if this extra flag could be of some use. It seems that the developers might have planned to add a 8th civ at some point but it hasn't gone through..
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,974
Location
Ontario
Sure, but still the interaction happens without Hanging Gardens. E.g. if you have 2 luxuries and red citizen (turned by luxuries to blue) and you settle another city, pushing over the limit and turning the base citizen from red to black, the citizen becomes happier (teal instead of blue).
Yes. If you are using luxuries anyway, having more black hat citizens is an improvement. And you get them by founding more cities. That doesn't mean that it is a "bug" that 2 luxuries make them happy, just that having more cities isn't always strictly worse for happiness. Perhaps one of the skills of Deity level is recognising this, and planning accordingly.

The AI aggressiveness thing was generally considered a "bug" since classic didn't have it, and people would actively choose to play the 'inferior' version of the game to avoid it (it would also let them play deity+ levels as well). Perhaps it was poor design choice, but that's different than a bug. The "key civ" mechanic takes your power rating and assigns you a 'key civ', white if you're pathetic, purple if you're supreme. The further ahead you are in research compared to your key civ, the more your research costs. If your key civ is missing, that counts as 0 techs. Usually, GOTMs were played using the purple civ to circumvent this. Is the key civ mechanic a bug? I doubt it very much. It seems deliberate, just poorly thought out. But that's civ 2.

I'm not against changing 'deficiencies' in Civ II via patch, as long as they're optional. In fact, these days most of my civ time is spent writing Lua code for the TOTPP version of the game.

Maybe I'm just pointlessly arguing semantics. But to me a "bug fix" is something you could reliably predict that most people would want to change, or which is obviously a mistake, while a feature change is something that people may or may not want, perhaps varying from game to game.
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,974
Location
Ontario
I have some maps I have customized with specific civs (regional for example - info modified in the txt files) and I always wondered if this extra flag could be of some use. It seems that the developers might have planned to add a 8th civ at some point but it hasn't gone through..
The 8th civ is the barbarians. They need some of the 'features' of a full fledged civ, but not others.
 

Hans Lemurson

Prince
Joined
Jan 2, 2006
Messages
483
Location
Silicon Valley
Yes. If you are using luxuries anyway, having more black hat citizens is an improvement. And you get them by founding more cities. That doesn't mean that it is a "bug" that 2 luxuries make them happy, just that having more cities isn't always strictly worse for happiness. Perhaps one of the skills of Deity level is recognising this, and planning accordingly.

The AI aggressiveness thing was generally considered a "bug" since classic didn't have it, and people would actively choose to play the 'inferior' version of the game to avoid it (it would also let them play deity+ levels as well). Perhaps it was poor design choice, but that's different than a bug. The "key civ" mechanic takes your power rating and assigns you a 'key civ', white if you're pathetic, purple if you're supreme. The further ahead you are in research compared to your key civ, the more your research costs. If your key civ is missing, that counts as 0 techs. Usually, GOTMs were played using the purple civ to circumvent this. Is the key civ mechanic a bug? I doubt it very much. It seems deliberate, just poorly thought out. But that's civ 2.

I'm not against changing 'deficiencies' in Civ II via patch, as long as they're optional. In fact, these days most of my civ time is spent writing Lua code for the TOTPP version of the game.

Maybe I'm just pointlessly arguing semantics. But to me a "bug fix" is something you could reliably predict that most people would want to change, or which is obviously a mistake, while a feature change is something that people may or may not want, perhaps varying from game to game.
Are you seriously using the Chewbacca Defense to declare that the "2 luxuries make angry citizen happy" bug isn't a bug because you happen to like it?
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,974
Location
Ontario
Are you seriously using the Chewbacca Defense to declare that the "2 luxuries make angry citizen happy" bug isn't a bug because you happen to like it?
No, I'm arguing that "2 luxuries makes angry citizen happy" looks awfully deliberate, and that the particularly "buggy" aspects of it are consistent with the application of that very rule. To believe that this is a bug would involve believing that the developers never opened a city window with a black hat and 2 luxuries. This is something where the effects are immediate and obvious. It's not at all like the angry AI, which snuck in only for MGE, and which you'd have to spend a lot of time playtesting to realise is not functioning as before. It's also not like the issue where disbanding a ship at sea disbands all units on the tile, even other ships, or the bug where the pikeman flag checks the current HP of the attacking unit, not the maximum HP.
 

duplj

Chieftain
Joined
Jul 11, 2022
Messages
11
Location
Россия
It's also not like the issue where disbanding a ship at sea disbands all units on the tile, even other ships, or the bug where the pikeman flag checks the current HP of the attacking unit, not the maximum HP.
The bug when removing water units is fixed quite easily, you need to replace push 0 with push 1 at 005B5FAA, apparently the idea of removing transport with units on board was not implemented quite correctly
and there don't seem to be any problems with pikeman, if you look at the section of code where attack or defense bonuses are calculated or talk about something else?
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,974
Location
Ontario
and there don't seem to be any problems with pikeman, if you look at the section of code where attack or defense bonuses are calculated or talk about something else?

TOTPP has a patch with this description
Code:
Fixes the pikemen flag, which checked the actual movement rate after damage instead of the movement rate defined on the unit type.
It looks like I misremembered the details (I didn't know about this bug until recently). The pikeman bonus is 'supposed' (but poorly documented) to apply units with 10 hp and 2 movement. But, the 2 movement is calculated based on the units maximum movement points, taking into account damage, rather than the maximum movement points of that unit's type.
 

FoxAhead

Warlord
Joined
Sep 7, 2017
Messages
168
With regards to the luxuries, two cups make one blue citizen teal (0 -> +1), one red citizen blue (-1 -> 0) or one black citizen teal (-2 -> +1), which seems like a programming error. It is known for quite a long time - there is an old thread here about it (https://forums.civfanatics.com/threads/the-black-people.30670/) but it seems that the main decription was hosted on Apolyton site, which is not working anymore...
I did a little research on the algorithm and described it in a separate thread. We can discuss the topic of happiness there. The considered algorithm clarifies the reasons for the appearance of the mentioned behavior.
 

LuKo

The Royal Guard
Joined
Aug 28, 2006
Messages
1,523
Location
Poland
Are you seriously using the Chewbacca Defense to declare that the "2 luxuries make angry citizen happy" bug isn't a bug because you happen to like it?
That comment made my day XD
No, I'm arguing that "2 luxuries makes angry citizen happy" looks awfully deliberate, and that the particularly "buggy" aspects of it are consistent with the application of that very rule. To believe that this is a bug would involve believing that the developers never opened a city window with a black hat and 2 luxuries. This is something where the effects are immediate and obvious. It's not at all like the angry AI, which snuck in only for MGE, and which you'd have to spend a lot of time playtesting to realise is not functioning as before. It's also not like the issue where disbanding a ship at sea disbands all units on the tile, even other ships, or the bug where the pikeman flag checks the current HP of the attacking unit, not the maximum HP.
With all my love to Civ2 it seems it was not tested nearly enough and the standard for games has changed very much since then (the time required to release a game changed too...).
I did a little research on the algorithm and described it in a separate thread. We can discuss the topic of happiness there. The considered algorithm clarifies the reasons for the appearance of the mentioned behavior.
Wow, great job! If I have some free time I will try to dig into it.
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,974
Location
Ontario
With all my love to Civ2 it seems it was not tested nearly enough and the standard for games has changed very much since then (the time required to release a game changed too...).
I agree that Civ 2 has a number of bugs and oversights. However, the happiness mechanic is important enough that a specific calculation chart was included for every city, in order to explain to the player exactly how the computation is made. This isn't a bug that is hidden behind some randomness (MGE Attitude), or only occurs in specific locations (double tile working over dateline), or requires somewhat unusual circumstances to trigger (ship disband bug). This is something that is trivially noticeable to anyone who asks the question "do the angry citizens work as we intend them to?"

The only bug I can think of that comes closest to the black hat "bug" in terms of immediate visibility is the airfield production bug. That was fixed for Test of Time, but angry citizen luxuries weren't.

Thematically, it seems reasonable that citizens who are "angry" about being in a large empire might change their minds if they actually receive some economic benefit from it. From a gameplay perspective, it encourages the use of luxuries from tax rates, but gives substantially smaller happiness boost when using entertainers.

Now that I think about it, you could just as easily say that specialists making unhappy citizens content is also a "bug." If a city has only 1 'free' content citizen, but 3 specialists, the city has gained 2 content citizens. Why shouldn't the 2 extra specialists cause 2 citizens to become angry, instead? "Obviously," since specialists 'use up' content citizens, it is a bug that they effectively create more default content citizens when the free default citizens are used up. This increases the usefulness of specialists at higher levels, so it must be a bug. What's more, this would make angry citizens appear at lower levels. Given the way the game turned out, angry citizens are pretty hard to see except on emperor and deity levels. Why have a special mechanic just for those levels? "Clearly," the intended mechanism is for specialists to cause angry citizens when the default content citizens run out.
 
Top Bottom