Log in

View Full Version : Place holder question



madman
November 7th, 2009, 14:12
well i have done most of the stuff i wanted to do (with the help of the community)and Thank You all. one more question though.


<hp type="number">11</hp>
<init type="number">0</init>
<intelligence type="number">13</intelligence>
<morale type="string">.</morale>
<name type="string">Aasimar</name>
<ranged type="string">light crossbow +0 (1d8/19–20)</ranged>
<reflexsave type="number">0</reflexsave>
<senses type="string">Perception +5</senses>
<skills type="string">Diplomacy +8, Heal +7, Knowledge (religion) +5; Racial Modifiers +2 Diplomacy, +2 Perception</skills>
<sla type="string">daylight</sla>
<slaa type="string">touch of good</slaa>
<slab type="string">channel positive energy</slab>
<slac type="string">rebuke death</slac>
<spacera type="string">.</spacera>
<spacerb type="string">.</spacerb>
<spacerc type="string">.</spacerc>
<spacerd type="string">.</spacerd>
<spacere type="string">.</spacere>
<spacereach type="string">5/5</spacereach>
<spacerf type="string">.</spacerf>
<spacerg type="string">.</spacerg>
<spacers type="string">.</spacers>
<spacert type="string">.</spacert>
<spacerx type="string">.</spacerx>
<spacerz type="string">.</spacerz>
<specialattacks type="string">channel positive energy (5/day, 1d6, DC 12);rebuke death +0 (1d4+1 6/day), touch of good (6/day)</specialattacks>
<speed type="string">30 ft. (20 ft. in armor)</speed>
<strength type="number">8</strength>
<text type="formattedtext">
<p>Aasimars are humans with a signif icant amount of celestial or other good outsider blood in their ancestry. Aasimars are not always good, but it is a natural tendency for them, and they gravitate to good faiths or organizations associated with celestials. Aasimar heritage can hide for generations, only to appear suddenly in the child of two apparently human parents. Most societies interpret aasimar births as good omens. Aasimars look mostly human except for some minor physical trait that reveals their unusual heritage. Typical aasimar features are hair that shines like metal, unusual eye or skin color, or even glowing golden halos. </p>
</text>

so here is a small piece of code that shows the strings i made as spacers. spacera-sbacerb and so on. when i drop the info into the client.xml for a library module from the db.xml. then open it up in FG the spacer fields have to have something in them or they do not get displayed. i used the spacers to create a large empty field. that other info sits right on top of. my question - is there some xml i can use as a place holder other than what i'm doing. so i do not have to put the "." in the empty fields to get them to work. attaches is a screen shot showing the "." in the window which i do not want to show up.
any help as always would be great

Thanks in advance
Chris

Foen
November 7th, 2009, 14:23
Why are you creating a large empty field? If you have to do it, you could use \r as a placeholder or a space " ".

It might be better to use a genericcontrol and set it to the size you want using bounds or anchored tags.

Foen

madman
November 8th, 2009, 01:45
i'm sure there is a better way to do it. i just dont know how. and i have posted the question in the forums and never got a reply.

thanks for the info i will try it.

Chris

Foen
November 8th, 2009, 05:39
I'm happy to help. I'm not sure why you want a large empty field: is it so you can position other fields over it, or because you want to place a background image/frame on the sheet?

Would you be able to post a snippet from the windowclass definition, so I can so how the npc combat sheet is defined?

Cheers

Stuart

madman
November 8th, 2009, 07:44
the reason i used an empty space. is that is the only i could get the save fields to work where they are without other info being covered up. so that is what i came up with to solve the problem. if you can advise me on another solution i would be most grateful.

Chris

Ikael
November 8th, 2009, 09:28
There are lots of better ways to do the layoutting. In fact using the dummy database nodes is probably the worst practise you can image, but I understand that it's difficult to understand how the layoutting is made in NPC/Item etc. sheets. Luckily every "mistake" teaches you valuable lesson. You should try doing the layoutting (spacing) by modifying the templates declared at the start of the adventures_npc.xml file.

For example in npcsavefield template try changing the following line in onInit() function: setAnchor("top", "hp", "bottom", "absolute", 17);

in that line you declare that the savefields are placed on the sheet under the 'hp' field (hit points numberfield). number 17 at the end of the line is how many pixels you offset your savefields from the 'hp' field. Try setting that number to 27 when you should have good "space" between the HP and save field in vertical direction (and you don't need your spacerfields).

madman
November 8th, 2009, 10:21
when i do that and delete the blank fields this is what happens. i think that the problem has something to do with the <columstringfield> and the way it works to stack one thing after the other. but im no coder so im not sure.

Chris

edit: i used the \r and the space and they do not keep a blank placeholder(second picture)

Ikael
November 8th, 2009, 11:14
So you want the "Senses" to be after the CR, EXP, Init line?

You should check out your anchorings (to where are you actually anchoring fields). If you your "senses" field appear below the line where CR is, you should set it's <anchor> to "cr" field instead of "hd". If I remember right in this case you should lso declare the statfields (CR, EXP, Init) before the senses field in your code.

In addition you should fix your statfield template's top anchoring to have better offset. Ie you should modify the following line in statfield template's onInit(): setAnchor("top", "hd", "bottom", "absolute", 15);

The columnstringfield template does "stack" fields after another as you said, and that's because it has "relative" positioning. This means that each field is offsetted auomatically. You have anchored most of the columnstringfields to the 'hd' field. You should probably try to set different anchoring to columnstringfields that start after different headerlabels (DEFENSE, OFFENSE etc.). Personally I would set names for these headerlabels and anchor each element within them to the headerlabel. Hope this helps.

madman
November 9th, 2009, 19:46
so i can change most things and remove the spacers i used. however i can no create a static label without creating a blank field next to it.

is there some other way to define a lable so it can be included without the blank field. as i think it only defines the horz anchor. and therefore i can not define the vertical.

Chris

madman
November 10th, 2009, 20:25
well i just wanted to say thank you for the help.
i had it working, and now i have it working good. so once again, Thank You
for your help. my game is better off because of you guys.

Thanks
Chris