Problem With Custom Hooks In Chargen

I had created a custom field on the web portal called Traits for a game and the .72 update rendered that field inoperable. It just did not work on the web portal anymore. So I see the thing about custom hooks and decide to re-add the field that way. I can get the tab to work fine on the profile for approved characters but the character generation side remains broken.

Players can see the tab, they can click on it, and they can see any traits that are set there already but it’s not in an editable box and when they hit save it kicks them to the main portal page with the Oops error. Then if you check their traits on the actual mush you see something like this:

< p>< p>< p>< p>< p>< p>< p>Test goals </ p> </ p> </ p> </ p> </ p> </ p> </ p>

I added spaces so they weren’t just converted to HTML. A < p> </ p> pair is added every time Save is hit.

Off the tops of people’s heads, any idea where I may be going wrong here?

1 Like

Without seeing the code or the specific error you get with the ‘oops’ message it’s difficult to say, but if you could provide a pointer to your code (or github repo) and the error message, I’d be glad to take a look.

Blah. I just can’t figure it out. Now we can’t view the traits at all on the web(for either approved or unapproved characters, so profile or character generation). I don’t have a github but I created one and uploaded all the files associated specifically with this project. It can be found here:

Any insight would be greatly appreciated. Thanks.

1 Like

So it looks like you’ve got some merge conflicts going on that lost some of the code that broke both the custom code hooks and your own traits stuff. For instance, in this file here:

It’s missing the stuff to set the “custom” field: And it doesn’t have anything for your traits field either.

Your char edit:

Is similarly missing the stuff to send the custom fields back to the game. There are a few places in that file, like this one: I don’t see anything in there for your ‘traits’ stuff either.

It is exceptionally difficult to manage custom code changes without a GitHub fork, because there’s nothing to alert you to conflicts between your custom code and the main Ares code.

You’re also probably suffering more than most because your thingy (traits) just happens to conflict with the Ares extra named traits that I integrated with the core code.

I’m not sure how much custom code you have, whether it’s worth trying to debug the situation you ended up in versus just starting over with a proper fork of the base Ares code and re-doing your changes.

If you do want to debug, you might have success setting up a folder-by-folder comparison of your code versus the base Ares code. Diff tools like BeyondCompare will do that for you.

Ok, thanks for letting me know. I appreciate it.

I should clarify this statement…

If you’re only modifying the files mentioned in the Custom Hooks tutorial, then you should be okay even without a fork. Those hooks are expressly designed to isolate the changes in files separate from the core Ares code, insulating you from conflicts in future upgrades. The “custom” plugin folder is likewise designed to be isolated.

But if you start modifying other core code files, you’re going to want a fork to help you manage the inevitable merge conflicts.