orlanth
Storm God. Yarr!
- Joined
- Nov 17, 2001
- Messages
- 1,805
For Lib Spi't and others considering making a new total conversion modmod based on M:C ; if you're finding it hard to generate all the needed XML files and cross-referenced XML tags by hand, you can feel free to try this XML generator script which is designed to generate a complete set of cross-referenced XML files in M:C compatible format.
https://github.com/Nightinggale/Medieval_Tech/blob/colonization2071/scripts/xmlgen.pl
This was set up just for use in 2071, but if you want to try using it to generate the XMLs for your own mod and have a little programming knowledge (this can be *very* little like I have ) you could try editing the arrays in this script (starting with @) to generate the content you want. For example in the code chunks below, it's setting up arrays listing the Cargo Yields (@cargoyields), Abstract Yields (@abstractyields), Buildable Improvements (@builds), Goody-Hut Improvements (@goody), professions producing yields on map plots (@plotprofs), and professions producing yields in buildings (@cityprofs).
If you were to edit all the arrays in the script to use the content for your mod, you can then execute the script using Perl (eg http://strawberryperl.com) and it will spit out a big set of XML files using that content, which you can then edit manually as you like.
The script will need modification to use for your own mods, and you'll still need to edit the resulting XML files to adjust the unit/building stats and other content the way you want; so I'm not sure whether people will want to use this script or just make all their XML by hand the old fashioned way. But IMHO this can cut down on the long and painful process of manually generating every XML file for a total conversion mod, while keeping all the necessary cross-references between your Professions, Units, Features, Buildings, ArtDefs, and Text XML files intact.
https://github.com/Nightinggale/Medieval_Tech/blob/colonization2071/scripts/xmlgen.pl
This was set up just for use in 2071, but if you want to try using it to generate the XMLs for your own mod and have a little programming knowledge (this can be *very* little like I have ) you could try editing the arrays in this script (starting with @) to generate the content you want. For example in the code chunks below, it's setting up arrays listing the Cargo Yields (@cargoyields), Abstract Yields (@abstractyields), Buildable Improvements (@builds), Goody-Hut Improvements (@goody), professions producing yields on map plots (@plotprofs), and professions producing yields in buildings (@cityprofs).
Spoiler :
# arrays of yields
@cargoyields = ("Nutrients" , "Biopolymers" , "Silicates" , "Base Metals" , "Actinides" , "Isotopes" , "Rare Earths" , "Crystalloids" , "Nucleic Acids" , "Amino Acids" , "Tissue Samples" , "Microbes" , "Datacores" , "Progenitor Artifacts" , "Alien Specimens" , "Precious Metals" , "Opiates" , "Xenotoxins" , "Botanicals" , "Hydrocarbons" , "Clathrates" , "Core Samples" , "Machine Tools" , "Robotics" , "Munitions" , "Photonics" , "Plasteel" , "Duralloy" , "Crystalloy" , "Nucleonics" , "Fusion Cores" , "Semiconductors" , "Plasmids" , "Enzymes" , "Stem Cells" , "State Secrets" , "Progenitor Tech" , "Alien Relics" , "Narcotics" , "Bioweapons" , "Pharmaceuticals" , "Petrochemicals" , "Colloids" , "Catalysts", "Hard Currency", "Earth Goods", "Contraband", "Earthling Specimens");
# array of abstract yields
@abstractyields = ("Industry", "Media", "Liberty", "Research", "Education", "Influence", "Energy", "Pollutants", "Credits");
@allyields = (@cargoyields,@abstractyields);
# improvements, goodyhuts and improvement builds
@builds = ('Farm','Mill','Quarry','Mine','Facility','Lab','Plantation','Rig');
@goody = ('Alien Menhir','Abduction Site','Land Worked','Water Worked','City Ruins');
@improvements = (@builds,@goody);
# arrays of professions: 1st item = description, 2nd item = yield produced, rest of items = yield inputs
# professions producing yields on map plots
@plotprofs = (
['Agriculture','NUTRIENTS'],
['Biopolymer Harvesting','BIOPOLYMERS'],
['Base Metals Mining','BASE_METALS'],
['Silicate Mining','SILICATES'],
['Precious Metals Excavation','PRECIOUS_METALS'],
['Actinide Extraction','ACTINIDES'],
['Isotope Extraction','ISOTOPES'],
['Rare Earths Extraction','RARE_EARTHS'],
['Crystalloid Extraction','CRYSTALLOIDS'],
['Nucleic Acid Culture','NUCLEIC_ACIDS'],
['Amino Acid Culture','AMINO_ACIDS'],
['Tissue Sample Culture','TISSUE_SAMPLES'],
['Microbial Culture','MICROBES'],
['Datacore Excavation','DATACORES'],
['Artifact Excavation','PROGENITOR_ARTIFACTS'],
['Alien Specimen Excavation','ALIEN_SPECIMENS'],
['Opiates Cultivation','OPIATES'],
['Xenotoxin Cultivation','XENOTOXINS'],
['Botanical Cultivation','BOTANICALS'],
['Hydrocarbon Drilling','HYDROCARBONS'],
['Clathrate Drilling','CLATHRATES'],
['Core Sample Drilling','CORE_SAMPLES']
);
# professions producing yields in buildings
@cityprofs = (
['Machine Tool Casting','MACHINE_TOOLS','BASE_METALS'],
['Robotics Manufacturing','ROBOTICS','MACHINE_TOOLS'],
['Munitions Manufacturing','MUNITIONS','MACHINE_TOOLS'],
['Photonics Manufacturing','PHOTONICS','CRYSTALLOIDS'],
['Plasteel Smelting','PLASTEEL','BASE_METALS','BIOPOLYMERS'],
['Duralloy Smelting','DURALLOY','BASE_METALS','SILICATES'],
['Crystalloy Smelting','CRYSTALLOY','PRECIOUS_METALS','CRYSTALLOIDS'],
['Fusion Core Enrichment','FUSION_CORES','ACTINIDES'],
['Nucleonics Enrichment','NUCLEONICS','ISOTOPES'],
['Semiconductor Fabrication','SEMICONDUCTORS','RARE_EARTHS'],
['Plasmid Biosynthesis','PLASMIDS','NUCLEIC_ACIDS'],
['Enzyme Biosynthesis','ENZYMES','AMINO_ACIDS'],
['Stem Cell Dissection','STEM_CELLS','TISSUE_SAMPLES'],
['Datacore Analysis','STATE_SECRETS','DATACORES'],
['Artifact Analysis','PROGENITOR_TECH','PROGENITOR_ARTIFACTS'],
['Alien Specimen Dissection','ALIEN_RELICS','ALIEN_SPECIMENS'],
['Narcotics Distillation','NARCOTICS','OPIATES'],
['Bioweapons Distillation','BIOWEAPONS','XENOTOXINS'],
['Pharmaceuticals Distillation','PHARMACEUTICALS','BOTANICALS'],
['Petrochemical Refining','PETROCHEMICALS','HYDROCARBONS'],
['Colloids Refining','COLLOIDS','CLATHRATES'],
['Catalyst Refining','CATALYSTS','CORE_SAMPLES'],
['Investment Banking','HARD_CURRENCY','PRECIOUS_METALS'],
['Construction','INDUSTRY'],
['Mass Media','MEDIA'],
['Administration','LIBERTY'],
['Education','EDUCATION'],
['Applied Research','RESEARCH']
);
@cargoyields = ("Nutrients" , "Biopolymers" , "Silicates" , "Base Metals" , "Actinides" , "Isotopes" , "Rare Earths" , "Crystalloids" , "Nucleic Acids" , "Amino Acids" , "Tissue Samples" , "Microbes" , "Datacores" , "Progenitor Artifacts" , "Alien Specimens" , "Precious Metals" , "Opiates" , "Xenotoxins" , "Botanicals" , "Hydrocarbons" , "Clathrates" , "Core Samples" , "Machine Tools" , "Robotics" , "Munitions" , "Photonics" , "Plasteel" , "Duralloy" , "Crystalloy" , "Nucleonics" , "Fusion Cores" , "Semiconductors" , "Plasmids" , "Enzymes" , "Stem Cells" , "State Secrets" , "Progenitor Tech" , "Alien Relics" , "Narcotics" , "Bioweapons" , "Pharmaceuticals" , "Petrochemicals" , "Colloids" , "Catalysts", "Hard Currency", "Earth Goods", "Contraband", "Earthling Specimens");
# array of abstract yields
@abstractyields = ("Industry", "Media", "Liberty", "Research", "Education", "Influence", "Energy", "Pollutants", "Credits");
@allyields = (@cargoyields,@abstractyields);
# improvements, goodyhuts and improvement builds
@builds = ('Farm','Mill','Quarry','Mine','Facility','Lab','Plantation','Rig');
@goody = ('Alien Menhir','Abduction Site','Land Worked','Water Worked','City Ruins');
@improvements = (@builds,@goody);
# arrays of professions: 1st item = description, 2nd item = yield produced, rest of items = yield inputs
# professions producing yields on map plots
@plotprofs = (
['Agriculture','NUTRIENTS'],
['Biopolymer Harvesting','BIOPOLYMERS'],
['Base Metals Mining','BASE_METALS'],
['Silicate Mining','SILICATES'],
['Precious Metals Excavation','PRECIOUS_METALS'],
['Actinide Extraction','ACTINIDES'],
['Isotope Extraction','ISOTOPES'],
['Rare Earths Extraction','RARE_EARTHS'],
['Crystalloid Extraction','CRYSTALLOIDS'],
['Nucleic Acid Culture','NUCLEIC_ACIDS'],
['Amino Acid Culture','AMINO_ACIDS'],
['Tissue Sample Culture','TISSUE_SAMPLES'],
['Microbial Culture','MICROBES'],
['Datacore Excavation','DATACORES'],
['Artifact Excavation','PROGENITOR_ARTIFACTS'],
['Alien Specimen Excavation','ALIEN_SPECIMENS'],
['Opiates Cultivation','OPIATES'],
['Xenotoxin Cultivation','XENOTOXINS'],
['Botanical Cultivation','BOTANICALS'],
['Hydrocarbon Drilling','HYDROCARBONS'],
['Clathrate Drilling','CLATHRATES'],
['Core Sample Drilling','CORE_SAMPLES']
);
# professions producing yields in buildings
@cityprofs = (
['Machine Tool Casting','MACHINE_TOOLS','BASE_METALS'],
['Robotics Manufacturing','ROBOTICS','MACHINE_TOOLS'],
['Munitions Manufacturing','MUNITIONS','MACHINE_TOOLS'],
['Photonics Manufacturing','PHOTONICS','CRYSTALLOIDS'],
['Plasteel Smelting','PLASTEEL','BASE_METALS','BIOPOLYMERS'],
['Duralloy Smelting','DURALLOY','BASE_METALS','SILICATES'],
['Crystalloy Smelting','CRYSTALLOY','PRECIOUS_METALS','CRYSTALLOIDS'],
['Fusion Core Enrichment','FUSION_CORES','ACTINIDES'],
['Nucleonics Enrichment','NUCLEONICS','ISOTOPES'],
['Semiconductor Fabrication','SEMICONDUCTORS','RARE_EARTHS'],
['Plasmid Biosynthesis','PLASMIDS','NUCLEIC_ACIDS'],
['Enzyme Biosynthesis','ENZYMES','AMINO_ACIDS'],
['Stem Cell Dissection','STEM_CELLS','TISSUE_SAMPLES'],
['Datacore Analysis','STATE_SECRETS','DATACORES'],
['Artifact Analysis','PROGENITOR_TECH','PROGENITOR_ARTIFACTS'],
['Alien Specimen Dissection','ALIEN_RELICS','ALIEN_SPECIMENS'],
['Narcotics Distillation','NARCOTICS','OPIATES'],
['Bioweapons Distillation','BIOWEAPONS','XENOTOXINS'],
['Pharmaceuticals Distillation','PHARMACEUTICALS','BOTANICALS'],
['Petrochemical Refining','PETROCHEMICALS','HYDROCARBONS'],
['Colloids Refining','COLLOIDS','CLATHRATES'],
['Catalyst Refining','CATALYSTS','CORE_SAMPLES'],
['Investment Banking','HARD_CURRENCY','PRECIOUS_METALS'],
['Construction','INDUSTRY'],
['Mass Media','MEDIA'],
['Administration','LIBERTY'],
['Education','EDUCATION'],
['Applied Research','RESEARCH']
);
The script will need modification to use for your own mods, and you'll still need to edit the resulting XML files to adjust the unit/building stats and other content the way you want; so I'm not sure whether people will want to use this script or just make all their XML by hand the old fashioned way. But IMHO this can cut down on the long and painful process of manually generating every XML file for a total conversion mod, while keeping all the necessary cross-references between your Professions, Units, Features, Buildings, ArtDefs, and Text XML files intact.