Mod making begginer v2. Guns ERRORS FIXED

Started by Herobrine112211, August 25, 2014, 10:09:07 AM

Previous topic - Next topic

Herobrine112211

Ok my wall building is fixed. Now i wanted to make a gun did same as people teached me and say in the forums still getting errors whats wrong now? tell me and fix it please.
Error log picture 1 error only: http://www.mediafire.com/view/ce69tb9z0py9lee/Untitled.png FIXED
Its fixed thank you all for helping me.

Neurotoxin

In the future, don't delete your threads. They may help someone else down the line. The problem you're having now is exactly the same thing as before with different names. Read the error log and you'll see that. hint: BaseBullet

Herobrine112211

Still have no idea how to fix it everything is ok looks like.

Neurotoxin

this time it's probably because of this:


<ThingDef ParentName="BaseBullet">
<defName>Bullet_ScarHC</defName>
<label>7.62×51mm NATO</label>
<texturePath>Things/Projectile/Bullet_Small</texturePath>
<projectile>
<damageType>Bullet</damageType>
<DamageAmountBase>8</DamageAmountBase>
<Speed>85</Speed>
</projectile>
</ThingDef>

<ThingDef ParentName="BaseBullet">
<defName>Bullet_ScarHC</defName>
<label>7.62×51mm NATO</label>
<texturePath>Things/Projectile/Bullet_Small</texturePath>
<projectile>
<damageType>Bullet</damageType>
<DamageAmountBase>8</DamageAmountBase>
<Speed>85</Speed>
</projectile>
</ThingDef>


you use ParentName="BaseBullet" twice, (for the same bullet I might add)  where I think you intended to make one of them the BaseBullet.

Herobrine112211


ItchyFlea

The problem is that you don't have a ThingDef named BaseBullet.

You've also got a lot of old XML in there. You should remove that (By changing it to what the game now uses, if it has a replacement.), otherwise the guns may not work as intended, or at all.
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

Herobrine112211

I fixed most of the things but still 2 red errors left please help.

ItchyFlea

#7
Quote from: Herobrine112211 on August 27, 2014, 07:39:46 AM
I fixed most of the things but still 2 red errors left please help.
The problem is that the game can't find the graphics to use for the gun.
Is the graphic actually in "Textures/Things/Item/IRGuns/"?
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

Herobrine112211

Yup it was a texture. Now i am getting 1 more error and some yellow errors on startup. Please fix i added 2 picture too. The weapon works in game. But dont do anything.

ItchyFlea

Quote from: Herobrine112211 on August 29, 2014, 08:43:47 AM
The weapon works in game. But dont do anything.
That's because you are using old XML to define what the weapon does. You need to change that to what the game now uses. Look at the XML the weapons use in the Core mod and go from there. (EG: <damageType> is now <damageDef>, the rest will most likely be just as easy to spot.)

An alternative would be to recreate your mod from scratch using the Core mod weapon definitions as a template.

The critical error in the first picture looks like it's caused by the old XML.
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

Herobrine112211

1 more problem 1 yellow text left i do not understand. In weapons_nukegun. Help. New picture and mod files.

Neurotoxin

your very last line: <ThingDefs> should be </ThingDefs>

ItchyFlea

Can't tell what the problem is without actually seeing the contents of that file. For whatever reason, the game thinks you don't have a </ThingDefs> tag, yet it is there in the screenshot.
I do see the beginning of a tag that tells the game to ignore the following information, but can't tell if that tag is properly closed or not. If it isn't, that's the problem.
All my mods are licensed under a Attribution-NonCommercial-ShareAlike 4.0 International
Ask for permission before using in ModPacks

Click here for a list of the mods I've created

Herobrine112211

You can check the files are attached.
Quote from: ItchyFlea on August 31, 2014, 12:59:50 AM
Can't tell what the problem is without actually seeing the contents of that file. For whatever reason, the game thinks you don't have a </ThingDefs> tag, yet it is there in the screenshot.
I do see the beginning of a tag that tells the game to ignore the following information, but can't tell if that tag is properly closed or not. If it isn't, that's the problem.

Bodog999

An other problem could be a space which isnt supposed to be there I had that problem a lot when editing save files 1 space or 1 missing or wrong tag/letter can break the mod make sure to double, triple and quadripple check everything on mistakes.