Sign in to follow this  
joedobo

[ABANDONED] Cave Dwellings Tweaks Mod

Recommended Posts

Cave Dwellings Tweaks Mod's purpose is to provide options to disable a few restriction that exists in vanilla WU pertaining the cave dwelling construction.

 

About the options:

  1. allowBuildAgainstWalls; This lets you build against cave walls off deed.
  2. maxStories; This is not implemented at all. And it's likely it won't ever be. To add this I'd have to mod how WU uses mesh files.
  3. allowAnyBuildingType; This lets you construct any type of building as a cave dwelling.
  4. buildOnPlainCaveFloor; This lets you plan cave dwellings on plain cave floors.
  5. removeAcceleratedOffDeedDecay; This removes the accelerated decay of cave dwellings.

 

Tested to work for up to WU 1.3.1.3
 
* Required: Ago's WurmServerModLauncher. https://github.com/ago1024/WurmServerModLauncher/releases
* Releases are here: https://github.com/Joedobo27/cavedwellingstweaksmod/releases

* Install: Get one of the archive releases and unpack it into the mods folder. The folder path should look something like this: ~Steam\SteamApps\common\Wurm Unlimited Dedicated Server\mods

Edited by joedobo
1.3.1.3 update
  • Like 1

Share this post


Link to post
Share on other sites

yes, beta 1.0.0.7.  I had to turn them on in the login.db. Not sure why they are default to off. 

Share this post


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

Wait, cave dwellings are in WU now?

 

As it's been stated and from what i understand, Currently and for the for-see-able future WU Will get all WO Updates. However we were excluded specifically from the Rift update and were given the ability to create our own scripts that would generate Rifts. I suspect the reason for this is the rift script was crude and broken, Then a last ditch decision was made to make Rifts a WO Exclusive. My theory anyways. 

 

1 hour ago, joedobo said:

yes, beta 1.0.0.7.  I had to turn them on in the login.db. Not sure why they are default to off. 

 

Probably because bugs i imagine. 

Share this post


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

 

As it's been stated and from what i understand, Currently and for the for-see-able future WU Will get all WO Updates. 

 

 

I know this already.

 

I was more surprised to see they were, in a way, already implemented.

Share this post


Link to post
Share on other sites
2 hours ago, joedobo said:

yes, beta 1.0.0.7.  I had to turn them on in the login.db. Not sure why they are default to off. 

Use The ebony wands feature management if you do not want to mess with the DB.

Share this post


Link to post
Share on other sites

This works if you run your own server from your pc or from a server provider that allows beta versions of the server update. 

For those who want this on there hosted server you need to ask your provider if they have a beta option for your server.

Pingperfect is at the moment building this option for us after my contacting them. So some time today pingperfect will provide the option to use the beta server version so you can get all the updates that have been added already

 

Example you can go into feature management and turn it on but with out your server being opt in you only get the last implementation of under ground dwellings and want be able to build on the side of walls etc...

Share this post


Link to post
Share on other sites

Had cave dwellings enabled on my server for a while since the feature came out and glad to see I'm not the only who made a mod for the restrictions they have been slowly introducing.

 

Share this post


Link to post
Share on other sites
On 05/31/2016 at 6:46 AM, Huntar said:

Wait, cave dwellings are in WU now?

 

Unofficially cave dwellings have been in WU for a few patches, can not remember when, think it was a little before they did the feature management change.

You just needed to enable the feature.

Share this post


Link to post
Share on other sites

Hey, sorry for the probably stupid question, but how do I use this? 

Share this post


Link to post
Share on other sites

@EvilprinceIt's not a stupid question. I mostly made this as a guide in hopes someone else might use it as a reference when making a more polished mod. What aspect of this do you most want? To use it in it's current forum you'll need to compile that pastebin code into a jar and create a properties file. Finally, put that stuff in the server mod loader's folder. It isn't user friendly in it's current form.

 

At thread...

1. I think I can use the javassist.expr.FieldAccess to add toggles to the reinforced floor requirements ( options to turn off that requirement).

2. max stories still looks like a bunch of low level bytecode alteration which I don't want to do.

 

Anyone know where the code is that accelerates decay for cave dwellings?

Edited by joedobo

Share this post


Link to post
Share on other sites
20 hours ago, joedobo said:

@EvilprinceIt's not a stupid question. I mostly made this as a guide in hopes someone else might use it as a reference when making a more polished mod. What aspect of this do you most want? To use it in it's current forum you'll need to compile that pastebin code into a jar and create a properties file. Finally, put that stuff in the server mod loader's folder. It isn't user friendly in it's current form.

 

At thread...

1. I think I can use the javassist.expr.FieldAccess to add toggles to the reinforced floor requirements ( options to turn off that requirement).

2. max stories still looks like a bunch of low level bytecode alteration which I don't want to do.

 

Anyone know where the code is that accelerates decay for cave dwellings?

Oh okay, I thought it was usable, but I think the part most people want is the ability to build against walls, and then the two stories would be nice. 

Share this post


Link to post
Share on other sites

I updated this and it should be easy to use now.

 

6/24/2016 at 3:11 PM, Evilprince said:

 then the two stories would be nice. 

You'll need to train your skill up so you can make two stores.

 

Edited by joedobo

Share this post


Link to post
Share on other sites

Thanks Joedobo,now using this mod on Valoria :)

Share this post


Link to post
Share on other sites

Quick question here. I looked further into seeing about allowing more than 8 stories.

Tiles.class encode()
public static int encode(final short height, final byte type, final byte data) {
        return ((type & 0xFF) << 24) + ((data & 0xFF) << 16) + (height & 0xFFFF);
    }

Server.class loadCaveMesh()
caveArr[x] = Tiles.encode(( short)(-100), TileRockBehaviour.prospect(x & (1 << Constants.meshSize) - 1, x >> Constants.meshSize, false), (byte)0);

CaveTileBehaviour.class handle_MINE()
final int digCorner = Server.caveMesh.getTile(digTilePos);

final int h = Tiles.decodeHeight(digCorner);
if (h <= -25 && dir != 1 && tileType != Tiles.Tile.TILE_CAVE_FLOOR_REINFORCED.id) {
	comm.sendNormalServerMessage("The water is too deep to mine.");
	return true;
}
final short cceil = (short)(Tiles.decodeData(digCorner) & 0xFF);
if (dir == 1) {
	if (cceil > 60 + performer.getFloorLevel() * 30) {
		comm.sendNormalServerMessage("You cannot reach the ceiling.");
		return true;
	}
}

 Based on the code it appears that every cave tile corner has a integer of information available. This integer is broken up into bytes and access with various bit shifting encode/decode methods.

1.0xff, first two bytes are for data and in this case hold information on the ceilings offset from the floor.

2. 0xff, 3rd-4th bytes are for tile type..rock, iron ore, 

3. 0xffff, the last 4 bytes are for heights or the elevation of the floor corner.

 

And thus without redoing the mesh file data storage architecture ( and all the other elements that access it) it's not possible to go beyond 256 height above the cave floor,  yea?

Share this post


Link to post
Share on other sites

Would it be possible to remove the restriction that cave dwellings can only be built on PvE servers?

Share this post


Link to post
Share on other sites

As your GM Power=5 implementer level character, with ebony wand activated, right click on the wand and select Server\Feature Management (or something very similar to that). Enable and Over ride cave dwellings.

 

Works on PVP servers too.

  • Like 1

Share this post


Link to post
Share on other sites

Has this ever come out of Beta mode?  Is it usable with the new WU update?

Share this post


Link to post
Share on other sites

@BattaIf i understand you right...yes you can build dwellings if you set the feature management like Nappy said. 

 

46CVacg.jpg

Edited by Eject

Share this post


Link to post
Share on other sites

Not exactly what I was meaning. We have already been able to create cave dwellings, and the Enable box is auto-checked in Feature management. But isn't this a mod to allow cave dwellings to be put right up against the walls, instead of needing a 1 tile buffer all around?  If so, then I'm wondering whether it's totally ready yet, or still in Beta testing?

Share this post


Link to post
Share on other sites

according to the code it is complete 

CAVE_DWELLINGS(85, "Cave Dwellings", 128, Features.State.COMPLETE, Features.Wurm.BOTH)

Share this post


Link to post
Share on other sites

Ok, that's great.  :-)  Thank you for helping.

 

Share this post


Link to post
Share on other sites

@BattaI'm pretty sure the main things this mod aims to do can't be done with GM wand or game options. Just read the original post for a list.

 

I just haven't updated it for 1.3 yet. I'll start doing this mod now.

Share this post


Link to post
Share on other sites

the thing is you don't need mod to put walls upagainst cave walls this was added in the feature it's self now other things this mod does will have to be updated but the WU feature it's self does allow for walls against cave walls.

  • 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