Aller au contenu

Photo

Can you color text in names and descriptions?


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

#1
JJM152

JJM152
  • Members
  • 301 messages
I just tried the old NWN and NWN2 ways of doing this in the new DA toolset and both came up bust.

Is there an approved way of doing this?

Thanks

#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
This is likely another dead end, but you could always play with the markup in dialog_tags.xls and see if  basefont works.

Modifié par Craig Graff, 13 décembre 2009 - 09:24 .


#3
JJM152

JJM152
  • Members
  • 301 messages

Craig Graff wrote...

This is likely another dead end, but you could always play with the markup in dialog_tags.xls and see if  basefont works.


Yeah I think that's probably a no go. Someone mentioned that the console version of the game does provide colorization of the item names however. Is that true? I wonder how they did that...

#4
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Ultimately, I believe stuff in the GUI is coloured using HTML like [font color='#ff0000']red[/font]. But as we've seen before, there seems to be somewhere that's breaking down if you try to put that in your item description. Maybe the dialog_tags could be used to fix that, or maybe it'll require more work elsewhere.

I mean, if you look at inventory tooltips, it's not all monochrome.

Modifié par FollowTheGourd, 13 décembre 2009 - 03:12 .


#5
Craig Graff

Craig Graff
  • Members
  • 608 messages
Most colored messages are either set in script (for floaty text) or are specified in a 2da such as ui_messages.xls. I'm just not sure where all of them are, personally.

#6
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Based off what others were looking for in the past, I'm taking it that JJM152 wants to have coloured text in item descriptions (say in the inventory tooltip or the description popup from the radial menu). I think it might be useful if people could say *exactly* where they're looking in the UI, though. Presuming this is all about items to begin with...

For floaty messages, I guess it's setting the textColor property of the Flash object based on the colour argument it got passed in; it looks that way in the ActionScript. Didn't really trace it, but I don't think that's using HTML text.

Actually, for inventory descriptions I'm going to test something out. Deleted what I originally wrote...

Update: OK, it works and it doesn't - at least don't bother trying to colour the item's name with font tags as you'll see. I also shortened the name because of the toolset's length restriction, but it doesn't really matter...


Posted Image


Posted Image



Posted Image

So close... but a GUI mod could fix that, but you don't have enough space to update the name in the toolset anyway, so probably no point. Edit: Not without maybe extending the tags we could use to map to that (maybe the 2DAs are enough to do that?) But *if* there's no other way already there to let you colour the name, it might be possible to create a GUI mod that just automatically colours it based on whatever rules or a custom 2DA matching item tags with colours...

Posted Image

Modifié par FollowTheGourd, 15 décembre 2009 - 03:27 .


#7
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Just to add to what I wrote about the last image... the item-name header in the inspection popup is indeed never coloured by anything in the GUI file. Not through HTML and not through the textColor property.

The reason I keep looking there is because it's easier to see what will eventually happen anyway, even if we found the "right" tags or functions to use. It's in the LoadDetails() function for the ActionScript (not DAScript) in the GUI file itemexamine.gfx. I modified the relevant line to colour it red just to confirm I was looking in the right spot.

Modifié par FollowTheGourd, 15 décembre 2009 - 04:15 .


#8
JJM152

JJM152
  • Members
  • 301 messages
Hey Gourd, sorry for not replying to this thread earlier (I was absorbed in work), but I had already figured out the same thing you did. Which is why I said it was a no go.



I guess I should have elaborated :o



I also found some strange behavior on SetName(o,s) -



Essentially some items are ignoring my calls to this... I assume it's some kerfluffle with the localized name string, but alas I'm at work and can't investigate it right now.


#9
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Hey JJM152,

If you wanted, I could try to elaborate on why it isn't working... at least from the end I'm looking at it. Basically it comes down to "because they didn't make it use HTML or look for a colour argument". It is possible to mod the GUI to change all that, but personally it might be good to make a more generic version so we don't have a ton of incompatible GUI mods.

I'm also trying to put some of this information on the wiki. I started some scaffolding on it so I'd try to preserve GUI stuff there instead of casting it off into the winds of the forum.

Edit: To clarify, SetName I couldn't be sure about off-hand...

Modifié par FollowTheGourd, 15 décembre 2009 - 03:52 .


#10
JJM152

JJM152
  • Members
  • 301 messages

FollowTheGourd wrote...

Hey JJM152,

If you wanted, I could try to elaborate on why it isn't working... at least from the end I'm looking at it. Basically it comes down to "because they didn't make it use HTML or look for a colour argument".

I'm also trying to put some of this information on the wiki. I started some GUI scaffolding there so I'd try to preserve GUI stuff there instead of casting it off into the winds of the forum.


No need sir, I get it. It would be nice however if we could put in some sort of request to have this fixed. It appears to me that it would be simple enough to run that string through whatever lexical process that the description goes through as well - if for nothing else, but uniformities sake.

The wiki thing sounds like a good idea. The GUI stuff is certainly going to be pretty esoteric though :)

#11
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Yep, I caught myself replying to something I thought you wrote... somehow disassociated it from the SetName part in between.

Actually, before I forget: is there any designer tag you could use to colour stuff? I don't think there is, so we'd probably need to see if we could define (extend) our own in the 2DAs and have the game pick up on those. It's just something that would probably be extra in all of it, even if BioWare chose to do it for us.

Using font tags is all well and good for the item description, but there's hardly enough space in the item name to do it - the toolset restricts the length of the field. Hence something like <red>UberawesomeItem</red> might be good.

Everywhere else in the GUI that stuff gets coloured, it doesn't seem to have gotten from the descriptive text, so much as from elsewhere based on the context.

Modifié par FollowTheGourd, 15 décembre 2009 - 04:04 .