Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

So I finally got this plug-in, and I aimed to have actors be able to be recruited with enough of a certain item; but as I was testing this to make sure you can't recruit them without it - I could still recruit them. I then tried this with a gold requirement instead, and it still worked despite having not set up any event previous to grant these items/gold amount before recruitment.

Am I meant to use conditional branches to make this work? Or is the plug-in meant to automatically prevent recruitments if you can't pay the amount?

EDIT: Just to clear things up, I am using the Call Actor Scene.

(2 edits)

Hi, I am not able to reproduce the issue. The plugin should prevent recruiting the actor if you can't pay the costs.

I did try reproducing the problem with an item in my test project, and it seems to prevent recruiting the actor:

Are you sure you do not have the required costs? What are the amounts / types of cost you have set up, I can try with your exact configuration and see.

I am sure I do not have the required costs. I've set it up for an actor to require 1000 G on a brand new save file, and also to require 1 of a "Spatial Gem" also on a brand new save file and both times I am able to recruit them.

I've even turned off every plugin except CGMZ_Core and the CGMZ_Recruitment Board and still it occurs. 

I tried creating a gif to show this but no matter how small I make it, it will not upload so I apologize.

(2 edits)

Hmm, when setting up your costs, is the 1000 G and 1 Spatial Gem set up as separate costs in the list, or are you trying to use the same cost structure for both 1000 G and 1 Spatial Gem? If the latter, you will need to convert it to have 2 cost objects, one that is for 1000 G and one that is for 1 Spatial Gem. For example like this:

To attach images / gifs to an itch comment, I just upload it to imgur and paste the link in here. Also, do you have anything entered for the currency ID in your gold cost? If not using [CGMZ] Currency System you still need to have something entered there so it is not empty, otherwise Recruitment Board will think it is an invalid cost object.

(3 edits)

Good questions, thanks for asking; they are both separate costs, for different actors.

I have something entered in the gold cost, yes.

This is what I have set up for one actor; 1 amount of a Spatial Gem (item 2).

And this is the gold cost gif:

https://imgur.com/a/YTxBAtv

Ah ok I see, you are calling the individual actor accept scene instead of the recruitment board. It does not check costs when called that way, since it is only 1 actor I thought it would be better to let people event how the player reaches that scene.

If you want it to check the costs automatically you can add the following code to the bottom of the js file

CGMZ_Scene_RecruitmentActor.prototype.createRecruitWindow = function() {
    const rect = this.recruitWindowRect();
    this._recruitWindow = new CGMZ_Window_RecruitmentBoardRecruit(rect);
    this._recruitWindow.setHandler('cancel', this.onRecruitCancel.bind(this));
    this._recruitWindow.setHandler('ok', this.onRecruitOk.bind(this));
    this._recruitWindow.actorId = this._cgmzActor.id;
    this._recruitWindow.refresh();
    this._recruitWindow.activate();
    const option = (CGMZ.RecruitmentBoard.RecruitDefaultOption) ? 0 : 1
    this._recruitWindow.select(option);
    this.addWindow(this._recruitWindow);
};

Thank you so much!

I tried to tell you that I was using the Call Actor scene in my first message in an edit but that might have been missed! I'm very sorry for the trouble and thanks again.

No problem, I did see you said that after scrolling back up 😅I think I did miss the edit. Glad you got it working.

I don't want to make this change for everyone as I think some people might want to be able to skip the costs in some cases... I can make it a true / false parameter in the plugin command easily enough though.