Aller au contenu

Photo

Beginner Tutorial - Custom Items in Single Player - Update


  • Veuillez vous connecter pour répondre
19 réponses à ce sujet

#1
weriKK

weriKK
  • Members
  • 106 messages
Hello.

I've rewritten the tutorial from the ground up. This time I cover the scripting part of the module creation much more deeply, added a couple of extra images and uploaded the complete source code, builder-to-load and the finished addin packages.

This new updated version of the tutorial guides you through the creation of two items, a custom longsword and shield and shows you how to add them to the inventory of your hero character in the Single Player Campaign.

I've made a very basic step by step guide for creating a customized Two-Handed Greatsword and giving it to the player character in Single Player Campaign.

I know there are a lot of eager players wishing to customize some items for their hearts desire who does not have much experience with game modding. I hope this little guide will help them get past the first couple of barriers of game modding.

Also, I am fairly sure it is far from perfect, I welcome any kind of criticism that could make this better. I set up a discussion board for conversation.

You can find the step-by-step tutorial on my blog.
The finished addon can be found among the projects.

Modifié par weriKK, 18 novembre 2009 - 01:48 .


#2
xCantoniousx

xCantoniousx
  • Members
  • 10 messages
Thank you!

#3
Raith Veldrin

Raith Veldrin
  • Members
  • 10 messages
A very nice early runthrough of item creation. Good work on a breakdown of the item properties!

#4
nothinginside

nothinginside
  • Members
  • 6 messages
This was quite helpful, however.. For what ever reason.. When i have the module enabled, it screws up the leveling process. Even character creation. Each assigned stat increases that attribute by two instead of one.. Which is .. Odd... It only does it when I have the module i made enabled, and i copied your script and followed your directions exactly.. o_O

#5
xCantoniousx

xCantoniousx
  • Members
  • 10 messages
Yeah I just noticed that as well. I'm reinstalling from scratch to see if that helps it.. Took out sql and everything. I'll let you know... download will take a little while :(

#6
weriKK

weriKK
  • Members
  • 106 messages

nothinginside wrote...

This was quite helpful, however.. For what ever reason.. When i have the module enabled, it screws up the leveling process. Even character creation. Each assigned stat increases that attribute by two instead of one.. Which is .. Odd... It only does it when I have the module i made enabled, and i copied your script and followed your directions exactly.. o_O


I have the exact same issue, but even if I delete the complete module directory I seem to get double points at level 20.

I'm trying to figure the reason out, but I am not entirely convinced that it's the mods doing.

#7
xCantoniousx

xCantoniousx
  • Members
  • 10 messages

weriKK wrote...

nothinginside wrote...

This was quite helpful, however.. For what ever reason.. When i have the module enabled, it screws up the leveling process. Even character creation. Each assigned stat increases that attribute by two instead of one.. Which is .. Odd... It only does it when I have the module i made enabled, and i copied your script and followed your directions exactly.. o_O


I have the exact same issue, but even if I delete the complete module directory I seem to get double points at level 20.

I'm trying to figure the reason out, but I am not entirely convinced that it's the mods doing.


I have a feeling you're right, but I also wasn't sure what I was doing before your post earlier, and no idea what changes I may or may not have made while trying to figure it out.

#8
weriKK

weriKK
  • Members
  • 106 messages
Actually, I have figured it out. It seems I have misunderstood the function of module_core in this module. The reason for the double points was, that the script called itself once more at the end. Removing this call from the end of the script fixed many issues:P

#9
xCantoniousx

xCantoniousx
  • Members
  • 10 messages
Right on, thank you! Time for another celebratory beer I think.

#10
weriKK

weriKK
  • Members
  • 106 messages
I've rewritten the tutorial from the ground up. This time I cover the scripting part of the module creation much more deeply, added a couple of extra images and uploaded the complete source code, builder-to-load and the finished addin packages.



This new updated version of the tutorial guides you through the creation of two items, a custom longsword and shield and shows you how to add them to the inventory of your hero character in the Single Player Campaign.

#11
quantumraider

quantumraider
  • Members
  • 37 messages
Thanks weriKK !



Now I just need to finish work so I can add some stuffs!!!

#12
crushum

crushum
  • Members
  • 17 messages
 I have a request. Could you make a very detailed and explicit tutorial that shows how to add vanilla game items like runes, gold, potions etc. to the player, player camp area. I 've read and watched the existing  tutorials but I cannot get a working non game crashing end product. How can you tell which area in the area list is the camp area if you don't already know? This toolset seems to be set up more for folks with programming backgrounds rather than just generic gamers.

#13
Tyranick

Tyranick
  • Members
  • 18 messages
Nice :)!



Now...what about adding to merchants and setting a price, or giving them to certain creatures inventories for custom quests or anything like that?

#14
Rosamund

Rosamund
  • Members
  • 15 messages
Thanks so much for the tutorial- worked like a charm! Except for one little thing hehe.. I had already played around with changing my appearance making a morph for my head (elf ears needed to be properly pointy hehe) It seems that when I export the item addin module this overwrites my head morph. I'm not quite certain how to fix this and any suggestions would be most appreciated :) Thanks!

#15
Despzh0r

Despzh0r
  • Members
  • 26 messages
Amazing work, this tutorial is really helpful. Any chance you would do another one for modifying abilities/talents?



I found one here I think, but can't access it since they closed the old forum.

http://daforums.biow...06616&forum=140

#16
Kraeten_Thorn

Kraeten_Thorn
  • Members
  • 1 messages
Could you please make a Custom armor tutorial, I used you tutorial and successfully created a sword and shield, but I'm a slow learner when it comes to applying your lessons to a different project. :huh:

#17
Nattfodd

Nattfodd
  • Members
  • 321 messages
I tried to apply this tutorial to add a custom item to a custom mod, but it doesn't work. From the log i noticed that the script runs. It seems that it do not found the uti file, because i tried the function GetObjectByTag() and it returns an invalid object.

#18
darkjedi5646

darkjedi5646
  • Members
  • 1 messages
uh...how do i remove a custom item that i created in the module?

#19
-Semper-

-Semper-
  • Members
  • 2 256 messages
check that item in. after this you can right click and delete. perhaps you have to edit or delete your script before deleting your item because it points to the resource.

#20
ne0fiend

ne0fiend
  • Members
  • 1 messages

Nattfodd wrote...

I tried to apply this tutorial to add a custom item to a custom mod, but it doesn't work. From the log i noticed that the script runs. It seems that it do not found the uti file, because i tried the function GetObjectByTag() and it returns an invalid object.


You need to change the name of the item in the script to the name of the item in your module that you want the script to fetch.

In weriKK's (:wub:) tutorial, weriKK (:wub:) uses "
my_custom_weapon and my_custom_shield; as a result, the script attempts to fetch those items (
my_custom_weapon, my_custom_shield). If the name of your item differs from that of weriKK's (:wub:), you need to tell the script that. 
For example, if your items were named weapon1.uti and shield1.uti, yor script should subsequently reflect as such:

UT_AddItemToInventory(R"[b]weapon1.uti[/b]", [b]1[/b]);
UT_AddItemToInventory(R"[b]shield1.uti[/b]", [b]1[/b]);
The numbers next to the item name in the sequence (", [b][color="#ff6600"]1[/color][/b]") represent the quantity of the item(s) delivered on cycle.
If you're dual wielding swords, and the stats are the same, save yourself time and alter the
(", [color="#ff9900"]1[/color]")number of delivery. 
so
UT_AddItemToInventory(R"[b]weapon1.uti[/b]", [b][color="#ff6600"]1[/color][/b]);
becomes

UT_AddItemToInventory(R"[b]weapon1.uti[/b]", [b][color="#ff6600"]2[/color][/b]);
If you build numerous items to feed into your player character's inventory at every script cycle or log in, and you aren't seeing the items, disable the check flag.

WR_SetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG, [color="#00ff00"]TRUE[/color] );
[i]changes to[/i]
WR_SetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG, [color="#ff0000"][b]FALSE[/b][/color] );[b][/b]
enj0i =)