(a usable) column from a note

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

(a usable) column from a note

Postby pasita » Sun Jul 08, 2012 10:53 pm

I can get the raw data from table notes to a column but how can I extract the stuff inside the <text> </text> section(s) , i.e 'test' in this case? If not extract then detect would do for now.
BTW don't you think you could have optimized the database usage a bit on this one?

"<?xml version="1.0" encoding="UTF-8"?>
<richtext version="1.0.0.0" xmlns="http://www.wxwidgets.org">
<paragraphlayout textcolor="#000000" fontsize="9" fontfamily="70" fontstyle="90" fontweight="90" fontunderlined="0" fontface="Segoe UI" alignment="1" parspacingafter="10" parspacingbefore="0" linespacing="10" margin-left="5,4098" margin-right="5,4098" margin-top="5,4098" margin-bottom="5,4098">
<paragraph>
<text> test</text>
</paragraph>
</paragraphlayout>
</richtext>
"
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: (a usable) column from a note

Postby kraada » Mon Jul 09, 2012 9:32 am

That is standard RTF (rich text format). I'm not certain exactly what you are trying to do - could you elaborate some for me?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: (a usable) column from a note

Postby pasita » Mon Jul 09, 2012 11:51 am

I'm not quite sure yet where this is leading... at the first step I'm thinking of setting a column , say flg_did_a_weird_play_on_turn based on the existence of a keyword in the notes (or autonotes). I'm thinking of possibly coloring some stats based on this flag (or a stat made of it), or making a "read based stat" based on this; i.e. highlighting some info (maybe "bagde"-style) in the HUD for a villain based on a "tag" (note) I've given him.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: (a usable) column from a note

Postby kraada » Mon Jul 09, 2012 1:17 pm

Given what I know about some of our post-release plans you might be better off waiting a little while - we have some features coming that might do a good percentage of what you want done here. At which point, why put in the work? ;)
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: (a usable) column from a note

Postby pasita » Tue Jul 10, 2012 8:11 am

kraada wrote: At which point, why put in the work? ;)

Mmm... cause I kind of enjoy learning about SQL and stuff this way? :) You guys didn't make it too easy, by the way, to generate a report showing the notes on people:)

I suppose you can't shed any light on the features or timetables you talked about? Would you think they're likely to appear within a) 1 b) 3 c) 6 d) other amount of months?
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: (a usable) column from a note

Postby kraada » Tue Jul 10, 2012 8:47 am

I can't promise for certain - you know how notoriously fickle development can be by now, I hope - but I'd think in the bish range given what I know is a reasonable starting point.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: (a usable) column from a note

Postby roundar » Fri Jul 13, 2012 6:41 pm

pasita wrote:I can get the raw data from table notes to a column


How is this done?
roundar
 
Posts: 12
Joined: Sat May 26, 2012 12:25 pm

Re: (a usable) column from a note

Postby pasita » Sat Jul 14, 2012 7:59 am

Not at my PT pc right now, but basically
-create a column str_note
-make it's value "notes.note" (without the quotes)
-iirc you need to add some more sql to the query to get the notes matched to correct player (else you get every players' notes for every player)

Unfortunately PT4 will have all sorts of problems displaying this anywhere.

You can use some sql functions (but not all of them... don't ask me why) to format the data to a readable/displayable form.

Sooo... unless you're into learning sql, I wouldn't recommend this. Then again, as a side effect, I've now got the notes text in red in the hud, making it stand out better from all the clutter in the notes box :)
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: (a usable) column from a note

Postby roundar » Sat Jul 14, 2012 8:29 am

I'm somewhat familiar w/ SQL's functions, and know what I'm looking for in the sql manual for what I don't know. Sounds like you've already carried out my plan, but I'll probably play with it anyway. (I also dk why some functions work and others don't...)

Coincidentally, your including the fact that notes.note contains every note from every player just solved my other thread asking why my custom stats weren't loading on the hud popups, it was trying to load a massive set of text. Thanks.
roundar
 
Posts: 12
Joined: Sat May 26, 2012 12:25 pm


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 41 guests

cron