Adventure Game Studio | Forums

AGS Support => Beginners' Technical Questions => Topic started by: DustyShinigami on Tue 02/01/2018 20:55:00

Title: Changing Template
Post by: DustyShinigami on Tue 02/01/2018 20:55:00
Hi everyone

Just signed up and have recently started using AGS in order to make my very first video game/adventure game. This is for a college project I'm doing in game development. I'm currently working through the tutorial, but I would like to change my BASS template to something else, but I'm not sure how or if you can. Is this possible at all?

Thanks
Title: Re: Changing Template
Post by: Crimson Wizard on Tue 02/01/2018 21:03:54
Not sure what you want to do exactly, but template is just a collection of starting assets, like scripts and dummy graphics. It's not something that is "locked" in your game.
Normally you would just start with something and then modify it to your needs.

If you want to use starting scripts from another template, you may:
1) create a new game using template you like more, and then copy only things you want from your old game.
2) Or other way around - create a temporary game from wanted template, and copy scripts from there to your current game.
Title: Re: Changing Template
Post by: DustyShinigami on Tue 02/01/2018 21:14:00
I guess I just want to experiment with the Monkey Island verbs, but without starting over whilst following the tutorial.
Title: Re: Changing Template
Post by: Crimson Wizard on Tue 02/01/2018 21:23:23
Quote from: DustyShinigami on Tue 02/01/2018 21:14:00
I guess I just want to experiment with the Monkey Island verbs, but without starting over whilst following the tutorial.

Hmm, no, there is no way to automatically switch the contents of one template with another. The only way is to create a new game with new template and then copy necessary things over.

For example, rooms are separate files with *.CRM extension, you may just copy them to new game folder and then include into game with "Import existing room" command from context menu. Then copy & paste their scripts (they are just texts).
If you have created any global script modules yourself, they are also just texts that may be copied over with copy&paste commands. Same for Dialogs.
GUI may be exported with context menu command and then imported to new game.
Sprites have to be reimported anew, I think.

Title: Re: Changing Template
Post by: DustyShinigami on Wed 03/01/2018 00:04:21
Okay, thanks for the help. :)

I have a problem now. I've done a search in the forums, but I'm still clueless. Plus, I'm still very new to coding/scripting, but I can't work out how to get my placeholder character to walk to the key first before picking it up.
Title: Re: Changing Template
Post by: Khris on Wed 03/01/2018 01:52:46
Sounds like you're looking for a blocking walk:
function oKey_Interact() {
  player.Walk(213, 123, eBlock);
  // pick up happens here
}


Always state what you've tried, so we don't have to guess. Asking for help is fine, but try to minimize the work we have to do as much as possible, is a good rule of thumb.
Title: Re: Changing Template
Post by: DustyShinigami on Wed 03/01/2018 09:54:36
Okay, I'll try to remember that in future. :) I take it those axis values will need changing to where my key is?

One other thing: I found out to my disappoint that AGS doesn't support vector graphics for characters/sprites, so I'll have to change my assets to be more retro/pixelated. I'll be doing this in Photoshop. How do I import them over? The import option asks for the files to be in .CHA, I think it was...?
Title: Re: Changing Template
Post by: Khris on Wed 03/01/2018 11:38:17
You need to
The import function you found is for importing characters that were previously exported from another AGS game.
Title: Re: Changing Template
Post by: DustyShinigami on Wed 03/01/2018 12:22:19
I managed to import a pixel image I made in Photoshop no problem. :) Animations I haven't looked into yet. That will be a whole new learning challenge.

I'm thinking of having my pixel art 1920x1080. What would be a good resolution for my characters/sprites?
Title: Re: Changing Template
Post by: Khris on Wed 03/01/2018 12:55:54
I don't know. Why don't you create a test room using that size, then draw a door and go from there?
The only thing you need to keep in mind is that scaling down a sprite always looks better than scaling it up. If the characters are going to get close to the "camera", draw them rather big.
Title: Re: Changing Template
Post by: Snarky on Wed 03/01/2018 13:07:12
There's no set answer for that. In classic 3rd-person adventure games, characters at full size are typically somewhere between 1/4 to 1/2 as tall as the background portion of the screen (i.e. not counting the bits covered up by a UI), varying a little depending on the aspect ratio, but it really just depends on how large you want them to be on-screen.

As Khris says, the best way to figure it out is to create a mockup with a background or background sketch, sketching in a character at full size and seeing how big that ends up being.
Title: Re: Changing Template
Post by: DustyShinigami on Wed 03/01/2018 19:52:50
Fair enough. I'll just have to experiment and see what works best.

Currently having problems applying my dummy sprite. I've got it uploaded as a PNG, but I'm not sure how to use it so it appears in my scene. I feel as though the tutorial doesn't explain or explain it clearly. :-/

Also, for some reason now, whenever I try and run the game, I get a compiler error saying: 'The game is set to start in room -1 which does not exist', but in the properties panel it says it's 1.
Title: Re: Changing Template
Post by: Crimson Wizard on Wed 03/01/2018 20:06:07
Quote from: DustyShinigami on Wed 03/01/2018 19:52:50
Currently having problems applying my dummy sprite. I've got it uploaded as a PNG, but I'm not sure how to use it so it appears in my scene. I feel as though the tutorial doesn't explain or explain it clearly. :-/

AGS does not have a concept of sprite shown in the game as-is, it has characters, room objects, overlays and GUI. Depending on what your sprite represents, create either of these and assign sprite to it.
Characters are best for characters (obviously), or anything that walks, talks, and moves from room to room. Room objects are simplier thing that always reside in the same room.


Quote from: DustyShinigami on Wed 03/01/2018 19:52:50
Also, for some reason now, whenever I try and run the game, I get a compiler error saying: 'The game is set to start in room -1 which does not exist', but in the properties panel it says it's 1.
The error means that your playable character's has "Starting room" set to -1. Are you sure you are looking at the correct property?
Title: Re: Changing Template
Post by: Cassiebsg on Wed 03/01/2018 21:20:31
I'm not sure which tutorial you're following, but I suggest you try this one: https://www.youtube.com/view_play_list?p=21DB402CB4DAEAEF

It's a bit outdated, but most of the stuff hasn't changed, so you at least can get the basis out of the way. ;)
Title: Re: Changing Template
Post by: DustyShinigami on Wed 03/01/2018 21:46:03
Quote from: Cassiebsg on Wed 03/01/2018 21:20:31
I'm not sure which tutorial you're following, but I suggest you try this one: https://www.youtube.com/view_play_list?p=21DB402CB4DAEAEF

It's a bit outdated, but most of the stuff hasn't changed, so you at least can get the basis out of the way. ;)

Thanks for this. This has cleared up the confusion. :D
Title: Re: Changing Template
Post by: DustyShinigami on Wed 03/01/2018 21:47:15
Quote from: Crimson Wizard on Wed 03/01/2018 20:06:07
The error means that your playable character's has "Starting room" set to -1. Are you sure you are looking at the correct property?

I have no idea. I can't see a -1 anywhere in any of the properties. :confused:
Title: Re: Changing Template
Post by: Cassiebsg on Wed 03/01/2018 23:13:11
No, but you can set (or not ) the Player's starting room to (None) which translates to -1 in script code... ;)
Title: Re: Changing Template
Post by: selmiak on Sun 07/01/2018 09:59:19
but -1 is even less than none! 8-0