The wiki doesn't seem to be working at the moment, so I'm going to post this question here.
How do you go about adding a codex entry along with a custom item? I'm figuring out how to create the codex entry on my own, but I 'm not quite sure how I would add the entry to the player's journal in-game.
Up until this point, I've been adding the bit of plot with the item to the description. I would prefer to have it in a separate entry, that way it does not clog up the item for those who don't care about the story, but still has a place for those who do.
So, I'm mostly curious if someone knows a script for adding a codex entry, in the same way that one adds an item to the inventory? Or if anyone has more info on custom codex enties in general, since my knowledge is limited to what I've experimented with.
Adding codex entries with custom items
Débuté par
crimsoncobra57
, nov. 15 2009 08:54
#1
Posté 15 novembre 2009 - 08:54
#2
Posté 25 novembre 2009 - 08:14
I would like to know this as well. How do I unlock a codex entry under a specific condition?
#3
Posté 26 novembre 2009 - 12:08
Well its quite simple - create a plot and set it to Codex. (in the Object Inspector)
Create a Flag, set the description.
Then set the Plot-Flag to True in your script and voila a Codex Entry pops up.
Create a Flag, set the description.
Then set the Plot-Flag to True in your script and voila a Codex Entry pops up.
#4
Posté 28 novembre 2009 - 01:05
It didn't work for me, maybe you can tell me, what's wrong with my script. It compiled correctly, but the codex entry didn't show up.
I tried to get codex 77 (An explanation of the Fade and its relation to dreams) to show up:
//// ---------- Script Starts Here ----------
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "plt_cod_mgc_fade"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_MODULE_LOAD:
{
WR_SetPlotFlag( PLT_COD_MGC_FADE, COD_MGC_FADE, TRUE );
}
break;
}
}
// ---------- Script Ends Here ----------
I tried to get codex 77 (An explanation of the Fade and its relation to dreams) to show up:
//// ---------- Script Starts Here ----------
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "plt_cod_mgc_fade"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_MODULE_LOAD:
{
WR_SetPlotFlag( PLT_COD_MGC_FADE, COD_MGC_FADE, TRUE );
}
break;
}
}
// ---------- Script Ends Here ----------
#5
Posté 29 novembre 2009 - 11:17
Update:
The script seems to work, if you don't delete the .plt file in the override folder of the toolset.
But why isn't it working without it? The files are part of the game and if I don't delete them out of the override folder, other codex entries are missing after running the script.
Also the added entry is in English and not in the language, the game has been installed in.
Does somebody know a solution for this problem?
The script seems to work, if you don't delete the .plt file in the override folder of the toolset.
But why isn't it working without it? The files are part of the game and if I don't delete them out of the override folder, other codex entries are missing after running the script.
Also the added entry is in English and not in the language, the game has been installed in.
Does somebody know a solution for this problem?
#6
Posté 21 décembre 2009 - 12:44
Another Update:
With the new toolset version the script works fine.;-)
With the new toolset version the script works fine.;-)





Retour en haut






