For some reason, background is a property of pre-generated characters.
So, in a standalone campaign with custom backgrounds, it doesn't make sense to use existing characters made for the OC (indeed, in my experience, it crashes the game).
Is there any workaround for this? I'm sure many players will want to use their favourite characters in standalone campaigns.
Any way to use a pre-generated character with a custom background?
Débuté par
Proleric
, oct. 06 2010 08:00
#1
Posté 06 octobre 2010 - 08:00
#2
Posté 06 octobre 2010 - 10:49
I'm not sure; I know Bioware had a way of triggering the chargen functions if you imported a character created in the stand alone character creator, but I don't know if that functionality is available to us.
#3
Posté 06 octobre 2010 - 01:38
I found the germ of a solution. If you set the nImportEnabled parameter of StartCharGen, it enables importing a character from a saved game, and disables using a pre-generated character (hence preventing the crash).
I'm going to play around with EVENT_TYPE_CHARGEN_IMPORT_HERO to see if I can set the background, reset to level 1 and clear the inventory.
I'm going to play around with EVENT_TYPE_CHARGEN_IMPORT_HERO to see if I can set the background, reset to level 1 and clear the inventory.
#4
Posté 06 octobre 2010 - 02:36
Well, that was easier than I thought.
Fortunately, my module only has one background.
For reasons of balance, I want the imported character to revert to level 1.
The following snippet in the module script achieves this:
Fortunately, my module only has one background.
For reasons of balance, I want the imported character to revert to level 1.
The following snippet in the module script achieves this:
In effect, this enforces a Quickstart, so I might allow the character build to be imported as is if it's still at level 1.[dascript]
case EVENT_TYPE_CHARGEN_IMPORT_HERO:
{
object oHero = GetHero();
int nGender = GetCreatureGender(oHero);
int nRace = GetCreatureRacialType(oHero);
int nclass = GetCreatureCoreclass(oHero);
int nBackground = BACKGROUND_FOUNDLING;
int nEquipIndex = Chargen_GetEquipIndex(nRace, nclass, nBackground);
Chargen_InitializeCharacter(oHero);
Chargen_SelectGender (oHero, nGender);
Chargen_SelectRace (oHero, nRace);
Chargen_SelectCoreclass (oHero, nclass);
Chargen_SelectBackground(oHero, nBackground);
Chargen_InitInventory (oHero, nclass, nEquipIndex);
SetCreatureMoney(0, oHero);
}
[/dascript]
Modifié par Proleric1, 06 octobre 2010 - 02:37 .





Retour en haut







