Fun with xml extraction

The following cultures do not have a Building that generate them (I assume it's thus impossible to get them). Just in case you'd like to remove some or all of them from the file, here's the list:

Do not remove them. I am just slow in making the Culture Wonders. I think some even have Unique Units made for them. In the process of making cultures you have to make the resources first. So that's why they are already made without a wonder.
 
OK. Are "Luxury" resources (such as Feathers) considered as Manufactured or TradeGoods?

TradeGoods can be produced by only one or maybe two nations in a game.

Map resources may be manufactured but not all manufactured can be map resources.

Are there other optional components than the Alt_timelines?

Bad_Karma, Custom_<anything>, anything under DancingHoskuld although I probably need to move the animal stuff into core the rest is optional, any Wonders folder and so on.

I already have my "master" table and xml with all the resources into it, it's now just a matter of deciding how to reorder it, which tags to remove/correct and how to split it.

That will be a problem, because the ones in the main/core file are currently in the correct order and have some meaningful comments in it.
 
Some further audit, mainly around TechReveal and TechCityTrade for manufactured goods:

- BONUS_AMMO is revealed by NONE and enabled by TECH_RIFLING. However, it is generated by the Filling Factory (or later on by the Munitions Factory), which only requires TECH_EXPLOSIVE.

No a big deal, but for Civopedia's reliability I'd replace both instance by TECH_EXPLOSIVE.

Same situation for:
* BONUS_BAMBOO (revealed/enabled by TECH_WOOD_WORKING, but the first building that is able to generate it is the Bamboo Grove, enabled by TECH_CARPENTRY)
* BONUS_BERRIES (revealed/enabled by TECH_AGRICULTURE, but the only buildings that are able to generate it (various farms), are enabled by TECH_IRRIGATION)
* BONUS_CAT (revealed/enabled by TECH_ANIMAL_HUSBANDRY, but the only building that is able to generate it (Cat Breeder), is enabled by TECH_CAT_BREEDING)
* BONUS_CEMENT (enabled by TECH_CIVIL_ENGINEERING, but the first building that is able to generate it (Concrete Mason), is enabled by TECH_CONCRETE)
* BONUS_COTTON_FIBERS (revealed/enabled by TECH_WEAVING, but the only building that is able to generate it (Cotton Plantation), is enabled by TECH_AGRICULTURE)
* BONUS_DIESEL (enabled by TECH_COMBUSTION, but the first building that is able to generate it (Oil Refinery), is enabled by TECH_REFINING)
* BONUS_FERTILIZERS (enabled by TECH_PESTICIDES, but the first building that is able to generate it (Fertilizer Plant), is enabled by TECH_ORGANIC_CHEMISTRY)
* BONUS_FIBERGLASS (revealed/enabled by TECH_PLASTICS, but the only building that is able to generate it (Fiberglass Factory), is enabled by TECH_ASSEMBLY_LINE)
* BONUS_FLAX_FIBERS (revealed/enabled by TECH_WEAVING, but the only building that is able to generate it (Flax Farm), is enabled by TECH_FLORISTRY)
* BONUS_FRUIT (revealed/enabled by TECH_AGRICULTURE, but the first buildings that are able to generate it (various farms) are enabled by TECH_ORCHARDS)
* BONUS_NUTS (revealed/enabled by TECH_AGRICULTURE, but the first buildings that are able to generate it (various farms) are enabled by TECH_ORCHARDS)
* BONUS_VEGETABLES (revealed/enabled by TECH_AGRICULTURE, but the first buildings that are able to generate it (various farms) are enabled by TECH_PLOUGH)
* BONUS_FURS (revealed/enabled by TECH_TRAPPING, but the only building that is able to generate it (Furrier), is enabled by TECH_SKINNING)
* BONUS_HEMP_FIBERS (revealed/enabled by TECH_WEAVING, but the first building that is able to generate it (Hemp Farm) is enabled by TECH_AGRICULTURE)
* BONUS_HIDE (revealed/enabled by TECH_SCAVENGING, but the first buildings that are able to generate it are McCallum (with TECH_SHELTER_BUILDING) or Skinner (TECH_SKINNING))
* BONUS_LACQUERWARE (revealed/enabled by TECH_SIMPLE_WOOD_WORKING, but the first building that is able to generate it (Lacquerware Hut) is enabled by TECH_ADHESIVES)
* BONUS_MARS_ROCKS (revealed by TECH_PLANET_EXPLORATION and enabled by TECH_ASTROGEOLOGY, but the only buildings that are able to generate it (various Mars colonies) is enabled by TECH_PLANET_COLONIZATION)
* BONUS_NEWSPAPERS (revealed/enabled by TECH_JOURNALISM, but the only building that is able to generate it (Newspaper Factory), is enabled by TECH_ASSEMBLY_LINE)
* BONUS_NYLON (revealed/enabled by TECH_PLASTICS, but the only building that is able to generate it (Nylon Factory), is enabled by TECH_ASSEMBLY_LINE)
* BONUS_WATERBOTTLE (revealed/enabled by TECH_PLASTICS, but the only building that is able to generate it (Water Bottle Factory), is enabled by TECH_ASSEMBLY_LINE)
* BONUS_WARE_BRASS (revealed/enabled by TECH_BRONZE_WORKING, but the only building that is able to generate it (Brasssmith), is enabled by TECH_BRASS_WORKING)
* BONUS_WARE_COPPER (revealed/enabled by TECH_COPPER_WORKING, but the only building that is able to generate it (Coppersmith), is enabled by TECH_METAL_CASTING)
* BONUS_WARE_ELECTRUM (revealed/enabled by TECH_BRONZE_WORKING, but the only building that is able to generate it (Electrumsmith), is enabled by TECH_BRASS_WORKING)
* BONUS_WARES_TERRACOTTA (revealed/enabled by TECH_AESTHETICS, but the only building that is able to generate it (Terracotta Workshop), is enabled by TECH_ORNAMENTATION)
* BONUS_WOOL (enabled by TECH_WEAVING, but the only building that is able to generate it (Shearing Barn), is enabled by TECH_ANIMAL_HUSBANDRY)
* BONUS_FINE_LEATHER and BONUS_O_FEATHERS (revealed/enabled by TECH_ANIMAL_HUSBANDRY, but the only building that is able to generate them (Ostrich Farm) is enabled by TECH_POULTRY_DOMESTICATION)

* BONUS_DRAMA (not enabled by anything, while the first building that is able to generate it (Broadway), is enabled by TECH_ELECTRICITY)
* BONUS_GEMS (not enabled by anything, while the first buildings that are able to generate it (various mines), is enabled by TECH_MINING)
* BONUS_MOVIES (not enabled by anything, while the first building that is able to generate it (Hollywood), is enabled by TECH_MOTION_PICTURES)
* BONUS_MUSIC (not enabled by anything, while the first building that is able to generate it (Rock N Roll), is enabled by TECH_ELECTRONICS)
* BONUS_ORGANIC_COMPUTERS (not enabled by anything, but the first buildings that are able to generate it are Organic Computer Lab (with TECH_BIOPUNK) or Organic Computer Factory (TECH_DNA_COMPUTING))
* BONUS_SKIS (not enabled by anything, while the only building that is able to generate it (Ski Resort), is enabled by TECH_MODERN_SPORTS)

- BONUS_DYE2 do not have the same TechReveal (TECH_NATURAL_PIGMENTS) and TechCityTrade (TECH_HERBALISM). The first building able to generate it (Dye Maker) requires TECH_NATURAL_PIGMENTS, so I suggest filling both with TECH_NATURAL_PIGMENTS.

Same situation for:
BONUS_ENERGY_DRINK (revealed by TECH_EXTREME_SPORTS, enabled TECH_GASTRONOMY, generated by TECH_GASTRONOMY through Energy Drink Factory)


- BONUS_EGGS is revealed/enabled by TECH_SCAVENGING, but you can't get it until TECH_FISHING (from turtle eggs) or TECH_POULTRY_DOMESTICATION (from poultry farms). I suggest keeping TECH_POULTRY_DOMESTICATION for both.

Same situation for :
BONUS_FEATHERS (revealed/enabled TECH_SCAVENGING, but you can't get it until TECH_FISHING (from Cormorant Trainer) or TECH_BONE_WORKING (from Feather worker). I suggest keeping TECH_BONE_WORKING for both.

- BONUS_IVORY2 is revealed/enabled by TECH_BONE_WORKING, but you are able to get it with an Elephant's or Mammoth's herd which have no tech prerequisite. I suggest removing the prerequisite for BONUS_IVORY2.

- BONUS_LARD is revealed/enabled by TECH_COOKED_FOOD, but the only building that is able to generate it (Rendering Plant), is enabled by TECH_COMMERCIAL_WHALING. Unlike other bonus, I'd suggest keeping the req for the bonus, but changing the Rendering Plant prerequisite to something like TECH_CUISINE instead of TECH_COMMERCIAL_WHALING (were the first rendering plants really based on whale hunting?).

- BONUS_THEREMIN is in the DieselPunk line (only way to build it is with Theremin Factory with TECH_DIESELPUNK), but is not located in the Alt_timeline files.

- The following manufactured resources have no building able to generate it. This also prevents the construction of some buildings that have them as prerequisites...
* BONUS_BULLION
* BONUS_INGOT_BRONZE
* BONUS_MOON_ROCKS
* BONUS_TOOLS
* BONUS_VIDEO_GAMES
* BONUS_WARES_MEGASTRONG_ALLOY
 
There never have been bronze ingots so BONUS_INGOT_BRONZE should be removed and any building/unit that uses them needs to be changed.

Moon Rocks (and Mars Rocks) are supposed to be provided by a Great Wonder or a Project.

BONUS_TOOLS? May be an early version and should be removed?
 
Do not remove them. I am just slow in making the Culture Wonders. I think some even have Unique Units made for them. In the process of making cultures you have to make the resources first. So that's why they are already made without a wonder.

OK, just reporting in case they were forgotten from past changes.


TradeGoods can be produced by only one or maybe two nations in a game.

Is the following list for TradeGoods OK for you?

BONUS_SCULPTURE_NOK
BONUS_EMU_EGG
BONUS_FINE_LEATHER
BONUS_FINE_STONEWARE
BONUS_JADE_MASK
BONUS_O_FEATHERS
BONUS_RED_AND_BLACK
BONUS_H_SURFBOARD
BONUS_VINTAGE_RED_WINE
BONUS_VINTAGE_WHITE_WINE
BONUS_CHAMPAGNE


Bad_Karma, Custom_<anything>, anything under DancingHoskuld although I probably need to move the animal stuff into core the rest is optional, any Wonders folder and so on.

OK, none of the BonusInfo files were located in those folders.


That will be a problem, because the ones in the main/core file are currently in the correct order and have some meaningful comments in it.

I can keep the same order for the map resources, but comments are deleted if I regenerate the file. Easiest thing will be to keep the original CIV4BonusInfos.xml file and just remove&transfer the few manufactured resources that are in it.

By the way, Aluminium is now manufactured (it wasn't the case in vanilla), correct?
 
There never have been bronze ingots so BONUS_INGOT_BRONZE should be removed and any building/unit that uses them needs to be changed.

No building or unit are using this one, so I'll just remove the resource.

Moon Rocks (and Mars Rocks) are supposed to be provided by a Great Wonder or a Project.

Mars rocks are generated by :
Mars Colony (Acidalia)
Mars Colony (Aeolis)
Mars Colony (Amazonis)
Mars Colony (Arcadia)
Mars Colony (Argyre)
Mars Colony (Chryse)
Mars Colony (Daedalia)
Mars Colony (Elysium)
Mars Colony (Hellas)
Mars Colony (Hesperia)

But there is no building for Moon rocks.

BONUS_TOOLS? May be an early version and should be removed?

This one is located in Modules\Praetyre\Tools\Tools_CIV4BonusInfos.xml (one of the few that are not in Modules\Resources\). Its only instance outside of this file is as a bonus to the Omega Child Crew building.
 
Moon Rocks SHOULD be generated by the Apollo Program.

Video Games were Hydro's or Mr Azure's idea. I made them and I think hydro wanted to add them to one of his buildings.

Megastrong Alloy Wares are basically in the same situation as Video Games. There might be a "Megastrong Alloy Factory" and I just forgot them to add.


For Tradegoods, I think you forgot the original three from bts: Music (Hit singles), Movies and... what ever the 3rd one was.
 
OK, just reporting in case they were forgotten from past changes.

I added Akkadian, Anasazi, Aymara, Bulgarian and Castilian culture Wonders. So that put a little dent into tht huge list you have of cultures without wonders.

* BONUS_MARS_ROCKS (revealed by TECH_PLANET_EXPLORATION and enabled by TECH_ASTROGEOLOGY, but the only buildings that are able to generate it (various Mars colonies) is enabled by TECH_PLANET_COLONIZATION)

There are plans for Mars Probe/Rover Missions bringing back samples too. They just have not been made yet.

* BONUS_BULLION
* BONUS_INGOT_BRONZE

Bullion was abandoned for the ingot system and Bronze Ingots were requested to be disabled by DH for more realism.
 
I added Akkadian, Anasazi, Aymara, Bulgarian and Castilian culture Wonders. So that put a little dent into tht huge list you have of cultures without wonders.

Sorry for [offtopic].
Could you add Lydian, Tahitian, Venetian so that we can use their hero units?
Also, Athenian, Blackfoot, Epirus, Roxolani, Massagetae need Culture Wonders. They have UUs but don't have the wonders so their units can't be used currently.
 
Sorry for [offtopic].
Could you add Lydian, Tahitian, Venetian so that we can use their hero units?
Also, Athenian, Blackfoot, Epirus, Roxolani, Massagetae need Culture Wonders. They have UUs but don't have the wonders so their units can't be used currently.

Sorry, since I go so slow with these I do them in the order I have them on my list so I don't forget any. Right now I am on my 8th grouping which has 22 cultures. All of those you list are in my 9th grouping which has 25 cultures.
 
Sorry, since I go so slow with these I do them in the order I have them on my list so I don't forget any. Right now I am on my 8th grouping which has 22 cultures. All of those you list are in my 9th grouping which has 25 cultures.

If you don't have time, I may help to do some works.
 
For Tradegoods, I think you forgot the original three from bts: Music (Hit singles), Movies and... what ever the 3rd one was.

You're right, the three are:
- BONUS_DRAMA (Broadway)
- BONUS_MOVIES (Hollywood)
- BONUS_MUSIC (Rock N Roll).

That will be a problem, because the ones in the main/core file are currently in the correct order and have some meaningful comments in it.

After checking the file, the comments indicate before each entry the start of a new "category", then the (plain) name of the resource. This got me thinking, what I could do in the output file (for all entries, not just map resources) is to add before each entry a comment with some info such as who made it originally (i.e. in which module it was; useful to know if there are questions related to a specific entry), the plain name of the resource (which is which between IVORY and IVORY2?...), maybe the iGridX or era of the enabling Tech, or whatever else that could help (as long as it's automatable in some way...).
For example :
<!-- Emu Egg -->
<!-- Wonder-based Trade Good, Prehistorical era -->
<!-- By Sargon -->
<Bonus Info>
<Type>BONUS_EMU_EGG</Type>
...

I could probably add similarly the native culture/map resource prerequisite for each culture, etc.

This might help improve the readability of the xml file, though one should be careful on the long run not to blindly trust those comments if the other files are changed afterwards...
 
If you don't have time, I may help to do some works.

As much as I would like someone to help, the problem is this is something I need to do myself. Mainly because I have not figured out all the requirements for each culture yet. Which not only takes researching the culture but then also keeping my online documents up to date and not clashing.
 
Here are the files, with all the changes (save a few I wasn't completely sure of) mentionned in my posts above:
- Manufactured_CIV4BonusInfos.xml
- Maps_CIV4BonusInfos.xml
- Culture_CIV4BonusInfos.xml
- TradeGoods_CIV4BonusInfos.xml
- The Alt_timeline files are included as they were cleaned a bit:
Atompunk_CIV4BonusInfos.xml
Biopunk_CIV4BonusInfos.xml
Clockpunk_CIV4BonusInfos.xml
Cyberpunk_CIV4BonusInfos.xml
Dieselpunk_CIV4BonusInfos.xml
Steampunk_CIV4BonusInfos.xml


In addition:

Bullions and Bronze Ingots are removed. I haven't removed Tools (although there's no way to build them) since they are used for Omega Child Crew for now. Theremin was not transferred into Dieselpunk (to prevent a bug with Mall/Hypermarket that has a bonus with them).
Each file is sorted alphabetically by Type and has a comment with name + author when I found it (I assume that the ones in Modules/Resources not from Faustmouse or Sargon were from Hydromancerx), except the Map bonuses which remain sorted as they were initially.
Useless tags mentioned by Dancing Hoskuld for manufactured (including culture) bonus were removed; I also fixed a few entries that were missing a tag somewhere (with a default value; this should have no effect in-game and is mainly for consistency/readability).

The mod starts and works well with the files in the core (with original files removed).

So, unless there's a problem somewhere, I'll generate the corresponding ArtDefines_Bonus the same way.


Minor comment: BONUS_ZINC does not seem to have any effect whatsoever (you can generate it, but it has no bonus and is not a prerequisite for anything). I don't know if there are other resources in this case.

And the useless stat of the day: the files went from 163 files/1,45Mo to 10 files/756Ko. That's at least worth 2 seconds of music ! ;)
 

Attachments

  • BonusInfos.rar
    28.8 KB · Views: 44
But the Backbone could be done. Like the Texts, Class Info,Art info...
They all don't take that long, but add up and it can save you a few hours.

Or research...

Are you offering to make them? If your serious then what would need to be left for me is;

- Cost (could leave it as -1)
- Tech Req (could leave as none)
- Bonus Req (could leave as none)
- Text Description (leave it blank)

Other than that the following could be done by you ...

- Normal Building set up (art, buildingclassinfo, buildinginfo, text)
- Art uses the same art as their corresponding resources.
- Each Wonder is gives 1 of that resource
- The text follow the same format where you just put in the name of that culture and the other text stays the same.
- The rest of the building info should be the same as each other expect for the regional culture. This you could leave alone or fill in if you know what region that culture is from.

If you (or climat) are willing to put in the effort in doing the basic set up for me that would be great. Just let me know who will do it and when its done so I can fill in the rest.

Note that setting it as -1 cost and none tech should keep it hidden and unbuildable so no one can make it until I have finished it.

Thanks in advance if you guys do that for me. It should would help me out. :goodjob:
 
Theremin was not transferred into Dieselpunk (to prevent a bug with Mall/Hypermarket that has a bonus with them).

And the useless stat of the day: the files went from 163 files/1,45Mo to 10 files/756Ko. That's at least worth 2 seconds of music ! ;)

Thanks, I have a look. Ostrich Feathers should be in the Manufactured not Trade Goods since everyone can make them. I will add the Theremin to the list of things needed to be fixed for modularity.
 
Thanks, I have a look. Ostrich Feathers should be in the Manufactured not Trade Goods since everyone can make them. I will add the Theremin to the list of things needed to be fixed for modularity.

Will you also but the merged bonus files into the core?

I think the name for a resource as comment is a really good idea rwn!
 
@Hydro
Let me know cultures that xml files are needed for. Then I'll make the basic form.
 
Top Bottom