logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Journal

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Wart



Joined: 13 Jun 2012
Posts: 45

PostPosted: Fri Aug 03, 2012 3:12    Post subject: Journal Reply with quote

One thing that cannot be altered by a script is the journal.

I can save it, make it persistent but i cannot alter the text of a journal entry with a script.

Is it possibile to write a nwnx plugin that solves this problem?


P.S
Using a custom system is not acceptable for me, i really like the NWN Journal Interface. It is something i do not want to give up.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Aug 03, 2012 9:25    Post subject: Reply with quote

As far as I know, you can use <CUSTOM*> tokens in journal entries.
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Aug 05, 2012 1:58    Post subject: to elaborate Reply with quote

To Elaborate on virusman's idea:

If you set your journal entries to have the text of
<CUSTOM554321>

and then in a script, call
SetCustomToken(554321,"This is a piece of text");

Then view the journal,
It will say 'This is a piece of text'

You can then change it - whenever you want via SetCustomToken

However- the limitation of this, is that the custom token is shared across all players, meaning you cannot make it customized per player easilly.

There is the possibility of hooking onto the nwn event for Journal Opening
(I managed to get this working once before - a year or so ago)
Basically fires an event, when the player opens the journal.

If you or someone fluent in c++ code were up for it, I would recommend adding a new event to nwnx_kewl or nwnx_cool
One that handles Journal Opening.

Once you have a journal event setup, you can script it so that onPlayerOpenJournal - customize journal entries for that player.

(in theory)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group