Author Topic: Adding new weapons.  (Read 4444 times)

Adding new weapons.
« on: September 11, 2016, 10:28:04 am »
Hello everyone! After spending some time on google/searching at this forum some info,im again starting new topis. Guys,i need some info/or short guide if you can,about adding new guns in game. So,i`ve got icon for it. I`m already done gun through the Fonline Object Editor. Give to this item unique PID,own description,name,damage,attack types,etc. all needed info(animations and path to the graphical part of new gun added too). So, when im spawning it in game,i see name of this gun,when i pick it up - i can see successfully added new icon for this gun. But when im click on it - it just says - You see nothing out of ordinary. Also,if i place it to the second hand - i can`t change to this gun and shoot. What am i need to do?

Re: Adding new weapons.
« Reply #1 on: September 11, 2016, 10:04:13 pm »
In most cases problem is in some small thing what is easy to miss during some process. I would recommend you repeat all steps and check for some missed thing. Hard to say for sure, but I think you missed some setting during using Object editor. Maybe compare already existed weapon with your and you will find what you maked bad.

Re: Adding new weapons.
« Reply #2 on: September 12, 2016, 03:39:25 am »
go to server/text/engl and find the FOOBJ.MSG, it holds the names and descriptions for each pid. You have to add it there, in the right order, using PID+00 for name and PID+01 for description.

Re: Adding new weapons.
« Reply #3 on: September 12, 2016, 11:06:13 am »
usually Object Editor automatically adding name and description to foobj.msg, but maybe something went wrong this time.

Re: Adding new weapons.
« Reply #4 on: December 22, 2016, 10:47:49 pm »
Hello guys!

I'd like to avoid any repetitive topic and get some explanations step by step.

1. I have a picture of a gun in .PNG format.
2. I launched Object Editor and loaded weapons list
then I did this

3. I dropped the picture of the gun in art/items/MEC.png and in art/inven/MEC.png

I don't understand why there is no [PID_MEC_Gauss_Minigun] in the left column if anyone can give me a piece of advice ?

Problems I encountered first:

First of all I tried to get a result by copypasting art/items/MEC.frm and art/inven/MEC.frm
When I launched the game and spawned the weapon in my inventory it was invisible. Even tho I managed to move it into my first slot and shoot around.
When I dropped the item on the floor it became a red "?" wallhex. I couldn't pick it up.
Then I noticed that my file was in .png format and not .frm

I changed the lines art/items/MEC.frm and art/inven/MEC.frm to art/items/MEC.png and in art/inven/MEC.png.

I could see the weapons in my inventory, but those which were laying on the floor looked like that:


Then I decided to use the ground picture grpahics as a minigun's one => minigun.frm and it looks like this:


Already better, but I cannot pick up the weapon. Can someone explain me in details how to fix this ?

Thank you guys  :)

Re: Adding new weapons.
« Reply #5 on: December 23, 2016, 04:00:32 pm »
Can you make it via copy paste method? Just copy minigun object and then adjust it to your needs.

Edit:
You could also try doing it via notepad not Object Editor.
« Last Edit: December 23, 2016, 07:35:36 pm by fonliner »

Re: Adding new weapons.
« Reply #6 on: December 24, 2016, 01:37:01 am »
Can you make it via copy paste method? Just copy minigun object and then adjust it to your needs.

Edit:
You could also try doing it via notepad not Object Editor.

Actually it somehow worked. These two miniguns I couldn't pick up were bugged. I spawned same weapons in my inventory and it worked. I could drop it and pick it up!

But I'll try the ctrl+c and ctrl+v method.

Thank you :)

Re: Adding new weapons.
« Reply #7 on: December 26, 2016, 03:38:05 am »
check item flags.