Aller au contenu

Photo

Putting character generation in


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
W1taker

W1taker
  • Members
  • 70 messages
Hey everyone,
first time modding and learning teh DA:O toolset is freakin complicated.

Im trying to figure out how to put character generation at the beginning of my module, i know i have to do something with this script, well code really
_______________________________________________________________________________________

#include "events_h"
#include "global_objects_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
switch(nEventType)
{
case EVENT_TYPE_MODULE_START:
{
PreloadCharGen(); //preloads resources needed for character generation
StartCharGen(GetHero(),0); //initiates character generation
break;
}
}
if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE

}
}
_________________________________________________________________________________
But i don't know where to put it or what type of file it needs to be.

Can anyone help me out?

Modifié par W1taker, 10 novembre 2009 - 06:57 .


#2
defster75

defster75
  • Members
  • 13 messages
Create a new resource of type Script. Give it a proper tag, like "script_chargen" or something. Paste the script above into it.

Go to Manage Modules, select your module and then "properties". In the "Script" field, type the tag of your script (script_chargen), and export. This means the script will be fired every time the module starts.

Taken from: http://social.biowar...cter_generation

Modifié par defster75, 10 novembre 2009 - 09:21 .


#3
W1taker

W1taker
  • Members
  • 70 messages
Thanks for this, i looked at the wiki but it didn't explain creating a script, and its much easier to understand in Lamens terms.



The code looks like C right? or is it C++

#4
W1taker

W1taker
  • Members
  • 70 messages
Another quick question, i have created the script, but when i go into the properties of my module. The script field it will only allow me too go open one from the folders, and i can't seem to find the one that i have saved, does it go into a default folder?

#5
st4rdog

st4rdog
  • Members
  • 104 messages
That script won't compile for me. Are you sure you didn't get a red X when saving?

#6
Deira

Deira
  • Members
  • 3 messages
In the last command line

HandleEvent ...

there is a ); missing at the end of the line... Then it should work fine.

#7
Belhene

Belhene
  • Members
  • 19 messages
Hi, I've just started with the tool (I'm not very handy regarding scripting).
I'm using this script to load the character creation at the beginning of my standalone module. It works fine, but the things is that in the character creation screen, the character appears completely black.
If I "blindly" design the character, in the module he/she appears perfectly fine.
In my normal Origins or DLCs games, the char creation works just fine.
Someone who can help me out?

Modifié par Belhene, 10 septembre 2010 - 05:44 .