FOnline Development > 3D Development
[TUTORIAL] Importing models for Items/Weapons into the game.
			Graf:
			
			Today I've got something special to show you. This is a plasma torch, that doesn't exist in the SDK originally. How to add such item into the game? That's easy:
1. Find a PID in the range of 1 to 500, that isn't occupied with another important (weapon, armor or misc) item. To do this simply enter the "~ais x x" command, and take a look at your inventory. If nothing appeared in there - you're good to go. 
2. Open up a "weapon.fopro" file (stored in server/proto/items folder)
3. Find an item, that uses the same animation. 
4. Copy-paste it and set path to both - "inventory" and "map" images. 
5. Change the PID for this item and voilĂ  - you've got this item in the game available via "~ais x x" command. 
You can also change the description and other stuff in "FOOBJ.MSG" but it's not important for us at the moment. 
--- Code:  --- Value 399 Attach WP_super_cattle_prod.x Texture 0 ITEM_super_cattle_prod.jpg  Link R_Handle_1 Scale 0.35 RotY 10 RotZ 10
 Value 498 Attach WP_plasma_torch.x Texture 0 ITEM_plasma_torch.jpg  Link R_Handle_1 Scale 0.35 RotY 10 RotZ 10
 Value 6 Attach WP_sledgehammer.x Texture 0 ITEM_sledgehammer.jpg Link L_Handle_1 RotX 90 Scale 3 RotY 6 RotZ -70
 Value 25 Attach WP_GrenadeFrag.x Texture 0 ITEM_GrenadeFrag.jpg Link R_Handle_1 Scale 1.7 MoveX 3 RotY -60
 Value 26 Attach WP_plasma_grenade.x Texture 0 ITEM_plasma_grenade.jpg Link R_Handle_1 Scale 0.2 MoveX 3 RotY -60
 Value 27 Attach WP_pulse_grenade.x Texture 0 ITEM_pulse_grenade.jpg Link R_Handle_1 Scale 1.7 MoveX 3 RotY -60
 Value 421 Attach WP_holy_hand_grenade.x Texture 0 ITEM_holy_hand_grenade.jpg Link R_Handle_1 Scale 0.6 MoveX 3 RotY -60
 Value 159 Attach WP_molotov_cocktail.x Texture 0 ITEM_molotov_cocktail.jpg Link R_Handle_1 Scale 2.5 MoveX 3 RotY -60
--- End code ---
Download link
		
			Haraldx:
			
			EDIT: Good job, Graf. Nicely done. :)
It's because I didn't apply any clothing on the skin layer. :-[
Sorry, that was my bad. 
Is this better?
Also, as it turns out, there indeed is no haircut that is a tad bit longer. I think I found something to occupy myself with...
		
			Karpov:
			
			I'm glad you are enjoying this Haraldx. I've uploaded all these items to the repository, and corrected the animation so that he stops playing with the knife.
I was working on the "walking" animation, but I could not achieve what I wanted, and I still can figure out a way to do it. So i might as well focus on something else. If anyone notices a  missing animation please tell me because I don't remember which of them are.  
For those who are working on this, please make a copy your folder before you update, just in case. 
I set the coordinates for the sawed off to work as a pistol, and it seems that Graf did the same thing with the light support weapon. To make this work properly edit the file weapons.fopro inside server/proto/items.
 Find the ID 385 (sawed off) and change the value of Weapon.Anim1= from 10 to 9
 Then the ID 355 is the LSW. Change it to 10 to make it work as a rifle. I think both weapons look great that way. 
		
			Haraldx:
			
			Behold, boys and girls! Arguably the dumbest thing I've ever created! Should have some somekind of nude skin for extra immature laughs.
Do we REALLY need this?
EDIT: ImageShack removed my image... Reuploaded to imgur.com. Let's hope they understand 3D art.
		
			Alvarez:
			
			Mods on 2238 hate immature jokes, too.
		
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version