PDA

View Full Version : Underdone Tutorial


dankiller94
03-29-2010, 02:41 PM
I wanna learn how to mess around with the Underdone gamemode, like making more skills, quests, equipment slots, etc...
Its not that I'm going to create a server on my own (as I don't need to throw money at that, I got other things to spend :D), I just wanna have some fun, then probably have a lil LAN game with some friends.

So is there some tutorial or some guide around here?

Kannon
03-29-2010, 10:12 PM
i think everyone is with me when i say we wont really help you. you say that you wont make a server but we dont know that.

But i will say google is a big help. just dont be lazy you have to search through results

dankiller94
03-30-2010, 02:26 PM
Its okay then. Found a few things when messing with code. Will write everyone a tutorial later to mess around with the code :D.

Edit: I wouldn't post here if I didn't get results from Google. All it ends up with is the thread of the gamemode with people confused about why he released the mode.

Mechanical Mind
03-31-2010, 01:11 PM
Theres no tutorials on editing Underdone code, take a look at it and see if you can understand it. I recommend only editing the files in code/sharedfiles/database/.
If you can't understand it, go learn Lua then come back.

dankiller94
03-31-2010, 03:30 PM
I noticed that I totally fucked up on my recent post, which u can read.

Okay so:


Melee Weapons-

local Item = QuickCreateItemTable(BaseWeapon, "weapon_melee_<name>", "<name>", "<description>", "<weapons Icon>)
Item = AddModel(Item, "<insert model>", Vector(0, 0, 0), Angle(0, 0, 0)) --There can be as many models as you want, keep it below 10 though.
Item = AddStats(Item, <damage amount>, <speed>) --Numbers only.
Item = AddSound(Item, "<sound it makes when swung>") --ex. weapons/iceaxe/iceaxe_swing1.wav
Item.Level = <level req> -level required to use it.
Item.Weight = <weight> -preferably between 1-10
Item.SellPrice = <sellPrice> -Sell price to the shop.
Register.Item(Item)


Ranged Weapons-

local Item = QuickCreateItemTable(BaseWeapon, "weapon_ranged_<name>", "<name>", "<description>", "<weapons Icon>")
Item = AddModel(Item, "<insert model>", Vector(0, 0, 0), Angle(0, 0, 0)) --There can be as many models as you want, keep it below 10 though.
Item = AddStats(Item, <damage>, <accuracy>, <speed>, <ammo clip>) --Low damage is good for quick firing weapons, high for slow. accuracy is from 1 - .00
Item = AddSound(Item, "<fire sound>", "<Reload sound")
Item.Level = <level req> --level required to use it.
Item.Weight = <item weight> --preferably between 1-10
Item.SellPrice = <sell Price> --Sell price to the shop.
Item.HoldType = "<the way the char holds the weapon>" --ex Pistol, RPG, Crossbow, shotgun
Item.AmmoType = "<ammo it shoots>" --ex smg1, AR2, SniperRound, buckshot
Register.Item(Item)


Quests-

local Quest = {}
Quest.Name = "quest_<quest title>" --no spaces
Quest.PrintName = "<Quest Title>"
Quest.Story = "<Story Told by NPC>"
Quest.Level = <level req>
Quest.ObtainItems = {}
Quest.ObtainItems["<Item>"] = <amount>
Quest.Kill = {}
Quest.Kill["<Monster>"] = <amount>
Quest.GainedExp = <exp>
Quest.GainedItems = {}
Quest.GainedItems["<item>"] = <amount>
Register.Quest(Quest)


Armor-

local Item = QuickCreateItemTable(BaseArmor, "armor_<slot>_<name>", "<name>", "<Description>", "<armor icon>")
Item = AddModel(Item, "<insert model>", Vector(0, 0, 0), Angle(0, 0, 0)) --There can be as many models as you want, keep it below 10 though.
Item = AddStats(Item, "slot_chest", <amount>)
Item = AddBuff(Item, "stat_<stat>", <amount>) --EX strength, dexterity, agility, luck, maxhealth
Item.Level = <level req> --level required to use it.
Item.Weight = <item weight> --preferably between 1-10
Item.SellPrice = <sell Price> --Sell price to the shop
Register.Item(Item)

Items-

local Item = QuickCreateItemTable(BaseFood, "item_<name>", "<name>", "<description>", "<Icon>")
Item = AddHealth(Item, <Health>, <Time>)
Item.Model = "<insert Model>"
Item.Message = "<Message Shown when used>"
Item.SellPrice = <sellprice>
Item.Weight = <weight>
Register.Item(Item)

Ammo-

local Item = QuickCreateItemTable(BaseAmmo, "item_<name>_<size>", "<name>", "<description>", "<ammo Icon>")
Item = AddAmmo(Item, <amount>, "<ammo Type>")
Item.Model = "<insert Model>"
Item.SellPrice = <sellprice>
Item.Weight = <weight>
Register.Item(Item)

Recipes-

local Recipe = {}
Recipe.Name = "recipe_<name>"
Recipe.PrintName = "<name>"
Recipe.NearFire = <true or false>
Recipe.MakeTime = <time in seconds>
Recipe.GainExp = <exp>
Recipe.Chance = <chance to make>
Recipe.Ingredients = {}
Recipe.Ingredients["<item needed>"] = <amount> --Can be more than one
Recipe.Products = {}
Recipe.Products["<item gained>"] = <amount> --Can be more than one
Recipe.RequiredMasters = {}
Recipe.RequiredMasters["master_<mastery name>"] = <amount
Register.Recipe(Recipe)

NPC-

local NPC = QuickNPC("<name(lowercase)>", "<name>", "npc_<npc name>", "<faction>", 1000, "<model(optional)>")
AddDrop(NPC, "money", <chance>, <min>, <max>)
AddDrop(NPC, "<item>", <chance>)
AddMultiplier(NPC, <health>, <damage>) --health and damage is multiplied by integers inputed into those slots.
NPC.DeathDistance = 14 --Do not edit.
NPC.Weapon = "weapon_<name>"
Register.NPC(NPC)

Slot-

local SLOT = {}
SLOT.Name = "slot_name"
SLOT.PrintName = "Name"
SLOT.Desc = "Description"
SLOT.Position = Vector(x, y, z)
SLOT.Attachment = "<part of body where it attaches to. check the other slots>"
Register.Slot(SLOT)

Stat-
local Stat = {}
Stat.Name = "stat_name"
Stat.PrintName = "Name"
Stat.Desc = "Description"
Stat.Default = 1
Register.Stat(Stat)


Pretty much just messing with database. Hope anyone in this forum who likes to mess around with this gamemode, but no idea about how to code in LUA, will find this helpful.

NinjaWilko
04-01-2010, 05:50 AM
Anybody who's even remotely connected to the FP thread on Underdone would know you just copy-pasted that.

dankiller94
04-01-2010, 05:10 PM
Ah shit, sorry, forgot to reference it.

Most of that tutorial is by Riozo (Melee, Ranged, Quests, Items, Ammo, Recipes, NPC) I did the other small parts that he missed out on. (Slot and Stats) http://www.facepunch.com/showpost.php?p=20826241&postcount=158

Here is something else.


Set
local tblEquipmentSet = {}
tblEquipmentSet.Name = "armor_name"
tblEquipmentSet.PrintName = "Set Name"
tblEquipmentSet.Items = {}
tblEquipmentSet.Items[1] = "armor_chest_name"
tblEquipmentSet.Items[2] = "armor_helm_name"
tblEquipmentSet.Items[3] = "armor_shoulder_name"
tblEquipmentSet.Items[4] = "armor_belt_name"
AddBuff(tblEquipmentSet, "stat_name", <amount of points added to stat>)
Register.EquipmentSet(tblEquipmentSet)
Note: You don't really need to have to make the set out of the 4 equipments, it could just be shoulder and chest, or whatever you want. (I think weapons work)


Atm I'm figuring out how to add negative stats to the game, so items can give out negative stats.

dankiller94
04-01-2010, 05:46 PM
Well, I looked around and couldn't find any tutorials for making icons for this game, so I decided to make one up for noobs like me who wanna make their own stuff :D.

Programs:
VTFEdit

Make sure your icon is 64x64 (haven't tried other sizes, but I'd stick to the default one - which is the size that all the other icons use) and .jpg (cauz I import all of my icons to VTFEdit in .jpg :D)

Go to File > Import your image, and then you get these. Select the options as shown on these screens (I pretty much guessed almost every option on most of these screens, but it made my custom icons work for me.)

NOTE: deselect "Generate Mipmaps" because it is pointless. forgot to do that :D.
http://img706.imageshack.us/img706/3594/74108465.png
http://img707.imageshack.us/img707/9606/17634913.png
http://img221.imageshack.us/img221/7866/19884533.png

After you see ur image on the empty grey space to the right, click the Image tab and choose the following options:
http://img144.imageshack.us/img144/9929/58683451.png

Then save it as a .vtf in the Underdone gamemode folder: (Underdone\content\materials\icons).

Then you have to make a vmt. Go to your icon, click Tools > Create VMT, then :
http://img144.imageshack.us/img144/2853/47888770.png
http://img706.imageshack.us/img706/7153/81394370.png

Hope someone will improve my tutorial.

wildbill
04-14-2010, 10:31 PM
thanks for all the information dan, im not into this kinda stuff but my friend aaron has been wanting to make his own weapons/shields/armour to suggest for the awol server.
he just needed to figure out how, i linked him to this and hes gone mental making crap xD

mic1996tam
04-28-2010, 11:17 PM
Wonderful Gamemode

Sylver
04-28-2010, 11:47 PM
Good work guys!