![]() |
Making advanced items - Printable Version +- Mirage Source (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: Making advanced items (/showthread.php?tid=2491) |
Making advanced items - Nean - 13-01-2009 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. Re: Making advanced items - timster0 - 15-01-2009 Do you mean Item requirements? Or something like adding STR, DEF ect.? Re: Making advanced items - Nean - 15-01-2009 Required stats, item stats, attack modifiers, etc, etc. Re: Making advanced items - timster0 - 16-01-2009 What I need is a Level Requirement and class requirement thing for items. Re: Making advanced items - Anthony - 16-01-2009 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. Re: Making advanced items - Nean - 16-01-2009 Asrrin29 Wrote:Something like this? Yes, that's very sexy. Thanks for the suggestions, everyone. I'll get to work soon. ![]() Re: Making advanced items - timster0 - 16-01-2009 Exactly like that, with the class and level req. Re: Making advanced items - timster0 - 17-01-2009 Wow, that's way to complicated for me. Need to get better at coding first. Re: Making advanced items - Anthony - 17-01-2009 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. Re: Making advanced items - timster0 - 17-01-2009 Thx, umm how do you "parse" stuff? Re: Making advanced items - Anthony - 17-01-2009 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 ![]() Re: Making advanced items - Jacob - 17-01-2009 Here's a sub I have to see if you can use an item: In the item UDT: Code: LevelReq As Long Code: '*************************************** Re: Making advanced items - timster0 - 17-01-2009 OK, I'm starting to understand it better now. Thanks Dugor, that sub really helped me figure things out. Re: Making advanced items - Nean - 18-01-2009 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 Re: Making advanced items - Anthony - 18-01-2009 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? Re: Making advanced items - timster0 - 18-01-2009 Those subs would go in modgamelogic right? Re: Making advanced items - Nean - 18-01-2009 Gah, I just I don't understand how to actually add the stats to the items. Re: Making advanced items - timster0 - 20-01-2009 I understand setting requirements, but not making the items add stats. I guess it would be like a spell Buff maybe. Re: Making advanced items - Matt - 20-01-2009 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. Re: Making advanced items - Anthony - 20-01-2009 I don't see how much better we can explain it O_o haha. Re: Making advanced items - Nean - 26-01-2009 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. ![]() Re: Making advanced items - timster0 - 26-01-2009 Really? Then I'm gonna try it as well. |