Waldorf Posted July 25, 2023 Share Posted July 25, 2023 Recentemente ho creato un plugin per modificare il funzionamento di altri 2 plugin, in modo da generare dei nemici randomicamente, in modo simile al generatore personaggi di MZ. 1) Innanzitutto, per funzionare è necessario-Visustella_BattleCore-MPP_CharacterMake & キャラクターメイク画面呼び出し-Il plugin di supporto elencato in seguito. 2) Copiare l'intera cartella "generator" dai file dell'engine MZ alla cartella del progetto (nel root) 3) Usare i plugin di MPP_CharacterMake per selezionare un ID eroe e definire un Tipo di personaggio (Male,female,kid), e poi usare l'altro comando per generarlo randomicamenteIn alternativa, è possibile usare un comando del plugin di supporto per precaricarli in anticipo (è suggerito questo metodo, dato che caricarne più di due in battaglia rallenta il gioco finché non finisce di caricare) 4) Mettere ai nemici ai quali si vuole assegnare la grafica dei personaggi generati il tag:<SIDEVIEW BATTLER: &ID>dove è da cambiare ID all'ID dell'eroe che è stato generato randomicamente 5) Inserire il plugin di supporto, che modifica la funzione che carica i battler per "dare" questi generati randomicamente a Visustella Reveal hidden contents //=============================================================================// Plugin compatibility for Random Human Enemies - MZ//=============================================================================/*:* @target MZ* @plugindesc [Rpg Maker MZ] [Version 0.5] This plugin is to use random generated characters as enemy battlers. Visustella BattleCore and MMP_CharacterMake needed.* @url https://waldorf.itch.io/* @target MZ* @author RPGWaldorf* @help How to use:1) Add Visustella BattleCore to your game--NOTE: CoreEngine is NOT strictly needed----On the contrary, it's not compatible with a function you may or may not use of the MMP plugin (Displaying generated characters on map)--Add MPP_CharacterMake and MPP_CharacterMakeOp1 too -https://woodpenguin.web.fc2.com/MV_Plugin/CharacterMake.htmlAdd this plugin under those two.2) Add the "generator" folder with generation parts in your game folder rootYou can copy it from the installation folder of RPG Maker MZPlaytest the game once (and after every generator folder change) to allow the plugin to elaborate datas3) Generate Characters:You need to save them on Actor indexes, keep a few empty.Method 1:Generate them with MPP_CharacterMake plugin commands:-First, use the first command to select its category (parameter 1: ActorId. Parameter 2: Gender)-Then use the last command to randomly generate it (Parameter 1: ActorId)(But if too many appears in battle at once it might lag while it loads)Method 2: You can preload them with the plugin command of this plugin.-It's still suggested you don't preload many of them at once.NOTE: after closing the game, the character is still saved, but the preloaded one isn't.So you can use it again, even if it falls under the previous option.4) Make them appear in battle!Use the tag on the enemyWhere "ID" is the Actor id where you generated the character.** @command Preload Human Enemies* @desc Generates characters in actor slots 11+.* @arg actorSlotId* @text Actor Slot ID* @type number* @default 11* @desc Actor slot from where start the character generation* @arg number* @text Quantity* @type number* @default 4* @desc Number of character battlers to generate* */(function() {const pluginName = "RandomHumanEnemies";var tempPreloadEnemyHuman = [];PluginManager.registerCommand(pluginName, "Preload Human Enemies", args => {var number = parseInt(args["number"]);var actorId = parseInt(args["actorSlotId"]);var genderValues = ["Male", "Female", "Kid"/*, "MaleMV", "FemaleMV", "KidMV"*/]; //you can add more categories there andfor (let id = actorId; id < actorId + number; id++) {//Chooses a random category between Male, Female, Kid.var randomGender = genderValues[Math.floor(Math.random() * genderValues.length)];//Calls the MPP pluginPluginManager.callCommand($gameMap._interpreter,"MPP_CharacterMake","setActorKind",{ actorId: id, kind: randomGender});PluginManager.callCommand($gameMap._interpreter,"MPP_CharacterMake","Op1:changePartsRandom",{ actorId: id });//saves the generated character in a variabletempPreloadEnemyHuman[id] = ImageManager.loadGeneratorBitmap($gameActors.actor(id)._geneBattlerName, 'SV');}});//feeds the preloaded character into Visustella. Uses aliases, so it doesn't ovverride.const _ImageManager_loadSvActor = ImageManager.loadSvActor;ImageManager.loadSvActor = function(filename) {if(/^MppGeneSV/.test(filename)){return this.loadGeneratorBitmap(filename, 'SV');} else{if(filename.startsWith("&")){if(tempPreloadEnemyHuman[parseInt(filename.substring(1))] !== undefined){//method that uses the preloaded charactersreturn tempPreloadEnemyHuman[parseInt(filename.substring(1))]} else{//method that loads them all at onece on battle start, but lags while it loads.return this.loadGeneratorBitmap($gameActors.actor(parseInt(filename.substring(1)))._geneBattlerName, 'SV');}} else {return _ImageManager_loadSvActor.apply(this, arguments);}}};})(); O copiatelo direttamente da qui:https://pastebin.com/0QarPAP0 6) Enjoy! Trovi la lista dei miei giochi cliccando qui! Seguimi su Youtube e Twitch! (spam gratuito, yeeeeee!!!) Reveal hidden contents Twitch:https://www.twitch.tv/rpgwaldorf Youtube:https://www.youtube.com/channel/UCdgXmw8f_L4Go9xVRGMqsrA NOTA: Ora faccio gli streaming solo su twitch, anche se su youtube trovate video interessanti! (spero) :D Bellissimo banner by Dedalo XIII Link to comment Share on other sites More sharing options...
Guardian of Irael Posted July 25, 2023 Share Posted July 25, 2023 Waldorf pure scripter!!!! Quote in modo simile al generatore personaggi di MZBella idea sfruttare quello stesso codice ma dal lato dei nemici.Usando stesse classi/eroi di base si possono creare anche variazioni tipo soldati nemici con capelli in stile diverso e altri dettagli simili senza snaturare troppo il nemico^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ Reveal hidden contents 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM: Reveal hidden contents Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Waldorf Posted July 25, 2023 Author Share Posted July 25, 2023 On 7/25/2023 at 9:03 PM, Guardian of Irael said: Waldorf pure scripter!!!!Bella idea sfruttare quello stesso codice ma dal lato dei nemici.Usando stesse classi/eroi di base si possono creare anche variazioni tipo soldati nemici con capelli in stile diverso e altri dettagli simili senza snaturare troppo il nemico^ ^ Nel plugin c'è effettivamente l'opzione per definire quali dettagli randomizzare, quindi volendo è possibile randomizzare dei nemici con lo stesso vestiario ma capelli/faccia diversi.Altrimenti, è possibile pure salvare un personaggio per utilizzarlo in seguito (come un rivale ricorrente), o addirittura usare un fixed seed per avere un personaggio random, ma coerente per ogni giocatore. Trovi la lista dei miei giochi cliccando qui! Seguimi su Youtube e Twitch! (spam gratuito, yeeeeee!!!) Reveal hidden contents Twitch:https://www.twitch.tv/rpgwaldorf Youtube:https://www.youtube.com/channel/UCdgXmw8f_L4Go9xVRGMqsrA NOTA: Ora faccio gli streaming solo su twitch, anche se su youtube trovate video interessanti! (spero) :D Bellissimo banner by Dedalo XIII Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now