Aller au contenu

Photo

Adding codex entries with custom items


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

#1
crimsoncobra57

crimsoncobra57
  • Members
  • 312 messages
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.

#2
Shard of Truth

Shard of Truth
  • Members
  • 105 messages
I would like to know this as well. How do I unlock a codex entry under a specific condition?

#3
AND04

AND04
  • Members
  • 154 messages
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.


#4
Shard of Truth

Shard of Truth
  • Members
  • 105 messages
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 ----------

#5
Shard of Truth

Shard of Truth
  • Members
  • 105 messages
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?

#6
Shard of Truth

Shard of Truth
  • Members
  • 105 messages
Another Update:



With the new toolset version the script works fine.;-)