sirati97
Chieftain
yes, i have also already starred the c3x repoAre you on GitHub?
yes, i have also already starred the c3x repoAre you on GitHub?
Another thing I've been thinking about doing for a while and intend to do for R16 is add an option for upgraded barbarian unit types. My idea is that there will be a list in the config file of barbarian unit types unlocked at certain tech levels. ... My current plan is to make it so that each encampment has its own tech level based on cities in its vicinity, for example an encampment could spawn longbows if there is a city within a certain number of tiles (say 10 - 15) that is owned by a player that has unlocked Chemistry. Another idea I had was to make it so the barbs own any tech already owned by at least two civs. ...
Aye, Civ1 and Civ2 upgrade their barbs as soon as the requisite tech is reached by anyone. Tailoring it to relative development is something I never even imagined possible.I'm also pretty sure that this is similar to how the "Barb-upgrades" worked in CivDOS.
That sounds very similar to my idea that I posted a long time ago!Also I did some work optimizing those improvement loops like I described earlier (still haven't gotten around to posting a thread about that, but I will eventually). Another thing I've been thinking about doing for a while and intend to do for R16 is add an option for upgraded barbarian unit types. My idea is that there will be a list in the config file of barbarian unit types unlocked at certain tech levels. Something like: barb_type_1_upgrades = [Chemistry: Longbowman, "Motorized Transportation": Guerrilla] so barbs would spawn longbowmen instead of warriors when players have reached Chemistry and similarly for guerillas. I'm still considering how to determine a tech level for the barbs. My current plan is to make it so that each encampment has its own tech level based on cities in its vicinity, for example an encampment could spawn longbows if there is a city within a certain number of tiles (say 10 - 15) that is owned by a player that has unlocked Chemistry. Another idea I had was to make it so the barbs own any tech already owned by at least two civs. That has the advantage that it's a simple rule and consistent with the rules for barb uprisings, but the downside is a barb encampment could tech up based on research happening on the other side of the planet. Anyone who's interested in this feature, feel free suggest something.
The config file's size doesn't seem to be an issue to me, just like the size of PediaIcons hasn't stopped anyone from making a mod. Things should go where they can be best implemented and adjusted by Flintlock, and cramming new functionality into the unmodified Firaxis editor will only get more daunting with time.To create in the config file a list of barbarian unit types unlocked at certain tech levels, enlarges that file to more and more big dimensions considering all the other lists that can be written in that file. So it should be reflected, how these features could be done without such lists in the config file.
No extra functionality to the Editor is needed: the .biq already specifies which units are available to each Tribe, including the "Barbarian Chiefdom".The config file's size doesn't seem to be an issue to me, just like the size of PediaIcons hasn't stopped anyone from making a mod. Things should go where they can be best implemented and adjusted by Flintlock, and cramming new functionality into the unmodified Firaxis editor will only get more daunting with time.
No extra functionality to the Editor is needed: the .biq already specifies which units are available to each Tribe, including the "Barbarian Chiefdom".
It occurs to me that it might not even matter.In the screenshot above, the unit needs the resource Iron. Barbarians have no access to resources. Can this unit been built by Barbarians even without having access to the resource Iron ? If this is not the case, it would be no problem for modders to integrate a unit in the upgrade chain, that is only available for Barbarians and doesn´t need such a resource (in this case Iron).
I don't know if the game even tracks techs for barbs, although it probably could since there's a barbarian player object in the first slot of the players list. In any case, I think it's easiest to evaluate the barb tech level and upgraded unit type at the point where barb units are spawned. I've already found the game's unit spawning method and where it gets called to spawn barb units. It would be pretty simple to intercept those calls and swap out the unit type to something else.I like this idea! Could you maybe use similar code as already used for the Great Library, to give the Barbs those techs?
Alright, it's probably best to collaborate through GitHub since it's been designed for that. I also signed up on Telegram (username cfcflintlock), I'll try sending you a message.yes, i have also already starred the c3x repo
I would like to rely on the editor as much as possible since people have told me multiple times that the text config is awkward to fill in. How big of a problem is it that the "available to" list gets overwritten by the general settings for barb units? Is there any way for modders to work around that? If it's not possible through the Firaxis editor, it's possible to require the use of a third-party editor instead. That's already the case for the free improvements from small wonders mod feature, so it wouldn't be the first time.Every unit in the unit rules registry of the editor can be set to be available to the Barbarians. The problem is, that this setting is overwritten by the setting for Barbarian units 1 and 2 (and the naval unit) in the general settings of the editor. Now when this barrier can be overcome with R16, every Barbarian unit still can be set in the editor - and this unit is still be connected to a tech in the editor, making the list in the config file no longer necessary.
(1) My current plan is to ignore the resource requirements for barb units. I might respect the requirements though, if that's something people want. I imagine it could be useful for scenarios with preset maps, for example a mod could place an encampment on an iron resource and let it spawn swordsmen unlike others. That particular encampment would be more difficult to disperse but also more valuable for whoever manages to do it. On random maps, I don't see resource requirements being useful since it's so rare for encampments to randomly spawn on resources.Now the questions are starting:
Exactly right. Barb unit spawning is separate from city production. I can intercept the call to the unit spawning method from the barb logic, and swap out the type of unit to be spawned with something else. The replacement type could be any other unit from the scenario. The requirements like resources, etc. don't matter unless you all want them to.Now I don't know the back end, but I presume the camps aren't producing units like cities but spawning them through internal script, so resources should be a moot point. I imagine the unit classes designated in the .biq are loaded into the script when the game starts, so Flintlock's patch would replace them at the appropriate milestones during play.
"Combat settlers??"Disabling founding cities on foreign territories would also be nice. Combat settlers make human artillery even more overpowered.
Surprise ... a "cheat" I hadn't thought of.Settling cities inside enemy borders in order to turn their railroads into yours. Then you bring your artillery up as Predator described and start turning the handle on the meat grinder.
No problem! I hope to fix the trade network collapses for R16. I've already found what might be the cause. If I'm right, the collapse should only occur when the number of resource generating buildings plus the number of map tiles equals exactly 65536. So when you experience the collapse, building another resource generator should fix it. If you could test that theory, it would be helpful, although I'll fix that issue I found in any case.
The fact that the limit depends on the number of tiles and the number of resource generators is odd, but it's a result of the way resource generation is implemented. Basically, when the game goes to propagate resources through trade networks, it processes every tile on the map checking each of them for a resource. To make building-generated resources possible, the mod alters that by causing the game to process additional tiles beyond those actually on the map, one for each resource generating building. The mod then alters the way the mod accesses those additional tiles so their location matches the city each resource generator is in and the resource type matches the generated resource. It's a clever setup, if I do say so myself, since it means generated resources work like map resources for all purposes, for example I didn't need to do anything additional to make generated resources work with trade between players. The catch is it creates this weird coupling between the number of tiles and the number of resource generating buildings.
Similar behavior is visible in CCM when enslavers attack workers, and you can see them "counting down" the damage until the worker is killed.