Sign in to follow this  
WalkerInTheVoid

[RELEASED] Mods for Modloader: Bounties, Digging Like Mining, Meditation, Underground Prospecting, Spider Replacements

Recommended Posts

The mod shows up along with the other mods I'm using (digging like mining, a deed mod, a skill mod, and creatures on water) and the rest SEEM to be working. The digging mod and the deed mod certainly do. The messages show in the Event tab, right?

Share this post


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

The mod shows up along with the other mods I'm using (digging like mining, a deed mod, a skill mod, and creatures on water) and the rest SEEM to be working. The digging mod and the deed mod certainly do. The messages show in the Event tab, right?

 

Yes, they do, or in this case should.  Any error messages (or loading messages) in the console (aka command line), or can you not see that for your server (thanks to hosting situation for example)?

 

You should at least be seeing lines like this:

Nov 21, 2015 11:56:54 AM org.gotti.wurmunlimited.mods.bountymod.BountyMod configure
INFO: skillGainForBred: true

Of course with a more current date, just plucked that one out of my own logs.

Share this post


Link to post
Share on other sites

Well, after yet another restart, it seems to be working... I'm getting the message about a lack of coins in the treasury. Now I can't log in for some reason, lol. Thanks for responding at least, lol.

Share this post


Link to post
Share on other sites
16 hours ago, drummerboyas157 said:

anyway to add chance of getting coins to other activities by percent?

 

Well, there's (almost) always a way to do something in code, but...at this point, BountyMod's pretty customized for awarding for kills.  I'd have to bring back some of the old code to even start adding coin rewards to other activities, and I'd have to find different places to hook into said actions...essentially that'd be a separate mod entirely.

 

I'll be honest, such a thing really isn't on my radar at the moment, but I am curious: what other activities did you have in mind?

Share this post


Link to post
Share on other sites

will these mods work with the beta branch of WU? or do i have to wait some more b4 i update the server?

Edited by Saiyan

Share this post


Link to post
Share on other sites

The beta branch of WU should only be used for testing.  You should NEVER use a beta branch on your live server.

Share this post


Link to post
Share on other sites

* I have solved my problem even sorry * 

Edited by Hanver

Share this post


Link to post
Share on other sites

Fantastic work!

Must... have... more... :D

 

Suggestions:

Meditation mod: Can you provide the ability to adjust the skill level requirements for each path?

Bounty mod: Can the coin go to the users bank instead? Those coins add up and begin to weigh a lot.

And with that said: Not sure its possible but here's a new mod suggestion "Mobile banking" Allow players to right click our body or inventory to access bank.

Share this post


Link to post
Share on other sites

Meditation mod removes the message for the 10 tiles, but does not give skill. I know it formerly worked pre-update.

Share this post


Link to post
Share on other sites

New Release!

 

https://github.com/WalkerInTheVoid/WurmMods/releases/tag/v1.5

 

Updated Mods:

  • BountyMod
    • Can pay to bank account instead of into player's inventory - Thanks to Faetyl for the idea!
    • Configurable multiplier for all bounties, for ease of fine tuning for your server
    • Configurable multiplier for player-bred creature bounties
  • MeditateMod
    • Specify custom action duration for meditation - Thanks to Kodos for the idea!

New Mods:

  • BoatMod
    • Change the wind effect for all boats to be like a rowboat, with a commensurate increase in speed, up to the cap.
    • Make all animals able to swim while led by a player
    • Enable continued leading of animals when embarking on a vehicle (no more having to frantically re-lead all your critters when you hop in the boat)
  • SacrificeMod
    • Adds a configurable chance for a rare item to award a bone of the same rarity, instead of the usual benefits.
  • SalveMod
    • Adds "power - " to the beginning of newly made healing cover names, so you no longer have to figure it out in your head.

 

 

5 hours ago, CubeManV2 said:

Meditation mod removes the message for the 10 tiles, but does not give skill. I know it formerly worked pre-update.

Huh.  I just tested it on my local machine and I get skill just fine.  Are you running afoul of a cooldown timer? 

Also, bear in mind that unlike Faith, the meditation skill gain is chances, not guarantees.  In other words, you may perform a meditation that qualifies for skill gain, and consumes a "skill gain chance"...but doesn't actually award skill gain.  Annoying I know, but I haven't been able to pin down where skill gain actually occurs in the code, so I haven't been able to address that.

 

Apologies to all for the long delay, the time & energy to update these mods comes and goes in bursts.

  • Like 1

Share this post


Link to post
Share on other sites
On 1/24/2016 at 0:58 PM, Faetyl said:

Fantastic work!

Must... have... more... :D

 

Suggestions:

Meditation mod: Can you provide the ability to adjust the skill level requirements for each path?

Bounty mod: Can the coin go to the users bank instead? Those coins add up and begin to weigh a lot.

And with that said: Not sure its possible but here's a new mod suggestion "Mobile banking" Allow players to right click our body or inventory to access bank.

 

As noted above, I went and implemented the pay-to-bank option, if for no other reason than it seemed to make slightly more sense than coins magically shoved into your pocket.

 

Mobile Banking...hmm.  That may be a toughie, but it's not a bad idea...I haven't gotten into adding new actions (or in this case existing actions to new targets/objects) but wouldn't hurt to start.  Banks are tied to a village, though, and that may cause a snafu or two.  If nothing else, the open-bank code throws an exception if the bank in question isn't currently in any existing village.

 

That said, now I'm curious.  Are you asking for the player to be able to deposit/withdraw items anywhere, deposit/withdraw coins anywhere, or both?

 

Come to think of it, not 100 percent sure I could do depositing coins or items independently.  Or depositing and withdrawing items independently.

Share this post


Link to post
Share on other sites

New (Bugfix) Release!

 

https://github.com/WalkerInTheVoid/WurmMods/releases/tag/v1.5.1

 

  • BountyMod
    • Fixed a bug where bounties paid to bank account didn't decrease kingdom coffers
    • (NEW) Bounties can be paid out of thin air (thus unlimited bounty payments) or from the kingdom coffers (thanks Netscreever)
    • (NEW) Non-hostile, same-kingdom creatures can be set to pay out no bounty (thanks again Netscreever)
Edited by WalkerInTheVoid
formatting glitch

Share this post


Link to post
Share on other sites
On 1/26/2016 at 10:12 AM, WalkerInTheVoid said:

That said, now I'm curious.  Are you asking for the player to be able to deposit/withdraw items anywhere, deposit/withdraw coins anywhere, or both?

 

Come to think of it, not 100 percent sure I could do depositing coins or items independently.  Or depositing and withdrawing items independently.

 

Your recent update resolves most of the need for it. But I was mostly thinking coins, as the bank space is a bit lacking for items. Hmm, another mod perhaps? Increased Bank space anyone? :) 

Really impressed with what you've done!

Share this post


Link to post
Share on other sites
On 1/26/2016 at 3:47 PM, WalkerInTheVoid said:

New (Bugfix) Release!

 

https://github.com/WalkerInTheVoid/WurmMods/releases/tag/v1.5.1

 

  • BountyMod
    • Fixed a bug where bounties paid to bank account didn't decrease kingdom coffers
    • (NEW) Bounties can be paid out of thin air (thus unlimited bounty payments) or from the kingdom coffers (thanks Netscreever)
    • (NEW) Non-hostile, same-kingdom creatures can be set to pay out no bounty (thanks again Netscreever)

 

This appears to link to source code only files. Was it also intended to contain a zip with the updated bounty mod all ready to go?

Share this post


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

 

This appears to link to source code only files. Was it also intended to contain a zip with the updated bounty mod all ready to go?

 

/facepalm

 

Fixed now with zip file.

 

4 hours ago, Faetyl said:

 

Your recent update resolves most of the need for it. But I was mostly thinking coins, as the bank space is a bit lacking for items. Hmm, another mod perhaps? Increased Bank space anyone? :) 

Really impressed with what you've done!

 

Was looking over this earlier today.  It really seems that increasing the number of bank item slots would be comparatively easy, at least for INCREASING the number.  There's a number of problems with decreasing it though, and I count returning it from an expanded amount to the normal 5 as a decrease for this discussion.

 

It seems that every "bank" records its own size, so just changing the size of new banks would not affect players that already have a bank.  Adding the code to expand the banks to a new larger size is only a slight addition in terms of the amount of work, so that's not a problem.

 

The problem then becomes what if the server in question wishes to lower the bank slot size downwards?  There would have to be special handling, especially since I for one really dislike the idea of some of the banked items simply vanishing into the ether.  I'll keep looking, though, it may be possible to simply wait for the player to remove some item(s) and then not allow the player to replace it/them until the bank's contents are below the new maximum.

 

The good news is, if a player has an expanded bank and for some reason the mod is disabled entirely by accident or design, from what I'm seeing here the player in question would simply be "grandfathered" by the existing bank code, as the bank would remember that it can carry X items and the code makes no checks that X matches the intended number of bank item slots.

 

Hope all that was coherent, let me know your thoughts.

Share this post


Link to post
Share on other sites

Thank-you for the updated download.

 

Question for meditation mod:

 

Would it be possible to allow someone to simply state the skill requirement for each level of meditation in the properties file.

 

For example:

 

Level1=1

Level2=3

Level3=7

Level4=10

Level5=18

Level6=26

Level7=35

Level8=42

Level9=50

Level10=60

Level11=70

Level12=83

LevelAfter=5 (every 5 after 83 you go up another level)

 

Another small request:

 

Could we specify whether to apply the epic curve or not to meditation calculations?

 

If either are already doable I apologize. Please point me in the right direction.

Share this post


Link to post
Share on other sites

Hmm.  Right, I forgot to look into customizing path skill requirements when Faetyl asked.  Sorry about that.

 

As far as I know, I'm the primary meditaiton-modder at the moment, though now that I've said that surely someone will come out of the woodwork to prove me wrong.

 

I've looked into the code and the headache is that, if the player is already on a path, the skill requirement for next level is defined by:

 

cultist.getLevel() * 10 - meditation.knowledge < 30.0 || meditation.knowledge > 90.0

if that's true, it sets the local boolean "mayIncreaseLevel" to true.  (there's another block that sets it to true if the "player" is an Arch-GM, but we're talking about regular players here.)

 

If the player doesn't already have a path, then it's a simple

meditation.knowledge >= 15.0

which, if true, sets mayIncreaseLevel to true.

 

The problem here is that my usual methods for fiddling with the code don't work on local variables.  They're stored differently in the bytecode and the means of accessing them gets very complicated very quickly.  Trying to change their value calculation to something else that itself is based off non-local variables is, unfortunately, beyond my skill range at this moment.  Or at least, every other time I've faced that problem, I've found some sneakier way to get the job done to avoid it.

 

Which may just mean I need to think about this problem some more.  This feature IS doable, I CAN do it, if nothing else I can use hooks to replace the meditate code outright, but that would require some reworking to not interfere with existing features and that's a rather brute force approach that is more prone to causing errors if the server code is changed in an update (or as I put it, "fragile").

 

So, to summarize, there's no apparent pretty way to do this, and I'm not sure what ugly way is best yet.

 

In unrelated news, I may have found how to detect modifiers when it comes to creatures (Greenish, champion, angry, etc) and am working on making BountyMod apply (configurable) payout adjustments based on that status.  ETA unknown though.

Share this post


Link to post
Share on other sites

What about the code that checks the mayIncreaseLevel boolean?  Change that from if mayIncreaseLevel = true to if 1 = 1.  Or insert your custom logic here.

Share this post


Link to post
Share on other sites

After updating the BountyMod (for paying into bank), any player on the server attempting to sell corpses at the bank gets  event errors;

[22:21:07] Failed to contact the bank. Please try later.
[22:21:07] We failed to contact the ingame bank. You may not receive the 11 iron coins you have sold items for.

Every 1 second.

Share this post


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

What about the code that checks the mayIncreaseLevel boolean?  Change that from if mayIncreaseLevel = true to if 1 = 1.  Or insert your custom logic here.

 

mayIncreaseLevel is a LOCAL variable, as I said.  That's harder to reach/affect/change using reflection, as the tools I've been using CAN'T work with local variables.

 

2 hours ago, Drathania said:

After updating the BountyMod (for paying into bank), any player on the server attempting to sell corpses at the bank gets  event errors;


[22:21:07] Failed to contact the bank. Please try later.
[22:21:07] We failed to contact the ingame bank. You may not receive the 11 iron coins you have sold items for.

Every 1 second.

 

 

Okay, my first reaction to that was "Yikes" and immediately fired up my own test server, grabbed a corpse, sold it at a token.

 

[19:17:13] You receive 11 irons. Your bank account will be updated shortly.
[19:17:19] You receive 11 iron coins.

 

And done.  Logged into a remote server I've been coding / modding a great many of my mods for, tried the same thing.  Took a little longer (about a minute instead of 6 seconds) for the second message to show up, but show it did, no errors.

 

Finally, BountyMod awards its coins when a KILL is made, NOT when a corpse is sold.  The item-sell-at-token mechanic is not affected, or at the very least it should not be.  At this point, while I've seen wierder and really do want to help resolve this issue, with current information I do not believe this to be an issue with BountyMod.  If it is, I do need more information, as I am not currently able to replicate the problem.  Any exceptions in the console?  Any exception entries / errors in the BountyMod.log file in the mods/logs folder?  Does the problem go away on disabling BountyMod, and return when it is re-enabled?

 

Addendum: the remote server, as I am an admin there, is one I know for a fact is running the latest BountyMod.  (from release 1.15.1)

 

Edited by WalkerInTheVoid
Added addendum

Share this post


Link to post
Share on other sites

Updates on the meditation levels thing: I may have an ugly way of doing it, mainly by monkeying with what the code thinks is the player's skill based off their path level...that's ugly as all get out but it could work.  Somewhat more resilient than some of the other options I've considered and discarded.

 

But that's an aside.  Main thing I wanted to address (since I realized I hadn't) is the "epic curve".  I have to offer my apologies.  I don't see that in the cards at the moment, simply because at present, I don't pretend to know how this curve works.  That may change, but unless someone can punt me in the right direction, I wouldn't hold your breath were I in your position.

Share this post


Link to post
Share on other sites

Token Selling; I'll do some more testing, if there was server side log information, I would have provided it, but I cannot find anything in mod logs or server logs, no console errors on the server either. Will keep you updated.

Share this post


Link to post
Share on other sites
19 hours ago, WalkerInTheVoid said:

mayIncreaseLevel is a LOCAL variable, as I said.  That's harder to reach/affect/change using reflection, as the tools I've been using CAN'T work with local variables.

 

Yes, I saw that.  What I'm suggesting is to completely ignore that local variable in the code that uses it to see if a skill up should happen.  Essentially, remove the check and always skill up, or put your own logic in there to determine if a skill up should happen.

 

Share this post


Link to post
Share on other sites

Another request has come to mind for the meditation mod.

 

When you change paths there is a 24 hour timer that has to elapse before you can formally enter a new path. Could you make that timer configurable?

 

~Nappy

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