This library contains features to parse/output RTW files.
It's extensively utilised in my randomiser, so check that out for more examples of usage.
This library makes use of the fantastic MAGICK.NET library.
- descr_region.txt
- can parse region name, colour, cityname, faction_creator, resources and citycoordinates
- find region by colour
- descr_strat.txt
- can parse the entire descr_strat into a simple data structure.
- can output the entire file
- Remove SPQR function to quickly remove them from the game
- shuffle factions (useful if doing randomisation)
- export_descr_buildings.txt
- can parse the building types, their levels, and all the building details. (exception hidden resources are currently not handled)
- can output the entire file
- functions to return a specific or random building
- functions to return buildings at a certain settlement level
- export_descr_unit.txt
- can parse the entire file
- can output the entire file
- functions to find specific units and return the unit(s)
- function to check a unit belongs to a faction
- names.txt
- can parse all the names and ownership of the names
- functions to get random names from the files
- function to check for non ASCII characters
- Select Map creation
- can paint faction maps showing the settlements a faction owns.
- can paint a full map showing all factions and their associated colour.
- can paint diplomacy maps showing whos at war with who for each faction.
- descr_sm_factions
- can parse the factions and their associated colours.
Parsing the export_descr_unit.txt
EDU edu = new EDU(true); //create an object of the edu with logging on.
edu.parse(new string[] {"path"}, out linenumber, out linetext); // needs a string array currently, line vars are for logging
Accessing and modifying a value within export_descr_unit.txt
Unit unit = edu.FindUnit("peasant");
unit.attack[0] = 3; // modify attack factor
unit.morale = 1; // modify morale
unit.discipline = StatMental_discipline.berserker; //modify discipline
unit.ownership |= carthage; // add carthage as an owner of the unit
Outputting the export_descr_unit.txt
edu.ToFile("path");