| Author |
Topic:
My Decal Sample Plugin and the same plugin converted to VVS [Locked] |
|
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
This is just a sample plugin I wrote to help beginners get into decal plugin development.
It shows the basics of:
drawing things in the in-game view
firing on user click events
firing on decal triggered events
converting a plugin to VVS (virindi view service)
VI did the VVS conversion, thanks!
You can download it here:
(No compiled binaries provided, you must build it yourself)
http://www.virindi.net/junk/Mag_SamplePlugins.zip
If you have any questions about how the plugin works, why I did certain things the way I did, or how to go about performing other basic actions, feel free to ask and I'll do my best to answer.
|
|
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
Thanks a lot for this.
-----signature-----
Gingers don't shit, they asshole puke.
lil vulno perhaps looks like a young conan obrien (very intelligent), not some kind of fucking leprachaun - Darklord
Official Get Down Forums - www.gd-gaming.com
|
|
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
Very nice ty!
-----signature-----
Never! Never! Never! take a sleeping pill and a laxative at the same time.
|
azv4 Posts: 107
Registered: 2008-7-14 14:30:53
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
|
Looks like Virindi considers it junk...
|
|
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
Here's VI's sample on how to wire up controls:
http://www.virindi.net/repos/virindi_public/trunk/Examples/AutoWireupExamplePlugin/
Notice here the ObjectTracker.cs class. This is a well designed object. It's purpose is to simply track objects in AC. When it detects a new object, or deletes an object from its list, it raises an event to indicate it.
The MainView.cs subscribes to these events and modifies the GUI.
After talking with VI, I've come up with a slightly different approach.
I would design ObjectTracker.cs just as VI.
MainView.cs would exposes all the GUI variables, but does not control interaction with them.
A new class ObjectTrackerGUI.cs would be created that would manage the modification of the GUI from an ObjectTracker.
This may sound a little complicated to those just getting started with programming.
I've also started publishing my open source project here:
http://magtools.codeplex.com/
I'll post pictures and a binary later, but for now its a good place to look at source.
I have not implemented the GUI pattern as described above yet. For instance Tracker.cs and ItemInfoOnIdent.cs both work with the GUI directly. This isn't "bad" but it makes it difficult to re-use these objects.
My code is LGPL licensed. You can modify it as long as you share the source. You can also use any public exports (there currently are none) in any non-shared source projects.
|
-Eps Title: I Love Boobies. And Butts, too!
Posts: 771
Registered: 2007-5-30 21:33:21
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
I dont get it.
decal already has on object create and release events
-----signature-----
#dnn #og-ac http://tinyurl.com/ACDTChat
Fastest 1-275 in AC history.
Plugin Users: 100+
Buy Plugins Relogger, ValSalv, and AutoVendor(route trigger): http://bit.ly/ACaCAl
[Trade] +Envoy Sparker says, "Rep check: Eps Levelin, PST."
|
|
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
The ObjectTracker class is just an example of a logic class. The idea is to demonstrate how plugin logic can be placed in a separate class from view interaction.
-----signature-----
Virindi
---
****Virindi Plugins FAQ**** http://www.virindi.net/wiki/index.php/Virindi_Plugins_FAQ
http://www.virindi.net - Virindi Tank, Follower, Integrator, Reporter, VCS5, XPHelper, Item Tool, HUDs, etc...
Decal Core Dev - http://www.decaldev.com
|
-Eps Title: I Love Boobies. And Butts, too!
Posts: 771
Registered: 2007-5-30 21:33:21
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
i peeked at it. i see.
-----signature-----
#dnn #og-ac http://tinyurl.com/ACDTChat
Fastest 1-275 in AC history.
Plugin Users: 100+
Buy Plugins Relogger, ValSalv, and AutoVendor(route trigger): http://bit.ly/ACaCAl
[Trade] +Envoy Sparker says, "Rep check: Eps Levelin, PST."
|
|
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
Hi. All my plugins have been created from the old Wolfs C# Plugin Template, so I've grabbed your samples to help sort out converting to VVS. So thanks for posting these  .
One question unrelated to VVS. I notice you subscribe to events like:
[BaseEvent("LoginComplete", "CharacterFilter"  ]
private void CharacterFilter_LoginComplete(object sender, EventArgs e)
Whereas I'm used to the Wolfs way of doing it like:
Core.CharacterFilter.LoginComplete += new EventHandler(CharacterFilter_LoginComplete);
Is there any meaningful difference between the two options (i.e.,. is it worth me going through and changing all my event code to do like yours)?
|
|
|
Date Posted:
1/1/00 12:00am
Subject:
My Decal Sample Plugin and the same plugin converted to VVS |
shontsu posted:
I notice you subscribe to events like:
[BaseEvent("LoginComplete", "CharacterFilter"  ]
private void CharacterFilter_LoginComplete(object sender, EventArgs e)
Whereas I'm used to the Wolfs way of doing it like:
Core.CharacterFilter.LoginComplete += new EventHandler(CharacterFilter_LoginComplete);
Is there any meaningful difference between the two options
Yes. If you do everything the same, the latter method is slightly faster depending on the size of your plugincore class.
How much does it matter? I converted GoArrow from the first to the second method and it saved 50ms of startup time on my system. Not a huge deal, but I don't like something else 'magically' dealing with my events anyway. Also, the latter method allows you to utilize intellisense and compile time checking...with the former, if you misspell something, it will just silently fail.
My personal theory is that as many errors as possible should be caught at compile time, rather than runtime. It's why I hate javascript and loose typing
-----signature-----
Virindi
---
****Virindi Plugins FAQ**** http://www.virindi.net/wiki/index.php/Virindi_Plugins_FAQ
http://www.virindi.net - Virindi Tank, Follower, Integrator, Reporter, VCS5, XPHelper, Item Tool, HUDs, etc...
Decal Core Dev - http://www.decaldev.com
|
|