Jump to content

Probleme for add Weapon


Antize

Recommended Posts

Hi,

I try to creat a mod for add any item in the game but I have 2 problem.

My first probleme impossible to get an icon ingame I have already try

Icon = AK47, -> in folder AK47.png

Icon = AK47 -> in folder Item_AK47.png

Icon = AK47.png, -> in folder AK47.png

Icon = AK47.png, -> in folder Item_AK47.png

Icon =mods/Antize/media/scripts -> in folder Item_AK47.png

Icon =mods/Antize/media/scripts -> in folder AK47.png

nothing works ):

 

 

My second problem when I reload the weapon it uses ammo and not ammo clip.

 

 

 

I have upload  on mediafire

 

 

Thank you.

Link to comment
Share on other sites

For icons you have to format like Item_AK47.png with the icon= AK47for it to work

 

The folder has to be mod/media/textures

 

The ammo usage is set up using the reloads .LUA.

 

Guns are probably the most difficult thing to set up (aside from building probably)

Link to comment
Share on other sites

Okay, just looking through your code in the mod,

All the icons need the "item_" prefix

the icon reference in the weapon.txt needs to have the ".png" removed

You also need to declare your mod in a .LUA somewhere.

 

it will look like this:

Antize = {}
local MOD_ID = "Antize";
local MOD_NAME = "Antize's AK-47 Mod";
local MOD_VERSION = "0.1";
local MOD_AUTHOR = "Antize";
local MOD_DESCRIPTION = "Adds an AK-47";

local function info()
    print("Mod Loaded: " .. MOD_NAME .. " by " .. MOD_AUTHOR .. " (v" .. MOD_VERSION .. ")");
end    

Events.OnGameBoot.Add(info);

 

Other than that I have no idea why the icon isn't showing up.

 

if what I suggested doesnt work consider starting over download someone's working mod and tweak it to yours to see if that works.

Link to comment
Share on other sites

Ah you are the creator of OHWM mod

 

I make my mod like your OHWM.zip :) and when I take your mod the icons not work for me it's my game the problem ? ...

 

Why yes I am, thank you for noticing. And the future ORGM mod, but that will take a while to  release... lots of  guns in there...

 

That is strange, does my mod have its icons show up for you?

 

If not, it might be the icons themselves that are the issue...

Link to comment
Share on other sites

I put in users/zomboid/mods

 

Did you deactivate and reactivate the mod in between tries?

 

I am not sure if that would make a difference but it might... and might explain why it worked differently when opened up not in Steam. Kind of like how running things as an administrator might can open a file differently, thus reload files.

Link to comment
Share on other sites

Re,

 

Now the icons it's ok I don't know why, brief I added several weapons.

Now my second problem I can't reload the weapons with magazin.. I can only reload with rounds ... can you see why ?

 

I upload on mediafire

https://www.mediafire.com/?3yu9sef025tfb17

Thank you

 

To use magazines you have to have the setting within PZ set to use magazine. on the options page there will be a drop down, when there select the middle option, the furthest down is broken as far as I know.

 

Default it is set on easy reloading which means no clips.

Link to comment
Share on other sites

Yes the weapon take magazin but the weapon stay empty an idea ? :)

 

You have to load rounds into the magazine. They try to make it as realistic (hard) as possible.

 

Here is how the reloading choices operate:

Easy, rounds load directly into the gun. Similar to how FPSs or how fallout 3/new vegas works.

 

Medium, You reload weapons with magazines, the magazines need to be filled with rounds before loading. This adds a level of strategy and realism because you have to have all the ammo, but to load it into the gun you need magazines, you can have 100 rounds but if you only have one mag,  you can only load 30 rounds. Then you have to take forever loading each round into the mag while zombies bear down on you.

 

Hard, as Medium but you need to rack the first round into the chamber on reloading. (the racking is apparently broken at the moment.) This would be the most realistic if it worked...

Link to comment
Share on other sites

If you are talking about the whole reload system, no, it is in the stock game.

 

If you are talking about if I will be adding guns and reloads, yes.

 

For the historical weapon mod I am working on adding the K98 Karabiner and the C96 Mauser, both of which will use stripper clips, so it would use that system.

 

I am also working on another gun mod that adds more realistic civilian firearms. Most will use magazines and in that mod there will be a semi-auto AKM.

 

Eventually I will make a comprehensive modern guun pack, but I am keeping them separate because I want people to have choices on how realistic their weapon choices will be. Not everyone wants to find M249s lying around their neighborhood.

 

I am just too busy with work and life to finish anything in a timely manner. They will get done, just slowly.

Link to comment
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
×
×
  • Create New...