I'm working through the tutorials and am having trouble affecting the level of my PC.
As per : social.bioware.com/wiki/datoolset/index.php/Character_generation I've added the following script and assigned it to my modules.Script property:-
// [additional includes goes here]
#include "sys_rewards_h"
const int FORCE_AUTOLEVEL = 2;
void main()
{
// keep track of whether the event has been handled
int nEventHandled = FALSE;
event ev = GetCurrentEvent();
switch(GetEventType(ev))
{
case EVENT_TYPE_MODULE_START:
{
object oHero = GetHero();
// [chargen code goes here]
// auto-level the player to level 10
RewardXP(oHero, RW_GetXPNeededForLevel(10), FALSE, FALSE);
SetAutoLevelUp(oHero, FORCE_AUTOLEVEL);
break;
}
}
// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}
A character is created albiet a level 1 character. Any ideas how make it a level 10 character as the script suggests?
Regards
Paul
Changing the starting level of a PC
Débuté par
Halchek
, déc. 07 2009 10:19
#1
Posté 07 décembre 2009 - 10:19
#2
Posté 07 décembre 2009 - 10:31
I've found the problem, I really must save script changes before exporting the module overwise they're not included.
Spoilt by Visual Studio I guess but is there a reason why the module isn't saved when you do an export?
Spoilt by Visual Studio I guess but is there a reason why the module isn't saved when you do an export?
#3
Posté 07 décembre 2009 - 11:37
There is a save-all function right on the UI if you did not see it. I think that what you are talking about?
#4
Posté 08 décembre 2009 - 10:08
Yeah I saw that and I usually chain spam ctrl+s when I'm working only for some reason not last night and it caused me a few problems.
Most of the development enivronments I've worked with in the past have automatically saved changes prior to compilation, I was merely curious as to why the toolset doesn't do similar. Perhaps it should and perhaps there is a reason why it doesn't.
More likely, perhaps I'm spoilt and should live with it.
Most of the development enivronments I've worked with in the past have automatically saved changes prior to compilation, I was merely curious as to why the toolset doesn't do similar. Perhaps it should and perhaps there is a reason why it doesn't.
More likely, perhaps I'm spoilt and should live with it.





Retour en haut






