Aller au contenu

Photo

Player Character Selection for created modules?


10 réponses à ce sujet

#1
ixobelle

ixobelle
  • Members
  • 109 messages
Where can I either make a character associated with my new module, or choose to use my existing character from the single player campaign (first choice would be best).

in NWN after chhosing the module to play, we chose the character to use. In my mdule, following the tutorials in the wiki, I've created enemies that are 'critter' difficulty, but they one shot my default character ("Jaden"?), even if I give him heavy armor and a battleaxe. 

I'd like to be able to create a PC that gets tied to the module, but I can't seem to see how to do this. I created a new character, and added it to the "_PC" group, thinking that would do it, but no luck.

Any help?

#2
Adinos

Adinos
  • Members
  • 341 messages
You can do various things in the character creation script - go through the same steps as in the game itself - rewrite it to give different origin choices - force the player to play a specific character, or even make the character play as a nug, if that's what you prefer.



There should be a "how-to" document on this somewhere - did you search the wiki?

#3
CID-78

CID-78
  • Members
  • 1 124 messages
http://social.biowar...cter_generation or if you want to write your own check the "chargen" events.

#4
ixobelle

ixobelle
  • Members
  • 109 messages
yeah, i've checked the wiki. I've spent a bunch of time following step by step instructions, but can't complete the quest it teaches me how to make, since my character gets one shotted.

#5
ixobelle

ixobelle
  • Members
  • 109 messages
CID-78, you put that as I was typing my response to Adinos. Looks perfect, thanks.



I'll need to dig deeper into the wiki, I guess, I didn't see that. Maybe I'll edit the main tutorial list to include that one, it seems pretty important.

#6
ixobelle

ixobelle
  • Members
  • 109 messages
 okay, so I wrote what looks to be the script:

#include "events_h"#include "global_objects_h"#include "sys_rewards_h"
void main(){    event ev = GetCurrentEvent();    int nEventType = GetEventType(ev); //extract event type from current event    int nEventHandled = FALSE; //keep track of whether the event has been handled     const int FORCE_AUTOLEVEL = 2;    switch(nEventType)    {         case EVENT_TYPE_MODULE_START:         {            PreloadCharGen(); //preloads resources needed for character generation            StartCharGen(GetHero(),0); //initiates character generation              object oHero = GetHero();
            // Make character level 10            int nTargetLevel = 10;            RewardXP(oHero, RW_GetXPNeededForLevel(nTargetLevel), FALSE, FALSE);            SetAutoLevelUp(oHero, FORCE_AUTOLEVEL);            break;         }    }    if (!nEventHandled) //If this event wasn't handled by this script, let the core script try    {        HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);    }}  

but the wiki page says "use the following script as the module event script", but going to file > manage modules > properties doesn't have an area to indicate this script should be run. I opened the variables ellipsis but still can't seem to find where to indicate that this script should run on launch.

#7
ixobelle

ixobelle
  • Members
  • 109 messages
yeah these forums are horrible in their implementation.

Modifié par ixobelle, 07 novembre 2009 - 07:37 .


#8
ixobelle

ixobelle
  • Members
  • 109 messages
i edited that post, and it made a double post. these forums are awful.

#9
BryanDerksen

BryanDerksen
  • BioWare Employees
  • 273 messages
In the module properties inspector there should be a field named "Script", whose value defaults to module_core for new modules. This is where you specify the module's event-handling script. Event handling scripts are run whenever an event is sent to the object, and in the module's case it is sent the event "EVENT_TYPE_MODULE_START" when the module starts up so that's where you'll want to handle any startup stuff like this.



The variables property is where you can set the starting values for the module's local variables, which can be referred to by scripts later on. http://social.biowar.../Local_variable has some information on how local variables work in DA.

#10
ixobelle

ixobelle
  • Members
  • 109 messages
thanks, I'll dig deeper.

#11
ixobelle

ixobelle
  • Members
  • 109 messages
got it, using the first script on CID-78's link. It allows you to select a previously created character, and at least let's me live long enough to kill a few things.



thanks guys. If any mods take another peek in here, feel free to delete my above responses. I honestly can't edit them, or doing so seems to have no effect.