About Store Forum Documentation Contact



Post Reply 
Making Object infocard description
Author Message
SamNainocard Offline
Member

Post: #1
Making Object infocard description
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.
(This post was last modified: 08-29-2014 03:06 PM by SamNainocard.)
08-29-2014 02:35 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
RE: Making Object infocard description
Not sure if this is relevant and sorry if it isn't but does EE::CalcValue/EE::CalcVar EE::Calculate() cover it?
(This post was last modified: 08-29-2014 02:48 PM by Zervox.)
08-29-2014 02:47 PM
Find all posts by this user Quote this message in a reply
SamNainocard Offline
Member

Post: #3
RE: Making Object infocard description
Haven't check these CalcValue when I write this file long ago, I think would be
Code:
<Cal p1="/" p2="*">## ## 100 </Cal>
<GetMovementSpeed/>
<GetChrExstats par1="MoveSpeed" par2="#"/>

to something like
Code:
<CalcVarR>
## / ## * 100
<GetMovementSpeed/>
<GetChrExstats par1="MoveSpeed" par2="#"/>
</CalcVarR>

CalcR("(movement speed)/(base movement speed)*100")
CalcR("4.3/4.3*100")
(This post was last modified: 08-29-2014 03:06 PM by SamNainocard.)
08-29-2014 02:57 PM
Find all posts by this user Quote this message in a reply
Post Reply