[PROGRAM] Thaumcraft Pathfinder

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
I figured, since its getting closer and closer to a proper release version, I'd make a thread in preparation for my little tool: Thaumcraft Pathfinder. Its in a similar vein to the likes of the old Thaumcraft 4.1 Research Helper and Thaumcraft Sixth Sense, and is inspired by both. Once complete, the initial release version will support six versions of Thaumcraft: 4.1, 4.1.0f, 4.1.0g, 4.1.1.13, 4.1.1.14, and 4.2. It'll be a standalone (not in-browser) program, so you can even use it whilst offline. Its also made to be easily extensible, and will come pre-packed with the scripting tool I built and used to create all these nice scripts. Here, take a look!

nl600m.png


Simple-looking, isn't it? Only real thing one needs to note with it is that the source aspects must be capitalized, as well as the name of the aspect itself. This mostly has to do with how the main program reads in the scripts and relates them to one another in its internal dictionary. The icons are read directly from the Resources.dat file, and aren't store in the Aspect Builder itself.

I'm currently working on fleshing out the UI for the Pathfinder itself. I just fixed a problem with the NumericUpDown control not incrementing properly when you use the scroll wheel; for me, it incremented by 2 instead of by the 1 I have the control's Increment property set to be. I'll keep you guys posted of any more progress I make here!

(Just as a note, this program is NOT meant to replace either the Research Helper or TCSS, it is merely meant as an alternative and as a learning experience for me.)
 

Kocyk

New Member
Jul 29, 2019
113
0
1
You can make sure the names are capitalized by using something like this in you textbox "Leave" event:
Code:
String temp = textBoxName.Text.ToLower().Substring(1);
textBoxName.Text = textBoxName.Text.Substring(0, 1).ToUpper() + temp;

And this in "Text changed" event makes sure user can only enter letters:
Code:
textBoxName.Text = string.Concat(textBoxName.Text.Where(char.IsLetter));
textBoxName.SelectionStart = textBoxName.Text.Length;

Or you can just use both in "Text changed" event.

Try to keep it as "idiotproof" as possible ;). Good luck.
 
  • Like
Reactions: RavynousHunter

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
Hrm, not a bad idea. Still need to fix the somewhat minor bug where I accidentally forgot to have the tool put things inside the Scripts folder, and it instead puts them in the program's main folder (still sorts them into version folders, so I'm only one off, lol.). Got my music loaded up, so I'm gonna hack away at this thing some more!

[ETA]

Idiot-proofing complete! Had to add a few checks to make sure things happened without errors and the selection didn't change unnecessarily (when the .Concat() doesn't change the string).

Code:
private void txtSAspect1_TextChanged( object sender, EventArgs e )
{
  if ( String.IsNullOrEmpty( txtSAspect1.Text ) == false )
  {
    string Temp      = txtSAspect1.Text.Substring( 1 );
    txtSAspect1.Text = txtSAspect1.Text.Substring( 0, 1 ).ToUpper() + Temp;

    string Temp2 = String.Concat( txtSAspect1.Text.Where( char.IsLetter ) );

    if ( txtSAspect1.Text != Temp2 )
    {
      txtSAspect1.Text           = Temp2;
      txtSAspect1.SelectionStart = txtSAspect1.Text.Length;
    }
  }
}

[ETA 2]

I'm having a very...odd problem. Form.Load() only ever does two methods' worth of work: FindScripts() and LoadStateData(). Anything else I add to it goes completely undone and no matter what I try, it won't tell me what's going wrong. What the hell VS?

What the F***? Now, its not adding the versions to the control NO MATTER WHERE I INSERT THE CODE! Has VC# just gone completely effing senile?!
 
Last edited:

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
Yo. (frmMain.cs, where the issue's happening. No matter where I put it, the code to populate the cboVersion refuses to function. Also, I figured I'd put it on PasteBin since these forums completely bugger formatting when I paste code, and I am NOT reformatting 140 lines of code by trial-and-error.)

If its not there, the code I'm using to populate it is thus:

Code:
foreach ( string Ver in Versions )
{
  cboVersion.Items.AddItem( Ver );
}

cboVersion.SelectedIndex = 0;

The only thing I've tried that worked is putting that tiny amount of code into its own method, and putting it at the end of FindScripts(). That, however, is a completely stupid solution because something that small shouldn't need its own damned method. Knowing my luck, the next time I go into VS, it'll behave absolutely perfectly and look at me like "Problem? What problem? I wasn't having any problems with your code, I have no idea what you're talking about."
 

Kocyk

New Member
Jul 29, 2019
113
0
1
Code looks fine from what i've seen. The only reason i can think of is that Versions list is empty when you populate combobox, so it looks like it's not working, but no idea why making separate method would fix that.

Do you know how to do basic debugging in VS? Place a breakpoint in
Code:
cboVersion.Items.AddItem( Ver );
and maybe before FindScripts() and go through each one, checking how many iterations it will go through and what will happen.
In debug mode you basically mouse over or click a field and it should show you it's contents.
Look for how many items are in combobox after the loop, and if Versions is not empty for some reason.
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
Aye, I know how to do breakpoints and all that. It literally skipped the code unless it was in its own method and as the second-to-last instruction in FindScripts(). I've restarted my machine since then, but haven't gotten back to it, yet. I prolly will sometime later on today...trying to get a handle on which books I actually need this semester, and trying to find them for as cheaply as humanly possible because if you aren't careful, college textbooks can cost you more than a friggin computer.
 

HeilMewTwo

New Member
Jul 29, 2019
1,179
-45
0
Aye, I know how to do breakpoints and all that. It literally skipped the code unless it was in its own method and as the second-to-last instruction in FindScripts(). I've restarted my machine since then, but haven't gotten back to it, yet. I prolly will sometime later on today...trying to get a handle on which books I actually need this semester, and trying to find them for as cheaply as humanly possible because if you aren't careful, college textbooks can cost you more than a friggin computer.
I just use torrents normally. :p
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
I just use torrents normally. :p
I would've said "torrent," but some forums don't take kindly to even so much as mentioning the fact that protocol even exists. Apparently, this place is less...oversensitive than I thought. Also, I absolutely refuse to give people who make college textbooks (who are clearly and flagrantly ripping students off) any money if I can help it. If they weren't douchebags about their monopoly, I wouldn't have as much of a problem with 'em, but alas.
 

HeilMewTwo

New Member
Jul 29, 2019
1,179
-45
0
I would've said "torrent," but some forums don't take kindly to even so much as mentioning the fact that protocol even exists. Apparently, this place is less...oversensitive than I thought. Also, I absolutely refuse to give people who make college textbooks (who are clearly and flagrantly ripping students off) any money if I can help it. If they weren't douchebags about their monopoly, I wouldn't have as much of a problem with 'em, but alas.
That seems a bit... Extreme. ◉_◉ Nearly to the point of censorship.
 
  • Like
Reactions: 1SDAN

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
That seems a bit... Extreme. ◉_◉ Nearly to the point of censorship.
The mentioning of torrents, or the textbooks? Because, if memory serves, almost all American textbooks (not just for college) come from, like, one or two companies in Texas. They're a bigger ripoff than "always online" non-MMO games. Like, the changes between various editions is mostly shuffling stuff around just enough to make using an old version all but pointless in class unless you're very careful and pay close attention.
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
I only shell out cash for non-rentals if I absolutely need the book or something the book has, like the occasional bit of software and/or access keys that come with most math textbooks. That said, I don't mind buying math textbooks, I love math. In fact, if computer science didn't have broader job appeal, I'd be very tempted to go to university as a math major. Hell, I might end up going as a dual comp-sci/math major, thinking on it...hrm.

(I'm in community college right now, getting the general ed. out of the way so I don't get forced into the dorms when I go to uni, away from my far more comfortable, far quieter apartment.)
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
Okay, update time! I'm doing a bit of a major rewrite of the underlying code to make this thing more easily-searched. I had it setup to where aspects were related to one another by strings, but that would make pathfinding a pain in the arse. Instead, they'll now relate to one another by actual Aspect objects. This may make the aspect scripts themselves a bit larger, but it'll make the whole thing easier to code in the long run because of one key feature I plan on adding: Aspect Trees. I may ship THEM as scripts instead of the raw aspect scripts themselves, actually. Basically, it'll sort everything out by tier and linking them together in a tree structure. After that, finding a way from A to B will only be a matter of tracing linkages. Since the aspects are naturally tiered, making them a tree shouldn't be too much more effort. I'll have to re-do all the aspect scripts, though. Thankfully, my scripting tool should be fully updated to the new standard. This refactoring should not only make things a LOT simpler on both ends, but when it comes time to add new versions, users won't find themselves downloading several dozen small files, just one larger one representing the entire data structure!
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
I was meaning your claiming to be a student at a university, intel recon seems to be more of Envy's thing. Then again, you are Greed Prime...
HA. I'm greedy for knowledge, as well. Besides, its a path to money, and everyone wants money.
 
  • Like
Reactions: 1SDAN