Other than the 4 directional sprites that just need to have their "directions" in the right order (use any existing sprite as a guide for this) you can pretty much do any of this stuff however you like.
ShaunJS
Creator of
Recent community posts
Ah interesting, yeah surfaces lose their contents in certain scenarios (like the window losing focus) I will need to put together a proper safety check for this. I imagine this might happen if you swap to full screen at any point mid fight and then finish the fight.
Should be able to fix this without too much problem in the near future, thanks for this!!
While I'm sure there's stuff I haven't thought of, I imagine this wouldn't be too difficult to do with this setup. You'd want to change the victory conditions, make a new type of player unit that faces the other way etc, but you can make most of what you need through duplicating the player one stuff and making minor adjustments.
even on one controller you'd want to know which player was which to determine who wins, who the default target for offensive/defensive abilities should be, what side to stand on, etc etc. So that doesn't make things any easier per se but either way it wouldn't be too difficult to implement with some basic GML skills.
You seem to have a mix of versions here for some reason. Line 37 of your oBattle creat event is from the new version, but the line in your slime collision event is from an old version.
Edit: i've also confirmed that the most recent version also works properly in Opera GX, so if you're still hitting errors this is a problem with your project specifically.
That, fortunately is the exact issue mentioned in the post above. Will look into the GX games thing but with the windows launcher if you implement the fix in the link in my previous post, or get the newest files it will fix that particular error. The mention of " if (_option[0] == "Attack") return 99;" is the giveaway.
Hello again! sorry to bother you, but I believe your bug may have been related to this issue that was reported recently. Was HTML5 the platform where you were hitting this bug? If so and you get a spare moment would you be able to either get the latest files or implement the fix mentioned in that post and let me know if you still get issues in the browser?
-S
This fix has now been uploaded: https://shaunjs.itch.io/shauns-turn-based-battle-system/devlog/484288/hotfix-for... please let me know if you still have issues!
If you want you can quickly implement the fix for yourself if you don't want to replace the project. Change line 120 of oBattle's create event to read as follows:
if (_action.subMenu == -1) array_push(_menuOptions,[_nameAndCount, SelectAction, [_unit, _action], _available]);
Ok I've found the issue, it's because I was setting menuOptions[i] to be the new top level action when compiling the menu. This means if we did a sub-menu action in between two top level actions (like magic) when the next top level action is added, i has increased by more than 1 and there will be 0s added in between. For some reason this never threw an error previously. I'm really not sure why it didn't! This probably also explains why a similar error appeared for another user in HTML5. Thanks for the report, I'll upload a fix for this now.
Unfortunately I'm low on ideas as I simply cannot reproduce the issue on my own end without changing the code intentionally to do so. All I can really suggest is that you place a breakpoint somewhere inside the DoTurn() function in oBattle's create event, just after the point where it has decided that it's a player turn (like the if (_unit.enemy == false) line). and run debug mode. Then when you hit this breakpoint use the Step Into Function Call button to progress one line at a time until the error occurs which might give you more clues. As your error as posted is struggling to isolate the problem line.
Fwiw the error itself refers to code trying to treat something that isn't an array, as an array. And if it's happening when it becomes one of your character's turns, chances are it's happening when trying to build the action menu for that character. Which might mean you've added or changed something in gamedata for that character (or perhaps an action) but accidentally affected the datatype or missplaced a comma or something similar?
Although you say sprite I presume you mean changing the names of the characters generally, correct?
You can change the name of any asset in the asset browser by right clicking it and selecting rename, or by pressing F2 with the asset highlighted.
In terms of changing the names as they show in game, etc. Most of that information is held in the "GameData" script. Where you will see all the data for the party members, the inventory, and every "action" you can perform in combat.
Enemies are not stored in this same way (although perhaps they should be?) but their information can currently be found in the create event for that particular enemy unit. During my refactor and for the tutorials, I will probably move this enemy data to also come from the GameData script instead.
Oh I have misunderstood! I did not read your errors correctly and presumed they were part of an earlier issue. The problem is that the project uses very new techniques introduced in stable 2022.11. The "string" function explicitly now allows extra functionality that this project uses. I will add clarifications on this to the project page. Very sorry for not reading this properly! =(
And if either of you are unable/unwilling to update your GameMaker version for whatever reasons and therefore cannot use this project, please feel free to initiate a refund request with itch.io. Sorry about that!
Hey hey! Have you tried downloading the version I uploaded after this hotfix? https://shaunjs.itch.io/shauns-turn-based-battle-system/devlog/476207/hotfix
I think this should fix your issue. Otherwise the line to fix is in the collision event with oSlime, the last argument "sBGfield" should be the last argument of the function but is accidentally part of the array given as the first argument.
Intrinsic issues that will not likely be fixed:
- Adding more than ~6 enemies, or more than 3 player characters using the same visual style/ui design will cause issues as there simply isn't room for them. This is just intrinsic to the design and if you want more characters for your game you'll need to change the UI design, formation positions and/or game resolution etc to accommodate your needs.
Known and not yet fixed:
- Toggling fullscreen or losing window focus during a fight might cause the transition surface to lose its data and trigger a crash at the end of the fight.
Hello YAL! I've struggled previously a little with room reloading in PokeyPoke which has quite large hub-worlds and big tilemaps, recently after grabbing the latest version I'm seeing what I guess is perhaps some timeout issues?
My speculation here is that my rooms have just gotten too large as 36000ms seems a long time to update the file. I don't actually know for sure if getting a newer version has affected this as its been a few weeks since I've worked on room editing in this way. Usually however Room reloading *works* but takes quite a while to update. Perhaps I'm having some port based issue instead?
It might just be that it's not practical to lean on GMLive as a level editing tool for such large areas, but wanted to ask your opinion.
PS. Other tangential issue is that I noticed previously tile map edits do not appear to be detected as a change until something else in the room is changed like an instance position. I usually have to wobble an instance about to trigger the update. Dunno if known about etc just thought I'd mention!
PS.PS. Thanks again so much for an awesome tool.
When reloading a room it seems that it is no longer possible to get the tilemap id of a given layer. Are these perhaps being moved/consolidated/disconnected from their layers somehow?
I can still get layers by name but when looking for the tilemap associated with that layer I get -1 from layer_tilemap_get_id().
Edit: nevermind! I found the older topic mentioning this. For anyone else, because the layers are recreated dynamically by gmlive you cannot access their tilemap ids using tilemap_get_id(). YAL suggested the following script as a fix:
/// layer_tilemap_get_id_fixed(layer) var els = layer_get_all_elements(argument0); var n = array_length_1d(els); for (var i = 0; i < n; i++) { var el = els[i]; if (layer_get_element_type(el) == layerelementtype_tilemap) { return el; } } return -1;
This one certainly will: https://shaunjs.itch.io/shauns-complete-platformer-tutorial-series