Author Topic: Persistant Map Notes?  (Read 659 times)

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
Persistant Map Notes?
« on: December 03, 2010, 10:19:20 am »


               Hi all,

I hope you all had a nice Thanksgiving. ':wizard:'

So, here's my question. Is it possible for map notes to be persistant through restarts using only the regular nwn database? I'm not using any other databases because *sheepish* I just can't figure them out. '<img'>

What I mean by persistant map notes, what I want is for players to be able to put a map note on their map once they find a place they want to mark which wouldn't get wiped out with restarts.

Thank you for any help. :happy:
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Persistant Map Notes?
« Reply #1 on: December 03, 2010, 11:02:21 am »


               http://nwn.wikia.com/wiki/Map_pin
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Persistant Map Notes?
« Reply #2 on: December 03, 2010, 11:11:22 am »


               NOTE - Ignore most of this post - the above post was more informative.

Im not too sure on the topic of player created map notes.
What I do know about generic mapnotes however, is that the map note is either
enabled, or disabled to all players.

If you are planning on making a system that allows players to place persistent map notes, then it is potentially do-able, but I suspect it would need the help of a nwnx plugin.


1. Create the mapnote template / resref in toolset.
2. Allow the players to spawn it at a location - store its location persistently.
3. NWNX would undoubtably be needed to change the map note text of the placed map note. I dont think nwnscript allows this by default.
4. In order to make it persistent, make the onModLoad event load all the Map Note data stored in the database, and spawn the notes at the relevant locations.


eg - Data needed to be stored.
1. Location
2. Text

How to link these?
Via the variable name, eg
PER_MAP_TEXT_#
PER_MAP_LOC_#

Where # is a number equating to the number of the map note spawned.


then, the onLoad event would iterate through all of these - but be warned, Bioware db operations are SLOW.

int iNum = 1;
location lLoc;
string sText = GetCampaignString("MAP_PINS","PER_MAP_TEXT_"+IntToString(iNum));
while(sText != "")
{
lLoc = GetCampaignLocation("MAP_PINS","PER_MAP_LOC_"+IntToString(iNum));
CreateObject() //This is the place where your map pins get created - eg - set the location to be lLoc, and then use nwnx or a plugin from nwnx if one exists, to change hte map pin text to sText
iNum++
sText = GetCampaignString("MAP_PINS","PER_MAP_TEXT_"+IntToString(iNum));
}
               
               

               


                     Modifié par Baaleos, 03 décembre 2010 - 11:13 .
                     
                  


            

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
Persistant Map Notes?
« Reply #3 on: December 03, 2010, 11:12:29 am »


               Thank you, sweeties. '<img'> *hugs*
               
               

               


                     Modifié par archer4217, 03 décembre 2010 - 11:13 .
                     
                  


            

Legacy_Tyndrel

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +0/-0
Persistant Map Notes?
« Reply #4 on: December 03, 2010, 05:07:50 pm »


               There are two systems available on the NwVault that do this...

Persistent / Editable Player Map Pins  by Jassper

and

Persistent Map Notes  by C. A. Schops

'<img'>
               
               

               
            

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
Persistant Map Notes?
« Reply #5 on: December 05, 2010, 01:50:01 pm »


               Thank you, sweetie '<img'> *hug*