I'm not sure how to answer on the basis of a "simplified architecture". Specific needs have specific answers...But I'll try.
Generic answer
don't get caught in programming paradigms. Do what works. If you have a dependency between two objects, you have a dependency, and any fake independence you'll inject will just obfuscate the dependency and make it harder to deal with.
In other words, if your character generator needs something from your DB manager, you have a dependency. How to make them independent? Well, you could for example, have the generator send a message where it requests information, and you could have the database send a message with the requested information, and have the generator listen to those messages. They'd "look" independent. But both would be dependent on a message manager; furthermore, both the information request and the information dispatching would be pretty useless if you removed either of the generator or the db manager. This is obfuscation by indirection and all it does is add complexity, without benefit. Any other solution you'd find would be similarly overly complex for no good reason. If two objects depend on each other they depend on each other. Make it clear. Make it so you can't instantiate the dependent object without passing its dependency. Don't try to force independence.
If you only need this information when you generate an object and never again, then it is possible, of course, to pass all info as arguments, but then you have a duplication of information. You should always thrive to have a single source of truth. Duplication of data means:
- possibility of data being unsynchronized (update
all_characters in db, then need to update it in all instances that use that variable)
- more memory usage (negligible for low amounts of data, but can get messy, specially if some of that data is references) -> more work for the GC
More specific answer
If the data however is used only on creation and not stored, then sure, pass it as arguments. I'd advise however to pass it as a dictionary:
func generate_character(props):
var born_at = props.current_year - props.character_age
As it will avoid you having to juggle variables around as you change your model, or do less juggling at least.
Hope it helps!