sarf
07-06-2004, 02:20 PM
Hiya!
I have a suggestion for the Cosmos patcher - an extension of the current work it does with regards to modules.
I realize, of course, that having work done by the patcher is a bit unfailr with regards to the people who can not use it, but since it already does affect the ease of which to add modules to Cosmos, my suggestion would not seem to be out of line - or, for that matter, to be particularly hard to do.
My first suggestion is this : make it possible for Modules to have some sort of "patch" possibility - for starters, the ability to add entries to Bindings.xml.
The reason for this is that it is currently unnecessarily restrictive to prevent the people that make modules from having a way to add stuff to Bindings.xml, and since that file is kinda important, it would be a nice thing to add, especially if you would consider going all out and implementing my second suggestion.
An idea of how to do this would perhaps to include the contents of all files with a file type of ".Bindings" into Bindings.xml.
Example of contents of how ExampleModule.Bindings could look like : <Binding name="PRANCEAROUND" description="Do a little dance on the spot">
PranceAround();
</Binding>
<Binding name="PETANIMAL" description="Pets the closest ambient animal">
PetAnimal();
</Binding>
My second suggestion would be to include a way to patch all functions of Cosmos, and indeed of all interface files.
An idea would be to specify a file format, so that people could make CosmosThingy_Update() call a certain method before, and after, doing whatever CosmosThingy_Update() normally does.
The power of having something like this done automatically should be rather evident, but if it is not, then simply consider that people could make third-party patches that could extend Cosmos almost infinitely, without forcing the users of the patches to hand-patch all files after each new Cosmos version. It would also help with the modularity of Cosmos, since a lot of Cosmos' features could be placed in Modules and thus be deleted by people that did not want them.
An example of how the patch specification could look like follows <Patch function="ChatFrame_OnEvent">
<Before>
-- remove all "Blah blah is under attack" messages - I'm just a regular grunt trying to farm items!
if ( event == "ZONE_UNDER_ATTACK" ) then return; end
</Before>
<After>
-- add support for new chat event (Arthas' new shock-troops invading area X)
if ( event == "SMURFS_INCOMING" ) then
local info = ChatTypeInfo["SYSTEM"];
this:AddMessage(format(TEXT(SMURFS_INCOMING), arg1), info.r, info.g, info.b, info.id);
return;
end
</After>
</Patch>
This is of course but an example, but it might give someone a few good ideas. :)
Sarf
---
"I think I am going to wait until the hacker is in my computer, then I will disconnect from the internet and trap him inside" - rompiku (http://www.bash.org/?38858)
I have a suggestion for the Cosmos patcher - an extension of the current work it does with regards to modules.
I realize, of course, that having work done by the patcher is a bit unfailr with regards to the people who can not use it, but since it already does affect the ease of which to add modules to Cosmos, my suggestion would not seem to be out of line - or, for that matter, to be particularly hard to do.
My first suggestion is this : make it possible for Modules to have some sort of "patch" possibility - for starters, the ability to add entries to Bindings.xml.
The reason for this is that it is currently unnecessarily restrictive to prevent the people that make modules from having a way to add stuff to Bindings.xml, and since that file is kinda important, it would be a nice thing to add, especially if you would consider going all out and implementing my second suggestion.
An idea of how to do this would perhaps to include the contents of all files with a file type of ".Bindings" into Bindings.xml.
Example of contents of how ExampleModule.Bindings could look like : <Binding name="PRANCEAROUND" description="Do a little dance on the spot">
PranceAround();
</Binding>
<Binding name="PETANIMAL" description="Pets the closest ambient animal">
PetAnimal();
</Binding>
My second suggestion would be to include a way to patch all functions of Cosmos, and indeed of all interface files.
An idea would be to specify a file format, so that people could make CosmosThingy_Update() call a certain method before, and after, doing whatever CosmosThingy_Update() normally does.
The power of having something like this done automatically should be rather evident, but if it is not, then simply consider that people could make third-party patches that could extend Cosmos almost infinitely, without forcing the users of the patches to hand-patch all files after each new Cosmos version. It would also help with the modularity of Cosmos, since a lot of Cosmos' features could be placed in Modules and thus be deleted by people that did not want them.
An example of how the patch specification could look like follows <Patch function="ChatFrame_OnEvent">
<Before>
-- remove all "Blah blah is under attack" messages - I'm just a regular grunt trying to farm items!
if ( event == "ZONE_UNDER_ATTACK" ) then return; end
</Before>
<After>
-- add support for new chat event (Arthas' new shock-troops invading area X)
if ( event == "SMURFS_INCOMING" ) then
local info = ChatTypeInfo["SYSTEM"];
this:AddMessage(format(TEXT(SMURFS_INCOMING), arg1), info.r, info.g, info.b, info.id);
return;
end
</After>
</Patch>
This is of course but an example, but it might give someone a few good ideas. :)
Sarf
---
"I think I am going to wait until the hacker is in my computer, then I will disconnect from the internet and trap him inside" - rompiku (http://www.bash.org/?38858)