Author Topic: brainstorm = 2 out of 3  (Read 466 times)

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
brainstorm = 2 out of 3
« on: February 14, 2011, 06:42:07 pm »


               I'm sorry to say I've had yet another brainstorm that was initially sparked by something on the vault that I stumbled across by accident. Anyway to cut a long storey short I need to create a placeable that can become an item in the players inventory. When the item is activated one of two things should happen. For now I'll leave out one of the two things, the other is that an effect occurs. Now the placeable is no problem and surprisingly neither is the effect. But the inventory item has me stumped. I've tried looking in the custom content guide but I'm afraid that it was as clear as mud. I'd look at somebody else's work to try to work it out myself but I don't know which to choose.

If someone could tell me what files I need (tga etc) to create an inventory item and which files I need to edit (2da etc), I think I can probably take it from there.

Thanks in advance.

TR
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #1 on: February 15, 2011, 02:19:09 am »


               It is highly dependent on the model type of the item. 

Documentation: Item Format  section 4.1
               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #2 on: February 15, 2011, 04:01:44 am »


               I'm sorry, but I'm not following you.  Are you trying to create a custom inventory item from scratch to add to the game, or are you trying to write a script to create the inventory item in the character's inventory when they use the placeable?  I would be happy to help, but I'm not sure what you need.
               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #3 on: February 17, 2011, 01:33:28 am »


               Sorry about the delay. I've been trying to follow that document. Thanks for the replies BTW. OK, well I think at least I'm clearer in my own mind what I am trying to do.



I realise now that the visual effect is irrelavent, something I add afterwards. What I am trying to do here is to create from scratch is an inventory item that has a 3d model as well. This item can't be equipped but can be used. I already have the graphics sorted and as long as the 3d model is the same format as for placeables then that is no problem either. Neither is the scripting. Actually when I said one inventory item I meant about 85.



I thought I had it sussed then I looked at BaseItems 2da... So I am afraid I still need help.



Couple of quick questions. Are either baseitems or visualeffects size limited eg number of entries? Do icons have to be tga/plt and not dds?



TR

               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #4 on: February 17, 2011, 04:44:40 am »


               If the item is not able to be equipped, a 3D model isn't required.
For icons, stick to .tga files rather than .dds.
To avoid rollover issues that occur, you should keep baseitems.2da limited to lines 0-255.
What category of item do you want to create?
               
               

               


                     Modifié par Khuzadrepa, 17 février 2011 - 04:45 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #5 on: February 17, 2011, 06:12:03 am »


               You can make a 3d model for any inventory-only (non-equipped) item, and it's really easy to implement.  I'll use an example of a basic miscellaneous medium item.

Look at the file name for the basic inventory item icon.  The very first one is iit_midmisc_001.tga (a dead body). Try making your 3d model and naming it the same as the inventory icon file, except leave off the first i (I simply extracted and PLC_O04.mdl and renamed it to it_midmisc_001.mdl).  Add the model to your hak, associate it with your module, then test it out by giving the PC a misc medium item (with the number 1 appearance), drop the item and see what happens. '<img'>

If all works properly, the default bag (for that particular item appearance) should be replaced by whatever 3d model you matched up to the item.  Then you can just pick it up and put it down like any other item of the same type, it'll just have a customized model when on the ground.

BioWare did this in the 1.69 patch for three misc. gemstone items (a ruby, diamond, and emerald).

Enjoy!

- The Amethyst Dragon

See Bob find a dead body.
'Image

See Bob pick up a dead body.
'Image

See Bob realize he wouldn't get paid for this.
'Image
               
               

               


                     Modifié par The Amethyst Dragon, 17 février 2011 - 06:13 .
                     
                  


            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #6 on: February 17, 2011, 11:41:59 am »


               Thanks guys. The item on the vault which has inspired me is Custom Maps by Kinarr Greycloak from 2003. My intention is to expand on this so that you can pick the map up and put it in your inventory. In your inventory you see a tiny version of the actual map you have picked up. If you use the map once, the effect from the original vault entry kicks in. However if you use it a second time while the effect is in view, something else happens. I see the natural home of this in the blueprints as being Items/miscellaneous/other as the built in maps reside there.

TR
               
               

               


                     Modifié par Tarot Redhand, 17 février 2011 - 11:43 .
                     
                  


            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #7 on: February 17, 2011, 02:34:32 pm »


               I see now why you want the model... that's a great idea!!  Also, I forgot to mention earlier that I'm not sure if you can add any custom visual effects to the game via visualeffects.2da.  I 'think' that you can only overwrite existing ones.  Someone please correct me if that is wrong, as it's been a bit since I messed with those.

I hope you share the results so we can see how it looks!  Let us know if you run into any problems.
               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #8 on: February 17, 2011, 05:32:51 pm »


               Just double checked the version of visualeffects.2da I pulled out of the CEP 2.3 and there's about 1000 empty lines marked user, so there should be no problem there. My biggest problem at the moment is that while I understand placeables and I understand visualeffects to a degree, I haven't got a clue on making custom items apart from the size (in pixels) and type of the icons and that you should make sure that there is a transparent region surrounding the actual graphic of the icon. But that is about it.

Knowing what I do about the graphics has enabled me to create the texture for the 3d model part, the icon and the graphic for the visual effect. So that's about 250 individual graphic files sitting on my hard drive all dressed up with nowhere to go. '<img'>

TR
               
               

               


                     Modifié par Tarot Redhand, 17 février 2011 - 05:33 .
                     
                  


            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #9 on: February 19, 2011, 01:22:51 am »


               Well I've still got problems. In order to keep things simple I decided that the first thing I would do would be to get a new class of item with an icon and no 3d model, working. As far as I can tell I have followed the instructions in the custom content guide to the letter. Unfortuneately this appears to trash the initial screen of the item creation wizard and causes the toolset to crash on exit. I am at a loss. In case anyone would care to look inside the hak and tell me what I have done wrong I have put it into a 7z archive which can be obtained from here.

Thanks in anticipation.

TR
               
               

               


                     Modifié par Tarot Redhand, 19 février 2011 - 01:23 .
                     
                  


            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #10 on: February 19, 2011, 03:32:04 pm »


               I found your problem with a little testing. Your icon names are one character too long. They are limited to 15 characters (not including the file extension type.)  Just take one out and you are good to go. '<img'>

Also, as long as you keep all of those map items Identified in the toolset, you shouldn't run into the rollover bug I mentioned earlier.
               
               

               


                     Modifié par Khuzadrepa, 19 février 2011 - 03:56 .
                     
                  


            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #11 on: February 20, 2011, 01:03:19 am »


               Arrrgh! 15 - I'd been working on 16 (half an hour of censorship later...)



Thanks



TR
               
               

               
            

Legacy_NWN DM

  • Hero Member
  • *****
  • Posts: 661
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #12 on: February 20, 2011, 04:03:45 am »


               Very interesting... hope you'll share.
               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
brainstorm = 2 out of 3
« Reply #13 on: February 20, 2011, 10:37:30 am »


               If nothing else goes wrong (get down murphy), I hope to have it on the vault within a week as I'd say I'm about 60% done.



TR