MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
133 stars 171 forks source link

[RFE: StratCon]: 1. Allow Nested Xml/Manifest/Folder Refrences, #3789

Open Thom293 opened 11 months ago

Thom293 commented 11 months ago

Title. I'll give examples as that is probably easier. But stated as simply as possible: For any stratcon xml refrences for modifiers/scenarios/muls, allow it to refer to another manifest and/or folder, where it would roll again. I made some mods for Fallout 4 that uses this system and its very powerful and allows for the creation of a lot more "guided randomness."

The example are long, but hopefully implementation (other than the optional era thing below) isn't too rough. It just allows nesting.

Examples:

Right now we have Rookies/Veterans/Elites modifiers. This takes up 3 spots in the main SC modifier manifest so they are rolled with approx 3/50 chance . Instead could could have a "skill.xml" refrence on the modifier manifest which would then roll on on the "skill.xml" manifest and roll for those 3. i.e. if the entry refers to a modifier or mul it applies that modifier. If the entry is another manifest it rolls again on the new manifest and repeats if a new manifest is rolled or applies the newly rolled modifier/mul.

More examples:

Could mix modifiers and .muls

"Assassination Target" -> Heavy.xml , Assault.xml, Heavy Tank.xml, Assault Tank.xml, Marauder3D.mul, Awesome8Q.mul

"Third Party" -> Pirates Incoming Ground, Pirates Present Ground, Mercs Incoming Ground, Mercs Present Ground, same for air, etc...

Would work the same for scenarios:

"Base Attack" -> Base Attack, Base Attack (Heavy), Base Attack (Veteran), Base Attack (Combined Arms), Base Attack (Battalion), Base Attack (Allied Cavalry), etc.

"Dropship present" - Grounded Dropship (Small), Grounded Dropship (Escorted), Grounded Dropship (Combat Landing), Active Dropship (Small), Active Dropship (Large), Active Dropship (Militarty), Active Dropship (Hotdrop)

Pie in the sky that may be too difficult but would be very cool:

Assign a date range for the end of each Canon Era and if an Era is mentioned in the xml/.mul skip ones that have not been ended yet. This would allow for period appropriate mul forces.

So for example the Era refrence list would have the Canon dates. SW < 3049, CI < 3059, CW < 3068, JH < 3081, etc (not certain exactly dates).

So if an xml or .mul had an Era name in it where the end had not been reached it would be skipped and rerolled. e.g.: SW Base Attack.xml, CW BattleArmor.mul, JH Protomechs.mul, etc. If no Era abbreviation is present then it's fair game anytime (basically introtech).

Thank you.

SuperStucco commented 11 months ago

Interesting idea. It would need to prevent a sequence of the same manifest XML being called later in the chain, potentially leading to an infinite loops situation. There would have to be a graceful exit, including useful user notification, so it can be diagnosed and corrected without needing to step through code.