Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: lafouine88 on Sun 09/02/2025 19:40:03

Title: weird ID views
Post by: lafouine88 on Sun 09/02/2025 19:40:03
Hi guys

I've recently changed a lot in my view system, so I had to delete them to start back on a clean basis. I used like 250+ views and I deleted them all to just have around 30 left. And start again.
Something weird happens though when I create my new views.Instead of adding normally : view 31,32,33... sometimes one or more Id numbers are skipped. It goes 31,32,35,36,37,39 for instance. Which is annoying because I really need the view order for legacy coding. And it doesn't make sense because I ve checked many times, views 33,34 or 38 in this example don't exist anymore.

Any ideas why this would happen?

Thanks
Title: Re: weird ID views
Post by: Kara Jo Kalinowski on Sun 09/02/2025 20:25:04
Quote from: lafouine88 on Sun 09/02/2025 19:40:03Hi guys

I've recently changed a lot in my view system, so I had to delete them to start back on a clean basis. I used like 250+ views and I deleted them all to just have around 30 left. And start again.
Something weird happens though when I create my new views.Instead of adding normally : view 31,32,33... sometimes one or more Id numbers are skipped. It goes 31,32,35,36,37,39 for instance. Which is annoying because I really need the view order for legacy coding. And it doesn't make sense because I ve checked many times, views 33,34 or 38 in this example don't exist anymore.

Any ideas why this would happen?

Thanks

I can't help you with the reason it is happening (it might be a bug that you should report) but if I wanted to fix it I might try opening my Game.agf to see what's going on, in notepad++ or another text editor.

There's a section starting with <Views> that has information for all the views stored in the project. Maybe something wasn't getting deleted properly.

If someone else knows why it's happening though, feel free to give more information.

Disclaimer: If you do try changing Game.agf by deleting stuff make sure to back it up first. I haven't tried doing that myself and seeing if that causes problems
Title: Re: weird ID views
Post by: Crimson Wizard on Sun 09/02/2025 21:21:29
I have vague memories about editor saving "used" view numbers somewhere, maybe that list got out of sync somehow. That's just a guess.

Also, do you have any folders in your Views node? Can it be that these views do exist, but you did not notice them because they are inside subfolders?
Title: Re: weird ID views
Post by: lafouine88 on Sun 09/02/2025 21:47:42
QuoteThere's a section starting with <Views> that has information for all the views stored in the project. Maybe something wasn't getting deleted properly.
Yes that was it. I don't know why but some views hadn't been deleted. I just copied/paste the code and changed the view numbers and they reappeared for creation !

(https://i.postimg.cc/nV3NRrqv/capture.png)

Thanks guys!!
Title: Re: weird ID views
Post by: lafouine88 on Mon 10/02/2025 07:44:48
By the way, Is there a way to add frames and loops in view, other than manually? When you create many it's long and annoying. I've noticed I can use the notepad and the game.agf file but I find it even longer, and more hazardous.
Title: Re: weird ID views
Post by: Crimson Wizard on Mon 10/02/2025 12:17:30
Quote from: lafouine88 on Mon 10/02/2025 07:44:48By the way, Is there a way to add frames and loops in view, other than manually? When you create many it's long and annoying. I've noticed I can use the notepad and the game.agf file but I find it even longer, and more hazardous.

Right click on loop ->
    Add all sprites from folder
    Replace with all sprites from folder

Sprite Manager: select sprites, right click ->
    Assign to View
Title: Re: weird ID views
Post by: lafouine88 on Mon 10/02/2025 13:16:51
Yes that's a good one. But it doesn t work for Dynamic Sprites view.

I need to create a lot of "blank" views with the right number of frames. It s not especially long, it s just very annoying^^ if you could like copy-paste a view,it would be cool. Though it stays a very casual need so I m not sure it would be that useful for most games^^
I was asking,just in case

Thanks anyway😃
Title: Re: weird ID views
Post by: Crimson Wizard on Mon 10/02/2025 13:23:02
Well, you should have clarified that you are speaking of blank views.

Quote from: lafouine88 on Mon 10/02/2025 13:16:51I need to create a lot of "blank" views with the right number of frames. It s not especially long, it s just very annoying^^ if you could like copy-paste a view,it would be cool.

You can copy/paste loops in the editor. There's no copy/paste view command, although it would be proper to have one, and for each other item in game too.

Also, supporting dynamic creation of Views could be a thing, that would cover the dynamic sprite case.