As noone seems to be able to answer this one, i'll tell the tale of what i finally did:
WHAT DIDN'T WORK
I tried to get the hook_content_generate that is mentioned on a few webpages to work as it seems to be the best way to do it without writing a full fledged module, but it seems that this does just not exist (anymore?). So this was a cul de sac.
Then i saw mentioning of hook_devel_generate which seems to be kind of a semi-hook (not a real Drupal hook, but these functions get called by the devel_generate Module to actually create the data), but browsing through the module i saw that before calling the HOOK_devel_generate function, it looks for module include files of the type 'FIELDTYPE.devel_generate.inc' in its own folder, and then in the folder of the FIELDTYPE module to include them via module_load_include.
It has generation functions for 'file', 'image', 'taxonomy', 'number', 'text', 'comment', 'list'. So any function that one might create of the form FIELDTYPE_devel_generate will be overwritten by the functions included in those files. This is not very flexible and can't really be extended/overwritten, but thats how it is. When i find some time after finishing this project i will bring it up in their forum maybe they will agree to implement sth. more extendable in the future.
SOME POSSIBLE SOLUTIONS
So there were two options that looked feasible albeit a bit "hacky"
- Implement our own version of the devel_generate
Modify the current devel_generate to our needs
- Just customize the included functions
- Modify devel_generate to look for custom functions in other modules before loading its own
None of these aproaches are optimal, the best would be if devel_generate were to implement some hooks to call the generation functions, and not just this brute force inclusion of files.
MY WORKAROUND
I went with option 2.2 and patched my "devel_generate.fields.inc" and replaced this code i found at line 41.
// Include any support file that might exist for this field.
if (in_array($module, array('file', 'image', 'taxonomy', 'number', 'text', 'comment', 'list'))) {
// devel_generate implements on behalf of core and special friends.
module_load_include('inc', 'devel_generate', "$module.devel_generate");
}
else {
module_load_include('inc', $module, "$module.devel_generate");
}
$function = $module . '_devel_generate';
with this one:
$function = $module . '_devel_generate';
// only load the devel_generate or the FILEDTYPES functions if no FIELDTYPE_devel_generate
// function has been defined elsewhere ($module is actually the name of the FIELDTYPE)
if (!function_exists($function)) { // ONLY if the function doesn't yet exist load the files
// --- ORIGINAL code
if (in_array($module, array('file', 'image', 'taxonomy', 'number', 'text', 'comment', 'list'))) {
module_load_include('inc', 'devel_generate', "$module.devel_generate");
}
else {
module_load_include('inc', $module, "$module.devel_generate");
}
// --- END ORIGINAL code
}
// We already initialized $function, so remove here..
// $function = $module . '_devel_generate';
So with this i can now define my own FIELDTYPE_devel_generate functions and they will have priority over the ones defined in the fieldtype itself and the ones of the devel_generate module. This way i could even control the content of each unique field by identifying it through its name ($field["field_name"]), to use field specific settings in my generation function;
I hope this will help others looking for sth. similar, so that they don't have to waste a whole day with research as i did.