SphereServer BugTracker - SphereServer | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0001792 | SphereServer | new feature request | public | 08-08-10 16:16 | 23-08-10 21:37 |
Reporter | xantier | ||||
Assigned To | |||||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | OS | OS Version | |||
Product Version | 0.56c Nightly | ||||
Target Version | Fixed in Version | ||||
Nightly Version | Not Available | ||||
Experimental Flags | None | ||||
Option Flags | None | ||||
Internal Build Number | |||||
Summary | 0001792: Overriding Hardcoded Functions | ||||
Description | I think this suggestion will solve most of common problems. As RunUO (c#) coding has overriding ability, coders can customize the server freely.. Why not also in SphereServer ? Main idea is to override hardcoded functions so that we can customize everything hardcoded. How ? See the example : Most known problem is Highlight color of characters. This is controlled by NotoGetFlag function. You will have to rewrite complete NotoGetFlag. It will require a bit professional scripting knowledge. We want player 1 to see player 2 as orange : [override function NotoGetFlag] ref1=<argv[0]> // viewer serial if (<ref1.uid>==Player1Uid) && (<uid>==Player2Uid) return NOTO_ORANGE // or NOTO_ENEMY ? endif ... overrided notogetflag code ... ... .. You can ask "you can already do this by creating your of noto function". But this is override. So this will affect everything related with hardcoded Notogetflag. So you will see player 2 as orange and you will be able to attack him freely. If you had created your own noto function, this wouldn't affect anything hardcoded, it was just going to be your own check. Example 2 , you want to rewrite your own Canseelos function : [override function Canseelos] ///argv[0] or args will be uid or location to see if (xxx) return 1 // in sight, you can see else return 0 // not in line of sight endif [override function CanseelosFlag] ///argv[1,2,3] will be uid or location to see ///argv[0] flag if (xxx) return 1 // in sight, you can see else return 0 // not in line of sight endif I hope you understood main idea. These are two functions i have just remembered. One more example : [override function resurrect] MENU m_are_you_sure Overriding hardcoded functions will surely be a difficult thing for sphere scripters. Because there would be lots of checks we can miss. But this feature will make sphereserver more customizable. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
08-08-10 16:16 | xantier | New Issue | |||
08-08-10 16:16 | xantier | Nightly Version | => Not Available | ||
08-08-10 16:16 | xantier | Experimental Flags | => None | ||
08-08-10 16:16 | xantier | Option Flags | => None | ||
08-08-10 16:36 | Mirravin | Note Added: 0000543 | |||
23-08-10 21:37 | MrSugarCube | Status | new => closed | ||
23-08-10 21:37 | MrSugarCube | Note Added: 0000589 | |||
23-08-10 21:37 | MrSugarCube | Resolution | open => won't fix |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|