Roguelite style carry over

I want to implement a system similar to Roguelites that carry some progress to the next attempt after a game over. Is it even something fathomable to achieve or is it blocked by the hard code of RPGMaker? I thought about doing it as a lose condition, but I'm wondering if its possible to do after the game over to have that feeling of starting a "fresh" slate.

The idea is to have a limited amount of items the player can pass onto the next run
There's no such thing as "blocked by the hard code of RPG Maker."

The engine's code is right there in your js directory, you can do literally anything with sufficient knowledge and effort.

Look up meta controls plugins, they allow you to set variables and switches with values that persist across save files.
Is it even something fathomable to achieve or is it blocked by the hard code of RPGMaker
the engine can be recoded. thats what plugins are for. adding to/changing the engine through JS

I thought about doing it as a lose condition, but I'm wondering if its possible to do after the game over to have that feeling of starting a "fresh" slate.
Id suggest that instead of issuing a game over, you use a plugin like this to fake a game over, then take the player back to the start and remove what you need to remove
there are several ways to achieve what you want, the most common one is done with a new game plus plugin (which is usually for a second playthrough but can be used to handle more than a second one.

other options are a custom game over like linked above, or the use of persistent variables (again with a plugin for that).

however, persistent variable are an extreme option here - you would need to micromanage the results stored in persistent variables. And that is both good and bad - you would have much more control on what exactly is done, but would require that detail management even where not needed.
There's no such thing as "blocked by the hard code of RPG Maker."

The engine's code is right there in your js directory, you can do literally anything with sufficient knowledge and effort.

Look up meta controls plugins, they allow you to set variables and switches with values that persist across save files.
Oooh I had no idea, but coding isnt really my strong suit so I'm not too confident with recoding some of these things 😅

the engine can be recoded. thats what plugins are for. adding to/changing the engine through JS


Id suggest that instead of issuing a game over, you use a plugin like this to fake a game over, then take the player back to the start and remove what you need to remove
Thanks! That plugin helped a lot!

I'm looking at the list of script calls and commands and I'm a bit at lost as to how I would have the inventory/current item list show before the game over screen so the player can select the items they would want to carry over.
how I would have the inventory/current item list show before the game over screen so the player can select the items they would want to carry over.
a basic form of it would be using the select item event command to bring up the player's inventory, having them select some number of items from there, then clearing out their inventory and using the ids stored into the variables to give them back what they chose for the next run
You could also do this with cute eventing. You could make all battles set up so they continue if you lose, and have the loss condition reset the game to the beginning (probably best done via a common event). You'd have to keep track of what resets and what doesn't each loop though.

And you can easily reset actor levels and equipment by removing everyone from the party, then readding then and checking t he initialize box.

The issue you will hit is it is a LOT to keep track of. You will have to keep track of how much EXP to give them via a variable. Any permanent stat gains are done that way too. Equipment changes from default. Etc. You will need to organize this well in advance.

Though most new game plus plugins require about the same level of organization in the end too as you have to tell it what to carry over and what not to, it just automates the resetting of variables/switches a little more for you.
a basic form of it would be using the select item event command to bring up the player's inventory, having them select some number of items from there, then clearing out their inventory and using the ids stored into the variables to give them back what they chose for the next run
Yea the select item unfortunately only stores the amount of items and not the item itself I'd probably have to do some conditional branching for this...
You could also do this with cute eventing. You could make all battles set up so they continue if you lose, and have the loss condition reset the game to the beginning (probably best done via a common event). You'd have to keep track of what resets and what doesn't each loop though.

And you can easily reset actor levels and equipment by removing everyone from the party, then readding then and checking t he initialize box.

The issue you will hit is it is a LOT to keep track of. You will have to keep track of how much EXP to give them via a variable. Any permanent stat gains are done that way too. Equipment changes from default. Etc. You will need to organize this well in advance.

Though most new game plus plugins require about the same level of organization in the end too as you have to tell it what to carry over and what not to, it just automates the resetting of variables/switches a little more for you.
I didn't think about the resetting of the other variables and switches... as for EXP and stats, theres no EXP gain in the battles or leveling up just gold earned, but yea I see what you mean about the organization 😅
Yea the select item unfortunately only stores the amount of items and not the item itself I'd probably have to do some conditional branching for this...
its not the the item count it stores, its the item's ID
1727562488040.png
its not the the item count it stores, its the item's IDView attachment 319017
So I made a quick test event like this:
1727563489921.png

How do I get the script to get the item ID from the Items variable?
How do I get the script to get the item ID from the Items variable?
Code:
$gameVariables.value(x)
gets the value of variable x, so you'd want to use
Code:
$gameParty.gainItem($dataItems[$gameVariables.value(44)],1)
to get one of the item that has the same id as variable 44's value
Is it possible to have the system check if the player has at least 2 items or 2 of the same item? I'm trying to build a conditional that will skip this item selection part if the player has less than 2 total items or at least have it play only once if theres only 1 item in the inventory.

I'm trying to use the item count script but it's not working
1727726581898.png


On page 1 I just have 2 events giving 2 different items
Olivia_MetaControls is the best part for global saves and local saves.
you can go crazy as 1 game did that with saving and loading savings
to go further into the game.

saving the items into a variable or flip switches is doable with that 🙂
Is it possible to have the system check if the player has at least 2 items or 2 of the same item
youre asking for 2 different things here, but:
the player has at least 2 items
if you try this, itll add up the quantities of all the items the player has
Code:
$gameParty.items().reduce((a,b) => a+$gameParty.numItems(b),0)
2 of the same item
youre using the right script call for that, but it doesnt take arrays. it takes items.
Code:
$gameParty.numItems($dataItems[16])>=2
if you wanted to see if they had 2 of any item instead of 2 of a specific one though, use this
Code:
$gameParty.items().some(item => $gameParty.numItems(item) => 2)
if you wanted to see if they had 2 of any item instead of 2 of a specific one though, use this
Code:
$gameParty.items().some(item => $gameParty.numItems(item) => 2)

I keep getting the "item is not defined" error I even tried substituting it for the $dataItem[1,16] range and it still didn't work 😅
I even tried substituting it for the $dataItem[1,16] range
as i said before, the function doesnt take an array. it takes single items. granted, $dataItem[1,16] would just get you $dataItems[16], and youd be running that because js doesnt create array slices by doing that, but the idea is theres no passing the function a list of items as-is

i did make a mistake typing that up. it should be
Code:
$gameParty.items().some(item => $gameParty.numItems(item) >= 2)
but thats not the error youd get from that. it might be an addition by a later version of nwjs
if the correction doesnt work, try this
Code:
$gameParty.items().some(function(item) {return $gameParty.numItems(item) >= 2})
i did make a mistake typing that up. it should be
Code:
$gameParty.items().some(item => $gameParty.numItems(item) >= 2)
Yea the typo was the issue, I noticed it at first but i changed both => to >= 😅 It works fine now, thanks a lot!

Original thread: https://forums.rpgmakerweb.com/threads/roguelite-style-carry-over.172217/