![]() |
Ranged weapons. - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Ranged weapons. (/showthread.php?tid=1708) |
Ranged weapons. - Jack - 27-04-2008 Well this is my first tutorial and im changing somethings in the 2handed tutorial so. here it is Copy and paste 1/5 Understanding 2/5 Untested but 99.9% im sure it will work *i used the 2handed version by Sync and changed somethings around* Lets begin. -=Server side=- Go into Modtypes and find. Code: Type ItemRec Add This Code: Ranged As Byte Below Code: Data3 Integer Now go into ModDatabase and Find. Code: Sub SaveItem(ByVal ItemNum As Long) Then add Code: Call PutVar(FileName, "ITEM" & ItemNum, "Ranged", Trim(Item(ItemNum).Ranged)) Below Code: Call PutVar(FileName, "ITEM" & ItemNum, "Data3", Trim(Item(ItemNum).Data3)) Now find Code: Sub Loaditems() Add in Code: Item(i).Ranged = Val(GetVar(FileName, "ITEM" & i, "Ranged")) Below Code: Item(i).Data3 = Val(GetVar(FileName, "ITEM" & i, "Data3")) Server side is almost done now. Go into Modhandledata find Code: If LCase(Parse(0)) = "useitem" Then And find Code: Case ITEM_TYPE_WEAPON Change it to this Code: Case ITEM_TYPE_WEAPON Just under the Case_item_Weapon You have Case_item_shield make it look like this Code: Case ITEM_TYPE_SHIELD Now find Code: If LCase(Parse(0)) = "saveitem" Then Add in Code: Item(n).Ranged = Val(Parse(8)) So now it looks like this [code] ' Update the item Item(n).Name = Parse(2) Item(n).Pic = Val(Parse(3)) Item(n).Type = Val(Parse(4)) Item(n).Data1 = Val(Parse(5)) Item(n).Data2 = Val(Parse(6)) Item(n).Data3 = Val(Parse(7)) Item(n).Ranged = Val(Parse(8)) = ITEM_TYPE_POTIONADDHP) And (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_POTIONADDHP) And (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex Re: Ranged weapons. - Robin - 27-04-2008 All you've done is added a variable. Where's the ranged weapon code? Re: Ranged weapons. - Labmonkey - 27-04-2008 Quote:Untested Yea... um... Re: Ranged weapons. - Kousaten - 27-04-2008 Better question: How do you expect to test it without a ranged weapon? o.O This is like... adding a special data to Players for a specific series of quests, but not implementing those quests. Re: Ranged weapons. - Labmonkey - 27-04-2008 Well he copied the two-handed weapon tutorial, and changed all of the "two-handed" to "range". Only thing is range doesn't do anything... at all Re: Ranged weapons. - Jack - 27-04-2008 My mistake *first tutorial* Re: Ranged weapons. - Kousaten - 28-04-2008 Understanding the basics of how to add a stat of sorts to how data is saved and loaded in certain aspects (player, npc, items, spells, shops...) is actually decent for a first tutorial. I remember the days when people were asking how to break away from the formula which automatically set NPC HP/EXP, and the only somewhat tough part of that was understanding where everything loaded and how it was saved. I think I posted a tutorial on it but forgot a few parts and didn't finish it in the end. Magnus posted one later that works quite well, I believe. This was before MSE1 even, so I can't really recall who did it exactly. ![]() Re: Ranged weapons. - Kousaten - 28-04-2008 All I've done is renewed some things... DEF became VIT, SPEED became AGI, MAGI became WIS. Added DEX, used the values of DEX and AGI to determine accuracy in PvP (players may complain about not hitting regular monsters, but PvP is a big thing in my community so I placed it there anyway and no complaints thus far). Added INTL, changed formulas to keep WIS as a bonus for only "healing" spells, and INTL for "offensive spells" using WIS as the defense instead of the GetPlayerProtection as normal. Not too much, just some minor stuff I wanted. XD Might do more later though, once I get the game to where I can release an alpha. Re: Ranged weapons. - Rian - 28-04-2008 Yeah, I feel like I should update my spell system a bit more too. Physical combat in my game includes a Slashing, Bludgeoning, Piercing, Ranging, and Shielding skills. Can't really think of good categories for splitting skills associated with spells though. Re: Ranged weapons. - Robin - 28-04-2008 Dave Wrote:You could split them by element Since when were Light and Dark elements? Re: Ranged weapons. - Labmonkey - 28-04-2008 Robin Wrote:Dave Wrote:You could split them by element Have you never seen the Fantasy Periodic Table of elements. Re: Ranged weapons. - Jack - 28-04-2008 Glad to see that i have learn't something through out the past time with Mirage Source and its Good to see some Nice comments on it Thanks guys ![]() |