Are you setting building prereqs for units too? I fixed a bug where building prereqs could interfere with unit limits, making it so the limits didn't apply. That's in R21, actually it was first in R21 Preview 1.
There's no easy way that I know of. According to that error message, the version of TCC I included with the mod isn't compatible with XP. I don't know where you'd get a version that is compatible other than compiling it yourself. TCC is open source and its official website is here: https://bellard.org/tcc/. They have some precompiled versions there for download, but unfortunately they're all too old to work for C3X. There was some problem with those old versions, a limitation or bug, I don't remember exactly, so the version included with C3X is one I compiled myself based on newer source code. Whatever compiler I used, probably MSVC, evidently produced an EXE that's not compatible with XP. XP is so old it's hard to support, TradeNetX.dll may not work either for the same reason. I don't even have an XP system to test on.On lunching the installation of C3X: EXE Mod in windows xp, it gives this error:
"ttc.exe is not a valid win32 application"
Is there a way to install C3X: EXE Mod in windows xp?
Maybe. It's technically already possible for sea units to enter land tiles, if those tiles have cities on them. So if I were to hunt down all the various places the game checks for the presence of a city to allow a sea unit in and patch those to check instead for a city OR a river, that could work at least at a basic level. I'm sure there would be all sorts of edge cases where things break, like when sea & land units interact as you mentioned. Another one I can think of right off the bat is transports. Moving a transport onto a land tile triggers the unload all operation, and I believe the AI does that as well, so that would need to be modified in order to allow loaded transports to travel along rivers.but would it be possible for ships to be able to sail along tiles with rivers?
This is again the sort of thing that I think would be a good use for Lua. There are no complicated gameplay changes, you'd just need a way to give players money, charge them interest, store outstanding loans in save files, and of course add the option to lend money somewhere in the interface. Those are all things that should be possible anyway with a proper Lua integration. To allow the AI to borrow money intelligently, I suppose you'd need to add that option to the AI's logic about rushing production. It would be easy, but a lot less helpful, to run some code at the start of the AI's turn that considered whether or not to borrow.Another totally missed concept is the possibility of national debt through government borrowing (but not from other civilizations). In a situation where a nation is running out/needs a lot of money and has a building representing a national bank, having the option of various loans of X (1000; 2000; 2500; 10000 gold), which it will gradually pay back in successive Y turns (20; 40; 15; 60 turns), with each turn at interest rates R (5%; 4%; 6%; 2.5%) paying back Z (80; 101; 257; 323 gold = X*R*(1+R)^Y/(((1+R)^Y)-1))
The only hard parts would be modifying the interface and AI.Sidenote: Any chance of having both options for hurrying production available at once for specific government types?
It's hard to say what the rule is specifically since the method is rather complicated. The part that checks for interest generating wonders is a small part of it, though, and only appears on a branch that handles improvement builds, not units. So it's not a hard limit, especially for units it's not a consideration at all. For improvements, it looks like the AI adjusts the amount of gold it wants to keep in reserve upward by enough to ensure it's still collecting maximum amount of interest. Its reserve target is 1000/number_of_interest_generating_wonders + 16 * number_of_cities and it appears it won't rush an improvement if doing so would leave its treasury below that level.In the sense that a given purchase that would get the AI below 1000 gold would never be executed, or would some other rule evaluate the execution of the purchase?
Not really, no. There's only one routine where the AI considers selling city improvements and it only applies to improvs with the "replaces others" flag. In that case there is some comparison made regarding the improvement's production bonus, maintenance, and pollution.Does the AI have any routine that would decide to sell a building (without running out of money) based on the following:
Sure, I know how to set text effects, font size, and things like that. At one point I played around with changing text color, however I was only able to make it either black or red. I'm not sure if any other colors are possible.It would probably be useful to have buildings granted by wonders be graphically distinguished in the list of improvements in the city, so that they are noticeable at first glance. An open question even for others is whether that distinction should be color, bolding, or italicization of text? Or maybe something else entirely?
Yes, one of the goals of integrating Lua would be to make modifying the AI easier for me and more accessible for others.Is Lua a solution that will give everyone the ability to write what AI they need themselves, or will any potential new universal AI routines eventually have to be written by you or someone like you with a broader access?
You're right. When the AI is forced to switch off of a unit build because of the limit and chooses to build an improvement instead, the game then interprets the building ID as a unit type ID and considers spawning it. If the city has more production in the box than that unit type costs, the build "completes" and the game spawns a unit of whatever type ID matches the chosen building ID. It's a sloppy little mistake, I think the third one so far in this particular mod function. No idea what I was thinking when I wrote it. Anyway, this will be fixed in R22 Preview 1. If you want, I could tell you how to fix it yourself since R22P1 is still a ways off. It's only a matter of inserting two lines of code in the right place.The AI is still generating these odd units somehow. I encounter several every game, given their apparant random and nonsensicle selection (kings, summoned-only and other non-buildable stuff) I guess it may be a similar issue, the asset number, or code thing, unexpectidly switching from one class (buildings I guess) to units so the result could be anything.
I was aware of similar projects but not of this one. I am currently working mostly on game-engine like stuff i.e. optimized renders of 4k games, and decentralized provable computing. Its not quite the same as what you are doing, but they still become useful in some way or another. especially your work on decoding formats and game mechanics is useful. I do not want to taint myself my looking of copyrighted code so that's good for a hands-off approachif you're not aware, you may also be interested in the project C7 linked in my signature
i believe you can work around this by patching on a more modern system and then copying over the patched executableIs there a way to install C3X: EXE Mod in windows xp?
Yes, you can: this is how I've been adding C3X to the Conquests installation on our old XP laptop.i believe you can work around this by patching on a more modern system and then copying over the patched executable
Maybe, I suppose it depends on what you consider the problem to be. Is the AI overvaluing techs or undervaluing gold/GPT? I could easily reduce the AI's valuation of all techs. I've already found the function that prices techs for the AI and have already inserted some code to modify its results, that's how technology perfume works. In fact, you could already reduce the values of all techs if you were willing to list every one in the config file with a perfume amount of, for example, -50%. On the other hand, changing the AI's behavior to make it keep more gold around or be less willing to give away so much of its income is not something I'd know how to do. That would probably require a much more elaborate edit.AIs will enter lots of gpt deals with other AI civs, which causes at least two thirds of the AI civilisations in a given match to rapidly bankrupt themselves. You quickly get the tech leader swimming in 10k, 20k of money, while the others get down to 0 gold and negative gpt, causing repeated losses of buildings and units. Do you think something can be done about this?
This would be easy. There's a method in the game whose job is to delete a building from a random city that's used on players when they go bankrupt. I could modify it to do nothing for AIs. As an aside, I wouldn't say players "sell" buildings when they're bankrupt because they receive nothing from the sale. The buildings are simply deleted. I mention it because that's something I noticed and changed for the aggressively_penalize_bankruptcy option. It makes more sense if the buildings are actually sold.In the same vein, do you think it'd be possible to make it so that bankrupt AIs at a negative gpt will never, ever sell a building? (Even if that means that bankruptcy entails fewer consequences for them.)
The game's espionage logic is still uncharted territory for me so I can't say much. Maybe if I ever get Lua integrated someone will take it upon themselves to program proper espionage behavior for the AI.AIs also never use espionage, not even planting spies, on anyone but the human player. No idea if this is worth addressing.
This is a shortcoming of the units per tile limit at the moment. It wouldn't be too difficult to block production of units if there's no room for them on the city's tile, but I haven't done that because I don't think the AI would be able to deal with it. An alternative approach could be to spawn the new unit outside of the city on a neighboring tile that has space, although that wouldn't work for air units. I'll address this somehow in the next version, probably. In the mean time there's not really anything you can do to prevent it unless you're willing to try editing the mod code yourself. (Which I recommend, BTW, although so far everyone who's tried has gotten scared away.)Hello. In the settings file, I set the units per tile limit to 5. Everything is working correctly, and the stack now contains a maximum of 5 units. Unfortunately, in the city, I can still produce 6 or 7 units, etc. I didn't enable the option for the limit to not apply to cities. What should I do to prevent this?
That is a good question. I'll try to reduce the tech valuation the way you suggested and see if that helps. Thanks for the idea!Maybe, I suppose it depends on what you consider the problem to be. Is the AI overvaluing techs or undervaluing gold/GPT? I could easily reduce the AI's valuation of all techs. I've already found the function that prices techs for the AI and have already inserted some code to modify its results, that's how technology perfume works. In fact, you could already reduce the values of all techs if you were willing to list every one in the config file with a perfume amount of, for example, -50%. On the other hand, changing the AI's behavior to make it keep more gold around or be less willing to give away so much of its income is not something I'd know how to do. That would probably require a much more elaborate edit.
Oh wow, I just assumed it would be "sold", never made sure though. Good to know! If it would be an easy adjustment, I'd love to have it and see how much better the AI performs with it - I expect it to be better by a lotThis would be easy. There's a method in the game whose job is to delete a building from a random city that's used on players when they go bankrupt. I could modify it to do nothing for AIs. As an aside, I wouldn't say players "sell" buildings when they're bankrupt because they receive nothing from the sale. The buildings are simply deleted. I mention it because that's something I noticed and changed for the aggressively_penalize_bankruptcy option. It makes more sense if the buildings are actually sold.
I understand, no worries. And yeah, Lua really sounds like a pathway to many wonderful abilities. Can't imagine how much work it is to expose all the required hooks and interfaces for the scripts to access all the necessary data and send all the wanted instructions. It sounds extremely daunting to be sure.The game's espionage logic is still uncharted territory for me so I can't say much. Maybe if I ever get Lua integrated someone will take it upon themselves to program proper espionage behavior for the AI.
Hey, Flintlock.
Is there a way to make airports connect trade routes without allowing units to be airlifted? Conversely, is there a way to enable the airlifting of units without connecting airports as trade routes?
I'm pretty sure Airlifting is connected to the Veteran Air Units flag, not the Allows Air Trade flag?
I have not looked at the current impl, so you may have this already, but i believe that the stack limit should apply separately to air, water, military, auxiliary/artillery, immobile, and civilian units. for the last i believe this is hard to impl as the game does not have those categories. but modern civ also treats the unit limit separate for these kind of units, so maybe the following metric would suffice: auxiliary/artillery any unit with attack that is neither immobile or civilian. immobile by the flag and civilian as a unit without attack, without bombard and that has any worker action or settle activated.although that wouldn't work for air units
I don´t think that this is a problem of C3X. At least I never noticed such a problem. I remember one of the members of the CCM succession games (Elephantium), who frequently reported about a white screen on his laptop when pressing the key to finish a turn and at the start of the next turn the normal screen appeared again on the laptop. This problem magically disappeared when he bought a new and stronger laptop. May be your computer is too weak to proper handle such big mods like RARR or CCM3 ?So, I'm getting an issue. Sometimes (most of the time?), during combat, the game freezes, the combat finishes without any change in the display until the completion of the combat, the game operates normally until the next combat.