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

Text colorization

4 posters

Go down

Text colorization Empty Text colorization

Post by Drgnwlkr Tue Nov 08, 2011 9:00 am

For something like a description trigger, do you alter a variable to change the color of the text that is read out?
Drgnwlkr
Drgnwlkr
Seasoned Explorer
Seasoned Explorer

Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30

Back to top Go down

Text colorization Empty Re: Text colorization

Post by Angel of Death Tue Nov 08, 2011 9:56 am

Pretty simple actually...you add a color tag code before and after the text you want colored. Smile
Example:

Code:

<c-P´>[Insert text here--without brackets....unless you want them to show up, of course.]</c-P´>

I believe this is the one I have been using for years to generator my color tags with... Smile
Angel of Death
Angel of Death
Epic Level
Epic Level

Number of posts : 1132
Age : 409
Location : Europe
Main Character : Célestin Chevalier; Knight Champion of Dalix. Protector of the Innocent. Slayer of Evil.
Other Character : Angelique Nightstar; Arcane Archer.
Personal Quote: "The way of the bow is simplicity and beauty combined with power and discipline."
Other Character. : Bruce Li; Wanderer and Practitioner of the Dragon Paw Style. & Cherry; Starchild of Jewel n' Chancetaker of Lysis.
Other Character.. : Anna, Weaver of Illusions. - You can read about all of them following this link to their Biographies! =)
NWN Username : I await You in the End
Time Zone : Central European Timezone
Registration date : 2010-12-11

Back to top Go down

Text colorization Empty Re: Text colorization

Post by The Amethyst Dragon Tue Nov 08, 2011 11:48 am

For a descriptive trigger, I use a script function that allows me to define text color by RGB values. For my own "flavor text" triggers, I have it set to always do white text, although it wouldn't take much to alter the script that fires to use values from new variables on the trigger. The trigger blueprint references the flavor text script, with a string variable preset on it that I can quickly change for the message itself.

The following link is to the include file I use for color text. I don't remember where I got it from (probably the old BioWare forums), as it's been years. You may need to right-click on the link and do something like a "Save Link As...", since it's a NWN script source file (.nss). You can open it in a text editor to copy and paste or you can drop it right into your NWN/modules/temp0 folder while you have your module open in the toolset.

Link: inc_colortext.nss

To use it in a script, I just do an include at the start of my script:
#include "inc_colortext"

Then for the white colored text, I do something like:
SendMessageToPC(oPC, ColorText("message text here", 255, 255, 255));

Or for the red colored text, I do something like:
SendMessageToPC(oPC, ColorText("message text here", 255, 0, 0));

The numbers are in order of Red, Green, and Blue, with values between 0 and 255 (0, 0, 0 = black, 255, 255, 255 = white)

I use Photoshop all the time, so it's really easy for me to find out the RGB value of any exact color I want text to appear as.
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

Text colorization Empty Re: Text colorization

Post by Drgnwlkr Tue Nov 08, 2011 4:26 pm

Thank you both for the great help! I know it must be frustrating to be badgered by questions. I need to learn much more about intricate things =)
Drgnwlkr
Drgnwlkr
Seasoned Explorer
Seasoned Explorer

Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30

Back to top Go down

Text colorization Empty Re: Text colorization

Post by Drgnwlkr Tue Nov 08, 2011 4:32 pm

Another question...heh...to know the resource size of the module I'm building to I go by the actual MB size (7.84) / MB size on disc (10.2) or the number of files (955) in the temp0 properties?
Drgnwlkr
Drgnwlkr
Seasoned Explorer
Seasoned Explorer

Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30

Back to top Go down

Text colorization Empty Re: Text colorization

Post by The Amethyst Dragon Wed Nov 09, 2011 8:54 am

Questions are how we learn. Smile

For NWN modules, the resource size worry is usually one of two limitations:

1st is the "module resources", which is limited to about 16,000 files. These are the ones found in NWN/modules/temp0 when you have you module open in the toolset. Each area in the game contributes 3 files to the total, each script contributes two, each blueprint for an item/creature/merchant/door/trigger/encounter/sound/waypoint adds 1.

Some of these files can be moved into a hak file (when you're pretty sure you don't want to edit their properties anymore). This will keep them available in the module palettes, but out of the "resource count".

2nd is the "palettes limit". If there are too many blueprints for creatures, items, etc. in the module's palettes (both in the module itself (aka temp0 folder when open in the toolset) and via hak), DMs will not be able to log into the game without crashing. This limit is also around 16,000 I think.

As far as the module's actual file size when saved, that doesn't matter so much. Aenea's module file is currently 101 MB. Smile This doesn't count haks of course, just the module file itself.
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

Text colorization Empty Re: Text colorization

Post by Drgnwlkr Wed Nov 09, 2011 3:10 pm

Thank you The Amethyst Dragon, for explaining this in such detail. I actually understand it and see where one could try to cut back on resource count, somewhat. If I'm not mistaken, using the 'doors' for transitions like you have in the Vale actually cuts back 1 file from the tradition area transition since the door uses no waypoints, correct? I had heard that the size of an area doesn't add to the file count and I believe you say as much. I've learned it is far better to create a NPC/Mob in the palette then spawn them through standard encounters. With that thought, would the resource count fluctuate as players are on due to spawns and such?

The files that can be moved into haks would be those like .nss and such which are fixed as to their use or after they are altered?

I am glad to know that I am far from the resource limit and now can watch (micromanage) myself better. Honestly, thank you =)
Drgnwlkr
Drgnwlkr
Seasoned Explorer
Seasoned Explorer

Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30

Back to top Go down

Text colorization Empty Re: Text colorization

Post by RustyDios Wed Nov 09, 2011 4:41 pm

.... And with that in mind .... just imagine how much "stuff" was in Aenea approx 6months ago when it was "nearing" the limit ....

Not that The Amethyst Dragon has cut anything, oh no, our esteemed leader found "better" ways of adding things to the game, cut-out tons of unnecessary OC content, improved on at least 50% of his original scripting, and implemented a better spawn system (for both monster encounters and loot).... as well as other stuff I can't even think about or fathom...

And keep asking your questions Drgnwlkr, I'm sure everyone reading these threads is also learning a wealth of useful information too.. like me... Smile
RustyDios
RustyDios
High Epic Level
High Epic Level

Male Number of posts : 2271
Age : 39
Location : England // Getting lost in Aenea
Main Character : Jay Braysin, The Wandering Shadow, Protector of Nektaria, Talon's Eternal Foe
Other Character : Shouri Braysin, The Shimmerstar's Moonlight Sorceress
Other Character. : Grace Fularras, Walking Library , Cleric of Mystara
Other Character.. : See my sig ... And here too ...
NWN Username : RustyDios
Time Zone : GMT (England, DST)
. : Text colorization Forum_donor
Registration date : 2008-07-28

Back to top Go down

Text colorization Empty Re: Text colorization

Post by Drgnwlkr Wed Nov 09, 2011 4:57 pm

Thanks Rusty, I'm in the process of creating a module with a few friends and that's the basis of my asking so much. Illiterate is a mind statement to surmise my understanding of scripting, variables and all the background aspects of NWN. Our project isn't to contest others like Aenea...far be it that we could ever achieve the prowess of The Amethyst Dragon! I've been gaming since 1998 and just to witness the visuals of realms and events that I've imagined is awesome to me. That alone was the cornerstone to my love of NWN and then I stumbled into the craftiness of The Amethyst Dragon and Lord of Worms and got my mind blown Laughing So, to shorten this novelette...I probably will drive The Amethyst Dragon crazy with question (hopes not but knows its possible).
Drgnwlkr
Drgnwlkr
Seasoned Explorer
Seasoned Explorer

Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30

Back to top Go down

Text colorization Empty Re: Text colorization

Post by The Amethyst Dragon Wed Nov 09, 2011 6:15 pm

Drgnwlkr wrote:Thank you Text colorization 787378, for explaining this in such detail. I actually understand it and see where one could try to cut back on resource count, somewhat. If I'm not mistaken, using the 'doors' for transitions like you have in the Vale actually cuts back 1 file from the tradition area transition since the door uses no waypoints, correct? I had heard that the size of an area doesn't add to the file count and I believe you say as much. I've learned it is far better to create a NPC/Mob in the palette then spawn them through standard encounters. With that thought, would the resource count fluctuate as players are on due to spawns and such?

The files that can be moved into haks would be those like .nss and such which are fixed as to their use or after they are altered?

I am glad to know that I am far from the resource limit and now can watch (micromanage) myself better. Honestly, thank you =)

The use of regular area transitions (which end up targeting an auto-generated waypoint when you do a "Setup Area Transition" in the trigger properties) doesn't add to the module resource total. It's not creating new trigger or waypoint blueprints. It might add an extra couple of bits to the module file size, but not to the resource count.

Using the doors like I did with the Vale was really just an experiment. It's actually a pain to do, as it requires arranging tiles to do a road through trees, manually move the door out of the location it appears in, remove the road-into-trees tiles, manually move the door to the final position, then link it to another door or transition.

Creating a new creature in the palette is creating a new blueprint, which does add another resource to the count. Any item in that creature's inventory that are edited from the originals in the palette also adds another resource to the count (an item blueprint). So some creatures, with multiple customized items (say armor, helmet, shield, sword, and cloak), actually add multiple resources to the file count (six for this example). If a creature is instead placed in an area, then totally modified, and using items modified from existing ones, it add no resources to the module count (since no new blueprints are created and added to the palettes)...it just takes specialized scripting to spawn such creatures in encounters (using CopyObject in a script instead of using a standard encounter trigger). 99% of the creatures I make now go this route, where I place basic creatures in an "NPC holding area", customize them as I wish (stats, feats/skills, spells, appearance, class, items, etc.), then use Sparky spawner code to copy them into areas for PCs to encounter.

Files that can be moved into a hak are blueprints (.utc, .uti, .utp, etc.) and script files (.nss and .ncs). Once in a hak you can't alter them in the toolset though, so you'll need to move them back out and into the module resources folder (modules/temp0) if you want to make any changes later.
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

Text colorization Empty Re: Text colorization

Post by Drgnwlkr Wed Nov 09, 2011 6:27 pm

And once again...you're a genius! I haven't looked at that spawner and perhaps I should before I get too far into this project? Yes, making the transitions like yours in the Vale is tedious but I really like them and find, as a player, they are much easier to use. I have been on a server as DM and had a new player make comment about the builders of that module, that they needed to follow some guideline I've not heard of and make all the transitions run the full range of the 'open' side of the area they were on or make them be a road/trail through trees or such. I found that kind of offensive for a player new to the server critiquing the builders and silly to expect a rebuild just for him, heheh.
Drgnwlkr
Drgnwlkr
Seasoned Explorer
Seasoned Explorer

Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30

Back to top Go down

Text colorization Empty Re: Text colorization

Post by Drgnwlkr Wed Nov 09, 2011 11:20 pm

I forgot to mention what using your door technique helped me with... in Worms' Fantasy Interiors there are stairs up and down for the Haunted House tileset that have doorways which do not 'take' doors like normal. After learning that you can precisely fine tune anything that you can adjust the location of from using your door technique, my problems with those stairways dissolved away... so, I am learning a lot and thank each and everyone of you that help me!
Drgnwlkr
Drgnwlkr
Seasoned Explorer
Seasoned Explorer

Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30

Back to top Go down

Text colorization Empty Re: Text colorization

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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