Hi everyone !
I’m trying to develop my own basic game system. I managed to design my actor sheet as I wanted, however I’m stuck to create only 1 actor. You can see on the screenshot I shared that when I press the “Create Actor” button, nothing happen. I can’t delete my previous character too by the way. Does anyone have an idea of what I missed ?
I can share piece of code if you need to see any information. My system is based on
Simple Worldbuilding System
Except the data from template.json and the actor-sheet.html file my system is still quite similar for now.
Any help will be greatly appreciated !
I’d recommend opening the dev tools console (F12) and checking to see if there is an error being logged out there when you try to create a new character. It’s possible that that will tell us what is going wrong
Could you also share your Foundry server version and the version of the system that you’re using?
Hi phi !
Thank you for the reminder, I really must get the habit to check the dev console. Here is the error I get :
I checked the code and it seems to be due to a check if the current actor is used as a template or not. I can’t find where the “worldbuilding” flag is defined however. My knowledge in Java is limited, so I’m sorry if I’m mistaken in my interpretation.
The error shown when I try to delete my previous character is also related to that flag and the function “isTemplate”, so I think we can put it aside for the moment
I tried to declare a new variable called “worldbuilding” but likely not in the right place and in the right way, as I said my knowledge in Java is limited ^^’ I don’t need to use template character, so is there a simple way to solve this issue ?
To answer your questions, I’m using the Version 11 of Foundry (Build 315) and my system is on 0.8.2
Many thanks in advance for any follow-up !
I’ve had a look at the code and can confirm that the issue doesn’t appear to happen in the base version of the simple worldbuilding system.
From what I can see, the issue happens because the “worldbuilding” scope never gets populated with flags. You mentioned you were looking for the right place to add the “worldbuilding” scope, and that you’re working on developing your own system based on it. so if you’ve made edits to the system’s code. They should be defined in the original version of that code, you might’ve removed one of these places where it’s getting set (Github search link here )
As far as I know, “setFlag” implicitly registers that scope. Unfortunately I can’t make any recommendations for a simple fix since making edits to a system gets a bit involved
I would totally encourage you to ask around in the
#system-development channel of the Foundry Discord though! Foundry VTT The folks over there might have some ideas and advice for next steps.
Thank you for your advices.
Unfortunately, I can’t access to Github/Gitlab or Discord. That’s why I posted my question here.
But fortunately, I solved the problem by re-using the previous code. I still don’t really understand where the problem came from, but if anyone find this post and is in a similar situation, you may check the code in the link I shared since it actually works well.
Good luck everyone, and thanks again to Phi for helping me solving the issue