|
||
|
|||||||
| Modification Suggestions This is where you can suggest a modifcation to RunUO! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Another wish list item; a class derived from PlayerMobile for scriptors to use so we can all leave PlayerMobile untouched. OK, granted this is not just a couple of lines of code and if it's not already in it most likely will not be. But it sure would be a nice surprise to find it in 2.0.
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Oct 2004
Location: New York
Age: 27
Posts: 688
|
This is easy, but I do see your point into having a standard one, so people could swap scripts back and forth, and work without everyone having different "sub-player mobiles"
in charcreation do this: Code:
private static Mobile CreateMobile( Account a )
{
if ( a.Count >= a.Limit )
return null;
for ( int i = 0; i < a.Length; ++i )
{
if ( a[i] == null )
return (a[i] = new SlyPlayerMobile());
}
return null;
}
|
|
|
|
|
|
#3 (permalink) |
|
Account Terminated
|
PlayerMobile is already a child class, of the Mobile class, which was done awhile ago. The problem with the above idea is the fact, there are several issues with a conversion script because of some issues within the PlayerMobile.
Plus the fact even if this is done, if there is an issue in the child class, it still will cause problems. So really in the end its easier to deal with PlayerMobile then it is to deal with yet another child class. |
|
|
|
|
|
#4 (permalink) |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Yes I have been a proponent of derived PlayerMobiles since the early betas. Back when we had to update every couple of weeks it was a really big deal. Even now I simply feel that it is the "right" was to add custom scripts to your players.
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
|
#5 (permalink) | |
|
Account Terminated
|
Quote:
|
|
|
|
|
|
|
#6 (permalink) | |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Quote:
A conversion script would need to be provided, but it would only have to account for the standard PlayerMobile. Anyone who has edited the PlayerMobile will have to do it again in 2.0, so they can just tweak the conversion script instead. Or they can continue to use the PlayerMobile script. I have used a derived PlayerMobile for years and have never had a problem with distro scripts referring to PlayerMobile while mine refer to BritanniaMobile. Lets see, if there is an issue with a script it will cause problems... again obviously. The idea here is that scripts actually be tested before they are submitted or put on a production shard. And finally how is working with a 2865 line distro script easier than working with a short script script that contains only what you have added to it? I have multiple custom features added to my Players but my PlayerMobile has been the default distro script since beta 26 or so. It is called PolyMorphism and is used throughout RunUO. It is not hard at all.
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
|
|
#7 (permalink) | |
|
Account Terminated
|
Quote:
Inregards to testing code, most people will never do this, which is evident by all the problems people have. Its up to the coder to write a script, that is easy to use, and won't cause problems in the future. |
|
|
|
|
|
|
#8 (permalink) | |
|
Forum Expert
|
Quote:
Say one has a PlayerMobile class with bunch of modifications, when new official version of the file is released ( for example 2.0 comes out ) one has to do a lot of annoying merging a comparsions. Another has "Player" class and all custom modifications are made to this class, then he has no problems when new version of file is available. Good idea David.
__________________
Angels are falling the very last time, down they're burning in hate and decline, unfaithful and violent we're breaking the spell, we're god, we're scissor, in heaven and hell! |
|
|
|
|
|
|
#10 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Posts: 1,125
|
Copying a file containing your own custom derived PlayerMobile class would be just as easy as copying it over one in the distribution, I would think. Well - except for modifying CharacterCreation.cs to create it. That's simple enough already really?
|
|
|
|
|
|
#11 (permalink) | |
|
Master of the Internet
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,251
|
Quote:
***EDIT*** Here's my old thread: Base classes... Last edited by Joeku; 05-16-2006 at 06:06 PM. |
|
|
|
|
|
|
#12 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
|
This is a great idea, same with the Item and Mobile classes Joeku. The server I work for has a BaseItem which works great, and a new project of mine also has a BasePlayerMobile which works well.
|
|
|
|
|
|
#13 (permalink) |
|
Master of the Internet
Join Date: Dec 2005
Age: 20
Posts: 12,927
|
David, would making mods intended for playermobile in the derived one instead prevent playermobile wipes if you made a booboo or just be easier....you seem to be mentioning how much easier it is...and not how great it would be w/o the wipes...I'm confused
|
|
|
|
|
|
#14 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
No amount of derived classes will save your shard if you don't know how to ser deser. The only thing that it'll help is with upgrading from one RunUO version to another because you won't have to remodify the new PlayerMobile that is released. Still if you mess up your ser\deser you will have a wipe.
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|