Forum Discussion

TriplisTrip's avatar
8 years ago

Triplis Developer Journal

I've been considering for a while how I could share insights into how I mod things, without distracting significantly from the projects I'm working on - that cuts out things like tutorials or videos, for the most part, because they'd slow down the process so much.

But then I thought of journal-like entries and that might just do it.

The aim of this thread is to be of some helpfulness to people who are interested in modding, either out of curiosity or because they want to mod themselves. People are welcome to comment on and discuss the entries I post.

Note that there's no guarantee the posts will be tutorial-like (though some of them could go in that direction). They may be anything from stream-of-consciousness style reflection to me going over a problem I worked out, or am trying to work out. I figure if you're new to modding, you might pick up something that helps you along in your aims.


Without further ado, here's the first entry:

I recently discovered push_affordance_on_run in the process of making an interaction for a child trait. It's always nice when learning one thing can be applied to another. The "bonded" needs draining interactions I made for the sorcerer mod are rather buggy and hacky in nature and prone to issues. This was due to me knowing little about how to utilize social super interactions at the time, so I got all elaborate and convoluted and tried to manually tie together two regular super interactions. They work, but with some annoyances. Discovering push_affordance_on_run gave me a thought about applying it to the bonded interactions. I tried to replace them with social supers and endlessly ran into seemingly impossible-to-squash bugs. So after having given up on that, I tried push_affordance_on_run and they're now working far more robustly. I just need to edit something like 33 files carefully to get them all working like the sample interaction. :|

So who knows when that'll get done. The child traits are still the priority right now.

But it was neat to see it come together in the sample interaction. Sorcerer uses typical (same as in Vamp interactions) pusher on target, so that the target cancels everything they're doing. Sorcerer then does a continuation where they walk to a particular distance from the target. Then, originally, it was Sorcerer and target both do a continuation from there into the janky hacked together thing and the only way for them to manually cancel out of the interaction is for the Sorcerer to click on the target and hit Sever Bond.

Now, instead, the target does a continuation from there into their part of the interaction. In their part of the interaction, they do a push_affordance_on_run which activates the Sorcerer's part of the "bond." With push_affordance_on_run (and link_cancelling_to_affordance set to true), they're linked together now, so that if the Sorcerer cancels their interaction, the target will automatically cancel too. I then change it so that the Sorcerer part can be canceled out of with a click and leave it so that the target cannot.

Much more clean. I put in a sort of "fail-safe" too, allowing the Sorcerer to click on the target and "dispel enchantment" to cancel them out of their part of the interaction, in the event of some weird edge case where the target starts their part of the interaction, but push_affordance_on_run doesn't properly push onto the Sorcerer.

It's not perfect, but it's much cleaner than what I had before.