Aller au contenu

Photo

When does a resource need to be a core resource


3 réponses à ce sujet

#1
stuntpope

stuntpope
  • Members
  • 112 messages
In the wiki it says:

Any item that the player can use or that a creatures drops for the player, needs to be a core resource.

Why? What if I am making a stand alone module or a campaign separate to the single player campaign?

Does this still apply. So long as all the resources shared between modules in my campaign all belong to the root module in the hierarchy, shouldn't that suffice?

As far as I can see there is a problem with having to make things core resources. Because of dependencies once you make an item a core resource you would need to make any scripts associated with the item a core resource and then any GDAs etc. The problem is that once you put GDAs in a core folder they start affecting every module, not just the ones they're intended for.

Does anyone know?

#2
BryanDerksen

BryanDerksen
  • BioWare Employees
  • 273 messages
The reason items were recommended to be made core resources instead of module-specific resources is because it is possible for the PC to be imported from one module into another one that doesn't necessarily inherit the first module's resources.



So for example, in module 1 the player picks up the item super_sword_1, which is a module-only resource. "super_sword_1" is now in the player's inventory. He saves the game, then switches to module 2 and starts a new game by importing his character from the save he just made. The save says the player's got "super_sword_1" in his inventory, but module 2 has no idea what that is. So the player loses his sword.



The dependancies issue is similar. If you create super_sword_1 as a core resource, but make it depend on a script that's in module_1 to function, when you bring it into module_2 the sword will be present but it won't work because the script it depends on is missing. It'll also cause Builder-to-builder to sometimes fail to deal with super_sword_1 sometimes, since you can't B2B load something that's missing dependencies.

#3
BryanDerksen

BryanDerksen
  • BioWare Employees
  • 273 messages
Actually, it may need to wait for a game patch. None of the DLC content we've released so far has required the ability to import a character, so it wasn't properly tested and I think it might be broken right now. Future DLC will likely require this and I've seen work being done on it to make it work.



In fact, if you'd like a little peek into the potential future, take a look at the module_core script's resource history in the 1.01 database. I had to remove a CHARGEN_IMPORT_HERO event from the script to get it to compile for the current version of the game, it was apparently added since the 1.02 game patch got branched.



(And before everyone wastes a bunch of time database-diving for similar resource histories, that was probably the only interesting thing I had to tweak while building this database. Everything else was pure annoyance. Much of it dependency-related. :)

#4
BryanDerksen

BryanDerksen
  • BioWare Employees
  • 273 messages
Yes, it's safe to have plot items be module-specific. I imagine it would actually be a good idea to have them fail to load if you imported the character into another module, since there might not be any other way to purge them from your inventory.

For packaging up resources for the player to use, use the "Builder to Player" packaging process to create a DAZIP containing all the resources the player will need (both core and non-core). The DA updater program will be able to install everything into the correct places from that. http://social.biowar...ilder_to_player