OpenClonk Bugtracker - OpenClonk
View Issue Details
0001977OpenClonkEnginepublic2018-01-13 09:122018-01-13 10:53
ReporterMarky 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001977: Feature request - Specify locations of Material.ocg for scenarios
DescriptionI want to be able to specify the location of Material.ocg in Scenario.txt, and also allow subfolders for material. Requirements:
* Reuse existing material definitions without copying them. At the moment I have two choices: 1) Create the material in Folder.ocf/Material.ocg - now, if another user creates an object pack and they want to use the materials, they have to copy them? 2) Create the material in Pack.ocd/Material.ocg - now, all scenarios that use Pack.ocd potentially overwrite the material definition?
* Create multiple material sets (Material.ocg/Industrial.ocg, Material.ocg/Rural.ocg) in one folder, for grouping them and setting them to different themes.
* For the purpose of overloading materials, I'd like to be able to specify the "default/source material" => this must be a complete material set that does not overload definitions or textures; as well as an "overload material" => this is optional, but must be a set that overloads textures or definitions.


Maybe this is possible already, but should be documented as such. I am thinking of the "DefinitionX" entries in Scenario.txt and the option to include/exclude specific definitions:
Theoretically, I could make a MaterialCollection.ocd/Industrial.ocd/Material.ocg, and MaterialCollection.ocd/Rural.ocd/Material.ocg and then import those into the scenario.
TagsNo tags attached.
Attached Files

Notes
(0006046)
Caesar   
2018-01-13 10:53   
There is an undocumented option Scenario.txt/[Head]/Origin where you can pass the path to another scenario to copy material definitions and other things from. You can throw some dummy scenario to YourScenarioFolder.ocf/AcompanyingDefs.ocd/Defaults.ocs and reference that. I don't know what kind of disadvantages that has, relative paths may not be supported, e.g..
You'll find that being used in savegames.

I feel like similar stuff had been done for Scenarios based on either the CR Western or Metal & Magic pack, and I'm not sure whether Origin or something else was used, you may want to have a look there.


Issue History
2018-01-13 09:12MarkyNew Issue
2018-01-13 10:53CaesarNote Added: 0006046
2018-01-13 10:53CaesarNote Edited: 0006046bug_revision_view_page.php?bugnote_id=6046#r1358