Giant Elementals, A Crazy Idea that IS possible!

Discussion in 'WIP and Development Status' started by Splated, Apr 7, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Splated





    Crap how do i tell eclipse not to include that :(


    oh well NathanWolf wanted it open source anyhow.



    I wanted to cause spin to orbit around a line drawn from one part to another.

    Well considering i learned java just from bukkit plugins I think I'm doing well. :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    epicfacecreeper

    Splated Aqua garbagemule

    Thanks for pointing this out. However, as the plugin is closed-source, we would appreciate you not looking around in the code (or at least not telling us about it). I am well aware that there are ways to decompile class files, but that does not mean you should. I too would like the plugin to be open-source, and have asked many times, but as this is Splated's plugin, we must respect his decision to keep it closed.

    Splated NathanWolf Use the maven build. Simply run "mvn clean compile package" to get a jar. Maven will now auto-update the version in plugin.yml based on the pom version.
     
  3. Offline

    NathanWolf

    Doh! Heh ... yeah.. Maven packaging FTW.

    If you guys are interested in using the CI server, you could also submit the builds from there, e.g.:

    http://jenkins.elmakers.com/job/Elementals/5/info.nothingspecial$Splateds_Elementals/

    There's a difference between intentionally releasing source (when it's ready!) and having people pry and poke with decompilers or what have you. If nothing else, I think it's clear that Splated wanted to keep the source closed until he's ready for feedback on it- it is a bit annoying (though I know garbagemule's intentions were good) to have someone pointing out issues with code that is clearly WIP and labelled as such. :)

    In any case, the source shouldn't be in the jar, I'm sure that'll get fixed for the next release.

    That sounds like teh seks, Ima hafta look at your pom and see how you did that :) I always hate having to keep all the version #'s in sync.
     
  4. Offline

    Splated

    I pushed an update just now with KnockBlocksOff effects and added a version log file for patch notes was in the plugin.yml.

    Also added the bukkit ticket fixes.


    NathanWolf Make a video with the new effects and your flying skull bombs , I think you will like the change. :)

    Also hid the code again "I hope".


    Since the code cat out of the bag, I guess we can show more of the code but part of the reason I wanted it private is I suck at java still, and my code is messy. My style of programing is poke at setting until it works the way i want, or it breaks then learn not to break it that way again.


    epicfacecreeper NathanWolf We can go half open source. People can view the code if they are looking at the api.
    But we won't advertise where the source is just the api.


    Oh and how do i get eclipse to ignore the target folder! it keeps trying to commit it and fails.

    I'm going to upload the friday update around 3 ish PST

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  5. Offline

    NathanWolf

    I certainly will, when I get a chance! I also made it so Fire applies fire damage, but I'm not sure that's working- is anything supposed to happen (like falling blocks bursting into flames) if I give it fire ticks?


    This should work via command-line:

    svn propset svn:ignore target .

    I tried to do it myself, but apparently my svn client is too new for your repo :\

    I've been using Eclipse, which I guess has its own separate svn install since it works, but for some reason is unable to ignore a folder (only individual files).
     
  6. Offline

    Splated


    I have learned to just not upload it but now I have bigger problems your changes to plugin.yml won't let me export my normal eclipse way. and I don't know how to make maven spit out a the plugin.

    I spent more time messing with eclipse maven and subversion then I programed today!

    I'm putting the plugin.yml version back to normal until you guys can show me how to export with maven.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  7. Offline

    NathanWolf

    Hey those weren't my changes! ;) You oughtta tahg epicface :)

    I do want to learn how to make that work though.

    To package the plugin, just do "mvn install"

    You should see a jar show up in "target" that will be all good to go. That's the idea, anyway. It should look something like this:

    http://jenkins.elmakers.com/job/Elementals/6/console

    EDIT: for what it's worth, I grabbed the jar from the CI server and cracked it open. There's no source in it, and plugin.yml looks correct. I'm going to try that "@version@" trick now on my own plugin :)

    EDIT2: Here's what I did to get this working in my own plugin (very handy trick!). A little different than what epicfacecreeper was trying to do, but it seems to work for me:

    https://github.com/elBukkit/MagicPlugin/commit/d16e53c8ee35054e20eb702873410a36d71bc327

    Note that part where I add "filtering" to the resources section in the pom, turns out that's important ;)
     
  8. Offline

    epicfacecreeper

    Can you do that? I use "mvn compile package".
     
  9. Offline

    Splated

    ok i was able to get mvn installed and wrote a bash script to put the plugin were i want it
    we can try the @verson@ and other codes

    Ok i still hate maven, I didn't change anything and now the api can't be found.

    "The import info.nothingspecial.api cannot be resolved"

    Can the Api be moved into info.nothingspecial.Splateds_Elementals.API?

    NathanWolf epicfacecreeper test if i broke the api!

    Ok i figured it out the mvn clean was breaking it

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  10. Offline

    NathanWolf


    Hrm- mvn clean shouldn't break anything, I actually use it before most of my runs. I'm not sure what the difference between "install" and "build package" is except for the purposes of exposing a repository (I think "install" will put it in your local repo?) I am definitely not a Maven expert here.

    Anyway, I did update the pom and make a "release" for the Maven repo and API. You can use that build for your actual release if you want, or not- I don't think the pom.xml version number matters for the actual plugin.

    I did try and make it so the plugin.yml version number comes from pom.xml again, it worked for me but if it doesn't for you feel free to change it back.
     
  11. Offline

    Splated

    if i do mvn clean and make any change in eclipse i get an error.
     
  12. Offline

    NathanWolf

    Do you have the m2e eclipse plugin?

    OK, here's a new video!



    If we can make these things attacking (hmm.. cast spells? Maybe?) this would start to be an epic battle here!

    Some thoughts:

    - It'd be cool to detect the power of projectiles and scale damage. I think you need NMS for that, though (at least for arrows, not sure about fireballs)
    - When getting damaged, the explosions they generate seem to bury them into the ground. Maybe for damage hits, they don't explode, but just play an effect?
    - Their death could be more epic... maybe a shower of blocks like when a Hunter dies?
    - An Elemental seems to kill an Automata in a 1:1 fight every time- I'm not sure, but I think the automata is doing damage to the elemental somehow
    - The way they react to the Push spell is really cool... I'm guessing one of the falling blocks is a "brain", and if I happen to Push that one, the one Elemental moves? I haven't looked closely enough at the code, but I suppose that would make sense.
    - Arrows don't seem to hurt them anymore? Or is that just the stone variant?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  13. Offline

    Splated

    nice video i love the flying effect.



    Turn exploding blocks off and he won't dig into the ground so bad ( remember theres an iron golem in there) every time theres an explosion he's getting thrown around and taking damage.

    theres a death animations but i think the explosions are messing it up.

    The stone golem has a mine craft iron golem in there he's invisible. but he will react to zombies and attacks.

    the stone golem has 1000 hp :p



    You can see my redstone block blood tests scattered all over.


    But for some reason the bow knocks back every time.

    When the arrow hits a few blocks fly out the back but its hard to see.

    But the golem will attack if provoked.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  14. Offline

    NathanWolf

    I wonder if having a golem as the brain means I don't need to do any special targeting (except for Shrink). I'd also expect explosion damage should be hurting them now, though I'm a bit surprised 4 Kabooms didn't finish it off if so. I know, 1000 HP is a lot ;)

    I may play around with that a bit. It's nice I can target any part of the golem, but it's quite a bit more expensive to sift through all the falling blocks I might target at any point.
     
  15. Offline

    Splated

    i put in an easy function to find the golem based on the flying Entity
    Splateds_Elementals.getGolemPart(Entity)

    We should add it to api but it will return the golemPart this falling block or item belongs to.
    you can use it to figure head shots vs arm hits.

    and each part knows the golem it belongs to just do .getGolem()

    Didn't you code the damage values? i figure we can move this to the config later so the values can be player edited.

    Im not sure tnt will do damage to the golem its self only via health transfer to the ControllEntity(iron golem).


    Code:java
    1. if (a.getType() == EntityType.ARROW) {
    2. damage = 10;
    3. }
    4.  
    5. if (a.getType() == EntityType.FISHING_HOOK) {
    6. damage = 1;
    7. }
    8. else if (a.getType() == EntityType.SPLASH_POTION) {
    9. ThrownPotion potion = (ThrownPotion) a;
    10. damage = 0;
    11. for (PotionEffect effect : potion.getEffects()) {
    12. if (effect.getType() == PotionEffectType.HARM) {
    13. damage += (4 * effect.getAmplifier());
    14. }
    15. }
    16. }
    17. else if (a.getType() == EntityType.THROWN_EXP_BOTTLE) {
    18. damage = 5;
    19. }
    20. else if (a.getType() == EntityType.FIREBALL) {
    21. damage = 15;
    22. }
    23. else if (a.getType() == EntityType.WITHER_SKULL) {
    24. damage = 20;
    25. }
    26. else if (a.getType() == EntityType.FIREWORK) {
    27. // Not entirely sure that a Firework is a Projectile... ?
    28. damage = 7;
    29. }


    We could also consider a damage system based on how many blocks are affected.

    For example an arrow, sword hits one block if a golem has an average block count of 600 block with max hp of 200.

    (1/600 ) * 200 = .333334 damage

    Now same golem hit with a bomb affecting 20 blocks

    (20/600 ) * 200 = 6.666 damage

    or a "nuke" hitting 500 blocks.

    (500/600 ) * 200 = 166.666 damage

    Say you had a golem with near max block count of 1900 and only 100 hp and hit it with a bomb

    (20/1900 ) * 100 = 1.0526 damage

    Also don't forget you can add http://dev.bukkit.org/bukkit-plugins/bar-api/ to show the boss bar when you fight them.

    One day we need to play with it on a real server to see how lag affects it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  16. Offline

    NathanWolf

    Is BarAPI a plugin? I thought that was a lib you'd need to shade in. I've been wondering why it wasn't working!

    I'm about ready to put this on my survival server...

    I looked at BarAPI - weird to call something an "API" if it's a plugin, but.. er, maybe that's just me?

    Anywho, I fixed the pom.xml, you were actually compiling in BarAPI - which would make sense if it were a normal API/Lib, but you don't want that if BarAPI is a separate plugin. IMO something like this would be better used as a lib that you would shade into your plugin so it doesn't require the server admin to download a separate plugin, but... well I digress. Not sure if that'd make it go crazy or what.

    I installed Elementals and BarAPI on my survival server... I'd have to give you perms to create elementals though, I don't really want them just running around anywhere. So maybe we can meet up sometime, I dunno, I unfortunately don't get to play on it very much :)

    I did try it out, it wasn't laggy for me... but I'm on a LAN with my server, so not a great test. Next time there are other people on I'll get them to check the lag for me.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  17. Offline

    epicfacecreeper

    I've got an open server running on a relatively low-powered box. Once we want to test it, I will get it set up for that.
     
  18. Offline

    Splated



    I want to remove barApi soon and just integrate the boss bar directly. My goal is to have No depends at all, that way we don't need to worry about other people not updating there plugins.

    epicfacecreeper NathanWolf PM me when and where so i can join your server and see it for real.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  19. Offline

    NathanWolf

    Well I do like how it's a soft depend, so it just doesn't have a bar if BarAPI isn't there. But I certainly get your intentions! I've got like 10 soft-depends in Magic (including yours)
     
  20. Offline

    Splated

    BarAPI keeps trying to update itself and failing its annoying me so at some point we need make our own boss bar.

    I do have a second project :p

    http://dev.bukkit.org/bukkit-plugins/splat-co-labs-collection/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  21. Offline

    Splated

    I thought of a way to solve a lot of AI problems by making a hidden Giant inside an elemental
    [​IMG]

    The giants bounding box is almost the perfect size so arrow shots tend to hit the giant before hitting the blocks.

    Its bounding box also prevents it from goring places it wont fit.


    How ever theres a few problems, the code I use to move mobs, Wont work no idea why it returns ture/false if a path can be found but the giant never moves.



    One fix is to have the giant ride a mob i can move since its hidden it works but its sorta lame and will kill the giant with low roofs.

    [​IMG]
     
  22. Offline

    coco5843

    Titanfall in minecraft ? Can you make a controllable elemantal like titan ?
     
  23. Offline

    Splated

    The dirt one currently is controlled by players.

    The build in giant AI works ok, but he tends to get stuck on houses and currently can only move upward one block.

    Heres my plain for the AI logic:
    1. if (no target) Idle Wantering just like normal mobs.
    2. if (have target)
      1. move in range
      2. attack if in range
      3. if (I'm stuck on something )
        1. use ASTAR find path around it
        2. try to jump over it (less then 4 blocks high)
          1. if (can i break it?)
            1. punch into wall grab target and eat him!
            2. if (to high to jump) smash it to make steps.
      4. can't get there wait or use other LOS attacks.
    3. target dead (back to idle)
    4. if I'm wounded look for healing blocks, and eat them.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  24. Offline

    Splated

    Last edited by a moderator: Jun 7, 2016
  25. Offline

    Splated

    The elementals now have a basic pathfinding AI and the ability to jump .


    also i had a new idea for a ranged attack Spit arrows

    every arrow that hits the golem is saved and when it has 10 it spits them at an enemy.

    I don't think i can finish the clean up for tomorrow so it may be buggy.



    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
    NathanWolf likes this.
  26. Offline

    Splated

    Updated to 1.6

    and added a how to video

     
  27. Offline

    Splated

    I need to finalize the elemental Config system so it can stop changing every week. My goal is to make the system as flexible as possible to allow new ideas to be added without disrupting the old.

    I need your help! Give me your ideas

    I need every possible elemental attack and ability you can think of so I can build the place holders for the future.
     
Thread Status:
Not open for further replies.

Share This Page