new module that requires change to existing module?

General Chat, Comments
Post Reply
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

new module that requires change to existing module?

Post by cbsarge »

If I created a new module but, it requires the editing of an old module is it worth sharing it and if so, how do you go about getting the user to edit the existing module?

In another thread I've been talking about a Combat Avatar module so that you don't get stuck with the built in images for the combat module. I've got it working now so it displays the custom image uploaded by a player or it shows the built in image if they haven't uploaded one. It also shows the custom image in the NPC combat. This required editing the existing combat module. My Combat Avatar module allows the image to be uploaded but, the combat module had to be edited quite a bit to bring the combat avatar into play.

Any thought or advice?
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: new module that requires change to existing module?

Post by KyleMassacre »

The only problem that I see is what it Alain decides to update the entire combat module and it is a critical change? What we can do is save a copy of the combat module but just disable it so if there is a change we can just adopt those changes. What you can do is maybe talk to Alain (since it's a paid module) and see if you can just rewrite that function and include it in your lib.php file wrapped in like:

Code: Select all

if(function_exists("SomeFunction"))
{
    function SomeFunction()
    {
        //function content here
    }
}
And that should overwrite the current function in the combat lib. Then in your config.xml file there is a feature to only make your module installable if they have the combat module installed.

Another alternative is to ask Alain to update the combat module and include his avatar module
User avatar
gmoore
Posts: 212
Joined: Wed Jun 04, 2014 5:40 pm

Re: new module that requires change to existing module?

Post by gmoore »

Those modules still have Alain's name but they are part of FunMayhem now. Part of 1.2.0 are some changes to 'FM' modules vs other authors modules vs local modules.

For the time being you will need to rename your module and disable the new one. For any suggestions on changing an existing module you will need to email me.

Greg
Running a game is like riding a bike ... well it should be!

New Worlds Engine / FunMayhem.com
Helping you get your game concept up and running. Now.
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: new module that requires change to existing module?

Post by KyleMassacre »

I think this one would be a pretty good one to have changed. Do you think you could add it to you to do list when you get a spare moment

EDIT:
Doctored mine up haha
Image
User avatar
gmoore
Posts: 212
Joined: Wed Jun 04, 2014 5:40 pm

Re: new module that requires change to existing module?

Post by gmoore »

Sorry can't read the text. Should I laugh or just not laugh? Don't know. :geek:
Running a game is like riding a bike ... well it should be!

New Worlds Engine / FunMayhem.com
Helping you get your game concept up and running. Now.
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: new module that requires change to existing module?

Post by KyleMassacre »

Oh, no, that was a screenshot of the console I had on my computer that I used for my accounts avatar lol. But if you would be willing to update the combat module similar to that, that would be great to make it official
User avatar
gmoore
Posts: 212
Joined: Wed Jun 04, 2014 5:40 pm

Re: new module that requires change to existing module?

Post by gmoore »

I will be happy to update any core module with good code. Just email rather than upload it. I started a business github account also. Hopefully we can use this area once things get settled with it (ie I figure out some of the administrative areas).

Greg
Running a game is like riding a bike ... well it should be!

New Worlds Engine / FunMayhem.com
Helping you get your game concept up and running. Now.
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: new module that requires change to existing module?

Post by cbsarge »

Here is an example of the profile screen with the Combat Avatar module added and a Combat screen between 2 players. The NPC combat still uses the built in images.

Image

Image
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: new module that requires change to existing module?

Post by KyleMassacre »

Your combat screen looks more aligned than mine haha. One thing though, your avatar display on your profile page is massive. Use the config variables to size it.

Also, I do stand corrected with what I said before about the denied access to the images directory in the avatar module, if you add a .htaccess file with ALLOW FROM ALL that will cure it but will still show a broken image if you use the avatar functions for some reason
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: new module that requires change to existing module?

Post by cbsarge »

I suppose I could just use some CSS to shrink the image on the profile screen. Right now it's using the full size like the combat does but, that would be easy to tweak.
Post Reply

Return to “General”