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

Draco18s commented 9 years ago

No shit, this project hasn't been updated since Mystcraft 0.9 something.

asl97 commented 9 years ago

so this is a won't fix?

Draco18s commented 9 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."

Blue64 commented 8 years ago

but... but... Post... and epicness... please? I'm actually looking for this mod in 1.7.10 for the most recent version of MystCraft I can find, because, who DOESN'T want to be able to create custom worlds that do strange stuff mixed with a bunch of other mods?

Pretty Please with nice looking Decay on top? (preferably not Yellow Decay though, because that would suck lol)

Draco18s commented 8 years ago

I still don't think the API is complete enough.

Blue64 commented 8 years ago

which API?

Draco18s commented 8 years ago

Mystcraft's

Blue64 commented 8 years ago

... would it be a stretch to recommend taking over both? If I recall everything correctly, there's been zero activity on it since October of last year, and the current Owner was trying to scramble to find a job so as to not get kicked out of Finland. This way you could update the API to at least your standards, and work this mod into it. Worst comes to worst, you could always end up working together with them should they ever return, form a little Mod Making Team, and do lots of awesome work together.

Also, if you say yes, I even have an awesome idea, allow it to recognize when it's about to generate a Dimension on top of an already existing one (for example, Aroma1997s Dimensional World (Mining Dimension) ID: 6, but ID: 2~5 are not made, so Mystcraft makes 2, 3, 4, 5, then when it tries to make 6, it realizes it's occupied, and skips to 7)

Draco18s commented 8 years ago

Wait. You want me to take over maintaining Mystcraft?

That's a laugh.

Also that dim ID idea has already been implemented. For a really long time.

Blue64 commented 8 years ago

You'd do a better job than I would lol I have never even used MystCraft before (I only even know about it because I was watching King Daddy DMAC's YouTube Channel and saw epic stuff), so I have zero clue about any kind of coding about it, any form of balancing, and I still would need to learn Java Coding (which is still a ways away, as I intend to get home Internet first so I will be capable of utilizing my GitHub properly)

the Dimension Variable thing shouldn't be too difficult, as Random Stuff 2 already uses a similar tactic to set it's initial variable for the Spectral Dimension (set the config to -1 and it auto-allocates to the first available dimension), so it's possible, I just have zero clue how it's done.

the alternative would leave me with something akin to this mod, leaving at least 1 massive hole in my World(s), which kind of makes things difficult (unless I make a floating base, but then I'd still need to start making Dimensions, and I'd need to get all my loot from the dimensions that aren't Void yet, assuming the Void Decay doesn't jump up to my base before I can "cleanse" it)

Draco18s commented 8 years ago

Ok. First off: Mystcraft isn't dead or abandoned. Second I would need the source code and XCompWiz's permission. Third I would need the free time in which to work on it. And that I absolutely do not have. And that's all assuming I understand his code and can actually make meaningful forward progress with it. There are a ton of things in the grammar system I don't even pretend to understand.

Draco18s commented 8 years ago

By the way, Mystcraft hasn't been on hiatus for over a year, its been a month.

Mystcraft 0.12.3.01 Post by: XCompWiz on November 12th, 2015 | File Under Mystcraft

Blue64 commented 8 years ago

ah, good to know. I was worried about that, a month isn't anywhere near as bad. I also forgot that 1.6 was rampant with Closed Source Code, I'm too used to dealing with 1.7 where almost everything is (thankfully) open source.

I didn't think Grammar was even an issue with Coding, other than the various "<{[('brackets')]}>" and end of line stuff (; or : usually) or the math (+[plus] -[minus] *[times/multiply] /[divide] =[equals] ^[power] !=(![not]=[equals])). Perhaps I could help you out with some stuff, what would be one example?

Draco18s commented 8 years ago

Uh. Mystcraft has a grammar system for the pages...

Blue64 commented 8 years ago

ohh, you mean the categories? yeah, they're weird alright, but I just look at it as a Folder Sorting System, one File in multiple Folders, it helps to figure it out. Unless you meant something different?

Draco18s commented 8 years ago

Yeah, no, not that at all.

http://binarymage.com/wiki/doku.php?id=writing:symbols_summary

keybounce commented 8 years ago

Hold on ... I have no idea where to start on this ...

keybounce commented 8 years ago

October of last year was 1.7.2. The mod has gone quite a ways since then.

If there is a problem with the Mystcraft API that does not allow this mod to run, then the Mystcraft API needs to be updated by XComp.

Second, you say that you have never even used Mystcraft before. I would strongly suggest you try to do a little research, or else if you are truly ignorant and don't know, then state that in your first response.

Dimensions are no longer handled or assigned by the individual mods. Forge has a generalized dimension registry. Individual mods are not responsible for allocating dimensions, or determining which ones who use; essentially, they just ask Forge for the next available dimension. (Yes I'm skipping quite a bit.)

The grammar system is not just categories. An age starts as the symbol, " AGE", which then expands into things like Suns0, Moons0, Stars0, ground, etc.

And if that were not enough, there are two different sets of expansions. One is used to initially look over what you wrote in your book, and figure out what was left out; the other is used to understand what was completely left out of the book in the first place. This is on top of the fact that the rarity rules for which rule is used, and which symbol is used to expand the rules, differs from the rarity used for generating treasure. The grammar is probably one of the more complicated sections of code in modern Mystcraft. As if that were not the only thing, the grammar system is the single big point of change from Mystcraft 9 to Mystcraft 10.

Here's a question for you: how do you think Mystcraft goes from the categories of symbols to generating a world description?

EDIT: And, I completely forgot: Visible source is not the same as Open source is not the same as "You have permission to decompile". We don't have the source to Mystcraft, we just decompile and make guesses.

Blue64 commented 8 years ago

@keybounce I was jumping all over the place,

Not quite everything has exactly soaked in still as I just absorb it all and then slowly process it over the next few days until it all just "clicks", but thank you for your concern on that topic. Research was done, but I'm still processing it all (including a few pages I didn't have time to read and only saved to my comp for later review offline), and that's not even counting the stuff I've seen in the Let's Play I mentioned (there was a server reset earlier in the Playlist due to MystCraft causing Crashing).

I figured it would just check which categories aren't filled in correctly when the Age is generated and creates instability as a result, or a randomized variable (such as Eternal Rain, No Weather, etc.), which according to the Symbols Page, it does exactly that. If you know what it takes to make a World, and you know what is missing, and what is extra, you simply create more or less instability as a result.

right?

@Draco18s I'm currently reading through the Symbols Sub-Link, which does slightly mention the Grammar y'all have referenced.

@keybounce @Draco18s Where would I find something more comprehensive about the Grammar? (yeah, I'm actually soaking this all up so far, and understanding it fairly well, and craving more information. To quote Little Shop of Horrors: "Feed Me!" lol)

oh, and of course, the stuff needs to be in the correct proportion, and potentially the correct order too. If you have 3 suns and then 3 times and then 3 colors, it might not compile right due to improper order and you'll get massive instability, or just a really wacky sun lol so you'd need

Sun, Time, Color
Sun, Time, Color
Sun, Time, Color

instead of

Sun, Sun, Sun,
Time, Time, Time,
Color, Color, Color

Right?

  1. Edit: I was referring to the "Words" earlier when I mentioned Categories, which as far as I can tell, is directly related to the Grammar.
Draco18s commented 8 years ago

It's not "categories." That's how it worked in Minecraft 1.5 and 1.6, it only took one symbol to satisfy the system. And you're half right. It would actually be

Color, Time, Sun,
Color, Time, Sun,
Color, Time, Sun,

You can't do

Color, Color, Color,
Time, Time, Time,
Sun, Sun, Sun,

Because the colors (and time) would all average, leaving you with

Color
Time
Sun, Sun, Sun,
Blue64 commented 8 years ago

lol as I guessed, one funky sun, and that's not even counting the directions! Yeah, the order of things I guess I have backwards (idk why you wouldn't define what you're coloring FIRST, but, meh).

See, I did do at least some research, I noticed that the ordering would need to be important enough to not just cluster everything together by type lol

So you're saying the "Words" aren't actually all that important anymore?

keybounce commented 8 years ago

You can't just go by category. What does Mystcraft do if you write

Link panel, plains biome

???

There is no way to answer that without using some rules to parse what you have written. Then, you see that "plains biome" might be attached to a biome controller, or to "Floating islands" as a large world effect.

So there's a chance to determine which of those is the owning rule. Then you know which rule is not present in your book, and gets filled in randomly.

It's worse if you specify a color, and nothing else. Something will have that color; what?

Draco18s commented 8 years ago

The colors come first because you're describing a "Red Sun" (see?) in prefix notation, rather than "Sun: Red" (postfix), ignoring the fact that suns don't take colors, they take sunsets which take colors. Other examples, "Stone tendrils", "Ice Spikes," "Obsidian Obelisks."

Some objects are harder to convert to proper English syntax, such as biome groups ("Jungle, Desert, Forest, Large Biomes") but it has to do with the symbols that are considered the nouns and which are the adjectives. "Large Biomes" is the noun because the world generator has a biome generator that takes as input a list of biomes. Biomes are modifiers, which is why Floating Islands take them as input as well.

Keep in mind, though, that the internal workings of this system are hugely complex so that the player can not specify modifiers if they don't want to, or supply a type of modifier that isn't possible via random selection. For example, "Red, Sun" is perfectly valid. So is "Blue, Red, Sun" (giving purple). So what stops the internals from taking your "Red, Sun" and making it a "Blue, Red, Sun"?

keybounce commented 8 years ago

The answer to that is that there are two sets of rules for expanding things like "Sun".

One is used for parsing what you wrote. The other is used for expanding what is missing.

@keybounce @Draco18s Where would I find something more comprehensive about the Grammar? (yeah, I'm actually soaking this all up so far, and understanding it fairly well, and craving more information. To quote Little Shop of Horrors: "Feed Me!" lol)

You'll have to read the source. Toss the .jar file at http://www.javadecompilers.com/ and select the CFR decompiler.

Blue64 commented 8 years ago

assuming you are capable of Coloring the Sun (which Random Things 2 can ... for it's Moon. It colors the Moon Red):

if sun !=
{
  forEvery sun
  {
    if color !=
    {
      forEvery color
      {
        colorMix = color
      }
      else
      {
        gen colorMix
      }
      sunColor = colorMix
    }
  }
}

basically (give or take), right? (keep in mind, I've never actually sat down and learned how to write Java, I'm just extrapolating up some example commands)

keybounce commented 8 years ago

What? I did not understand that at all.

Blue64 commented 8 years ago

!= is Not Equals, so

if sun !=
{
  BlahBlahBlah
}

is if sun variable does NotEquals blank, then BlahBlahBlah. if sun Equals blank, it doesn't do anything between the { & } for if sun !=

forEvery I've been seeing around GitHub recently for various other mods using loops, and it literally means "for every" so basically, for every sun it finds, it checks the color variable, for every color variable it finds, it mixes them. if it finds a Sun, but no Color, it generates a mixed color.

it's a simple if / if else / else array, one of the most common arrays in any programming language commonly used these days that I've heard about. This one just happens to be nested to provide a more explicit command control.

Draco18s commented 8 years ago

Keybounce and I are both programmers. That said, your loops are still wrong. Its more accurate to represent the book as a tree.

        Sun
      /    \
  Time     Color
               \
               Color
Blue64 commented 8 years ago

how would you go about programming that tree? because as far as I can tell, the format has not changed. I still went sun > color > color unless it found no color, at which point it went sun > generate color

if sun !=
  forEvery sun

sun >

    if color !=
      forEvery color

color >

        colorMix = color

color

    else
      gen colorMix

no color? generate color

    sunColor = colorMix

apply color to sun where is this tree invalid other than the branch error of having gen colorMix inside it detecting that a color exists?

Draco18s commented 8 years ago

Your loops fail as soon as there's more than one sun.

The way it actually works is using a stack. When a color is read (from left to right) it is pushed onto the stack. When any other symbol wants a color modifier (a color page being a page that accepts a color modifier!) it pops it from the stack and does what it wants with it.

Your loops will give every sun the same color (or possibly the first sun will consume every color page in the book, then the others will get random).

Blue64 commented 8 years ago

that's more descriptive of the issue. but it specifically takes into account the possibility of more than 1 sun, so it will not fail, just error.

and yes, every sun would end up with random, but that is simply because the color page would be a different array!

keybounce commented 8 years ago

So, step one: you are completely wrong in the concept you are bringing to the problem.

It is not "write code to describe the suns".

It is "write a language that describes the suns, in two ways, and code to understand that language".

Here's a sample: a portion of the rules for dealing with stars:

./mystcraft/data/SymbolRules.java: SymbolRules.addRule("StarsEndSky", SymbolRules.buildRule(4, "Starfield", "Gradient", "StarsEndSky")); ./mystcraft/data/SymbolRules.java: SymbolRules.addRule("StarsNormal", SymbolRules.buildRule(1, "Starfield", "Gradient", "Period", "Angle", "StarsNormal")); ./mystcraft/data/SymbolRules.java: SymbolRules.addRule("StarsTwinkle", SymbolRules.buildRule(2, "Starfield", "Gradient", "Period", "Angle", "StarsTwinkle")); ./mystcraft/data/SymbolRules.java: SymbolRules.addRule("StarsDark", SymbolRules.buildRule(3, "Starfield", "StarsDark"));

Note that at rarity 1 (most common), you have the expansion "Starfield", "Gradient", "Period", "Angle", "StarsNormal" as the expansion of StarField. And yet, if it sees "StarsTwinkle", then it knows that expands as part of a different rule.

This should give you some insight into how things work. There's a lot more going on than just this.

Blue64 commented 8 years ago

this is what I was asking about when it came to Grammar. this I am assuming is from that site you told me to decompile stuff at.

and how exactly does the ./mystcraft/data/SymbolRules.java: SymbolRules.addRule("StarsTwinkle", SymbolRules.buildRule(2, "Starfield", "Gradient", "Period", "Angle", "StarsTwinkle")); read it's "Gradient",? because that's the example I would have been posting for the sun coloring (we already know it's sunset gradient, but it's an example, so it doesn't need to be exact snippets, just valid structure)

P. S. an alternate way of reading this same line:

./mystcraft/data/SymbolRules.java: SymbolRules.addRule(
  "StarsTwinkle", 
  SymbolRules.buildRule(
    2, 
    "Starfield", 
    "Gradient", 
    "Period", 
    "Angle", 
    "StarsTwinkle"
  )
);

so my loop is still valid, it's just spread out.

keybounce commented 8 years ago

The line of code, SymbolRules.addRule("StarsTwinkle", SymbolRules.buildRule(2, "Starfield", "Gradient", "Period", "Angle", "StarsTwinkle")); exists in the file mystcraft/data/SymbolRules.java

This says to add a rule to the grammar. This rule describes both how to interpret "StarsTwinkle" when that symbol is seen written into a book, and provides a rule for expanding "Starfield" when no such data is in the book.

There are similar rules for gradient, for time, for color, etc. Some of these rules are actually constructed by loops in the code, instead of being hard-coded.

Blue64 commented 8 years ago

yes, it runs through a reference label as a subroutine that contains a compilation loop, this concept is nothing new to me.

keybounce commented 8 years ago

Start here:

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

This is the "master" rule that defines everything else. From here, there are many other rules for each of those.

keybounce commented 8 years ago

yes, it runs through a reference label as a subroutine that contains a compilation loop, this concept is nothing new to me.

no, no, no.

Do you have any concept of a context-free grammar? Do you know what that is?

Blue64 commented 8 years ago

all I'm seeing is a bunch of label calls so far. where is this context free grammar?

keybounce commented 8 years ago

Here's a sample of the "dual rules".

./data/GrammarRules.java: GrammarRules.registerRule(GrammarRules.buildRule(1, "Biomes", "BiomesAdv")); ./data/GrammarRules.java: GrammarRules.registerRule(GrammarRules.buildRule(2, "BiomesAdv", "BiomesAdv", "Biome")); ./data/GrammarRules.java: GrammarRules.registerRule(GrammarRules.buildRule(3, "BiomesAdv", "Biome")); ./data/GrammarRules.java: GrammarRules.registerRule(GrammarRules.buildRule(null, "Biomes", "BiomesExt", "Biome")); ./data/GrammarRules.java: GrammarRules.registerRule(GrammarRules.buildRule(null, "BiomesExt", "BiomesExt", "Biomes")); ./data/GrammarRules.java: GrammarRules.registerRule(GrammarRules.buildRule(1, "BiomesExt", new String[0]));

One of those sets is used for parsing. One of those sets is used for generating random stuff when you don't specify anything.

What do you mean by "a bunch of label calls"? These are pieces of the grammar.

keybounce commented 8 years ago

Edit: Maybe I can make it cleaner:

GrammarRules.registerRule(GrammarRules.buildRule(1, "Biomes", "BiomesAdv")); GrammarRules.registerRule(GrammarRules.buildRule(2, "BiomesAdv", "BiomesAdv", "Biome")); GrammarRules.registerRule(GrammarRules.buildRule(3, "BiomesAdv", "Biome")); GrammarRules.registerRule(GrammarRules.buildRule(null, "Biomes", "BiomesExt", "Biome")); GrammarRules.registerRule(GrammarRules.buildRule(null, "BiomesExt", "BiomesExt", "Biomes")); GrammarRules.registerRule(GrammarRules.buildRule(1, "BiomesExt", new String[0]));

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

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

there's a GoTo variant and a GoSub variant of label calls, but that's basically what I'm reading.

keybounce commented 8 years ago

Edit: Maybe I can make it cleaner:

(GrammarRules.buildRule(1, "Biomes", "BiomesAdv")); (GrammarRules.buildRule(2, "BiomesAdv", "BiomesAdv", "Biome")); (GrammarRules.buildRule(3, "BiomesAdv", "Biome")); (GrammarRules.buildRule(null, "Biomes", "BiomesExt", "Biome")); (GrammarRules.buildRule(null, "BiomesExt", "BiomesExt", "Biomes")); (GrammarRules.buildRule(1, "BiomesExt", new String[0]));

Is that cleaner?

Your "sequence of calls" is not accurate. You need to learn the basics of context-free grammars.

Try https://www.cs.rochester.edu/~nelson/courses/csc_173/grammars/cfg.html to get started. Then, https://en.wikipedia.org/wiki/Context-free_grammar for more data than you can digest in one sitting.

Oh -- Rochester State treats this as fairly advanced? (cs 173)? ... Well, UCLA had it in the 100's as well, so, maybe. (UCLA's numbering: The 0xx's were for non-CS majors, or first-year CS majors; the 1xx's were for CS majors; the 2xx's were for CS grad students.)

Blue64 commented 8 years ago

GoTo doesn't return to where it was when that segment ends, thus preventing it from doing stuff you wouldn't like it to, such as getting stuck in an infinite loop. while GoSub returns to where it was sent from.

how exactly was the sequence not accurate? I read it top left to bottom right, standard English programming style.

keybounce commented 8 years ago

Sigh.

The concepts you are bringing are inadequate. You must forget what you "know".

More to the point: There is something going on that you do not know. And as long as you insist on mapping what you are seeing to what you know, and not willing to say "I am confused, I don't understand", you will not learn something that you do not know.

Tell me, how would you turn these rules into a bunch of gotos/gosubs for understanding this:

(GrammarRules.buildRule(1, "Biomes", "BiomesAdv")); (GrammarRules.buildRule(2, "BiomesAdv", "BiomesAdv", "Biome")); (GrammarRules.buildRule(3, "BiomesAdv", "Biome")); (GrammarRules.buildRule(null, "Biomes", "BiomesExt", "Biome")); (GrammarRules.buildRule(null, "BiomesExt", "BiomesExt", "Biomes")); (GrammarRules.buildRule(1, "BiomesExt", new String[0]));

keybounce commented 8 years ago

(To help you understand: the first argument is the "weight", or likelyness, of that rule. "1" is more commonly used than "3". "null" means it will never be selected at random.)

Blue64 commented 8 years ago
  1. what is CS?
  2. I never even finished Grade School, much less even looked at High School, or even remotely considered College.
  3. I've taught myself a few different Programming Languages without even needing YouTube once, just a plain text file with a bunch of real examples I could utilize and see how they worked until I could rip the code apart and rebuild it for my own purposes.

as far as your next post, I know how a weighted stack works., despite the fact that it's using a custom variant with inverted values (normally it adds them all together and picks one, thus larger = more common)

keybounce commented 8 years ago

CS = Computer Science.

The concepts being expressed here are independent of the programming language, and are the concepts used to describe/design programming languages.

Being able to learn the syntax of a language is not the same as learning how to work with things in a language. Do you understand the concept of a tree? You said you understand the concept of a "weighted stack", yet I'm not familiar with this -- stacks to me are first in, last out. So I'm going to say I don't know what you mean by that, and ask you to explain and teach.

Independent of any language, do you know how to write code to traverse a tree? Do you even know what a tree structure is?

Blue64 commented 8 years ago

do you know what a "Weighted Item Stack" is? If not, I would recommend quickly learning it, as the MineCraft function IItemStack utilizes this insanely frequently in Forge, as well as in even Vanilla MineCraft.

Floating Ruins Mod for example uses Weighted StacksChances to decide which Island Type it generates when it creates a Floating Ruin (Sphere, Cone, Jetsons).

so if it is configured thusly:

I: sphere=3
I: cone=2
I: jetson=1

then the total value is 6, sphere has a 3/6 chance, cone has a 2/6, and jetson has a meager 1/6 chance of being created every time a floating Ruin is created.

keybounce commented 8 years ago

Oh. That's not what I'd call a stack. That's just a weighted choice. And, I'd say that the weighting sum is 6, not 9.

Meanwhile: Do you understand what a tree structure is?

keybounce commented 8 years ago

Consider this:

Root -> nodeA, listB, treeC, treeD listB -> (1, 2, "Buckle my shoe") treeC -> treeE, treeF treeD -> (listG, listH) etc

Can you write code to traverse such a structure? Not just a list, not just a list of lists.

Do you understand recursion? Both "tail recursion" (where you can recurse once per loop, at the end of a call; those can be re-written as a simple loop) and ... call it "dual recursion", where you need to recurse twice each time through until you find a terminal case and return out?