13-01-2009, 09:52 PM
I noticed that the items are barren. There's no stats for them whatsoever, can anyone post a tut or maybe steer me in the right direction? I thought of ripping it from Elysium, but... No. Just no.
Making advanced items
|
13-01-2009, 09:52 PM
I noticed that the items are barren. There's no stats for them whatsoever, can anyone post a tut or maybe steer me in the right direction? I thought of ripping it from Elysium, but... No. Just no.
15-01-2009, 12:14 AM
Do you mean Item requirements? Or something like adding STR, DEF ect.?
15-01-2009, 04:09 AM
Required stats, item stats, attack modifiers, etc, etc.
16-01-2009, 12:51 AM
What I need is a Level Requirement and class requirement thing for items.
16-01-2009, 01:22 AM
Just add the new thing you want to the item UDT then add a box or scrollbar or whatever to the item editor, parse everything properly and make it save right. Then just whenever a player goes to equip something have it check if they are the correct level or class by calling to the saved item. Pretty simple.
If you want item bonuses it's like the same way more or less just when you have the getplayerstats check, look to see if they are wearing any items that may increase their stat points and if so just add it in.
16-01-2009, 10:14 PM
Asrrin29 Wrote:Something like this? Yes, that's very sexy. Thanks for the suggestions, everyone. I'll get to work soon. ![]()
16-01-2009, 11:14 PM
Exactly like that, with the class and level req.
17-01-2009, 12:45 AM
Wow, that's way to complicated for me. Need to get better at coding first.
17-01-2009, 01:37 AM
Asrrin made it sound way more complicated than it actually is haha.
Add this to your ItemRec UDT on client and server side. Code: Stat(1 To Stats.Stat_Count - 1) As Byte Then parse the data back and forth properly and have it all save and make it work with the editor. On the server side find the GetPlayerStat function and make it look like this. Code: Public Function GetPlayerStat(ByVal Index As Long, ByVal Stat As Stats) As Long That's how I did mine. So if you have any item equipped it checks for any bonuses that have been added then just adds it to the stat. This works in MS4.
17-01-2009, 01:51 AM
Thx, umm how do you "parse" stuff?
17-01-2009, 01:59 AM
Basically it's just transferring data between a server and client.
So in modHandleData you can see that in the HandleEditItem sub the client is receiving data from the server and organizing it to it's appropriate defined types. If you look on the server side for the part of it that sends the data to the client you'll see how it's setup. So in modServerTCP on the server you can see the SendEditItemTo sub and how it's sending the data. Keep it all organized and in order and it's pretty easy. I might write a tutorial on this advanced items thing but don't count on it. I just almost have in this topic ![]()
17-01-2009, 03:04 AM
Here's a sub I have to see if you can use an item:
In the item UDT: Code: LevelReq As Long Code: '***************************************
17-01-2009, 03:55 AM
OK, I'm starting to understand it better now. Thanks Dugor, that sub really helped me figure things out.
18-01-2009, 09:00 AM
Anthony Wrote:Asrrin made it sound way more complicated than it actually is haha. Thanks a lot dude, this really helped me out. Could you give an example of parsing one of the stats though? It might be that I'm missing something obvious, or the fact it's two in the morning, but that's the only thing I have a problem understanding. If I can get that, than I think I can definitely program this in myself... Than again, that's the biggest part. xD
18-01-2009, 09:25 AM
Parsing for the item editor? This is a sub here.
Code: Sub SendUpdateItemToAll(ByVal ItemNum As Long) Then for receiving it in the client. Code: Sub HandleUpdateItem(ByRef Parse() As String) Or are you talking about sending the data to the client so you can have it displayed as like a 10 + (2) sort of thing?
18-01-2009, 07:05 PM
Those subs would go in modgamelogic right?
18-01-2009, 07:32 PM
Gah, I just I don't understand how to actually add the stats to the items.
20-01-2009, 12:58 AM
I understand setting requirements, but not making the items add stats. I guess it would be like a spell Buff maybe.
20-01-2009, 04:52 AM
If weapon(getplayerweapon(myindex)).bonusstr > 0 then
call setplayertempstr(myindex, getplayerstr(myindex)) call setplayerstr(myindex, getplayerstr(myindex) + weapon(getplayerweapon(myindex)).bonusstr) end if Something along that, pending how you store the item's bonus stats and such.
20-01-2009, 06:26 AM
I don't see how much better we can explain it O_o haha.
26-01-2009, 05:06 AM
Holy fucking shit, i was retarded. I worked on this tonight, and actually thought about it, and it was incredibly simple. Well at least the item requirements are, I have yet to do the stat modifiers. Thanks for all the help guys.
![]()
26-01-2009, 11:41 PM
Really? Then I'm gonna try it as well.
|
« Next Oldest | Next Newest »
|