Sign in to follow this  
joedobo

Modifying item's generic template. Bigger forges, fountain-pan, pick-up altars...

Recommended Posts

Interesting stuffs but where does one declare what type of items can be put into a bulkbin/fsb? 


Share this post


Link to post
Share on other sites

Interesting stuffs but where does one declare what type of items can be put into a bulkbin/fsb? 

Basically you add "(short)146" to the itemTypes list, in other words:   new short[]{...SOMEWHERE IN HERE...}

 

Here I added catfish as a possible bulk item.

createItemTemplate(160, "catfish", "catfishes", "delicious", "nice", "old", "rotten", "A pretty large and strange bluish, black fish with whiskers.", new short[]{(short)146, (short)5, (short)36, (short)74}, (short)504, (short)1, 0, 86400L, 15, 50, 200, -10, MiscConstants.EMPTY_BYTE_PRIMITIVE_ARRAY, "model.fish.catfish.", 40.0F, 25000, (byte)2, 100, false);

Share this post


Link to post
Share on other sites

Thanks! I had no idea it was that simple, I was looking in other places and over complicating things as usual :P


Share this post


Link to post
Share on other sites

i just can't get the java compiled back to a class.  but have used sqlite to edit made items,  got a forge with 6 backpacks, but the 6 backpacks allow 100 ores each.  plus was able to edit a few bsbs to allow 1000's of ore vs the old 864.


 


can't seem to get large crates to allow more then 300 items still ;-(


 


i'm going to stop trying to edit for a month , spending way to much time on editing and less then 1 hr playing past 2 weeks , lol.  got a river map made that was first goal.  i hope an easier way to edit these values comes up soon, great ideas,


 


maybe soon i'll buy java for dummies and learn,  my exp was on the old commador vic 20 and64.  i'm old .lol


Share this post


Link to post
Share on other sites

I'm not sure what to say about compile troubles. Maybe I should make a short video because it doesn't seem that hard to me.


 


 


The code to change crates is in server.jar   com.wurmonline.server.items.Item


 


I took a different path and made it so bsb and fsb are more convenient to load into a vehicle and use as portable storage.


1. make bsb/fsb huge inside. The x,y,z values are used to calculate a volume which returns a integer. I took the cube root of max integer. This is about 1290 so I set my bsb and fsb internal dimensions to: 1200, 1200, 1200.


2. make the bulk storage bin's external measurements much smaller so I can easily put a few in a large cart or rowboat.


3. make a bunch of changes to "server.jar - com.wurmonline.server.behaviours.CargoTransportationMethods" so that i can load bsb/fsb when the bin it is not empty.


4. Not sure what I changed to let me put stuff in bsb/fsb when its loaded into vehicle.


 


 


I've also spent most of my time looking at code and trying to change things. All I've done in game is mine a few tiles and flatten a few tiles.


  • Like 1

Share this post


Link to post
Share on other sites

Joe I'd love a video myself... The only coding I've done was (lol...) MC servers. I understood it pretty well and how to do different things, but that was a few years ago. And quirks has me so confused that I've no idea how to change anything, or half the time even read what I'm looking at.

Share this post


Link to post
Share on other sites

hmmmm....


 


Do you think there would be any way of making inner and outer volume a variable set by a "Spell"?


 


IE, Certain Items in the game could have "Carry More Space"  "Take up less Space" spells.


 


Would definitely bring new "marketable" skills to priests ;)


 


While i do love me some good "God" mode do everything instantly... for a longer based game, having the same potential game changing effects, would be best accomplished via a "Vanilla Wurm" with "Priest abilities"


Share this post


Link to post
Share on other sites

A spell that changes the item's database values would be the way to go. With this idea you'd likely keep the default item creation values.


It should also be possible to add craftable inventory expansion modules. You'd use them on something and that would also change the item's data base values.


In both the spell and module case it should be possible to add options to configure how powerful the ability is. 


 


 


Now, Can I do this? possibly but I have no idea where to start. At the moment I"m trying to focus on Javassist to mod WU.


 


 


I been changing what containers hold because I don't think its fun to play the micro-manage what-fits-where game.


Edited by joedobo

Share this post


Link to post
Share on other sites

I took a look at creating a Bag of Holding spell but unless I'm completly off it's not possible to change that on item level without huge changes to the database.

The container volume is either detemined by the real item size or the container size of the item template. So to enlarge one forge you'd have to enlarge all forges.

EDIT: I'm trying a different approach. The spell would essentially reuse the Courier enchantment but the power determines how much larger the item becomes. I was going to create this as a karma spell but they won't show in the items action list because there is no support for karma spells on items yet.

EDIT^2:

https://github.com/ago1024/WurmServerModLauncher/releases/tag/v0.8.1

v0.8.1

new Feature: Bag of Holding priest spell

The spell reuses the courier enchantment to allow a priest to magicly distort space and time to create a larger volume on the inside. The spell power determines how much space is bend.

Edited by ago

Share this post


Link to post
Share on other sites

EDIT^2:

https://github.com/ago1024/WurmServerModLauncher/releases/tag/v0.8.1

v0.8.1

new Feature: Bag of Holding priest spell

The spell reuses the courier enchantment to allow a priest to magicly distort space and time to create a larger volume on the inside. The spell power determines how much space is bend.

Thanks for making this. Its nice to see that your applying your Java skills to making modding work. I haven't seen any other competent Java coders undertake this project.

 

1. Why does the file structure in your github not match the package class declarations?

2. I can't find where you've defined what "BUFF_COURIER" is for the the bagofholding mod.

Share this post


Link to post
Share on other sites

I separated the mods from launcher. This makes it much easier to compile and pack them into separate jars.

Also due to the class access policies for the Spell class I had to move the BagOfHolding class into the com.wurmonline.server.spells package and change the classloading to allow the mods to load into the main classloader.

BUFF_COURIER comes from the servers com.wurmonline.shared.constants.Enchants interface which is inherited from ReligiousSpell

Share this post


Link to post
Share on other sites

I separated the mods from launcher. This makes it much easier to compile and pack them into separate jars.

Also due to the class access policies for the Spell class I had to move the BagOfHolding class into the com.wurmonline.server.spells package and change the classloading to allow the mods to load into the main classloader.

BUFF_COURIER comes from the servers com.wurmonline.shared.constants.Enchants interface which is inherited from ReligiousSpell

It's as i thought, I don't know how to fully make use of Intellij. I'm sure there is a way to setup its project structure better then how I'm doing it now.

 

"BUFF_COURIER", silly me.  Forget to add common.jar as library.

Share this post


Link to post
Share on other sites

it looks like Rolf might be "borrowing" your mod with the "Rift" spell that replaces the Fountain bug :D


  • 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