Would you like to react to this message? Create an account in a few clicks or log in to continue.

Not Used: Battlefield Journal

2 posters

Go down

Not Used: Battlefield Journal Empty Not Used: Battlefield Journal

Post by buddha5442a Wed Feb 02, 2011 3:44 pm

Would it be possible for the journal to be alphabetized when you use it? Or sorted by category of creature (ie. Humanoid, beast, construct, etc)?
buddha5442a
buddha5442a
Player with Too Much Time
Player with Too Much Time

Male Number of posts : 99
Age : 47
Location : Ohio, US
Main Character : Vistaran Tul'Motek
Other Character : Arianna Winnstrom
NWN Username : buddha5442
Time Zone : EST (GMT -5:00)
Registration date : 2010-12-26

Back to top Go down

Not Used: Battlefield Journal Empty Re: Not Used: Battlefield Journal

Post by The Amethyst Dragon Wed Feb 02, 2011 5:54 pm

Think of it like a list on a piece of paper that you are keeping, written in ink. You can't just shuffle items around as if it were a computer screen (or even as if it were pencil).


[warning: game mechanics heavy section]

Mechanics wise, it would take way too much scripting and processing power to alphabetize all the entries that you (will) end up with. The entries are recorded on the book itself with a database number, starting with 1 and ending with whatever the newest type of monster slain was. As you slay more types of enemies, that number gets incremented and used for storing both the number killed and the text of the critter's name.

Example:
variable: kk_1 (integer) "12"
variable: kk_1 (string) "Goblin"
variable: kk_2 (integer) "3"
variable: kk_2 (string) "Rabid Mouse"

What happened here is the PC first killed one or more goblins. Since this was the first kill, it was assigned to spot 1, and the name recorded as a string with the same variable name. Later, the same PC killed a rabid mouse. Since that was the 2nd type of enemy killed, it was assigned to spot 2 and the name recorded.

The script does zip through the existing entries to check for a matching name string. If it finds one, it increments the integer stored with the same variable name (you can have multiple types of variables that share a name, they just have to be different types). If it doesn't find one, it creates a new variable name, based off the value of the last existing ones.

If the next critter killed by our example PC was another rabid mouse, the integer value for kk_2 would increase by 1. If it was a kobold, a new entry would be made with the variable name "kk_3", recording an integer value of 1 and a string value of "Kobold".

And thus ends today's abbreviated lesson on rudimentary variable use in NWN. If you're not confused, congratulations. If you are confused by this, don't worry about it, the book just works. Smile
The Amethyst Dragon
The Amethyst Dragon
Ludicrous Level
Ludicrous Level

. : Creator of Aenea / Dungeon Master
Male Number of posts : 7840
Age : 48
Location : probably on the computer or wrangling his offspring
NWN Username : amethystdragon
DM Name : The Amethyst Dragon
Time Zone : GMT - 6:00 (Wisconsin)
Registration date : 2008-06-02

https://www.amethyst-dragon.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum