PDA

View Full Version : Odd problem with gameelements.xml



jonsharland
September 5th, 2006, 09:45
When I copy gameelements.xml to rulesets\myruleset\data\gameelements.xml
and in base.xml I point gameelements to this file I don't see my chat box.


Why do I want to do this - well I want to change the portrait icon to be a custom one instead of the brown one and this is where the location is.

If I make the change above I see the new Icon I have made but don't see the chat box. If I change it back I see the chat box but have the horrible brown icon. I cannot see any refrence in gameelements to the chatbox.png

Any ideas guys
Jon

Ged
September 5th, 2006, 15:45
The actual chatbox bitmaps are defined in graphics.xml whose referene version is located in the data-folder. The game_elements.xml defines the chatwindow, which uses the definition from the graphics.xml. I.e.: in game_elements.xml you have

<chatwindow>
<frame name="chatbox" hilight="chatboxhilight" /> ...
and in the graphics.xml you have

<framedef name="chatbox">
<bitmap file="data\frames\chatbox.png" /> ...
and other related definitions. Don't know where you have lost the chatwindow in the process, but hope this still clarifies how the chatbox.png is implicitly referenced in the game_elements.xml.

jonsharland
September 5th, 2006, 16:15
Hi yes thats how I thought it works.

My gameelements.xml in my rulesets\custom\data
folder is identical as the one in
the base data folder except I change this link:
rulesets\Custom\icons\BS_portrait.png

My Graphics.xml contains the link to the chatbox.png -

if I include the default gameelements.xml from the \data folder in my base.xml the portrait changes back to default and my chat box re-apears - its very odd.

Jon

kalmarjan
September 5th, 2006, 17:02
One thing that could help:

When making custom changes to the graphics, make sure to put the full path from the FG directory in the definitions. thus,


<framedef name="chatbox">
<bitmap file="data\frames\chatbox.png" /> ...

should become:


<framedef name="chatbox">
<bitmap file="rulesets\YOUR_RULESET_NAME_HERE\data\frames\chatbo x.png" /> ...

It is a small thing, but I have found that this fixes the problem that I have had with modification to graphics. Sometimes the program needs an actual placement of the files, sometimes it doesn't. So I err on the side of caution.


[EDIT] Also, double check your capitalization of "custom" in your gameelements.xml. In the example that you provided, you have:

My gameelements.xml in my rulesets\custom\data
folder is identical as the one in
the base data folder except I change this link:
rulesets\Custom\data\icons\BS_portrait.png

Thing about xml is, it is case sensitive, so that may be your problem as well. Also, maybe your path is not entirely correct.

Hope that helps.

Sandeman

jonsharland
September 5th, 2006, 19:57
No I check the path its correct..

Odd problem