Sign in to follow this  
Schmois

[ALPHA] Fix Surface Mining Mod (With enchantments!)

Recommended Posts

Nevermind.

Edited by Rudie

Share this post


Link to post
Share on other sites

Appears to be borked with this mornings update? All my other mods work but my server will not start with this mod enabled. D: And I was in the middle of a massive surface mining project too naturally.

Share this post


Link to post
Share on other sites

When mining high Slopes, you can only mine high slope as your effective skill level...

is this a bug?

Share this post


Link to post
Share on other sites

Epic curve would prevent you from mining beyond 90 i think it is - freedom allows 3x skill.

 

A way around it is to tunnel mine. You can do slopes up to 270 that way.

Share this post


Link to post
Share on other sites
13 hours ago, Nappy said:

Epic curve would prevent you from mining beyond 90 i think it is - freedom allows 3x skill.

 

A way around it is to tunnel mine. You can do slopes up to 270 that way.

 

can you explain how tunnel mining is different than surface mining if you want to make the slope steeper? I am not familiar with this tactic

Share this post


Link to post
Share on other sites

This is sometimes called strongwall mining as well.

to start, the tunnelling mechanics can be used in your favor to lower a certain tile when a tunnel is opened up on the adjacent tile.

  it is really hard to explain in text the exact criteria that needs to be inplace forn it to be successful, its is far easier to show some one how it is done...

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
5 hours ago, MootRed said:

 

can you explain how tunnel mining is different than surface mining if you want to make the slope steeper? I am not familiar with this tactic

 

BigSteve is correct that it is much easier to show someone then it is to explain in text. I will try anyway.

 

Tunnel mining or strongwall mining takes advantage of the way tunnel entrances clear the land in front of them when they are opened.

 

-------A------

-------X------

LLLLLLLLL

 

In this very simple diagram, L represents level terrain, X represents a tile that is not currently level. A is the tile that will have the tunnel put into it.

 

First you need to make sure that the tunnel will open in the desired direction.

 

     15

45 A 49

     29

 

In this example the number with the highest slope dictates the direction of the tunnel opening. Since 49 is the highest slope the tunnel will open towards the bottom (or down).

 

Next you need to make sure that you have a level tile on the other side of the X tile that you wish to remove. To be completely accurate all that matters is the leading edge of the tile where it is next to the tile you are trying to remove.

 

Once these two things are in place then when you open a tunnel in A, X will become level with L and in the process the slope that was part of X will be added to A making the slope of A much higher. Strongwall is then used to immediately close off the tunnel entrance so that you can continue forward with the next tile.

 

To obtain higher slopes then you can attain normally you would work a number of tiles in a row until you reached a maximum of 272 slope. As an example there are six tiles in a row that have the vertical slopes listed.

 

A

45

62

94

17

21

33

L

 

By using tunnel mining on each tile, starting above the L and continuing until the final tunnel opening below the A, you will add all the slopes together giving you 272 (the maximum permitted tunnel entrance slope).

 

To prepare each tile do this you will often need to do some surface mining and you will likely use another technique called shuffle mining. Shuffle mining is where you start your mining action on a tile edge where you are able to mine and then you run to the corner you want to surface mine down before the action completes. This relies on the mining skill level check happening at the start of the mining action rather then at the end.

 

One common gotcha with this technique is when you encounter an ore vein. Clever use of strongwall tunnelling can often eliminate the vein problem that is blocking you. A more regular approach is to mine out the vein.

 

I hope this long attempted explanation helps.

Share this post


Link to post
Share on other sites

hello

with noNeedToUnconverRock=true the server like not to start =)

Share this post


Link to post
Share on other sites

does this make it like digging = 1 hit = 1 shard also :?

Share this post


Link to post
Share on other sites
1 hour ago, Woltox said:

does this make it like digging = 1 hit = 1 shard also :?

 

If you cast a strong AF on a pickaxe then yes it does.

Share this post


Link to post
Share on other sites

Having an issue getting this mod to work and was wondering if anyone could help with some advice...

 

When I start the server with this mod installed it shuts down immediately and will not run.

 

I have not had any issues with any other mods and to make sure it was not a compatibility issue with another mod I tried it on its own. I've tried fiddling with the config settings, leaving it as the default settings, tried running the server in test mode. Ideally all I want is to make alwaysLowerRockSlope=true.

 

Anyone got any ideas of what the problem might be or things I could try?

Share this post


Link to post
Share on other sites

Post the last few java errors in the wurm.log.0

Share this post


Link to post
Share on other sites
17 hours ago, bigsteve said:

Post the last few java errors in the wurm.log.0

 

Thanks for the offer to help. I yelled at it a few times this morning then took my server offline so I could put the mod back on to get the java errors so I could post them here and it decided to work on my server this time (even if it won't work still on my test server). But that's good enough for me! It's now working, live and tested. Working well so I'm happy :)

 

+1 to this mod

Share this post


Link to post
Share on other sites

Ok,

 

I did not want to ask but I have tried everything I can think of and I can not get it to do this...

 

I need to add the Az Fist spell to a player god, the mod isn't set up to do so. I tried adding it, using the player gods int number assigned to this particular one 104, and it won't give him the spell. Among about a billion other ways I tried.

 

Deities.getDeity(104).addSpell(azbantiumPickaxe); Did not work.

 

I also tried doing it with another mod, using the same method that I use to give other player gods custom spells

 

if (spell.getName().equals("Azbantium Fist")) {
                            deity.addSpell(spell);

 

That does not work either.

 

Sooo any suggestions?

Edited by Xyp

Share this post


Link to post
Share on other sites
On 16.5.2016 at 10:36 PM, Xyp said:

Sooo any suggestions?

Could it be possible that your mod tries to access the spell before Azbantium Fist is initialized?

Share this post


Link to post
Share on other sites

I think I see what I did... if so very stupid on my part haha. Will update after push tomorrow.

Share this post


Link to post
Share on other sites

Received following error in server console following today's WU update. (I believe I have latest version of mod however I will confirm)

 

[08:58:39 AM] SEVERE org.gotti.wurmunlimited.serverlauncher.DelegatedLauncher: javassist.NotFoundException: code
org.gotti.wurmunlimited.modloader.classhooks.HookException: javassist.NotFoundException: code
        at com.schmois.wurmunlimited.mods.surfaceminingfix.SurfaceMiningFixMod.preInit(SurfaceMiningFixMod.java:220)
        at org.gotti.wurmunlimited.modloader.ModLoader.lambda$loadModsFromModDir$3(ModLoader.java:89)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
        at org.gotti.wurmunlimited.modloader.ModLoader.loadModsFromModDir(ModLoader.java:87)
        at org.gotti.wurmunlimited.serverlauncher.DelegatedLauncher.main(DelegatedLauncher.java:18)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at javassist.Loader.run(Loader.java:288)
        at org.gotti.wurmunlimited.serverlauncher.ServerLauncher.main(ServerLauncher.java:33)
Caused by: javassist.NotFoundException: code
        at org.gotti.wurmunlimited.modloader.classhooks.CodeReplacer.findCode(CodeReplacer.java:75)
        at org.gotti.wurmunlimited.modloader.classhooks.CodeReplacer.replaceCode(CodeReplacer.java:32)
        at com.schmois.wurmunlimited.mods.surfaceminingfix.SurfaceMiningFixMod.replaceMineSlopeCondition(SurfaceMiningFixMod.java:382)
        at com.schmois.wurmunlimited.mods.surfaceminingfix.SurfaceMiningFixMod.preInit(SurfaceMiningFixMod.java:217)
        ... 18 more

Share this post


Link to post
Share on other sites

Yep this mod is broken currently with the new version of WU.

 

They saw your rolf code comment and broke that section LOL.

 

This section sadly breaks the whole mod.

 

If you have a server that has a lot of az fist enchants it wont launch. Too many errors it will hang up then give up. I had to go in and do some sql to back up the spelleffects that had type 34 then delete those records so I can sql them back in later when this gets to working again.

 

Anyway its down at the replaceMineSlopeCondition and below. Throwing not found exceptions, apparently they changed how this works.

  • Like 1

Share this post


Link to post
Share on other sites

Getting the same.  Disabling until a solution can be found.

Share this post


Link to post
Share on other sites

possible to get a simple version that only enables the always lower without all the other stuff? <3

maybe less headaches with updates? :)

i also having the crash

Share this post


Link to post
Share on other sites

sad that this mod is not working with the newest server version. we all love it and have use the mod very often, nice spell, nice new pickaxe

i hope there will come an update soon

Share this post


Link to post
Share on other sites

I agree with Eject, this is something that has been so contraversial over the years, this mod fixes the problem, and they break it.

Share this post


Link to post
Share on other sites

It's not really the fault of the mod. The byte code of com.wurmonline.server.behaviours.TileRockBehaviour is strange.

The const pool contains the entry "java/util/Random" twice and this breaks the whole code replacement.

 

The actual code contains the first entry, the code fragement which is used to find the location is using the second entry. I'll try to find a proper solution.

 

EDIT:

There is a simple solution that needs to be added to the mod: The classes const pool can be compacted which replaces duplicate entries:

 

ctTileRockBehaviour.getClassFile().compact();

 

running this before requesting the methods to change will fix the const pool.

 

Edited by ago

Share this post


Link to post
Share on other sites

Thanks ago, have I told you how much your rock lately? if not, you rock!

 

For the less mod savy, I added

ctTileRockBehaviour.getClassFile().compact();

 after final CtClass ctCommunicator = classPool.get("com.wurmonline.server.creatures.Communicator"); in both sections for replaceSurroundingRockCondition and replaceMineSlopeCondition

After doing that the mod loaded up fine. Have not tested in game yet, but in theory that should cover it.

Share this post


Link to post
Share on other sites

Would it be possible to also add a configurable option to the mod that allows you to set the maximum slope possible for surface mining either as a number or as a multiplier.

 

On an Epic server maximum slope is your skill (or about 100 - 101 if skill maxed), on Freedom type server it's about 300. It would be nice to be able to actually set the max (so for Epic perhaps I set it to 300) or to set a multiplier (say 3 x your skill).

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this