Sign in to follow this  
jpiolho

[RELEASED] JPWM Offspring Names (now with custom name item)

Recommended Posts

I always found the name pool for horses a bit limited, so I made this mod that allows to replace or add new names, and now with a new item for custom names.

 

TbfqRpW.png

 

Features:

  • Add new possible names into male, female and generic name pools
  • Completely replace the built-in wurm name pools so that only the custom names will be available
  • A custom item, Naming Tag, craftable with a wood scrap and some cloth string, allows custom names or select one of the available random names from Wurm. The maximum characters via naming tag is 20, which is achieved at 100ql.

 

Requirements:

 

Instructions:

  • Extract the zip file to your mod folders, configure the JPWM_OffspringNames.properties file to your desire.
  • To change/add names, open the file at "mods/JPWM_OffspringNames/names.txt". Inside you'll find 3 categories, generic, male and female. Below those add one name per line.
  • By default the mod will disable horse names on birth, this is to allow custom names with the naming tag, however if you wish to use the initial version functionality, just change the nameMethod to 1 (or Wurm in GUI) and alternatively disable the naming tag as well.

 

Downloads:

 

 

 

 

 

Edited by jpiolho
  • Like 8

Share this post


Link to post
Share on other sites

Actually, look at the code again. There is 0% chance to get just a single name.  The top end of nextInt is non-inclusive so rand.getInt(100) will never be 100.


Share this post


Link to post
Share on other sites

I just wanted to stop by and say thanks for this mod. I offered the players on our server to add name suggestions to a google docs spreadsheet, and everyone came by to add their names. I added them all, nearly 300 of them, and we currently have some fun new horse foals, "Rumblebutt wisdom", "Wildblue", "Huntingmax", and many more on the way.


 


:)


  • Like 1

Share this post


Link to post
Share on other sites

I just wanted to stop by and say thanks for this mod. I offered the players on our server to add name suggestions to a google docs spreadsheet, and everyone came by to add their names. I added them all, nearly 300 of them, and we currently have some fun new horse foals, "Rumblebutt wisdom", "Wildblue", "Huntingmax", and many more on the way.

 

:)

Could you post your list? I'd like more names but I'm not creative enough to think them up!

Share this post


Link to post
Share on other sites

Any idea how hard it would be to change the name of an existing horse? Or if something similar could be done to other bred animals? Would sure make keeping track of the parents a lot easier with names.

Share this post


Link to post
Share on other sites
On 11/16/2015, 9:51:40, cmiddlebrook said:

 

Could you post your list? I'd like more names but I'm not creative enough to think them up!

 

What I did was search the internet for lists of famous horse names - Kentucky Derby winners, Famous movie horses, Famous fictional horse names etc. Came to 500+ names. 

 

The funny thing is that some of these names are large and when two of them come together it makes for some incredibly funny and long names. I was going to take another shot at the list however the people on my server apparently really enjoy the super long names!

 

~Nappy

Share this post


Link to post
Share on other sites

New update. Version 1.1

 

  • Added a new item, Naming tag, craftable with a wood scrap and a piece of cloth string. Allows for custom naming animals, or choose your own random name.

 

  • Like 2

Share this post


Link to post
Share on other sites

Hi, fantastic mod, however, you're doing a base edit which might break compatibility with other mods. You should look into bytecode injection and modification with javassist. I had a bit of trouble with it at first but once you get the hang of it, it should be ok.

Share this post


Link to post
Share on other sites
14 minutes ago, Schmois said:

Hi, fantastic mod, however, you're doing a base edit which might break compatibility with other mods. You should look into bytecode injection and modification with javassist. I had a bit of trouble with it at first but once you get the hang of it, it should be ok.

 

There's no base edit, it's all done with injection and javassist :). Check github source code now, I totally forgot about pushing the changes of this update.

Edited by jpiolho

Share this post


Link to post
Share on other sites

The source looks good! You may want to update your beta ;) still seems like it has base edits.

Share this post


Link to post
Share on other sites

My server GUI doesn't start after I installed the updated version of this mod. I'm not sure why or where I can find any logs on the crash. The command prompt pops up then goes away after some text scrolls.

Share this post


Link to post
Share on other sites

I just installed the latest version of this mod (last one has been running for weeks). Noticed the following error in console when restarting.

 

java.lang.RuntimeException: com.wurmonline.server.behaviours.Actions class is frozen
    at javassist.CtClassType.checkModify(CtClassType.java:294)
    at javassist.CtField.setModifiers(CtField.java:240)
    at org.gotti.wurmunlimited.modsupport.actions.ModActions.init(ModActions.java:44)
    at com.schmois.wurmunlimited.mods.surfaceminingfix.SurfaceMiningFixMod.preInit(SurfaceMiningFixMod.java:153)
    at org.gotti.wurmunlimited.modloader.ModLoader.lambda$loadModsFromModDir$3(ModLoader.java:89)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java.util.stream.ReferencePipeline.forEach(Unknown Source)
    at org.gotti.wurmunlimited.modloader.ModLoader.loadModsFromModDir(ModLoader.java:87)
    at org.gotti.wurmunlimited.serverlauncher.DelegatedLauncher.main(DelegatedLauncher.java:16)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at javassist.Loader.run(Loader.java:288)
    at org.gotti.wurmunlimited.serverlauncher.ServerLauncher.main(ServerLauncher.java:24)

 

Changed .properties to .disabled for this mod (even though message mentioned SurfaceMiningFixMod and server came up fine).

 

I am going to change back to original Offspring_Names again and restart. Server came back up fine running the old version. 

 

Is there a conflict of some sort with the other mod?

Edited by Nappy

Share this post


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

My server GUI doesn't start after I installed the updated version of this mod. I'm not sure why or where I can find any logs on the crash. The command prompt pops up then goes away after some text scrolls.

 

Update to the latest version of the GUI please. That might be the issue!

 

Nappy: There is currently a bug in modloader which makes multiple calls to ModActions.Init have an exception. The only fix I found so far was to put an exception catch around that code but there's nothing I can do on my side, either modloader or that mod has to apply a fix. It has to do with order of load. In this case it means offspring names is being loaded before that mod, and If you somehow could reverse that (not sure how), then if offspring names mod loads after it will be fine.

Edited by jpiolho

Share this post


Link to post
Share on other sites

This is the actual problem:

 

[12:53:48 PM] WARNUNG org.gotti.wurmunlimited.modloader.ModLoader: Mod JPWM_OffspringNames loaded server class com.wurmonline.server.behaviours.Actions during phase preinit
[12:53:48 PM] WARNUNG org.gotti.wurmunlimited.modloader.ModLoader: Mod JPWM_OffspringNames loaded server class com.wurmonline.server.behaviours.ActionTypes during phase preinit
[12:53:48 PM] WARNUNG org.gotti.wurmunlimited.modloader.ModLoader: Mod JPWM_OffspringNames loaded server class com.wurmonline.server.behaviours.ActionEntry during phase preinit

 

Mods are supposed to do any bytecode changes during the preinit phase. To make this independent of the module load order there must be no actions that actually load classes because loaded classes will prevent further editing. Registering an action loads the above classes.

 

The actions should be registered in init() or maybe even later in onServerStarted()

 

I've posted 0.12.1 which avoids doing the ModActions initialisation twice. However, calling it twice would not cause any problems since it just removes the final modifier from the actionEntrys value.

Share this post


Link to post
Share on other sites

New update, v1.1.1

 

Download

 

Changelog:

  • Fixed tags not being improvable
  • Changed some internal code that follows the modloader guidelines, which in turn should make it less likely to have problems with other mods.

Share this post


Link to post
Share on other sites

I like the nametag idea, but would love to see it extended to more than just horses and cows/bulls. I want to rename my pet dog, for example. It would also be handy to be able to name other animals I breed like sheep and pigs. Right now on my own server I am changing the names in the database, but its a real pain to do it that way. But I do know that if the names of those other animals are changed they show up in game, so perhaps modifying the mod to rename those too might not be too hard.

 

Also, with the name tag you can choose a random male or female name but not a generic. And if I understand correctly those are only the normal game names, and not the added ones. It would be really nice to still have the names.txt names available for the nametag letting one pick from their list of names.

 

(One really odd thing I notice is that horse names begin with capital letters, but for other animals it is always lowercase regardless of what is in the database. I think it rather odd that they would convert a name to lowercase for all but horses. Wonder what the devs were thinking when they did that...)

Edited by Romen
added more
  • Like 1

Share this post


Link to post
Share on other sites
On 12/3/2015 at 10:08 AM, Nappy said:

 

What I did was search the internet for lists of famous horse names - Kentucky Derby winners, Famous movie horses, Famous fictional horse names etc. Came to 500+ names. 

 

The funny thing is that some of these names are large and when two of them come together it makes for some incredibly funny and long names. I was going to take another shot at the list however the people on my server apparently really enjoy the super long names!

 

~Nappy

Love to see your list of names. I found some horse names on a website (lost link or I'd include it here) but always open for more names...

  • Like 1

Share this post


Link to post
Share on other sites

ok, I might be slightly retarded, but I'm not quite sure how this works.  If I wanted to implement this to ONLY create a database of names for cattle (two randomly generated names, like horses, some gender locked), would that be possible?  Would it also be possible to ADD more names to the horse name list without compromising the existing list?

 

If yes to these questions; how exactly would I go about doing so?

 

I downloaded the Offsprings Names file and the GUI manager (you have the wrong link to it up there).  I then added names in to the names.txt file.  I put these files into my wurm dedicated server mods folder and launched the game on another computer.  Nothing.  I then put the files in my wurm launcher, client mod folder and tried to launch wurm and the server list won't even open.  The game never launches.

Edited by JackBinimbul

Share this post


Link to post
Share on other sites

There is essentially 2 ways to use this mod. You can modify the list of names the game automatically assigns to your horse offspring, either adding to the default list of names in the game, or replacing the default list entirely by your own. This way only names horses, nothing else.

 

The other way which was added was to allow you to create a naming tag which you can use to name horses and cows/bulls. You can either carve your desired name into the tag, or generate random names (using the modified names list) until you find one you like. If you have the naming tag enabled then the game won't automatically assign names to your horse offspring. But the tag does let you name cows and bulls (never actually used it that way myself).

Share this post


Link to post
Share on other sites

So this mod does NOT allow for an automatic naming pool for animals other than horses, and in order to manually name other animals, it breaks horse names.  No thanks, I'll stick to branding and naming.

Share this post


Link to post
Share on other sites

Well it will give you the ability to add names to the random horse names by adding them to the names.txt file and turning off naming tag. You can either add to the existing horse names or replace them completely. So it does give you something you don't have without it. With the naming tag you can either give an entered name (subject to the quality of the naming tag as far as name length though the naming tag also lets you cycle through random male or female names to pick one you like as well).

Share this post


Link to post
Share on other sites

It would be nice to have the option to use the randomly generated horse names from the names.txt file while also having the option to change the name using the name tag later.

Share this post


Link to post
Share on other sites

I agree, but currently the mod won't rename animals that have already been named.

 

EDIT: Actually looking at the source for the mod I see where it disallows using the name tag on an already named animal and it looks like it would be simple to allow renaming. To change it yourself would mean you'd have to recompile the mod. Ideally this should be another option - to allow renaming.

Edited by Romen
add info

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this