Author
Topic: SoftInc Modder by amensch [4.02] (Read 30812 times)

Amensch is pretty trust-worthy in my book.. he's put a lot of time into helping this community already. (Check out his mods, they're great!) And there's still A LOT more to come from Khornel.. so I'm pretty excited to see what Amensch will bring with it.

// The load emits events when loading a mod that are the validation. You can add // the ValidationResult objects to a collection to display, or print them out, // or whatever else you need to do with them.

// Note that I have a TODO to expose the validation in an API that doesn't require // loading to get the validation results. This will primarily help with starting a // new modification. // https://github.com/jdphenix/SoftwareincValidator/issues/34 loader.XmlValidation += (s, e) => Console.WriteLine(e); loader.ModComponentValidation += (s, e) => Console.WriteLine(e);

//Load the modification at the argument given to Load(). var mod = loader.Load(args[0]);

// Create a new modification var newMod = new SoftincModification("NewMod"); newMod.Scenarios.Add(new Scenario { Name = "Example Scenario", Money = new [] { 5000 }, // These and other properties on the representation like them // will be abstracted away to a more sane representation. // Goals are really a set of dictionaries, and the structure should // reflect that. Goals = new [] { "Money 50000000,Date 1-1990" } });