Draco18s / Decaying-World

More decay types for Mystcraft
MIT License
2 stars 3 forks source link

Doesn't work with latest mystcraft (0.11.11) (1.7.10) #3

Closed asl97 closed 9 years ago

asl97 commented 9 years ago

java.lang.NoClassDefFoundError: com/xcompwiz/mystcraft/api/instability/IInstabilityProvider

Blue64 commented 8 years ago

I edited it to 6 to reflect the correct number. keep in mind, I'm still processing all of the stuff I learned yesterday, compounded by today, on top of uploading my ZenScript scripts (MineTweaker 3 / ModTweaker 2) to my GitHub repository (which also uses weighted chances). just because it's not an Item doesn't mean it's not a stack. you add all the values into a sum and extrapolate it's percentage chance of being "called" (dropped, formed, shaped, however you want to reference it) Errors are bound to happen when I'm bouncing everywhere, learning stuff, absorbing stuff to learn, and also trying to explain stuff to others, while also distracted with my own tasks.

as far as a Tree Structure goes, it's gonna take a few, let me hit the bathroom first and get a refill on my soda (McDonald's, free refills lol)

keybounce commented 8 years ago

I understand the idea of weighted choices. But that is not a stack.

An "item stack" is not a "Stack".

A stack is a data-structure where you have only the ability to push something onto the stack, and pop the most recently pushed item off the stack, as the only primitives. You can make things like "peek" (examine the top of the stack without disturbing it), or "reverse" (return a stack that is the opposite order of the first), etc.

An "item stack" is a collection of 1 to 64 of something, in minecraft; it is a combination of an item plus a count.

A weighted choice is a bunch of options, each of which has a chance of being selected.

A weighted choice, each of which is an (item, count) pair, has nothing to do with the "Stack" concept.

Draco18s commented 8 years ago

Stacks vs Queue

Blue64 commented 8 years ago

Ah, that would be a Syntax Translation issue. I can easily demonstrate a massive script I built, but it's for a program called AutoHotKey, and it's got trees out the wazoo, I even have a more complex one I was using to create a GUI for a Video Game I never got around to starting, but the Syntax is different. I had forgotten Java had the Stack Syntax, I learned it long ago, back when I was scripting to cheat (bot) at the game RuneScape.

AutoHotKey was the first programming language I learned, it comes with a fully fleshed out help file, and all the tools to preform anything it demonstrates as an example. It compiles into Windows format. are you on Unix, Mac, or Windows iOS?

this thread is definitely going into my bookmarks lol there's a LOT of useful information here lol

my script

keybounce commented 8 years ago

Ok.

So, the Mystcraft Grammar is a giant tree. There is a special weighting on the branches that controls how likely a given branch is going to be used for generating the age at random; the primary purpose of that weighting is to permit some branches to never be used in the random generation, but only for parsing what you wrote.

Many terminals, such as "full length", or "north direction", can be used by multiple different rules. Others, like "Plains Biome", are only found in one rule, but that rule can be used in multiple places.

In order to expand "Age" into a description of a world, what you wrote has to first be matched to a partial expansion, and that partial expansion filled in; then, the missing parts of the expansion have to be generated at random based on those weights.

This is true not just of "Age", but also all of the things that "Age" turns into, as well as all of those parts, etc.

As the worst example, a color can be used in many, many different places. A book that has <link panel, red color> has to be expanded into something. In the process of parsing what was written, the grammar tree will be consulted to generate something with Red Color.

Next, the grammar tree will be expanded from the top. A partial expansion exists -- something that uses Red Color has been selected. But anything not specified has to be filled in with other things.

All of this is done by manipulating a tree structure of data nodes. Not by coding "a biome list is a set of subroutine calls to return biomes". Such a system cannot read a set of symbols to understand what was put into the descriptive book.

Blue64 commented 8 years ago

I've been combining my old posts and deleting the extra duplicates so as to keep the size of the thread as small as possible without disrupting the timeline

the primary purpose of that weighting is to permit some branches to never be used in the random generation, but only for parsing what you wrote.

without knowing this, I was doomed to get it incorrect.

GrammarRules.registerRule(GrammarRules.buildRule(0, "Age", "TerrainGen", "BiomeController", "Weather", "Lighting", "Spawning0", "Suns0", "Moons0", "Starfields0", "Doodads0", "Visuals0", "FeatureSmalls0", "FeatureMediums0", "FeatureLarges0", "Effects0"));

I shall attempt and example of this (jeez, this is going to take forever), for the sake of Time, I shall only do "Suns0" & "Moons0" though, and keep in mind, these commands will be generalized as I do not actually "Know" Java Programming Language, just kind of the concepts and a few obscure commands. It also doesn't help that you're asking me to build the syntax for the CREATION of the rule, instead of the EXECUTION. Creation is a pain in the butt, Execution is a breeze.

Jeez! He jumps all over the place with this!

    private static final String SUN_GEN = "SunsAdv";
    private static final String SUN_EXT = "SunsExt";
    public static final String SUNSET_EXT = "Sunset_Ext";
        GrammarRules.registerRule(GrammarRules.buildRule(0, "Age", "TerrainGen", "BiomeController", "Weather", "Lighting", "Spawning0", "Suns0", "Moons0", "Starfields0", "Doodads0", "Visuals0", "FeatureSmalls0", "FeatureMediums0", "FeatureLarges0", "Effects0"));
        GrammarRules.registerRule(GrammarRules.buildRule(1, "Suns0", "SunsAdv"));
        GrammarRules.registerRule(GrammarRules.buildRule(4, "SunsAdv", "SunsAdv", "Sun"));
        GrammarRules.registerRule(GrammarRules.buildRule(2, "SunsAdv", "Sun"));
        GrammarRules.registerRule(GrammarRules.buildRule(null, "Suns0", "SunsExt", "Sun"));
        GrammarRules.registerRule(GrammarRules.buildRule(null, "SunsExt", "SunsExt", "Sun"));
        GrammarRules.registerRule(GrammarRules.buildRule(1, "SunsExt", new String[0]));
        GrammarRules.registerRule(GrammarRules.buildRule(2, "SunsetUncommon", new String[0]));
        GrammarRules.registerRule(GrammarRules.buildRule(3, "SunsetUncommon", "Sunset"));
        GrammarRules.registerRule(GrammarRules.buildRule(1, "Sunset", new String[0]));
        GrammarRules.registerRule(GrammarRules.buildRule(null, "Sunset_Ext", "Sunset"));
        GrammarRules.registerRule(GrammarRules.buildRule(1, "Sunset_Ext", new String[0]));

and that's just any mention of the word Sun! By the way, if you're going to call it by what it is, he uses Ranks, not Weights

    private static /* varargs */ GrammarGenerator.Rule buildRule(Integer rank, String parent, String ... args) {
        ArrayList<String> list = CollectionUtils.buildList(args);
        return new GrammarGenerator.Rule(parent, list, rank);
    }

that last line ALONE is more than enough information for me to know how the entire thing works, because that is literally the "this does that" line of code.

Rank has a nifty little rule, you can call the next number up (it's an int, so over 2 billion possible ranks) but you can't send it to the parent until you're done with that chunk. so _I have no Idea why I originally learned it as that, probably learned it from someone who didn't know Java_ Rank is basically GoSub, so he basically is going:

in:
GrammarRules.registerRule(GrammarRules.buildRule(0, "Age", "TerrainGen", "BiomeController", "Weather", "Lighting", "Spawning0", "Suns0", "Moons0", "Starfields0", "Doodads0", "Visuals0", "FeatureSmalls0", "FeatureMediums0", "FeatureLarges0", "Effects0"));

Suns are ruled as:
buildRule(Suns0 > (SunsAdv > Sun) > (SunsExt > Suns) > new String[0])

correct?

of course the arguments are an entirely different file somewhere. but you'll notice he calls the ranks of equal number, and he only ever calls up by 1, because it doesn't like to call down (especially since it potentially creates Infinite Loops). It needs an EndPoint already set up, or it just loops and loops, also known as a Memory Leak or at least a TpS Spike Edit: _wrong type of Syntax_

have you looked at my script?

  1. Edit: Combined multiple posts.
  2. Edit: Command(Rank0 > (Rank4 > Rank2) > (RankNull > Rank1) > OutputText)
  3. Edit: Lots of corrections.
keybounce commented 8 years ago

I did attempt to look at your script, but didn't really understand what you are doing. I don't know runescape (that was what you said it was for, right?), and don't know what the script is trying to do. It looks like it is just doing stuff for character generation.

that last line ALONE is more than enough information for me to know how the entire thing works, because that is literally the "this does that" line of code.

Not really. All that is doing is building a data structure. Something else has to run through that data structure twice over both the partial description in the descriptive book, and the result of that first pass to generate the final description.

Rank, or weight, is handled differently in Mystcraft. Basically, any rank 1 rule will be more common than any rank 2 rule, which in turn is more common than any rank 3 rule, etc. The idea is that 0's are very common, 1's are common, 2's are uncommon, 3's are rares, and 4's and up are very rares. The actual probabilities are determined at runtime, and this is done so that no matter how many rares are added by mods, they will still be rare. This also determines how the contents of the sealed boosters are determined. But ultimately, this is just an implementation detail -- it's still a weight, and just makes some things more likely than others, unless "null" is used, in which case the random chance is 0.

You still have to parse what is written into a partial tree. You still have to say, for example, that "red color" will turn into a modifier for grass color, before you can then generate the missing pieces.

That is the hard part of the current codebase.

    GrammarRules.registerRule(GrammarRules.buildRule(1, "Suns0", "SunsAdv"));
    GrammarRules.registerRule(GrammarRules.buildRule(4, "SunsAdv", "SunsAdv", "Sun"));
    GrammarRules.registerRule(GrammarRules.buildRule(2, "SunsAdv", "Sun"));

During generation of a random age, Suns0 (From the "Age" master rule) will be converted into "SunsAdv", so the "SunsExt" rules will be ignored. It is most likely going to turn into one sun (weight 2), but can turn into multiple (weight 4).

    GrammarRules.registerRule(GrammarRules.buildRule(null, "Suns0", "SunsExt", "Sun"));
    GrammarRules.registerRule(GrammarRules.buildRule(null, "SunsExt", "SunsExt", "Sun"));
    GrammarRules.registerRule(GrammarRules.buildRule(1, "SunsExt", new String[0]));

But to parse what a user wrote into the book, the sun terminals (NB: Normal sun, Dark sun, etc, are specified elsewhere) trigger the SunsExt rule; this can nest into multiples of them, and if a SunsExt rule is found, then the Suns0 rule is satisfied, and the SunsAdv rule is not used during generation.

Blue64 commented 8 years ago

this is how I learn. It's full of stumbling and feeling my way through the code blindly, but then there's that "AHA!" moment. At least I don't go running down the street naked while shouting "_Eureka! I've got it!_" (method of Water Displacement to measure Weight, discovered by the guy getting into his bath, he was so excited to tell everybody, he forgot to get dressed lol)

but yeah, Rank is a Java command.

the script was for my game that I was creating, not for RuneScape. my RuneScape scripts never came that far, and got deleted when the Bot Client I was using got temporarily shut down (cease and desist from RuneScape Lawyers lol). It was indeed for character generation, and it recursively called the GUI if it was invalid (blank), and also refreshed the screen so as to reflect any changes, while also including the data already put into it so as to not force people to re-type the entire thing. I also filtered everything in the length measurement into feel and inches (never got around to translating centimeters or millimeters).

ohhh, yeah, now I see it. I had missed it because I was scrolling all over and was looking up all the code (not the most efficient way, but it keeps progress moving, better than brain locking up lol) it calls them in this order:

GrammarRules.registerRule(GrammarRules.buildRule(null, "Suns0", "SunsExt", "Sun"));
GrammarRules.registerRule(GrammarRules.buildRule(1, "Suns0", "SunsAdv"));

because RankNull is higher rank than Rank0, Rank1, etc. (null is as high as it gets) then it works from there.

this is all stuff I learned once about half a decade ago lol I never even got to even attempt to toy with it, much less implement it.

if Suns0 already has a rule, it obviously can't build a new one on it, so if SunsExt has a value (SunsExt != P. S. blank in Java also = null or error) then it is unable to write SunsAdv to Suns0. I'd need to look it up, but I'd guess that there's a Random called somewhere involving the "variable arguments" (vararg) for the sun, which I'm guessing has a decent chance of returning no sun and it probably just gets called all 3 times.

keybounce commented 8 years ago

FYI: Null is not zero. Rank 0 rules are the most common, but a rank null rule has zero chance of random selection.

The only way that the null rules will be used is if you wrote something that matches them; the mechanism exists so that if you write one sun, Mystcraft won't generate any random suns. Ditto for the other things.

Blue64 commented 8 years ago

I know null!=0 lol null is the strongest rank there can be, but if you're writing nothing, then it's still a blank variable when the non RankNull gets called. I'm going to need to actually look up Ranks because I'm fairly positive that they're not a randomly selected thing, but are instead called in some form of a loop, so I'll need to look them up.\, and if they are called, I'll need to locate what calls them by searching for what either imports it or gets imported to it:

package com.xcompwiz.mystcraft.data;

anything that calls:
import com.xcompwiz.mystcraft.data;

or

import com.xcompwiz.mystcraft.api.grammar.GrammarData;
import com.xcompwiz.mystcraft.grammar.GrammarGenerator;
import com.xcompwiz.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;

one of these packages

as those are the only ways for Data to go into or out of this file. It probably doesn't help us that he uses private static final inside a public class.

it might help HIM, because he can be more explicit about his imports/packages, but it doesn't help US.

Blue64 commented 8 years ago

how do I use the Windows 7 Search function and force it to include a .(period)? it ignores the . in my search for "import com.xcompwiz.mystcraft.data;".

keybounce commented 8 years ago

No clue. I use Macs, not windows.

Blue64 commented 8 years ago

you poor thing.

Blue64 commented 8 years ago

found it! ~*import com.xcompwiz.mystcraft.data;*

Blue64 commented 8 years ago
com\xcompwiz\mystcraft\block\BlockLinkModifier.java
com\xcompwiz\mystcraft\data\ModBlocks.java
com\xcompwiz\mystcraft\client\gui\GuiUtils.java
com\xcompwiz\mystcraft\instability\InstabilityController.java
com\xcompwiz\mystcraft\item\ItemLinking.java
com\xcompwiz\mystcraft\api\impl\linking\LinkingAPIDelegate.java
com\xcompwiz\mystcraft\block\BlockBookBinder.java

That's the files that Import it

asl97 commented 8 years ago

seeing as how this issue been more or less hijacked by @Blue64 and others and the fact that i ain't really needed here, i am unsubscribing from this issue.

if for whatever reason you need me (which i highly doubt), 'mention' me using @asl97

Blue64 commented 8 years ago

It's all on topic. If none of us can or will get the mod updated, then the request obviously wouldn't get fulfilled, I'm just trying to get started.

Draco18s commented 8 years ago

None of us can do that. This thread had devolved into you trying to learn how to update a system you don't understand based on decompiled code so that you can use an outdated plugin. This really isn't the place.

keybounce commented 8 years ago

The project needs to be completely rebuilt from the ground up. I poked at it once about six months ago, but the API wasn't complete enough. Since then I've been too busy with other things. So more like, "Closed: pending project reboot."

The real questions are, something like:

  1. Is the API currently complete enough, and if not, what's missing, and
  2. To what extent is the current code-base maintainable, and to what extent is a rewrite necessary now.
Draco18s commented 8 years ago

I haven't had sufficient time lately to look into it terribly deeply, however, the last time I poked my nose in there were huge swaths of the symbol and instability mechanics that were inaccessible (i.e. no API at all).

Blue64 commented 8 years ago

GitHub kinda states all over the place that it's main purposes includes the sharing of code for learning, if this isn't the place to ask questions about code for application in this mod so a fork can potentially be made that could fulfill this request, which is something I too would enjoy, as these are rather ingenious little Corruptions, then where exactly would be the place for that? Because I've every intention of utilizing what I've learned to make progress on this. Just because I started off not knowing anything about the mod beyond "it can generate custom dimensions", my capacity to help and potentially fulfill a request y'all haven't even attempted to see if it was feasible recently is unaffected, we all knew nothing about MystCraft at some point or another. My biggest problem is with Syntax Translation, once I know what the commands DO and HOW, it's a breeze. All coding has a key somewhere it uses to figure out how to do what it's being told to do, it's just a matter of learning the key, and applying it.

Draco18s commented 8 years ago

I'd go here

keybounce commented 8 years ago

More to the point:

What the stuff in the grammar rules DO is describe the complete descriptive book that is used to make the new world. That's all.

HOW they do that is in the code in the Mystcraft jar. Start with grammar.java and work your way down.

As I understand it, there are three phases:

  1. Parse what was written, from terminal symbols UP the set of rules that have no weight (at least when there are two sets of rules), to try to identify portions of book syntax that are provided, and also identify non-terminals that need to be expanded,
  2. ADD new symbols based on the weighted rules and non-expanded non-terminals, to get a final description sentence,
  3. For each symbol in that final sentence, call the code that is registered to that symbol.

You seem to want to combine 1 and 2 together, skip a lot of it, and just go from the grammar rules directly to calling code, without first determining which symbols are going to be used and how to determine which symbols are going to be used.

Blue64 commented 8 years ago

@Draco18s Where should I start there? and more importantly, How does that page relate to this request? I understand that's the official MystCraft forum, but if I was unaware of any issues with, for example, the API used to access the Symbols and Instability Mechanics

I haven't had sufficient time lately to look into it terribly deeply, however, the last time I poked my nose in there were huge swaths of the symbol and instability mechanics that were inaccessible (i.e. no API at all).

then I would be creating my own Add-On Mod to do exactly what this mod is supposed to do, which is just silly, if I can contribute to an already existing mod instead of building it again to allow it to fulfill something as simple as this single request, I'd rather contribute, as that has multiple benefits over rebuilding this mod:

all I needed to know is what was missing, and where to look. It does help that y'all have been explaining the structure to me, as this does save me hours of research and coding and testing (I prefer to test my releases personally before publishing them, saves lots of headaches and "oops"es)

@keybounce I do not see why combining 1 & 2 is a bad thing. I know I'm skipping a lot of stuff, I'll be getting to that stuff later, first I just needed to understand how to preform 1 & 2, then I am capable of replicating it multiple times over until I finally have all the Aspects done, once I understand the Aspects, I move on to the Symbols, once I have the Symbols, I can move on to Parsing for the entire Book, but if I don't have the Aspects (the effects of the various Symbols), then knowing the rest is just mental masturbation. I prefer to start with the meat of the issue (the idea) and work towards implementation, as opposed of starting with implementation and working towards the meat.

My apologies if I've been difficult, you both have been extremely helpful.

Draco18s commented 8 years ago

Go there and ask how to use the api. As the instability effects need to be rewritten entirely, just figure out what my things do and replicate them. Or do your own thing.

Blue64 commented 8 years ago

do you by chance know where their central API thread is? I'm terrible with most BBC boards lol it's all folders and sub-folders and "read here first", I'm just like "I want to just politely ask my question, get my help, and be on my way." lol

Edit: and before you ask, yes, I am already poking around there.

keybounce commented 8 years ago

I do not see why combining 1 & 2 is a bad thing. I know I'm skipping a lot of stuff, I'll be getting to that stuff later, first I just needed to understand how to preform 1 & 2, then I am capable of replicating it multiple times over until I finally have all the Aspects done, once I understand the Aspects, I move on to the Symbols, once I have the Symbols, I can move on to Parsing for the entire Book,

Stop. That is what Mystcraft does for you. You don't need or want to do that.

And yes, you do need to do them in two steps. XComp probably took a year to get that to work right.

Draco18s commented 8 years ago

do you by chance know where their central API thread is?

They're isn't one. Theta an entire BOARD for it. Mods -> API Discussion

Blue64 commented 8 years ago

@keybounce but I don't see _why_, that is what I want to know. Why not do it in 1 step? If I do not see the problem, then I don't see why it's required, and as thus, see no need for the extra coding to separate it.

@Draco18s it this it?

keybounce commented 8 years ago

The best way to find the answer "why not" is to ask XComp. However, I believe the answer is that you don't know what it will be until it is fully parsed -- you have to finish step one entirely before you can begin step 2.

Blue64 commented 8 years ago

XComp states on the Wiki Page that he doesn't regularly browse the forums, as he's normally busy with other stuff (such as programming)

keybounce commented 8 years ago

Can you access http://xcompwiz.com/forum/viewforum.php?f=26 That should contain a sub-forum, http://xcompwiz.com/forum/viewforum.php?f=29 -- which is the API discussion forum.

Draco18s commented 8 years ago

f=29 is the right sub board, yes.

As for asking XCW, he is very active on his own forum. He doesn't visit the Minecraft forum thread.

Blue64 commented 8 years ago

@keybounce 1 post up, I posted that as my link in question (good to know I'm not the only one sometimes forgetting to check links lol)

@keybounce 2 posts up, I compared our notes, and I noticed, I don't actually hit Step 2 until Step 1 is finished, I just don't have it under it's own separate label, because I'd rather Compile as I go, but I do finish each segment before I move on to the Auto-Gen section for that segment (forEvery goes through each iteration, which is what you're saying I need to do).

forEvery Sun(doStuff);
if doStuff = (); [for visual's sake, nothing, there's more than 3 different ways to say this]
(
    gen sun 1-3
    forEvery Sun(doRandom)
)
forEvery Moon(doStuff);
if doStuff = ();
(
    gen Moon 1-3
    forEvery Moon(doRandom)
)
(etc.)

instead of

forEvery Sun(doStuffSun);
forEvery Moon(doStuffMoon);

then

if doStuffSun = (); [for visual's sake, nothing, there's more than 3 different ways to say this]
(
    gen sun 1-3
    forEvery Sun(doRandomSun)
)
if doStuffMoon = ();
(
    gen Moon 1-3
    forEvery Moon(doRandomMoon)
)
(etc.)

As far as I can tell, it's the exact same behavior, just a bit more compacted. I do not see the problem with this method, so if you would kindly explain why this would be sub-optimal, I would gladly adapt it. (I also plan to ask XComp directly, but I'm responding to you first, so I'm asking you first as a result)

@Draco18s thank you for clearing that up. Minor issues such as that slip through all the processing of info sometimes, and it's (very) good to know that he's fairly active on his own thread, I was rather curious about that as well.

I noticed one of the words in the base symbol using segments I was unaware of, so I had to go digging into the base code again, then built that image, as I'd missed a fair bit of it when I'd looked at the symbol components file before (white-on-white, yay). Which I built largely for my own use (I had a pencil sketch version I had been using) and realized that the image alone was 30% of a documentation page.

Some spare moments between adding rim, translucency, and specular shaders to 3D objects in a scene ("No, Bill, they're not textures! Or default! Quit calling them that! And I'm not adding the forcefield shader to every object in the scene! It does not make it look more realistic! GAH") I wrote up the page.

@Draco18s lol at least he knows you randomly go looking through his code

keybounce commented 8 years ago

but I do finish each segment before I move on

\ You cannot say that you have finished a segment until you reach the end of the book.

It is possible to put the first symbol in the book as part of the last symbol in the book. Since you cannot tell what will happen to a symbol until the end of the book, there is no place in the middle to be done at.

Blue64 commented 8 years ago

isn't it all parsed as an array beforehand to figure out how many of each there will be?

Draco18s commented 8 years ago

An array is not a tree. An array is just a list of things, with no context. In order for it to be parsed you have to take that extra step to go through and look at what's there and see what it means.

keybounce commented 8 years ago

I'm pretty sure that stage one takes an ordered list of symbols, and constantly tries to assign each of them to a piece of a tree, and possibly attach these tree pieces together. It only know what it finally has -- a bunch of potentially disconnected tree pieces -- it only knows how all the pieces do or do not fit together -- once it reaches the end of the list of symbols.

Stage two takes all those disconnected pieces of tree, and fits a single tree that contains all of them.

And, in the process of doing this, leftovers can exist, that can't fit into the tree -- these leftovers cause writing instability.

keybounce commented 8 years ago

One more thing:

\ ANY ADDON MOD CAN ADD TO THE TREE **

You cannot write code to parse a preset tree, because the tree can be modified by other mods at runtime.

You have to process a data-structure, not code classes.

Blue64 commented 8 years ago

so this wouldn't be doable using an Array to assign stuff to stacks?

@Draco18s according to all of this forum info, MystCraft is built primarily for use with IMC (Inter Mod Communications), would that help at all, or would it hinder?

Draco18s commented 8 years ago

That's sort of how it works: Modifiers add to stacks (each modifier has its own stack) and symbols that use modifiers pop from one or more stacks (suns take a sunset color, a starting position, and an angle. sunset colors take a gradient. gradients take colors and time). The problem is that in order to have three suns, each of these things has to be parsed separately from one another. You can't simply go looking at all the color pages, smash them all together and go "there! done!"

As for the IMC message, yes, that gets the API, but what the API gives me access to is the important bit. In order to create a symbol and register it, I need an API object that knows what registerSymbol() method does. And I'd need an interface that lets me define a class representing that symbol, and so on. Just because there's an IMC message that gives me the API doesn't mean I can do anything with the API if it has no properties and methods.

Blue64 commented 8 years ago

semi-related topic: bummer! that would be very helpful! @keybounce did you ever manage a workaround for that?

@Draco18s have you tried this?

Draco18s commented 8 years ago

Ironically, I originally wrote that page. It is not current (last edited 2013).

Blue64 commented 8 years ago

@Draco18s lol that's actually pretty hilarious

Draco18s commented 8 years ago

The not-currentness is the problem: I do not know if the current API has those hooks or not. I haven't had time to look and the last time I did they were not there.

Blue64 commented 8 years ago

@Draco18s if I'm understanding this info correctly, you're saying that basically I'd need to have multiple stacks already set up for every variable possible (non-issue, as that's already mandatory for Java), and run them concurrently, parsing their context as I go in order to do it the way I'm thinking of, right? (basically applying the rules, as far as I can tell, the same way it currently runs actually, meaning no grouping all the colors together or you'll get only 1 color type of behavior)

which brings me to this question, are y'all trying to teach me how MystCraft CURRENTLY runs, or how MystCraft would run OPTIMALLY?

this is the difference between rank and FIFO

This is actually true for block modifiers as well, but the value is a collection rather than a single block, and the modifier symbol just pushes to the queue. That queue is FIFO if one ignores categories. EDIT: See viewtopic.php?p=6547#p6547 for a discussion on this point.

on an older note, earlier y'all sent me to a decompiler, how exactly would I get that to run offline? I downloaded their .jar file for that method, but I can't even recall how to apply Java Arguments to a Windows .jar file lol it's been over a decade since I read about that.

I need the Java Dev ToolKit don't I? (JDK)

I asked about progress via the forum ;)

keybounce commented 8 years ago

OK.

Number one: There is a huge difference between knowing how to use a language and knowing how to program.

Just knowing how to write a "hello world" program in java does mean you know how to work with trees. And trees are not the same as stacks, lists, or queues.

Anything from 2013 is going to be out of date now. The API has changed.

Rank and Fifo are completely unrelated concepts. Rank is about relative values of different items, Fifo is just a queue (first in, first out), and all the stacks are FILO (first in, last out).

I'm still trying to understand why you want to re-write the book parsing. There's no need or reason to.

If you were to try to parse stacks for the symbols in the books, you would have to have some way to tell what stacks you were parsing. Anyone can add new symbols, with new logic, to define new categories and things for a new stack. We have stacks of block modifiers, we have non-stacks (running averages) of colors, time, length, and angles, we have stacks of biomes, etc. Any new symbol can come along and read from these stacks or values.

If you want to write/compile java, then yes, you need the JDK. That's just the start. You'll need to set up forge, and I'm going to recommend that you also run through a few tutorials, at least enough to do some sort of "hello world" mod.

The site that we pointed you to will take the mystcraft .jar, and give you a .zip of source files, that could be compiled back, or read and understood. How to compile it is something else -- you'll need to learn how to setup forge for mod development. It's not hard, but you need to be able to follow instructions. (The instructions are designed for people working on one mod, and work well. Not so well if you're trying to work on multiple mods.)

We have been trying to explain how Mystcraft works.

As for IMC and the API: You use IMC to get access to an object that takes a string, and returns an API class corresponding to that string. While convoluted, it is designed to permit the API to change over time without causing any problems for mods -- so that, in the future, once an addon works with mystcraft, it will continue to work with mystcraft.

Blue64 commented 8 years ago

@keybounce I was intending to start with DireWolf20's tutorials originally (I hear lots of good things about them) and working from there, but I was actually referring more to needing the JDK to run the decompiler offline though. I know I'll need JDK & Eclipse at LEAST to build a mod lol I used to work with JavaScripting remember? There may perhaps be a conceptually different design behind Scripting, Programming, and Coding, but in Binary, it's all the same 1s & 0s man, and that's what Computers run on, is Binary, the Concept may change, but all you're doing is staring at the same pole from a different angle (if you catch my drift).

Rank, FILO, & FIFO are all in the Java Programming Language, it's all a matter of how it's used. The API may have changed, but it's sometimes good to look into the past for things that are desired in the present or the future (such as THIS MOD for example lol)

The reason I wish to understand the book's parsing is because I wish to know how the mod works so as to better understand the capabilities available. the decompiler helps, but as I currently have no internet access at home, it can be "problematic" (to put it lightly) to do programming, especially if I need to push an update somewhere or grab a file before I'm capable of compiling (like for example if I need to grab a file off of my GitHub before I can compile due to file corruption on my laptop, I'd need to Download it to my phone, then FTP it to my laptop, then compile, then test, then find WiFi to push the update if it passes my test, otherwise resume debugging)

Isn't a Stack just a FIFO while a Que is just a FILO? Either way, until it becomes remotely relevant in any noticeable way, it'd be fairly pointless to learn them. I know rank was used, so I know I need to learn about the rank stuff again (I was actually toying with it's concept before I stopped JavaScripting on RSBuddy, just never implemented) (and yes, I'm fully aware that rank is a part of the FILO/FIFO category)

"Hello World" is nice and all, but I don't just want a mod that says "Hello World" lol I want to make something that will use a power source (universally rechargeable of course, similar to the AE2 Energy Acceptor combined with the portable rechargeability concept from IC2).

I want to add my own blocks to make custom recipes for custom items that are supposed to be very difficult and expensive to get, because lots of people start up Mob Farms and get all kinds of Automation going, but then there's nothing left do do except to create a fashionable base that can keep up with insanely large workloads (such as ExNihilo Pebbles into ExtraUtilities Octuple Compressed Cobblestone), I desire to make armor that isn't indestructible, but is still very difficult to break while providing lots of End-Game Benefits and being insanely expensive (I'm talking like, multiple stacks of Emerald, Diamonds, Quartz, End Stone, Nether Rack, Eye of Ender, Blaze Rods, Magma Cream, a TON of power, some miscellaneous fluids, and perhaps a few other high end objects as well).

But first I need to learn how to do stuff like this, otherwise, I'll just plain suck at modding, and I know the last thing any of us desire to see is poorly made mods.

Edit: that stuff about IMC actually sounds pretty useful, as long as the wrong ref doesn't get changed of course, but then you can simply create a redirect and the problem fixes it's self.

Draco18s commented 8 years ago

You have stack and queue backwards. A queue is a line for a roller coaster: First In First Out.

keybounce commented 8 years ago

Sigh.

I don't know, or care, if Java, the language, has something called "rank". As used in Mystcraft, it is completely different.

Mystcraft's use of "rank" is strictly as a relative weight for selecting between choices.

The reason I wish to understand the book's parsing is because I wish to know how the mod works so as to better understand the capabilities available.

I can tell you 100% of what capabilities the mod gives you, without knowing anything about how it gives you those capabilities. HOW something is done is decoupled from the WHAT is done.

The what is done: Symbols can take modifiers; the modifier can itself take modifiers. Modifiers are either in the "average and continue" variety, or the "stack" variety. Blocks have helper functions so that they can be tagged with types -- you can ask for the first block of type "ground block", or the first block of type "organic", etc.

Finally, when your symbol logic is called, you are told what count you are looking at -- you'll be told if this is the first time you've been seen this book, the second time you've been seen this book, etc. You won't know how many times total, nor will you know when is the last time. Equally, you don't know when one book is done and the next book is started -- in an SMP server, it is possible for two people to be creating worlds at the same time.

but I was actually referring more to needing the JDK to run the decompiler offline though.

I wouldn't. Just convert it and download the decompiled output.

There may perhaps be a conceptually different design behind Scripting, Programming, and Coding, but in Binary, it's all the same 1s & 0s man, and that's what Computers run on,

Sigh. I don't care what languages you know. If you don't know concepts, you can't program them. If you don't know how to work with trees, with parsing; if you don't understand recursion, or data structure design, then languages won't matter.

Offline: Well, I see that you mentioned git. Good. Offline will still have full versioning / history.

Stack is last in, first out; or, first in, last out. It is a pile of plates, where you put something on the top, or take something off the top. It does reversal nicely, and has a hard time doing ordered.

Queue is first in, first out; it is a line, and can handle ordered behavior.

"Hello World" programs are always the first thing you do. Make sure that you can even get a simple mod loaded, make sure you can get a simple mystcraft add-on loaded.

I did not know that Direwolf had modding tutorials. I don't think of him as a modder.

I'm talking like, multiple stacks of Emerald, Diamonds, Quartz, End Stone, Nether Rack, Eye of Ender, Blaze Rods, Magma Cream, a TON of power, some miscellaneous fluids, and perhaps a few other high end objects as well

Please, no. That's a horrible way to gate things.

because lots of people start up Mob Farms and get all kinds of Automation going, but then there's nothing left do do except to create a fashionable base that can keep up with insanely large workloads

Actually, I regard automation more as a tool to an end, than as a goal in itself. The goal is what I can build and do. I may be an oddball.