Hi!
I'm very (VERY!) new to editing plugins, coding and need help with adding my own tool-items (like the hookshot etc that it has already implemented) within Moghunters Chrono Engine.
I looked and searched within the code if I can make sense of it (at least for my range of understanding so far) but sadly not. How can I write funtioning tools and how and where do I edit the plugin file?
What I would like to have:
- A Tool-Item that highlights specific events on the map when the item-button is being pressed
- 3 that starts a ceratin event when the item-button is being pressed while being near it (like listening to ghost-NPCs when the button is pressed while standing in front or beside of them for an example and that for 3 different items for 3 different kinds of events)
Sorry if there is already a thread or guide for that but didn't found one. ^^'
And thanks in advance for the help! 😀
Neither of those require editing the plugin file but they do require you to use a script on the tool event page and maybe another plugin to add a highlight effect to an event.
Could you be more specific what events you want to be highlighted?
Oh okay that would be awesome of course if it´s possible via eventing!
Item 1 should highlight events that "mark" hidden passages on a map (like illusionary walls and overgrown pathways) when the item-button is pressed
Item 2 should make tracks (may it via events that become vissible or show-picture-command like a scent-track or ghostly footprints) vissible. (again on button-press/item use)
Item 3 should trigger on button-press a text-event when standing next to/in front of a specific event (like a shrine for an example) so the player is able to listen to spirits when using this item
Maybe I'm just missing something here?
What I tried:
Create an item in the database and insert the script under the notes (where Moghunter also entered his own notes such as abs-mode, etc.). It doesn't work when I use it.
But when I create a separate event and run it via script:
(function() {
$gameMap.events().forEach(event => {
if (
event.event().name == "NPC" &&
!event._erased &&
$gameSelfSwitches.value([$gameMap._mapId, event._eventId, 'A']) == false
) {
$gameSelfSwitches.setValue([$gameMap.mapId(), event._eventId, 'A'], true);
}
});
})();
Then it works, but regardless of whether I have the item in the slot (the tools are key items in the plugin that have a tool ID in the notes in the database as well as the addition abs-mode) or not or if the Item-key of the script is being pressed (in my case the A-key). ^^'
(and honestly sorry if I just don't get it)
You need to put the script in the tool event page (on the tool map). I never said to use the database entry
Oh my gosh, hit me but I just found the tool map... (actually searched through the entire code, item list etc etc to find what you could mean (like a code segment or something) and just didn't notice the named tool map in the demo of the plugin demo... ...
Works like a charm now of course, was super easy - thank you so much for the help and template code! ^^'
Hi, Im also trying to add items here.
I have them added but its not fully functioning the way I wanted to.
one thing im struggling with is scrolling through the item or skill menus. It works on the default game by pressing Q or pagedown but in my game these buttons don't do anything.
and one more thing I'm trying to do is instead of pressing the action button for an event that requires that item, i'd want to press the item button (a)
I just checked the shield, pressing D. I included the tileset with the shield,
but it doesn't do anything. I have those tilesets with default names but nothing. Do you know where I'd look?
The shield filename suffix would be in the database entry of the shield
I compared it to the default file, made it all the same, first item with the suffix.
It still doesnt show the shield character tileset when pressing D
Post screencap of the actor's database page, the shield page, and the actor's base sprite and shield sprite names
You have the shield pose suffix as _Shd01 when the file name is _shd01
It's case sensitive
my mistake, I changed it to lowercase but still nothing.
Maybe it has something to do with Hero01?
Is the shield working functionally? When you press 'D' does it block attacks?
Then this isn't a graphical issue, you changed the key assignment. Check the Chrono Engine plugin settings and any other plugins you have that change keybindings