Jump to content
bbh_blocked_dnftl

A16 Carlzilla's Fishing Mod


Carlzilla

Recommended Posts

Here's a basic fishing mod for the game. The difference between mine and many of the other fishing mods lately is that nothing about the default game data is changed, all items/blocks/etc. are new, so it's a lot easier to remove if you need to.

 

Just paste the code from the pastebin links into the appropriate .xml file in your .../7 Days to Die/Data/Config/ folder. (Be sure to check the IDs if you have other mods installed)

 

Items.xml:

v1 (no fishing trap): http://pastebin.com/rD0SnADG

v2 (/w fishing trap): http://pastebin.com/B9fwbL99

 

Blocks.xml:

v1 (no fishing trap): http://pastebin.com/6bN4im26

v2 (/w fishing trap): http://pastebin.com/qKbQF7it

 

Recipes.xml:

v1 (no fishing trap): http://pastebin.com/j8hmYECC

v2 (/w fishing trap): http://pastebin.com/YTDNEKLU

 

To start fishing you'll need to craft a fishing pole. The rod requires 3 wood, 1 fishing weight (can be made with 5 lead scraps), 1 scrap iron, and 3 bait (can be made from moldy bread, raw meat, or raw fish). Once you have the fishing pole, head to your favorite fishing spot (any water should work) and right click with the rod equipped. Your rod will change into a fishing catch which will need to be placed on the ground and harvested like any other animal (butchering tools work best). After you harvest everything from the fishing catch, you'll get your unbaited fishing pole back. You'll have to bait it again in your crafting menu and then you'll be able to fish again. Pretty easy stuff.

 

If you want to use a trap (and are using v2 of this mod) you can craft one at the forge using an anvil, 125 iron and 5 clay. It will then need to be baited with 3 bait in your personal crafting menu. Then bring the trap to the water, equip it, and right click. It will change to a full trap (looks like a rebar frame block) which needs to be placed on the ground and harvested like any other resource (butchering tools still work best, despite the fact that it looks and sounds metal). You will usually (but not always, to simulate wear and tear of the equipment) receive an unbaited fishing trap back when you finish harvesting, this can be rebaited with 3 bait in your personal crafting menu.

 

I used a custom icon for the Fishing Poles and traps, so you'll need to download this rar file and uncompress it to your main 7 Days to Die folder in order for the icon to show up in game.

 

Fishing Pole Icon:

https://www.mediafire.com/?nfu6479h6ubab4c

 

I'd like to give a huge thanks to Kage, who's own fishing mod inspired me to work on this one. I also borrowed some of his foodstuffs where they would be almost identical (things like grilled fish, boiled fish, etc.), you can check his mod out here:

https://7daystodie.com/forums/showthread.php?36951-The-Fisherman-s-Mod

Link to comment
Share on other sites

Thanks for creating and sharing this mod. This is exactly the sort of thing that feels like it should be part of the base gameplay.

 

I tested this on single-player using Alpha 13.6 and it worked exactly as described. I might implement this on my dedicated server after some more testing. If I do use this on my production server, I will write an Bash installation script for Linux and post it here for others to use.

 

I like instructions in an easy-to-read numbered format so when I saved a local readme file, I re-wrote your paragraph instructions. Here is a copy of what I did in case you or others want it:

 

Installation
============
1. Backup your items.xml, blocks.xml and recipes.xml
2. Copy the contents of blocks.xml and add into the game's blocks.xml
3. Copy the contents of items.xml and add into the game's items.xml
4. Copy the contents of recipes.xml and add into the game's recipes.xml
5. Extract the icon archive into the games main folder.
  - Example target: <game dir>\Mods\ItemIconTest\ItemIcons\Fishing_Pole.png

Usage
=====
1. Craft 3 Bait using 1 Moldy Bread or 1 Raw Meat or 1 Raw Fish Meat.
2. Craft a Fishing Pole using 3 Wood, 1 Fishing Weight (or 5 Lead Scraps), 1 Scrap Iron, 3 Bait.
3. Use Fishing Pole and right-click on the water.  The Fishing Pole will turn into a Fishing Catch (animal carcus).
4. Place Fishing Catch somewhere on the ground.
5. Harvest the Fishing Catch like any other animal carcus (butchering tools work best).
  NOTE: Upon completion, you get an Unbaited Fishing Pole, Raw Fish Meat and potential for Bait. Raw Fish Meat and Bait amount depend on tool used.
6. Craft a new Fishing Pole using 3 Bait + 1 Unbaited Fishing Pole

 

Thanks,

LHammonds

Link to comment
Share on other sites

I feel this is a really clean take on the mod. Well done! It brought a few ideas to mind if you don't mind a suggestion.

 

I was just thinking of how we explain how to do things and craft to each other in the game. This may end up being a bit confusing for new players. The reason I think this is because of the lack of true fishing animations and what people would assume you would do with the pole once you have crafted it. I'm seeing a few people siting by the water casting in the air and nothing happening XD

 

What if you forgo the fishing pole all together and use a rebar frame as a fishing trap? It would make some sense to harvest the trap with your knife or stone axe as far as game mechanics go. You would still have to bait, empty it out and put weights in it or tie it to a bank to keep it from drifting off in the current. People would automatically know you would need to place it next to water.

 

https://en.wikipedia.org/wiki/Fish_trap

Link to comment
Share on other sites

I may add that in an alternative way to fish as well. Make it cost some more resources to build, but have a higher yield.

 

I'm definitely not going to remove the fishing rod, as really, I enjoy the idea of sitting by a lake and casting my rod.

 

I'd ideally like to add actual fish types, each with their own benefits...but I needed to get a working base model for fishing before I mucked around with any of the fluff.

Link to comment
Share on other sites

I worked the trap in already, the only issue is that I can't seem to give an item a block mesh without it causing problems, so the trap currently uses the brass radiator mesh when you hold it. If anyone knows how I'd create an item using the rebar frame mesh, let me know.

 

I'll put up the new code in a second. You're free to play with it if you want though. Just make sure to give credit if you share the code publicly.

Link to comment
Share on other sites

  • 2 years later...

I didn’t create the mod, I tried it last night and it works well, but didn’t like the icons

 

If you’ve got mods already installed you should have a folder called ItemIconTest in that folder ItemIcons

 

If you already know how to edit xml files then itll make it easier

 

What I had to do, is when copy pasting the text from the links the OP did, I had to change the item id numbers and the blocks id numbers (I've added a lot more food items and a couple of other items etc)

 

(I use notepad++ brilliant free editor, and you can set it to be in “XML” mode makes it a lot clearer to read xml files)

 

Now in the OP xml files theres lines that look like this

 

 

<item id="1001" name="Fish Stew">

<property name="Meshfile" value="Items/Food/venison_stew" />

<property name="CustomIcon" value="meatStew" />

<property name="CustomIconTint" value="7EB2D8" />

 

This is for Fish stew, it uses the default built in meatstew icon, with a dulled colour tint

 

So I made a fishstew icon in PhotoShop

 

Deleted

 

<property name="CustomIconTint" value="7EB2D8" />

 

Changed custom icon to point towards mine that I placed in the itemicons folder

 

So now it looks like this (item 1517 was the next free one available according to the items.xml)

 

<item id="1517" name="Fish Stew">

<property name="Meshfile" value="Items/Food/venison_stew" />

<property name="CustomIcon" value="Fishstew" />

<property name="Material" value="organic" />

<property name="HoldType" value="23" />

<property class="Action1">

 

(No need to make it say “Fishstew.png”, game already expects a png file as all the others are)

 

Spelling is important, eg, in the recipes.xml the recipe name has to be EXACTLY like what the item names are

 

And so on…..

I did the same for the other item icon files, aslong as the icons have the same name as what the items “point” to then all should be fine

 

Ill upload the icons I've made here, to media fire

 

Just extract them into the ItemIcons folder in your

 

C:\Program Files (x86)\Steam\SteamApps\common\7 Days To Die\Mods\ItemIconTest\ItemIcons

 

Or wherever you’ve installed the game

 

CLICK HERE

 

im still learning xml stuff myself, if ive missed anything then im sure a pro modder will point it out

Link to comment
Share on other sites

Thanks for all your explanation.

 

i change the xml like you said just before, create a folder "Mods" and put inside the icon (thanks for your links) but when I try to have accès in game I didn't see picture. I mean It's like if I have no connection between the xml and the Icontest...

 

 

Thanks for took time to explain.

Link to comment
Share on other sites

ok might need to do this

 

copy paste this into a new text file

 

<?xml version="1.0" encoding="UTF-8" ?>

<xml>

<ModInfo>

<Name value="Datas Icons" />

<Description value="Custom item icons" />

<Author value="Mat 'Data'" />

<Version value="1" />

<Website value="http://7daystodie.com/forums/" />

</ModInfo>

</xml>

 

save it as ModInfo.xml and put in same folder as ItemIconTest

 

so in the folder Mods, should be 2 things, the ModInfo.xml and a folder called ItemIcons which has the icons i made

Link to comment
Share on other sites

ok might need to do this

 

copy paste this into a new text file

 

<?xml version="1.0" encoding="UTF-8" ?>

<xml>

<ModInfo>

<Name value="Datas Icons" />

<Description value="Custom item icons" />

<Author value="Mat 'Data'" />

<Version value="1" />

<Website value="http://7daystodie.com/forums/" />

</ModInfo>

</xml>

 

save it as ModInfo.xml and put in same folder as ItemIconTest

 

so in the folder Mods, should be 2 things, the ModInfo.xml and a folder called ItemIcons which has the icons i made

 

 

 

Thanks a lot, I check the number id and one was wrong, and the name at the picture versus xml too.

Now all work.

 

Thanks a lot.

 

 

Just one last question please : can we change the value, for try to fish and have anything?

I mean you are at 100% to catch fish with the Pole inside water.

 

So can we change the value for example you try to fish and have 30% only to succes ?

Link to comment
Share on other sites

If I want to try and test this mod on a server do I need to give everyone the image files or can they just be uploaded in the mods folder for the server? And Data can we get a copy of how you put the code in mate? I mean I know you explained it and all, but being real honest it would be alot simpler and easier to see exactly how you altered it to make your icons work in your game. I am playing around with it now and not even sure if I am doing it right. lol Anyway if ya don't mind it would be much appreciated. Thanks mate. :)

Link to comment
Share on other sites

How did you get the icons to show marcou44? I've done everything that was written and they don't show for me. Also the recipes don't show in the recipes list either. Is that right? I checked in creative menu and the items show there, but no icons for them and the recipes when I try to search for them to see what it takes to make like fish stew for example doesn't show up at all. If you guys got it working can ya please tell the rest of the class how? lol I am at a loss myself. lol Anyway thanks in advance. :D

Link to comment
Share on other sites

This is what I have managed to come up with so far since no one is really showing what they done. I got the recipes to finally show in the list. Still have not got the icon issue worked out though. Maybe someone else can come up with a fix for that, but I'll share my code so far as I have done it and hopefully it helps someone else wanting to use this mod. Basically you had to add the start and end portion to the code. Everything else should be as they were in the original code by the OP. I don't recall changing much else out of this part. I also did this in the other ones as well. Again still have not got the icons Data provided to work right. If I do manage to get it to work I'll upload and share it, but being honest if I get to much more annoyed with this I may not finish it since no one else seems to be interested enough in helping or sharing out exactly what they have done in order to get it to work for them. If I do finish it then it's more then likely because I'd want to help out the next guy in my shoes trying to set up this mod. I am sure I've over looked something, but I don't know enough about this stuff to pin point exactly what it is at this time. Anyway hope this bit of info. helps someone out. :)

 

Recipes:

 

<!-- Carlzilla's Fishing Mod start -->

<recipe name="Boiled Fish" count="1" scrapable="False" craft_area="campfire" craft_tool="cookingPot" >

<ingredient name="Raw Fish" count="1"/>

<ingredient name="bottledWater" count="1"/>

</recipe>

 

<recipe name="Fish Stew" count="1" scrapable="False" craft_area="campfire" craft_tool="cookingPot" >

<ingredient name="bottledWater" count="1"/>

<ingredient name="Raw Fish" count="1"/>

<ingredient name="potato" count="1"/>

<ingredient name="corn" count="1"/>

</recipe>

 

<recipe name="Grilled Fish" count="1" scrapable="False" craft_area="campfire" craft_tool="cookingGrill" >

<ingredient name="Raw Fish" count="1"/>

</recipe>

 

<recipe name="Charred Fish" count="1" scrapable="False" craft_area="campfire">

<ingredient name="Raw Fish" count="1"/>

</recipe>

 

<recipe name="Fishing Pole" count="1" scrapable="False" >

<ingredient name="fishingWeight" count="1"/>

<ingredient name="wood" count="3"/>

<ingredient name="scrapIron" count="1"/>

<ingredient name="Bait" count="3" />

</recipe>

 

<recipe name="Fishing Pole" count="1" scrapable="False" >

<ingredient name="Unbaited Fishing Pole" count="1" />

<ingredient name="Bait" count="3" />

</recipe>

 

<recipe name="fishingWeight" count="1" scrapable="True" >

<ingredient name="scrapLead" count="5"/>

</recipe>

 

<recipe name="Bait" count="3" scrapable="False" >

<ingredient name="rawMeat" count="1"/>

</recipe>

 

<recipe name="Bait" count="3" scrapable="False">

<ingredient name="moldyBread" count="1"/>

</recipe>

 

<recipe name="Bait" count="3" scrapable="False" >

<ingredient name="Raw Fish" count="1"/>

</recipe>

 

<recipe name="Baited Fishing Trap" count="1" scrapable="False" >

<ingredient name="Fishing Trap" count="1" />

<ingredient name="Bait" count="3" />

</recipe>

 

<recipe name="Fishing Trap" count="1" scrapable="False" craft_area="forge" craft_tool="anvil" material_based="true">

<ingredient name="unit_clay" count="5"/>

<ingredient name="unit_iron" count="125"/>

</recipe>

<!-- Carlzilla's Fishing Mod end -->

 

 

 

I'll add blocks in here as well too. :)

 

Blocks:

 

<!-- Carlzilla's Fishing Mod start -->

<block id="1665" name="Fishing Catch">

<property name="Group" value="Fishing" />

<property name="CustomIcon" value="RawFish" />

<property name="Material" value="organic" />

<property name="Shape" value="ModelEntity" />

<property name="Model" value="Entities/Gore/animal_remainsPrefab" />

<property name="Texture" value="22" />

<property name="Place" value="TowardsPlacer" />

<drop event="Harvest" name="Raw Fish" count="2" prob="1.0" />

<drop event="Harvest" name="Bait" count="1" prob=".5" />

<drop event="Harvest" name="Raw Fish" count="5" prob="1.0" tool_category="Butcher"/>

<drop event="Harvest" name="Bait" count="3" prob="1.0" tool_category="Butcher"/>

<drop event="Destroy" name="Unbaited Fishing Pole" count="1" prob="1.0" />

</block>

 

<block id="1667" name="Full Fishing Trap">

<property name="CustomIcon" value="Fishing_Trap" />

<property name="Material" value="organic" />

<property name="Shape" value="CubeCutoutBackFaces" />

<property name="Mesh" value="cutout" />

<property name="Texture" value="289" />

<property name="Collide" value="movement,rocket,melee" />

<drop event="Harvest" name="Raw Fish" count="2,5" prob="1.0" />

<drop event="Harvest" name="Bait" count="0,3" prob=".5" />

<drop event="Harvest" name="Raw Fish" count="9,12" prob="1.0" tool_category="Butcher"/>

<drop event="Harvest" name="Bait" count="6,9" prob="1.0" tool_category="Butcher"/>

<drop event="Destroy" name="Fishing Trap" count="1" prob="0.9" />

<drop event="Destroy" name="wornBoots" count="1" prob=".02" />

<drop event="Destroy" name="canEmpty" count="1,5" prob=".1" />

<property name="Group" value="Fishing" />

</block>

<!-- Carlzilla's Fishing Mod end -->

 

 

I am pretty sure these two are fine. When I get the items one sorted out and work out how to get the icons to finally manage to show up in the game then I'll give everyone that one as well. :)

Link to comment
Share on other sites

Sorry not sure how I managed to miss the questions

 

Ok here’s how it works for the icons

 

Go into your 7 days folder

 

And make a folder called Mods

 

Then inside that folder create another called ItemIconTest

 

Has to be spelt exactly that way, capital I’s and T

 

Inside that folder create another called ItemIcons, again Capital I’s

 

4wD6siFt.png

 

 

Open a text editor and copy paste this into it

 

<?xml version="1.0" encoding="UTF-8" ?>

<xml>

<ModInfo>

<Name value="Datas Icons" />

<Description value="Custom item icons" />

<Author value="Mat 'Data'" />

<Version value="1" />

<Website value="http://7daystodie.com/forums/" />

</ModInfo>

</xml>

 

Save it as ModInfo.xml into the folder ItemIconTest

 

(Capital M and I)

 

make sure its saved as xml!!

 

ezatB7Ht.png

 

Download the icon file I made

 

HERE

 

 

Extract all to the ItemIcons folder

 

Now back into you text editor and you will need to load the items.xml from your 7 days to die>data>config folder............make a backup 1st!!!

 

Reason, small changes might be needed if you don’t have unaltered items and recipe, in other words if you’ve got other mods or changes, the item id numbers won’t match, game wont load

 

How it works is this

 

When game is loading you'll see, “loading blocks,item” etc

 

Its checking to make sure there’s no errors and item/block/recipes are connected if they need to be

 

Eg, you can't have a recipe if there isn’t a an item made for it, as the game wont have a clue what its supposed to be

 

And spelling HAS to be exact or game will freeze whilst loading

 

(Good tip here is as soon as the game starts to load, press f1 as this brings up the command line, as parts of the game load, if there’s an error its shows in red, what xml it didn’t like and what line of the xml)

 

 

So back to the checking

 

Load up items.xml

 

Scroll to the bottom

 

The last id number if you have not got any mods/changes should be 1465 (unit_clay) as of 16.4,

 

The original fishing mod items started at id number 1000, that won’t work and will clash, game won’t load

So in a text editor change all the id numbers starting from 1 more than what your id list ends at

(i.e. 1466)

 

Underneath the id number you'll see

 

<item id="1516" name="Fishing Pole">

<property name="CustomIcon" value="Fishing_Pole" />

 

This basically tells the game to use the custom icon called Fishing_Pole that’s stored in the ItemIcons folder

 

Again the spelling HAS to be exact or icon wont load also the dimension HAS to be 116x80, or itll just show blank

 

that ones fine as I made an icon with same name

 

But for the fish stew:-

 

<item id="1001" name="Fish Stew">

<property name="Meshfile" value="Items/Food/venison_stew" />

<property name="CustomIcon" value="meatStew" />

<property name="CustomIconTint" value="7EB2D8" />

 

I changed to

 

<item id="1517" name="Fish Stew">

<property name="Meshfile" value="Items/Food/venison_stew" />

<property name="CustomIcon" value="Fishstew" />

 

I deleted the line with CustomIconTint, wasn’t needed

 

So make sure all the items point to the custom icons….

 

<item id="1516" name="Fishing Pole">

<property name="CustomIcon" value="Fishing_Pole" />

 

<item id="1517" name="Fish Stew">

<property name="Meshfile" value="Items/Food/venison_stew" />

<property name="CustomIcon" value="Fishstew" />

 

<item id="1518" name="Charred Fish">

<property name="Meshfile" value="Items/Misc/parcel" />

<property name="CustomIcon" value="CharredFish" />

 

<item id="1519" name="Grilled Fish">

<property name="Meshfile" value="Items/Misc/parcel" />

<property name="CustomIcon" value="GrilledFish" />

 

<item id="1520" name="Boiled Fish">

<property name="Meshfile" value="Items/Misc/parcel" />

<property name="CustomIcon" value="BoiledFish" />

 

<item id="1521" name="Raw Fish">

<property name="Meshfile" value="Items/Misc/parcel" />

<property name="CustomIcon" value="RawFish" />

 

<item id="1522" name="Bait">

<property name="Meshfile" value="Items/Crafting/clay" />"

<property name="CustomIcon" value="Fishbait" />

 

<item id="1523" name="Unbaited Fishing Pole">

<property name="CustomIcon" value="Fishing_Pole" />

 

<item id="1524" name="Fishing Trap">

<property name="CustomIcon" value="Fishing_Trap" />

 

Now a change, as the original baited fishing trap used same icon as fishing trap, I just made a new icon and saved it as BFishing_Trap..

 

<item id="1525" name="Baited Fishing Trap">

<property name="CustomIcon" value="BFishing_Trap" />

Link to comment
Share on other sites

Thanks for the reply and posting that information out mate. I had everything set up exactly how you explained it. I even redid it and straight copy pasted in case of spelling errors just to be sure. For me personally it is still not working. Now only thing I can think of is I am setting this up on a dedicated server. I don't know why that'd make a difference, but do ya think that could be why the icons are not showing? I've tried it both with eac enabled and with it disabled and still nothing. The images are installed both on the server mods folder as well as client side exactly how you said it should be. The code looks exactly the way you explained it. I've read your instructions over and over so many times I almost got your words memorized. lol So at this point I am totally stumped on it mate. lol :beaten:

 

Edited: Adding a link to my whole code so you can see exactly what I have done mate. Thank in advance. :)

 

https://drive.google.com/open?id=1F0cRHL8NasJwNnEmjp58TeCR4NUHzarD

Link to comment
Share on other sites

Ok Problem solved. lol Icons didn't show on the account of me being a dumbarse. lmao!!!! I don't even wanna say what happened because I feel so stupid, but you deserve to know this mate. lol The ModInfo.xml somehow when I saved it the file ended up saving as ModInfo.xml.xml and I caught it when in was in the middle of rechecking everything. Lmao!!!! How I missed it before I don't know, but it's all working now. Thanks for the help mate. lol If you have no objections because I may decide to zip everything I posted out to make it work all in one folder and zip it up do you mind if I add your icons along with it? I wanted to ask first before I did it and make sure that was all right to do.

 

And also I don't know if you caught it, but I think marcou44 wanted to know about changing the values. Not sure if ya know the answer to that one or not. I don't know anything about that myself. I did good just to get this thing to work. lol Anyway thanks again mate. I owe ya one. :encouragement:

 

 

Edited: Something I noticed is that fishing traps don't show in the recipe search like the fishing pole does or in the creative menu. All I seem to find is full traps in the creative menu. Is that right? I just want to check and make sure the mod is working right. I would have thought fishing traps would have showed up like the fishing pole does along with everything else at least in the creative menu anyway. I dropped a full one down and tested it and instead of giving me an unbaited trap back it just splattered apart after giving me fish and bait. So not clear if that part is working correctly or not so thought I'd ask just in case. Anyway thanks again. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...