Jump to content

Blueberry Ice - my first ever mod!


Requiem76

Recommended Posts

Yep, if I have the Mods folder its working, that is right. The problem is for the other players, they can not see the items... but anyway I am making a few new .png icons and it works, the bad thing is: it works only for me because the mods folder (local).. so, is there a way to make that work on servers for other players with this local mods folder?

Link to comment
Share on other sites

In the code remove the <!-- and -->

 

THIS:

 

 

Becomes this on your SERVER items.xml

 

 

I think you might have made a mistake. The customicon property still points to your custom icon. This is what you want, I think:

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

 

 

 

Yep, if I have the Mods folder its working, that is right. The problem is for the other players, they can not see the items... but anyway I am making a few new .png icons and it works, the bad thing is: it works only for me because the mods folder (local).. so, is there a way to make that work on servers for other players with this local mods folder?

 

Like I said, it doesn't push to clients. They will all need to have the custom icons installed on their own client PC inorder to see the icons, if you go with brand new icons via the Mods folder. Your only other option is to use the customicon property to give the item the same icon as a vanilla item/block.

 

Customicon property is not the same as true custom icons, which use the mods folder and do not push to clients from the server.

Link to comment
Share on other sites

I think you might have made a mistake. The customicon property still points to your custom icon. This is what you want, I think:

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

 

Erh no... Then the icon will look like the standard bottlewater glass....

 

The Value should carry the same name as the PNG file.

 

on my server it is like this:

 

<item id="1140" name="Blueberry Ice">

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

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

<property name="CustomIconTint" value="ffffff" />

 

the value references to the ..\Steam\steamapps\common\7 Days To Die\Mods\ItemIconTest\ItemIcons\Blueberry_Ice.png

 

so the code is not wrong since it works, see my images in the first post that is from adding this code to my VILAYER gameserver XML's , I have not even tested it with my local XML :) (since i got a private server for just me and a friend I can take the server offline at any moment so i find no need in testing it local first)

 

but the whole problem is like valmar said and like i updated in the first post, EVERYONE who plays on YOUR server with these modified codes, should download this file http://www.mediafire.com/download/c8uaa420dj25qnd/customicon_requiem76_7dtd.zip

 

and on THEIR side they need to browse to \Steam\steamapps\common\7 Days To Die\

 

there they need to make if not present this directories (CAPS SENSITIVE!), so their local file structure looks like this:

 

7dtdmod1.png

 

7dtdmod2.png

 

7dtdmod3.png

 

7dtdmod4.png

 

Again do NOT make any CAPITALIZATION errors, so do not rename the png file and do not rename the value name. the value name should be exactly written in the code as the name of the png file (without the extension PNG ofcourse )

Link to comment
Share on other sites

@Requiem

 

Sorry, I assumed you were showing him how to add a customicon property to avoid using a Mod icon, thus making it work with everyone on the server without the need for downloading or installing files.

 

Coincidentally is there a reason why you don't just rename the png Blueberry Ice? You don't NEED the customicon property in this case. If the icon has the same name as the item/block then it will be used. You don't have to use the customicon property to point to it.

Link to comment
Share on other sites

my reason was to make / (read add) a total new icon, not replace an existing icon, or... i do not understand what you mean with renaming?????

 

My intention for this mod lies to the use of the custom icon, not to create just a new drink that looks like the waterjar. there is no blue berry ice original png, its created by me.

 

erh im confused of what you mean valmar....

Link to comment
Share on other sites

As far as I understood, he means that if you give the icon file the same name as the item's name (which would be "Blueberry Ice.png" then?), you don't need the CustomIcon property as the game automatically finds an icon when it has the same name as the item itself.

 

He means you can use the pre-existing bottled water icon and merely give it the blue tint to avoid a custom-made icon.

 

This way all the clients don't need the icon.

 

I think.

 

You would always need to CustomIcon property if you want an icon to show; even if you use a pre-existing one.

 

 

Vote h0tr0d 2016 -- The Icon

Link to comment
Share on other sites

my reason was to make / (read add) a total new icon, not replace an existing icon, or... i do not understand what you mean with renaming?????

 

My intention for this mod lies to the use of the custom icon, not to create just a new drink that looks like the waterjar. there is no blue berry ice original png, its created by me.

 

erh im confused of what you mean valmar....

 

Like I said, I thought you were trying to tell him a way to make the mod work for other people on the server WITHOUT them needing to have the mod folder. I thought that was why you were having him add the "customicon" property - a property you do not need if you're using the Mods folder to get icons.

 

 

As far as I understood, he means that if you give the icon file the same name as the item's name (which would be "Blueberry Ice.png" then?), you don't need the CustomIcon property as the game automatically finds an icon when it has the same name as the item itself.

 

Yes, exactly. The customicon property is redundant for this mod since he made a real icon for it - he only needs to name the icon the same thing as the item or, alternatively rename the item to match the icon.

 

Chous expressed concern that the icon wasn't working for others on the server. Requiem then advised he add a the customicon property. I incorrectly assumed he was trying to tell him a way to make everyone on the server see an icon WITHOUT needing the Mods folder. It was a misunderstanding on my part.

 

 

 

He means you can use the pre-existing bottled water icon and merely give it the blue tint to avoid a custom-made icon.

 

This way all the clients don't need the icon.

 

I think.

 

You would always need to CustomIcon property if you want an icon to show; even if you use a pre-existing one.

 

 

 

Yes. Though you don't need a customicon property for an item you've given a "real" custom icon too with the Mods folder.

Link to comment
Share on other sites

all i understood, since this was my first mod is that the value should have the name of the png file, did not know if you call the item name the same that is not needed, however the item name then needs an underscore in it, as i named the items name Blueberry Ice, but the png file is Blueberry_ice. ok i think i understand so if i leave the property value Blueberry_ice out and rename my png file to Blueberry ice without the underscore, it should work too? <--- this is as i understand the above.

 

 

and no valmar, i was not trying to help for a way to make it show up without the icon, the whole purpose of my mod is the special icons :)

 

but by al means if you want to use this drink/recipe in the game without the special icon then indeed <property name="CustomIcon" value="bottledWater" /> would be the answer :)

Link to comment
Share on other sites

ok i think i understand so if i leave the property value Blueberry_ice out and rename my png file to Blueberry ice without the underscore, it should work too? <--- this is as i understand the above.

 

Yes. As long as the item or block shares the same name as the image it will automatically use that image in the game - no customicon properly required. This even works on items or blocks in the game that already have icons in vanilla as the Mods folder will "overwrite" them. For example if you didn't like the icon the game uses for a ladder you could replace it by making a new icon in the Mods folder and giving the same name as the block - in this case it would be ladder.png

 

 

and no valmar, i was not trying to help for a way to make it show up without the icon, the whole purpose of my mod is the special icons :)

 

As I said, it was a misunderstanding on my part. Meant no disrespect.

Link to comment
Share on other sites

Updated items code with " <!-- <property name="CustomIcon" value="bottledWater" /> --> " which indeed works, thanks valmar.

 

Notice you still need to download the custom icon if you want to use that, if not its a working recipe but just with the waterjar icon.

Link to comment
Share on other sites

  • 2 years later...
UPDATED: corrected ITEM.xml code Thanks valmar!

 

I am new too modding, so please don't kill me, be gentle :)

 

Having that said, I got ispired by Valmar's mods.

 

Actually the day i am posting this is the first day i attempt to write/make a small mod myself, so might I screwed up, XML editing is not my second langauge, i just looked at Valmar's codes, try to learn from that, and just started fooling around,

in my game it works, but please keep in mind, i am very new to this, but im daring to share this.

 

Especially where he had created custom icons, or well created him self or created for his mods, im unsure, anyhow...

 

Since we heat up so much in the game I added an extra drink that cools you down.

 

Blueberry ice!

 

To start you need to have the custom icon added to your local 7dtd file system.

If you already own some mods from Valmar you only need to copy and paste the PNG file to the folder that already contain's valmar's mods.

 

Here is the file needed with the custom icon:

 

http://www.mediafire.com/download/c8uaa420dj25qnd/customicon_requiem76_7dtd.zip

 

EDIT: ALSO YOUR CLIENTS (players on your server) need to download and place this icons locally for them to show up the icons!

 

 

Now for the Codes:

 

Items.XML

 

<!-- requiem mods -->
<item id="1140" name="Blueberry_Ice">
<property name="Meshfile" value="Items/Food/bottled_waterPrefab" />
<!--    <property name="CustomIcon" value="bottledWater" /> -->
       <property name="Material" value="glass" />
       <property name="HoldType" value="3" />
<property name="Weight" value="12" />
<property name="Group" value="Food/Cooking" />
       <property name="Stacknumber" value="100" />
       <property class="Action1">
           <!-- UseAction -->
           <property name="Class" value="Eat" />
           <property name="Delay" value="1" />
           <property name="Use_time" value="..." />
           <property name="Gain_health" value="0" />
           <property name="Gain_water" value="15" />
           <property name="Gain_food" value="5" />
<property name="Buff" value="yuccaJuiceCooling" />
<property name="Gain_stamina" value="15" />
<property name="Sound_start" value="UseActions/player_drinking" />
                       <property name="Create_item" value="emptyJar" />
       </property>
       <property name="Group" value="Food/Cooking" />
       <property class="Preview">
           <property name="Zoom" value="24" />
           <property name="Pos" value="-0.02,-0.1" />
           <property name="Rot" value="90,45,0" />
       </property>
   </item>
<!-- requiem mods end -->

 

PLEASE CHECK THE ITEM ID, since i choose an ID number that was not already used for me, might not mean its also not already used for you so if needed modify the number in " <item id="1140" name="Blueberry Ice"> " if needed!

 

Recipe.xml:

 

<!-- Blueberry ice  recipe.xml -->

<recipe name="Blueberry Ice" count="1" scrapable="False" >
   <ingredient name="blueberries" count="5" />
<ingredient name="snow" count="1"/>
   <ingredient name="emptyJar" count="1" />
</recipe>

<!-- Blueberry ice end -->

 

Feel free to adopt, rewrite or ignore this amateur mod. I had fun making this, and i am planning a lot more, I especially like creating the custom icons and make that work in game.

 

blueberry-ice_1.png

 

Feel free to feedback :)

 

Great mod. I have a very brief understanding of how to create custom icons but could someone do a step by step dummies guide on how to do it properly? Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...