I'm wondering about making infocard description for button, ability, item and such. Is there a better than using external string table?
I required it to be easily localization and allow function calling, so embedded in code or gui's desc will probably not work.
Only problem I have is, because EE3.0 cannot edit it directly, so I often forget to reload a file.
I'm using text file with XML format to write description, by use GUI's desc or Object's UID as XmlNode.
And special character to replace with function, wrote by using XmlNode in XmlData area.
This is my XML sample.
Code:
HT = text, pos=text position, big=size.
## = Function, will search for node then find function and replace this text.
Cal = Calculate with parameters as math functions.
<entity name="chr_movement" icon="UID()">
<IMG src="UID()"/>
<HT Big="1">Movement Speed</HT>
<HT pos="0, 0.215">Current:</HT>
<HT pos="0.18 0.215">##<GetMovementSpeed/></HT>
<HT pos="0.30, 0.215">##<GetDistanceUnit/></HT>
<HT pos="0.38, 0.215">( ## %) <Cal p1="/" p2="*">##<GetMovementSpeed/> ##<GetChrExstats par1="MoveSpeed" par2="#"/> 100 </Cal></HT>
</entity>
I can move those node to below for readability (I think ;p)
Code:
<entity name="chr_movement" icon="UID()">
<IMG src="UID()"/>
<HT Big="1">Movement Speed</HT>
<HT pos="0, 0.215">Current:</HT>
<HT pos="0.18 0.215">##</HT>
<HT pos="0.30, 0.215">##</HT>
<HT pos="0.38, 0.215">( ## %) ## ## 100 </Cal></HT>
<GetMovementSpeed/>
<GetDistanceUnit/>
<Cal p1="/" p2="*">
<GetMovementSpeed/>
<GetChrExstats par1="MoveSpeed" par2="#"/>
</entity>
Results approximately
Code:
[img]Movement Speed
Current: 4.3 m (100.00%)
They're quite messy by the way, maybe there's better way to achieve it.