New DataQuest Designer

Share files with other Dawn of Light users

Moderator: Support Team

Re: New DataQuest Designer

Postby Trick » Fri Dec 17, 2010 6:13 pm

Graveen wrote:Trick you made a software based on the actual QD ? :)

Yeah haha just improved stephens a bit since he is on a tight schedule :P
Code: Select all
If at first you don't succeed, then you are mediocre ;)

Trick
DOL Novice
 
Posts: 88
Joined: Sun Jan 18, 2009 1:51 am

Re: New DataQuest Designer

Postby mattress » Mon Nov 07, 2011 1:46 am

Started working on this yesterday. Still a bit of work to do to it. Any input, feedback, or contribution is welcome, it was really a great base for me to build onto being a noob. Need to take a break, been working on it all day and my wife asked me, "What on earth have you been working on all day?!" Only thing I haven't really dug into yet is pulling the step specific info out of the dictionary and collating them properly for the DB input.

Fixed:
Source and Target Search/Get Selected Buttons
Updated the database dll

Added:
CLXP for steps
BP for steps
RP for steps
StartNPC Search and Set
Quest Dependency Search and Set
Item search for collect, step, optional rewards and final rewards
Max Count field
Multiple rewards input (zip file re-uploaded)

Todo:
Proper input of serialized data (all)
Tooltips for all fields
Add help menu with descriptions of all the input fields
Probably rearrange everything to make it more readable, was mainly working on function
Last edited by mattress on Mon Nov 14, 2011 5:58 am, edited 3 times in total.
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: New DataQuest Designer

Postby Tolakram » Mon Nov 07, 2011 2:35 am

Awesome, this will be a huge contribution!
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: New DataQuest Designer

Postby Graveen » Mon Nov 07, 2011 8:21 am

Very good Mattress ! Do not hesitate if you need specific help :)
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: New DataQuest Designer

Postby Hiatus » Tue Nov 08, 2011 3:11 am

Nice job :D If you're still working on this I found a bug, Dunno if this is just me or this is intentional but when you save it into the DB only 1 step saves ;d
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: New DataQuest Designer

Postby mattress » Tue Nov 08, 2011 4:03 am

Nice job :D If you're still working on this I found a bug, Dunno if this is just me or this is intentional but when you save it into the DB only 1 step saves ;d
That's in the TODO line :D
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: New DataQuest Designer

Postby mattress » Sun Nov 13, 2011 6:39 am

Updated a bit, serialization still not worked out, haven't started on that yet, don't think I'll have too much trouble with that. I couldn't figure out the dictionary with the key pair deal, had no clue how to pull the step unique data individually to serialize it. I instead used a regular dictionary on the final and optional rewards itemtemplates. Took me a few days to get the forward/back buttons on the final and optional reward templates working with the standard dictionary without throwing exceptions :x .

So I should be able to pull and combine the data with | separators from those dictionaries by enumerating the dictionary for keys and using TryGetValue for each, the optional itemtemplates keys will be > 100, final itemtemplates will be < 100 in the r_dictionary I created. I plan on doing the same for the other step specific data that is currently written to use the key pair dictionary doohickey, unless someone can fill me in on how to pull that data since I couldn't figure it out.

Other thoughts....update Dataquest to include a CheckQuestQualification to check if champion path has been started and also what master level the player is (not sure for what, might come in handy)

Updated DataquestBuilder attached. Any thoughts or recommendations welcome, I realize I probably code like a 4 year old right now :D
Last edited by mattress on Mon Nov 14, 2011 5:59 am, edited 1 time in total.
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: New DataQuest Designer

Postby Graveen » Sun Nov 13, 2011 9:49 am

I like the maturity you show in coding:

- a real learning, with basics and advanced concepts
- a GUI well 'dressed', this is very important and often a real problem in quick code

Here are the advices i can give you:

1) reuse most of DOL core for basic tasks (you are ok for the use of DOLDatabase, GOOD POINT :mrgreen:) including MySQL login form (from DOLConfig) and so on
2) think 'integration' with the actual quest designer. At the end, if your code can simply be pushed in a tab, replacing the quest design one in QD, this 'd be awesome.

GJ !
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: New DataQuest Designer

Postby mattress » Mon Nov 14, 2011 6:06 am

Thanks Graveen, just to be clear, I am working on what I think stephenxpimentel started, so it's his base, I'm just trying to complete it, so I can't take credit for how nicely it was originally put together :wink: .

I got the serialization worked out on for the reward data, give it a go if you want. Unless I can figure it out, or someone can point me in the right direction, i'm going to have to make a dictionary for every input field, it'll work, but will probably be very inefficient. Take a look at the saveToDatabaseToolStripMenuItem_Click in the MainForm.cs, specifically at this:

string opt = String.Join("", Array.ConvertAll(opt_dictionary.Values.ToArray(), i => i.ToString()));

I can't figure out how to make this pull key specific values from the dictionary like I had originally planned, if someone can fix that up, I can use the one dictionary as I had planned in the beginning to serialize data based on the key integer (i.e. sourcetext data is entered into the dictionary with a key of 551-600).

Updated attached.
Attachments
DataQuestBuilder.zip
(1.23 MiB) Downloaded 38 times
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: New DataQuest Designer

Postby Graveen » Mon Nov 14, 2011 7:39 am

Ah, you mean from the db line, recreate a dictionnary ? or did i miss the point ?
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: New DataQuest Designer

Postby mattress » Mon Nov 14, 2011 1:51 pm

Yes from the db line, I need to take values from the dictionary where the key is say 1-50 and add them to a string, the String.Join in my previous post works, but pulls every value from the dictionary regardless of key. Since I googled that specific line in first place and can't figure out exactly how it is doing what it's doing, I have no idea how to make it do what I need it to.
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: New DataQuest Designer

Postby Graveen » Mon Nov 14, 2011 5:09 pm

give me an example, i don't know the actual DQ structure.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: New DataQuest Designer

Postby mattress » Mon Nov 14, 2011 7:04 pm

Don't worry about the structure, the pipes are being added to the dictionary itself, so the data only needs to be pulled by key and converted to a string
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California

Re: New DataQuest Designer

Postby Graveen » Mon Nov 14, 2011 8:00 pm

First, you have included Office PIA, so your solution is not compiling on a computer w/o it.
Second, you are missing a | in your line (pipe is the separator):
Code: Select all
string opt = String.Join("|", Array.ConvertAll(opt_dictionary.Values.ToArray(), i => i.ToString()));
Your structure is hmmm, a bit complex for such a thing. If you really want to use a dictionnary (not necessary here, a List<T> is more suitable tbh) then the best is to have a Dictionnary<int,ItemTemplate>.
This is because your selection controls are not suitable (items, steps, etc..). Instead of 2 buttons ( < and > ) and a textbox, simply push a combobox, with the id of the combobox representing the reward number (or the step # in case of step)
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: New DataQuest Designer

Postby mattress » Tue Nov 15, 2011 2:35 am

I was inserting the pipe with the forward and back arrows, I yanked that now and use the code above, I'm working a little harder, not smarter :P .

I went with the dictionary since it was already there, I was thinking of using an excel or access file to store the data, but yanked it, it shouldn't have any using statements or references to office in the latest upload.

The combobox seems like a good idea, but in my opinion will pretty much do the same thing as what is already there, personal preference I guess, once I get everything working properly, I'll look into the cosmetic/functional details.

It's a lot more complex than it needs to be I know, I know I could sum up a lot of it into a separate methods and call it for each step forward/back and a few, I'll probably do that after it's all working right, and I still need to completely understand the method, string, args thing, and the public/private....return types and so on.

The only question I still have remaining is how to pull the dictionary value given a key....was reading in the parking lot on my lunch break....I think something like this might work out...gonna keep trucking.

Edit: fixed this, works without adding 15 |'s now.
Code: Select all
int i = 1;
string value = "";
foreach (KeyValuePair<int, string> pair in m_dictionary)
{
if (pair.Key <= 50 && i != 1)
{
value += "|";
value += pair.Value;
i++;
}
if (pair.Key <= 50 && i == 1)
{
value += (pair.Value);
i++;
}
}
Last edited by mattress on Tue Nov 15, 2011 2:12 pm, edited 1 time in total.
Matt450/Variations of "Matt"
User avatar
mattress
Server Team
 
Posts: 277
Joined: Mon Jul 05, 2010 3:30 am
Location: Oceanside, California


Return to “%s” User Files

Who is online

Users browsing this forum: No registered users and 1 guest