FOnline Development > 3D Development
[TUTORIAL] Importing models for Items/Weapons into the game.
Graf:
Let me help to both of you. I have prepared an archive, which you simply extract, add master.dat and critter.dat (don't forget to specify the new path to it) and you're good to go. You'll have a completely working Fonline SDK with 3D models enabled. To run the game in singleplayer, you'll need to run the server just as usual, and not to forget to set a path to Fonline.exe in FOnlineSingleplayer.exe properties.
Download link
To check the models you'll need to load the save file and enter following commands:
~getaccess admin admin
~param 0 151 x (x stands for the item name, and could be taken from here)
Jotisz, it seems to me, that you're trying to access the added models through the inventory, but it's not yet possible (at least, I don't know how). You can only add items and access then through the console command above. How to combine the inventory and 3D is rather a good question, but the only one who knows something about it is Karpov. Maybe Luther knows something about it, I'm not sure though. My own guess, is that it works via fo3d file. One have to create a separate file for each item, which specify which animations to use and so on (I haven't tried this on practice).
Haraldx:
--- Quote from: Mike Crosser on January 02, 2013, 02:39:55 pm ---I don't mean to be picky but the way he hold the LSW is wrong.
--- End quote ---
Unfortunately it is true - you hold the LSW by the last handle like all other bullpup weapons (a bullpup is a weapon design where the trigger and handle is located AFTER the magazine, unlike other weapons like the M4 and M16 carbines).
Aaanyway. Testing out the SDK, if everything works alright, I should be able to start working today.
EDIT: Tried out the ripper as an initial test to see if I understood everything correctly. Aside from the wrong rotation and the overly huge size, everything else seems OK. Also, Leather jacket clips through body during the animation.
EDIT2: Also, why is the idle animation looping all the time? It's infuriating!!!
EDIT3: Is there any waster way to reload files? Clicking "Exit" and "Load game" all the time isn't very fast.
Karpov:
Nice job. There is a file called client_main, inside server/data. I modified it so that the Items in hand call the layer value in the 3d character when they are used, as well as the armors in the armor slot. They go from 1 to 500, I have placed 500 lines at the bottom of that file. If you don't have that file, then the items will not match the 3d item when equipped, and the will use the original setup instead. Same thing for armors. Also, the value for the right hand has to be set to 0, which is neutral. Any other value will lock the item in the character's hand all the time. If you still can't see the item it may be that it is too small. Try to scale it up three times to check.
here's the file I mentioned. Keep the original, of course.
http://www.mediafire.com/?1nyooujn1tp0nsg
The knife animation loops because I made it as the Idle animation. Use the female character instead. I'll correct that one.
Luther Blissett:
[edit] Short version = what Karpov said a minute ago :)
--- Quote from: Graf on January 02, 2013, 02:52:51 pm ---You can only add items and access then through the console command above. How to combine the inventory and 3D is rather a good question, but the only one who knows something about it is Karpov. Maybe Luther knows something about it, I'm not sure though.
--- End quote ---
The bits I mentioned here : http://fodev.net/forum/index.php/topic,26833.msg231777.html#msg231777 should resolve that. Karpov sorted it out at some point in the past and has covered it in more detail, but as the 3d repo only covers the client folder, it's not included in the 3d svn thing.
The bits that need to link together are values in client_main.fos (in server/scripts), which should correspond to the objects in the fo3d file. If you need them, you should be able to get item names and numbers from itemnames.lst in Server/data, or from looking at the proto files in server/proto/items, but for now it will function by simply linking the numbers as in the file below.
Anyway the client_main.fos should be uploaded here http://www.sendspace.com/file/nxevzl, which you can drop in your own server/scripts folder and it should work on a basic level.
Note that only the pre-existing weapons/items will work in an "equip object in game>model appears in 3d" sort of way. Anything we've added ourselves (i.e. extra armours, weapons etc) would need adding as items first (with floor icon, inventory icon, short description, long description, stats and values etc).
If you've been looking at different things with ~param 0 151 x, then you'll need to set it to ~param 0 151 -1 to return to the "use linked models" sort of mode.
[edit2] Karpov says above it should be 0 instead of -1, so try that first (~param 0 151 0).
Haraldx:
Thanks to everyone for the help! Everything works perfectly, working right now on the misc items.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version