PDA

View Full Version : FG1.5 Colored Text Question



Sacman
January 18th, 2008, 06:57
In the effort to create an Iron Kingdoms ruleset, I want to add the IK equipment to the existing D20 list. However, I want to specify the ones that are IK specific by changing the font color.

I have created the new font with no issue.
I can change the font of the all of the list items by changing the reference.xml file as follows

<font normal="bluefont" bold="narratorfont" italic="chatitalicfont" bolditalic="chatbolditalicfont" title="titlefont" />

This works to change all normal font on the page to blue.

This is not what I want to do. So how do I change only one part of a table or paragraph or header field to a specific color.

I have tried to add <font normal = "bluetext" /> before the text that I want to change but that didn't work. I have tried more options but none of them work. Interestingly enough it didn't kick an error either. It did appear to put an extra space in front of the text though.

I have spent the last three hours trolling the boards looking for an answer but most posts only talk about how to get the new font. I have done that I need help at the next level.

Thanks,

Wade

Oberoten
January 18th, 2008, 09:45
The fonts in FG are Bitmaps. This means that you will have to define new fonts in the bmpfonts.xml file.

There is a tool called FGfontgenerator.exe available at the forums.
Basically it will let you make new fgf files which you can then link in as a different color and call up in various controls in FG with the font tag

Sacman
January 18th, 2008, 15:43
The fonts in FG are Bitmaps. This means that you will have to define new fonts in the bmpfonts.xml file.

There is a tool called FGfontgenerator.exe available at the forums.
Basically it will let you make new fgf files which you can then link in as a different color and call up in various controls in FG with the font tag

Clearly you didn't read my full post.

I have done everything necessary to create the new font. The bmpfonts.xml file is in my custom ruleset folderand it is correctly referenced in the base.xml file. I have successfully used the font in the custom ruleset but not the way I need to. The question is more specific.

I do not want to change the all of a given font type on a form, I want to change only specific parts of the font.

For example. On the equipment list, if I change the normal font to my bluefont, all of the equipment information changes to the bluefont since it is all non-bold and non-italic. I don't want this to happen so I leave the normal font set to the standard chatfont.

On the equipment.xml page, I need to be able to change the equipment name to another color for specific items that relate only to the IK (Iron Kingdoms). There are a lot of custom items in the IK and want to be able to easily identify them.

So the final table would have all of the standard D20 equipment listed as it normally is. All of the IK equipment will have the equipment name in blue but the rest of the stats in normal font. Like so:

Small Weapons Cost etc....
Unarmed Attacks
Bronze Gauntlet 2gp
Unarmed Strike _
Glove, Clawed 12gp


I hope this makes more sense. This should be easy to do but I have tried everything I can think of.

Thanks again,

Wade

joshuha
January 18th, 2008, 15:53
I am not sure if this is possible in 1.5. It is in 2.0 with a simple LUA script command but obviously since you are using IH that ruleset isn't out for FG2 yet.

The only thing I can think of organizationally is to have 2 seperate lists and if you still wanted could color everything in the second list.

Sacman
January 18th, 2008, 15:55
Okay, for anyone interested, I cheated but I solved my immediate problem. This is not the best fix but it worked for me for now.

In the reference.xml file for the equipment form, there are five font types called out as indicated below.

<font normal="chatfont" bold="narratorfont" italic="chatitalicfont" bolditalic="chatbolditalicfont" title="titlefont" />

I looked at the layout in FG and there are no fields in this particular form that are bold and italic. So I changed the bolditalic to my bluefont.

Now in the equipment.xml file, I merely have to use the following:

<b><i>Glove, Clawed</i></b>

for anything that I want to use my blue font.

Although this worked, this is clearly not the best way to do this.

Is there a way to specifiy a new font requirement? For example, where does the 'title' designation come from. It appears to be used for anything that is a header as in <h>Simple Weapons</h>.

How was this setup? If I could specify a new one such as blue = "bluefont" and use something like <bl>Glove, clawed</bl>, this would be a much better solution. This would also allow me to callout other fonts in a document. For example a red = "redfont" and use <rd>Gove, reinforced</rd> would let me specify a red font.

Thanks again,

Wade

Sacman
January 18th, 2008, 16:34
This is what I was going for:

Toadwart
January 21st, 2008, 21:58
Okay, for anyone interested, I cheated but I solved my immediate problem. This is not the best fix but it worked for me for now.

In the reference.xml file for the equipment form, there are five font types called out as indicated below.

<font normal="chatfont" bold="narratorfont" italic="chatitalicfont" bolditalic="chatbolditalicfont" title="titlefont" />

I looked at the layout in FG and there are no fields in this particular form that are bold and italic. So I changed the bolditalic to my bluefont.

Now in the equipment.xml file, I merely have to use the following:

<b><i>Glove, Clawed</i></b>

for anything that I want to use my blue font.

Although this worked, this is clearly not the best way to do this.

Is there a way to specifiy a new font requirement? For example, where does the 'title' designation come from. It appears to be used for anything that is a header as in <h>Simple Weapons</h>.

How was this setup? If I could specify a new one such as blue = "bluefont" and use something like <bl>Glove, clawed</bl>, this would be a much better solution. This would also allow me to callout other fonts in a document. For example a red = "redfont" and use <rd>Gove, reinforced</rd> would let me specify a red font.

Thanks again,

Wade

Heh heh. Yeah I used that 'cheat' myself to get diff colored text into formattedtext.
Unfortunately I think the normal/bold/italic/etc are constructs are something that we don't have any control over. SW would need to change the underlying code to allow us to specify our own as you have suggested.
I like the idea though and hope SW add something like this in a future upgrade.

Sacman
January 31st, 2008, 01:36
So now I am adding the Iron Kingdoms Feats. (Actually already added them all) And I run into the same problem. Since the feats are indicated using the <h>FEAT</h> text format, I can either change all of them or none of them. I tried the same trick with using the bolditalic and the following <h><b><i>FEAT</i></b></h> but It just ignores the bold and italics. SO this one has me stuck for good. Oh well. At least I have a workaround that works some of the time.

Wade

wootersl
January 31st, 2008, 17:44
That's too funny. I am currently working on creating an Iron Kingdoms ruleset also, but for FGII. Right now I am working on the spells. It's pretty cool. I got frustrated when I was trying to find a spell and was like "Okay, is that a Wizard or Cleric spell and what freaking level was it?" So I added a spell list of all the spells in alphabetical order. :) I was quite proud on myself. My next step is to customize the character sheet with a drag and drop cleric domain section. I already have one that you can type the info in yourself, but I'd like to add the drag/drop capabilities like the spells page.

Foen
February 1st, 2008, 07:09
Sacman, you might create a blue coloured font using the same fontface as the standard title font, and then use:

<p><b><i>FEAT</i></b></p>

It would look the same as the other titles, but be in blue.

Just a thought

Stuart

Sacman
February 2nd, 2008, 19:55
Sacman, you might create a blue coloured font using the same fontface as the standard title font, and then use:

<p><b><i>FEAT</i></b></p>

It would look the same as the other titles, but be in blue.

Just a thought

Stuart

I thought about this but didn't try it. I was thinking for some reason that the spacing etc would be different but I will give it a shot.

Sacman
February 2nd, 2008, 19:57
That's too funny. I am currently working on creating an Iron Kingdoms ruleset also, but for FGII. Right now I am working on the spells. It's pretty cool. I got frustrated when I was trying to find a spell and was like "Okay, is that a Wizard or Cleric spell and what freaking level was it?" So I added a spell list of all the spells in alphabetical order. :) I was quite proud on myself. My next step is to customize the character sheet with a drag and drop cleric domain section. I already have one that you can type the info in yourself, but I'd like to add the drag/drop capabilities like the spells page.


I am pretty much done with everything I had to have to get the basics. I am putting in the Prestige classes since they are new to everyone and had thought about the Character sheet but haven't even looked at how complicated that is going to be.