Quick Questions , Quick Answers

So with the mod and the font with size 23 is surely a little better but still not big enough for some windows/icons. I tried to play a little around with the font size but changing it more than that (like 32 that would be probably perfect for the size) creates layout issues like not enough space between lines and too small text boxes. Is there a way via xml files to modify these values? I mean the spacing and maybe windows position and size, I could try to arrange a more visible UI in 4k in that case. Sorry for the noobiness again and thanks.
I don't see those as Nooby questions at all, just ones beyond my ability to answer. @Toffer90 is the one who most understands the UI - maybe he can comment. Thanks for being a fan of the mod. Hopefully I and more of us will get more time to complete some projects soon.
 
I have some problems with the position of many hover windows. The only resolution with they seem to appear correctly is my monitor resolution (4k) but the font is too small to be able to read something.
Best to play C2C on 1080p; not sure why your hover tooltips are misaligned on that resolution though... Are you playing the game in windowed mode? Maybe having different desktop resolution and game resolution mess with the code that tries to pinpoint where on the screen the mouse is located when playing in windowed mode.

Try playing in full screen, or alternatively try to change desktop resolution to 1080p to match game resolution.
 
Hello,

How to get the mod sdk sources? I tried pming Koshling with sourceforge userid (leodim) yesterday, no answer yet. Should I just give him time or the way to go has changed?
I would like to integrate my "nearly no rng" battle mod for personnal play.
No need for commit permissions personnaly at this point, this is up to you guys :) Unless you want to discuss it for a potential checkbox option, either way is fine with me.
But would really love to get the svn update with sources for my own playthrough. Even though I might be the only one liking it :lol:

Spoiler Description, just in case: :

- each random roll in a fight is the same infinite sequence generated by binary counting around 500 (given a 0-1000 roll), like this : 500, 750, 250, 625, 375, 875, 125, 575, ...
- more rolls per fight to have more precision on unit's health loss (fraction of rounds each round, so to say)
- outside resolvecombat loop, nothing is changed at all
Works well, played in many games/mods with it. Result is as expected : all fights produces the average outcome given by odds.
In case of total equality (not so common in practice, ie 50.0% odds = a unit with 0 bonuses attacking same strength unit with 0 bonuses/terrain bonuses/etc) : the attacker wins because of the > vs >= sign, having 0.1 hp left at the end. Which is to be expected code-wise.
I am aware most people prefer randomness and that this is a very personnal preference in my playthroughs, so really up to you.

NB : first strikes and so on are also dealt with (ie one original BTS round's length is still the same in that regard) to give the same result as in orginal BTS.
 
While I'm at it, but really not important :

- no spies (and so spy missions) before writing, right?

- why some units (thieves in my case) can upgrade and some can't, both inside borders and at same time (ie not reached max unit of that type). It seems to be dependant of their position (nearest city?). I guess the nearest city must be able to build it? Is that intended (which is fine with me, just wondering)?
 
- why some units (thieves in my case) can upgrade and some can't, both inside borders and at same time (ie not reached max unit of that type). It seems to be dependant of their position (nearest city?). I guess the nearest city must be able to build it? Is that intended (which is fine with me, just wondering)?
Criminals cannot upgrade from within a city because at times they upgrade to units that are not JUST criminals and some of those steps behave differently in regards to city sharing properties, which can lead to sudden rule loopholes where crashes or accidental conquests can take place.
 
Everything should be available here (check out the link there to the dev guide):
https://github.com/caveman2cosmos/Caveman2Cosmos
The spy upgrade might be related to being on a tile not accessible via your trade network? I recall there being some oddities with that recently.
Thanks, I used the svn version, oops. :mischief:
Hope my game will be compatible, will check it out!
EDIT: I went svn because of OP post here : https://forums.civfanatics.com/threads/c2c-svn-changelog.429816/

Criminals cannot upgrade from within a city because at times they upgrade to units that are not JUST criminals and some of those steps behave differently in regards to city sharing properties, which can lead to sudden rule loopholes where crashes or accidental conquests can take place.

Concerning the thieves, they were definitely on trade networks (on prehistoric roads), not inside city.
I checked with world builder (managed to not look at bottom right map^^), putting a few here and there, and it definitely seems that the ones with the upgrade button were those inside border of a city that had the building for building them. Really not an issue, I was just wondering.
 
Thanks Toffer, you're right I was playing in window mode, in full screen most of the problems disappears (like the happiness and revolt window position issue) but the game sometimes has some problem returning to desktop with the Windows button while in full screen.
However there are still some overflow with the windows position as you can see, maybe a simple layout change could help here like for example not sending the icons to the new line or using a second column if possible. Another nice thing would be to have the possibility to change the size of the icons in the lower right, upper right and upper left part of the main map screen, right now they're very small at higher resolution. Last detail would be to enlarge the font in the Pedia and in all the upper right menus too in order to have good readability. Would these kind of change be doable without re-inventing the wheel for the whole game?

In any case, I would also like to offer my help and the free time I can find for the mod. I have some C# skills, speak Italian and also have a testing attitude as you saw...:) An Italian translation would be very nice but it's a gargantuan task, I'd need help with that. I don't know how to program in Python or XML but I'm open to try to learn something new and XML doesn't seem so hard to crack (at least I hope). If there is something you think I can be of help with let me know.
 

Attachments

  • Sid Meier's Civilization 4  Beyond Sword Screenshot 2023.05.20 - 13.55.51.52.png
    Sid Meier's Civilization 4 Beyond Sword Screenshot 2023.05.20 - 13.55.51.52.png
    5.7 MB · Views: 60
  • Sid Meier's Civilization 4  Beyond Sword Screenshot 2023.05.20 - 13.55.45.53.png
    Sid Meier's Civilization 4 Beyond Sword Screenshot 2023.05.20 - 13.55.45.53.png
    5.7 MB · Views: 57
  • Sid Meier's Civilization 4  Beyond Sword Screenshot 2023.05.20 - 13.56.03.01.png
    Sid Meier's Civilization 4 Beyond Sword Screenshot 2023.05.20 - 13.56.03.01.png
    5.5 MB · Views: 42
  • Sid Meier's Civilization 4  Beyond Sword Screenshot 2023.05.20 - 13.55.45.53.png
    Sid Meier's Civilization 4 Beyond Sword Screenshot 2023.05.20 - 13.55.45.53.png
    5.7 MB · Views: 54
  • Sid Meier's Civilization 4  Beyond Sword Screenshot 2023.05.20 - 13.55.55.06.png
    Sid Meier's Civilization 4 Beyond Sword Screenshot 2023.05.20 - 13.55.55.06.png
    5.7 MB · Views: 38
  • Sid Meier's Civilization 4  Beyond Sword Screenshot 2023.05.20 - 13.56.03.01.png
    Sid Meier's Civilization 4 Beyond Sword Screenshot 2023.05.20 - 13.56.03.01.png
    5.5 MB · Views: 34
  • Sid Meier's Civilization 4  Beyond Sword Screenshot 2023.05.20 - 13.56.10.47.png
    Sid Meier's Civilization 4 Beyond Sword Screenshot 2023.05.20 - 13.56.10.47.png
    5.1 MB · Views: 42
but the game sometimes has some problem returning to desktop with the Windows button while in full screen.
Known vanilla issue; game engine related and unfixable.
However there are still some overflow with the windows position as you can see, maybe a simple layout change could help here like for example not sending the icons to the new line or using a second column if possible. Another nice thing would be to have the possibility to change the size of the icons in the lower right, upper right and upper left part of the main map screen, right now they're very small at higher resolution. Last detail would be to enlarge the font in the Pedia and in all the upper right menus too in order to have good readability. Would these kind of change be doable without re-inventing the wheel for the whole game?
Some things can certainly be improved, for example quite a few of the tooltips seen in your screenshots are using the vanilla tooltip (not very wide at max width), these can be transformed into using the new python programmed tooltip that I made some years ago, it's not trivial though, even small things like this can require a lot of work. One limitation we have on font sizes is that the game only supports having 4 font sizes, and these are pixel based sizes, and they cannot be modified while the game is running by code, so we can only have 4 font pixel sizes that fit all our needs for all the different resolutions, which means it is hard to add support for 4k without dropping support for e.g. 720p or other such low resolutions. One day we might want to take that step up, but that will be a gargantuan job, involving thousands of python code line changes and other types of changes to make it all work fine with full support for 4k (a reinventing of the wheel kinda task).

In any case, I would also like to offer my help and the free time I can find for the mod. I have some C# skills, speak Italian and also have a testing attitude as you saw...:) An Italian translation would be very nice but it's a gargantuan task, I'd need help with that. I don't know how to program in Python or XML but I'm open to try to learn something new and XML doesn't seem so hard to crack (at least I hope). If there is something you think I can be of help with let me know.
I think we already have an Italian translator slowly working through our text (which is for the most part just xml work); maybe you two could collaborate? First step would be for you to setup our C2C git repository and get in contact with our other Italian translator. On our discord server he (our Italian translator) goes under the handle: "Luca Martinelli [Sannita]", I'll notify him about your post here.

Here's our git repository: https://github.com/caveman2cosmos/Caveman2Cosmos
To begin with, you can setup a fork and do push request to our master repository (then we will approve the request to merge your changes in), later on you can get permission to make changes on our repository directly. Ask on our discord server if you need help with any of the technicalities of git usage. https://discord.gg/KWGvV7eWsN
 
Try borderless gaming utility. Turn on windows mode and add civ in bg.
Borderless gaming utility is one of the most useful apps.
 
One limitation we have on font sizes is that the game only supports having 4 font sizes, and these are pixel based sizes, and they cannot be modified while the game is running by code, so we can only have 4 font pixel sizes that fit all our needs for all the different resolutions, which means it is hard to add support for 4k without dropping support for e.g. 720p or other such low resolutions. One day we might want to take that step up..
About that, my quick 2 cents if someday someone has the nerve to go with this gargantuan task:
Instead of dropping low res, maybe make a bat (or something) that changes the value of the 4 font size to HD/LD (and/or more, HHD?) in the xml. Can do a quick popup somewhere (at mod first start or new game maybe) to tell this to the average user. I think that should be pretty doable. Ofc the issue is that the task gets even more gargantuan because of multiple case to handle in code at probably many points :crazyeye:


Having a 3440x1440 (wide) and having "bad" eyes, I'm rooting for it. :lol:
 
About that, my quick 2 cents if someday someone has the nerve to go with this gargantuan task:
Instead of dropping low res, maybe make a bat (or something) that changes the value of the 4 font size to HD/LD (and/or more, HHD?) in the xml.
It would have to modify most of the the python UI code too, or we would need to double all the python code dealing with UI where it runs section A code if game is launched as LD or run section B code when game is launched in HD mod. It's of course possible but it would mean we suddenly have two versions of UI code which both might need to be maintained... and it could cause confusion for new python modders in the future. Dll c++ code might have to be adapted a bit based on what mode the game is launched in.
 
It would have to modify most of the the python UI code too, or we would need to double all the python code dealing with UI where it runs section A code if game is launched as LD or run section B code when game is launched in HD mod. It's of course possible but it would mean we suddenly have two versions of UI code which both might need to be maintained... and it could cause confusion for new python modders in the future. Dll c++ code might have to be adapted a bit based on what mode the game is launched in.
Yeah I know, that's what I was pointing out "multiple case to handle in code at probably many points :crazyeye: ". Make the font size coeff a parameter everywhere it's needed + test and validate all UIs with possible (2?) values, gargantuanesquer indeed! I personnaly wouldn't dive in it (even if I wasn't so lazy) :lol:

Didn't think about future modders that would have to know they need to accomodate that too. Definitely a pain.

Side note: I might try to increase font size locally just to see how broken or not it gets (assuming it works the same way as in BTS). Probably someone already tested. I wonder how it went. On BTS, a few +pts (2-4 I think, I forgot) was still ok but increasing too much "as is" was not. Mostly because some spots weren't in % of width/height (pure bmp bgs for example) and room was too small. Again, that's from memory.
 
Last edited:
Compiled the git version this morning, spent a few time realizing the master must be in a folder without spaces in its parent folder name so the linker has no error.

Now it works... fingers crossed...
Save version of my playthrough is 3, need 4 to continue with sourced version. Sad. I'll have to continue with how it was (and normal odds-based battles).
It's not a question I admit, just wanted to share my sadness :cry:


EDIT : I suppose if I get another branch/version like this one maybe "https://github.com/caveman2cosmos/Caveman2Cosmos/tree/v43.1patch" it should work? Will try that tomorrow if I have some time.
 
Last edited:
Yay! :) Indeed getting the 43.1 branch worked with my save and the "no rng combat rolls" generator works pretty well.

Funny side effect : on a pure 50.0% both units are destroyed since (unlike BTS) both units can get dmg in the same round.
So far I didnt change the dmg per round, after all the precision it gives is still fine, no real need to make smaller sub-rounds. Not sure, will see.
Didnt do air/etc. yet, just basic combat rolls.

I also noticed that 2 combat with exact same odds (lets say 98.60% in my example) can give a very small different result in hp loss for the winner from one time to another. I suspect (not sure) it is because of the other mechanics (I saw stuns in code, etc. but didnt look into which mechanic was at play on this particular case) which are still random based.
All in all pretty acceptable even for my "I dont like rng result" maniac taste (and I know I'm in the minority here, all tastes are perfectly fine), because that is really a small small difference compared to given odds.
 
I don't like RNG when I lose a >70% battle. I love it when I win a 5% one though. I find more interesting the part that involves guaranteed damage on both sides though. This makes weakening much stronger units a lot more viable. Sometimes they could go unscathed through several encounters, with your modmod, if I understand correctly, that woulnd't be the case.
How does it work with withdrawal chances? Are all the modifiers available in C2C taken into account (ie surround and destroy)? Also, C2C has an element of randomness with extra first strikes working differently from vanilla, is that affected?
Very interesting nonetheless, would be a cool modifier option!
 
I don't like RNG when I lose a >70% battle. I love it when I win a 5% one though. I find more interesting the part that involves guaranteed damage on both sides though. This makes weakening much stronger units a lot more viable. Sometimes they could go unscathed through several encounters, with your modmod, if I understand correctly, that woulnd't be the case.
How does it work with withdrawal chances? Are all the modifiers available in C2C taken into account (ie surround and destroy)? Also, C2C has an element of randomness with extra first strikes working differently from vanilla, is that affected?
Very interesting nonetheless, would be a cool modifier option!
Yes, I admit I'm prone to reload and change attack order when losing a 80+% battle. Which makes me piss at myself for "cheating" when I do, so all in all, I find more fun in less rng. Really personnal way to play I admit.

At this point, and I cannot really tell how far I will push it, only the basic damage rolls are affected. I praise the dedication of the modders here, I'll try to upload something when it's nice enough though.
So yes, withdraw is still odds-based (so "rng" so to say, on a given fight), same goes for other mechanics. That's also more tricky cause they are decided in one roll at one point (in BTS at least), not a sequence.

Btw I was surprised to see that a 98.60% odds attack (which I was actually losing without modmod, which kind of pissed me off for the nth time :lol: ) actually ends up with still a 40-50% hp loss on the attacker, which does indeed correspond to what was expected in ALT losses preview. I can't remember how it was in BTS but my bet would be less hp loss for such an advantage.
EDIT : ofc it is totally possible depending on mechanics (even 100% could mean some heavy losses every time).
So yes, weakening much stronger units should work really well here actually, I suppose.

I already explained a bit but if you're interested, here how it works in more details:
Spoiler :
Each roll being one in a sequence (ie one fight = one sequence), instead of being random 0 to 1 (actually * 1000, just easier to explain on 0-1), they go like this:
1/2, 1/4, 3/4, 1/8, 7/8, 3/8, 5/8, 1/16, 15/16, 7/16, 9/16, 3/16, 13/16, 5/16, 11/16, 1/32, 31/32, and so on (using binary counting which I was kind of proud to find as a "clever" way to generate that, getting older and such :lol: )
In C2C this applies to both attacker and defender actually (both rolls it seems).
So the more and smaller rounds, the more accurate, but all in all, you already get the expected outcome +/- some "small" unexpected hp loss due to "rounding".
The advantage of the method is that it is NOT a new combat mechanic (just rolls average sequence), and it can be applied to nearly every combat mod in civ4 without changing its own cool mechanics. You just get the average of the mechanic, each sequence. It only requires rounds per fight to be large enough so the "rounding" is small enough.
 
Last edited:
Some things can certainly be improved, for example quite a few of the tooltips seen in your screenshots are using the vanilla tooltip (not very wide at max width), these can be transformed into using the new python programmed tooltip that I made some years ago, it's not trivial though, even small things like this can require a lot of work. One limitation we have on font sizes is that the game only supports having 4 font sizes, and these are pixel based sizes, and they cannot be modified while the game is running by code, so we can only have 4 font pixel sizes that fit all our needs for all the different resolutions, which means it is hard to add support for 4k without dropping support for e.g. 720p or other such low resolutions. One day we might want to take that step up, but that will be a gargantuan job, involving thousands of python code line changes and other types of changes to make it all work fine with full support for 4k (a reinventing of the wheel kinda task).
Thanks Toffer for the reply. I suspected was something not very easy as for the font size and it's obviously not a very important issue as the game is fully playable and enjoyable as it is. I mean v44 is near and I can't wait for it... :) In any case it would be something nice to upgrade in the long run cause I guess now-day almost everyone plays the game in much higher res than when it was launched.
I think we already have an Italian translator slowly working through our text (which is for the most part just xml work); maybe you two could collaborate? First step would be for you to setup our C2C git repository and get in contact with our other Italian translator. On our discord server he (our Italian translator) goes under the handle: "Luca Martinelli [Sannita]", I'll notify him about your post here
Nice! I'll contact him and see if I can be of help. Thanks.
Try borderless gaming utility. Turn on windows mode and add civ in bg.
Borderless gaming utility is one of the most useful apps.
Thanks, I'll try that for sure. I love how everyone is so friendly here : )
 
Back
Top Bottom