New DataQuest Designer

Share files with other Dawn of Light users

Moderator: Support Team

Re: New DataQuest Designer

Postby Tolakram » Tue Nov 15, 2011 12:57 pm

Yep, each Dictionary entry is a keyvalue pair, so that will do it.
- 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 » Tue Nov 15, 2011 1:05 pm

No, imho you are not focusing on how your GUI should work, in example, for on step, fill all the fields, validate on save, then go to next step. Then, save the whole steps. I suggest to really define when you 'll perform integrity checks and so on, because this is really what makes your code usable.

you can access a defined value simply with
Code: Select all
var myvalue = mydictionnary[key];
what you are listing is a way to enumerate the collection.
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 7:46 pm

I got the dictionary pull and string creation for the db entry worked out with the foreach statement in my last post. Should have a fully working solution in a couple days. Not all fields in a dataquest must be filled out so I don't have to validate every entry, I will set it up to return a message if the mandatory fields are blank and hold at the current step. Once it's working properly, the folks that have been making quests recently should test it since they are more familiar with the structure. Going to pretty it up also and set the proper tab order.
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 Argo » Tue Nov 15, 2011 10:34 pm

I got the dictionary pull and string creation for the db entry worked out with the foreach statement in my last post. Should have a fully working solution in a couple days. Not all fields in a dataquest must be filled out so I don't have to validate every entry, I will set it up to return a message if the mandatory fields are blank and hold at the current step. Once it's working properly, the folks that have been making quests recently should test it since they are more familiar with the structure. Going to pretty it up also and set the proper tab order.
can you feel my greedy fingers mattress ? ;)
Möge Gott sein zwischen Dir und dem Leid, an allen dunklen und verlassenen Orten, die Du erreichen wirst.
Argo
Server Team
 
Posts: 1760
Joined: Thu Sep 18, 2008 6:21 pm
Location: Berlin, Germany

Re: New DataQuest Designer

Postby Hiatus » Wed Nov 16, 2011 12:30 am

Nope, but he can feel mine :)
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 » Wed Nov 16, 2011 2:01 am

i'm skerred :(
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 » Wed Nov 16, 2011 6:25 am

Edit:

Only real nag right now is I figured out how to commit the steptype to the dictionary as an integer, but not how to convert it back to text from the enum when you hit the back or forward button and step data already exists. The step gets input correctly, so don't worry about it when Interact turns into 0 and so on...

Fixed:
-Don't have to worry about hitting back/forward to commit last quest to the dictionary, the savetodatabase button checks to see if it's committed.
-The step forward button checks for data in the steptype and target before allowing the step to proceed, those are the only 2 really mandatory fields.

TODO: Help file, I'm thinking a quick reference kinda flash card menu or something, and I plan on video capturing me making a quest with this and kinda narrating it, hopefully it'll make the dataquest more inviting for people that want to create and submit their favorite quest.

Attachment updated.

Edit again....cripes I have a new respect for programmers, this is a pain!...the steptype thing is broken....will update when fixed!
Attachments
DataQuestBuilder.zip
(1.24 MiB) Downloaded 46 times
Last edited by mattress on Thu Nov 17, 2011 3:28 am, edited 2 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 Hiatus » Wed Nov 16, 2011 2:28 pm

Thanks! I'm looking forward to using this when I get home :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 » Thu Nov 17, 2011 11:00 pm

Need some help with enum values. The steptype combo box lists the step type names, when the step type data is added to the dictionary, it is added as a number using:
Code: Select all
byte steptype = (byte)(eStepType.SelectedIndex);
steptype_dictionary.Add(stepNum, steptype);
Now my problem, when the data is already there, and the stepforward or stepback buttons are pressed, the index number is pulled, not the text, so the combobox displays a number instead of the step type text (like "Whisper" or "Kill"), that is fine...but when going back and forth through the steps, the combobox data gets removed and re-added to the dictionary at certain points, and it all goes haywire and the numbers change since the add step checks for an enum index for the value and not vice versa.

So my question is, given an enum like this:
Code: Select all
public enum eStepType : byte
{
Kill = 0, // Kill the target to advance the quest
KillFinish = 1, // Killing the target finishes the quest and gives the reward
Deliver = 2, // Deliver an item to the target to advance the quest
DeliverFinish = 3, // Deliver an item to the target to finish the quest
Interact = 4, // Interact with the target to advance the step
InteractFinish = 5, // Interact with the target to finish the quest. This is required to end a RewardQuest
Whisper = 6, // Whisper to the target to advance the quest
WhisperFinish = 7, // Whisper to the target to finish the quest
Search = 8, // Search in a specified location
SearchFinish = 9, // Search in a specified location to finish the quest
Collect = 10, // Player must give the target an item to advance the step
CollectFinish = 11, // Player must give the target an item to finish the quest
Unknown = 255
}
Given the index number, say 10 or 11 or whatever, how do you pull the value, Collect...CollectFinish, etc and put that into a variable? I'm thinking that Enum.GetName is what I need, but I can't get the syntax right.
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 » Thu Nov 17, 2011 11:21 pm

Code: Select all
var convertedEnum = Enum.GetName(typeof(eStepType), 11);
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 » Sat Nov 19, 2011 2:51 am

Thanks Graveen, but for whatever reason, that throws an exception, tried it in various setups, message boxes, etc.
I worked around it, the data stays text in the window and is string.replace'd before input.
It works now, I'm taking a break, been at it for about 2 weeks now.

Only thing to check in the DB after creating a quest is TargetText and CollectItemTemplate as |'s will be input even if no data has been entered, delete the pipes. Also, for every step created, the rewards for $, XP, CLXP, RP and BP will have 0's added, if none of the steps award RP, then clear out the field, I have an idea to fix this already, will check the string if any numbers exist besides zero, else the string will = "".

I never did check the Allowed Classes function, will check that out and fix if needed later.

Other than those things, works pretty well.

Enjoy :)
Attachments
DataQuestBuilder.zip
(1.24 MiB) Downloaded 175 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 mattress » Sat Dec 24, 2011 6:22 pm

I created an SVN for this on Sourceforge, if anyone needs/want access to add to this or pretty it up, let me know and I'll give you commit access.
svn is here: https://svn.code.sf.net/p/doldataquest/code-0/trunk

I removed the release/debug folders from the bin directory in the svn so you can compile it yourself, it's in the same state as my previous post, I haven't added or fixed anything else yet, but it's working fine, I've been using it a lot for a project of mine :)
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 Dec 25, 2011 9:00 am

i'm ok to host it on the public SVN, if you are interested ;)
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 Graveen » Sat Jul 06, 2013 9:56 am

Bump ! Anyone using it, interested to include new changes ?
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 HunabKu » Thu Jul 11, 2013 3:01 am

I tried to but i don't understand all about how to works
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am


Return to “%s” User Files

Who is online

Users browsing this forum: No registered users and 1 guest