Jibble

Author Topic: AGS 2.61 Pre-final Edition  (Read 31739 times)

Edmundito

  • Mittens Serf
  • Just tween it.
    • Best Innovation Award Winner 2014, for 'Tween Module'
    • Edmundito worked on one or more games that won an AGS Award!
    •  
    • Edmundito worked on one or more games that was nominated for an AGS Award!
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #120 on: 28 Apr 2004, 07:00 »
No-one seems to have noticed the editor plug=in new feature! This looks great. Finally we can do all those things that CJ is too lazy busy to implement...!

EDIT:

Quote
"Next, still with the class selected, look down the properties list for "Instancing". This is initially set to "2 - PublicNotCreatable", which means that other applications can't create the object. We need to change it to "5 - MultiUse", so that the AGS Editor can load the plugin."

This step of the tutorial is impossible with the free VB5 download... any ideas anyone?

Also, any plans to add more than the dialog system to this API, CJ?



If I could figure where this is with visual studio.net 2002 you could actually make stuff with C#... AGS would truly become AGS.net! OMG OMG OMG.... :P

Edit: Oh! It's Public!  :o

Edit 2:
I actually figured out how to code it with C#, even though I don't know C# nor remember much of visual basic. But the code actually compiles, and I'm sure I did it partially right because C# is as picky as Java (we all know why)

Anyway, here's what I get:

---------------------------
AGS Editor Warning
---------------------------
A plugin 'AGS_TestPluginCS.dll' was found in the editor folder, but it did not support the required interfaces.
---------------------------
OK  
---------------------------

I think it may have to do with the whole multiuse thing. I should look into it some more, but maybe I should sleep! Sleep it is :P

Edit 3: I found the problem:
"Visual Basic 6.0 ActiveX documents are not supported in Visual Basic .NET. You can still interoperate with ActiveX documents from your Visual Basic .NET Web applications, but development should be maintained in Visual Basic 6.0."

Meaning it won't work for the others like C#/J#...bah!
« Last Edit: 28 Apr 2004, 23:08 by netmonkey »
The Tween Module now supports AGS 3.5.0!

Isegrim

  • Every forum needs a troll...
    • I can help with translating
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #121 on: 28 Apr 2004, 16:46 »
Got a bug record (or maybe I'm just too stupid):

Can it be that RawDrawImageResized works only with 256col sprites? when I try it with a true col one, it's all weird, whereas the 256col attempt looks fine... (no matter what color depth the actual game has!)
If this is intentional, it should be documented in the manual, I think...
This post was generated automatically and therefore bears no signature.

Re:AGS 2.61 Beta 6 - Automation edition
« Reply #122 on: 28 Apr 2004, 16:55 »
What do you mean, it's all weird? Like, it's not displaying at all or it looks strange?
I've tested it an hour ago and it worked fine with my true color sprites.

Re:AGS 2.61 Beta 6 - Automation edition
« Reply #123 on: 28 Apr 2004, 20:12 »

I think this is a bug, but not sure: I'm using sierra style speech. Sometimes it displays the speech at the top of the screen, and sometimes it don't, instead it display it like Lucas-Arts style...

...Uhh...

Scorpiorus

  • 100101101010b
    • Scorpiorus worked on one or more games that won an AGS Award!
    •  
    • Scorpiorus worked on one or more games that was nominated for an AGS Award!
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #124 on: 28 Apr 2004, 21:54 »
If the character doesn't have a talking view assigned then the lucas-arts speech style will be used.

Re:AGS 2.61 Beta 6 - Automation edition
« Reply #125 on: 29 Apr 2004, 05:47 »

Nay, of course it has a talking view...thay all got talking views, don't you know? Well, you probably didn't...I think it only does that with DisplaySpeechBackground, but not sure...

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #126 on: 29 Apr 2004, 06:20 »
From the manual -

Quote
DisplaySpeechBackground
DisplaySpeechBackground (CHARID, string message)

Similar to DisplaySpeech, except that this function returns immediately and the game continues while the character is talking. This allows you to have characters talking in the background while the player does other things. Note that the character's talking animation is not played if this function is used.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Isegrim

  • Every forum needs a troll...
    • I can help with translating
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #127 on: 29 Apr 2004, 14:15 »
About my "Bug report": I tried the RawDrawing before a completely blank background. No BG image, no RawClearScreen. That gave a stange color-inversed and interlaced look.
Clearing the screen or using a BG image solves the problem...
This post was generated automatically and therefore bears no signature.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #128 on: 29 Apr 2004, 21:19 »
This step of the tutorial is impossible with the free VB5 download... any ideas anyone?

Hmm I didn't realise that. Try using a UserControl rather than a Class Module, and put all the code in there instead. Though this gives you an unwanted GUI component, I believe the User Controls automatically have the correct Instancing.

Quote
Also, any plans to add more than the dialog system to this API, CJ?

As I said in the original post, if people find this useful then I'd be happy to add more. It takes a fair bit of time to add the interfaces, so I'd rather only do it if people are going to use it. :)

Quote
I'm so rusty with VB. Could you give me a hand with this. It should be along these lines:

Dim a As AGSDialogTopic

a = editor.Dialogs.NewTopic()
a.newOption ("option 1")

which doesn't work. The following does:

With VB, you have to use "Set" for objects. If it's not an object and you use Set it crashes; if it is an object and you don't use Set it crashes.
This is one of the stupidist and least intuitive things ever about VB - it knows whether the variable is an object or not, so why not take care of it automatically? Sigh.

And talking of stupid VB syntax, you can only use brackets in a function call if it returns a value. If it doesn't and you use brackets, it will usually crash.

Anyway, to make your code work:

Dim a As AGSDialogTopic

Set a = editor.Dialogs.NewTopic()
a.NewOption "option 1"

Quote
Can it be that RawDrawImageResized works only with 256col sprites? when I try it with a true col one, it's all weird, whereas the 256col attempt looks fine... (no matter what color depth the actual game has!)

This is probably a colour depth mismatch. RawDrawImageResized only works if the source image and the destination are the same colour depth. From your later post, I presume the cause was that the empty room you were using initially had a blank 256-col background.

Re:AGS 2.61 Beta 6 - Automation edition
« Reply #129 on: 29 Apr 2004, 23:08 »
Ahhh, the set command. Uch. Thanks. I've tried but failed. The syntax is soooo... uch. it's counterproductive. I spend more time trying to figure out syntax that should be straightforward with any other language. How is VB still here?

Any examples of file handling would be a great help. I want to load strings and integers and such. I have a preliminary version, but it's hard and slow to test.

Is this the right way?

dim value as string
Open "file.txt" For Input As #1
input #1,value
close #1

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #130 on: 30 Apr 2004, 17:06 »
Hehe, agreed about the VB syntax. Fortunately they have sorted most of it out with VB .NET (eg. the Set thing is gone, the brackets thing is gone - it's a lot better), but that doesn't help us here much :)

Anyway, binary file read is slightly different:

Dim i as Integer
Dim l as Long

Open "filename.dat" for Binary As #1
Get #1, , i   ' read 2 bytes into i
Get #1, , l   ' read 4 bytes into l
Close #1

Basically, "Get" reads as many bytes as the length of the data type you read in (Integer=16-bit, Long=32-bit). You can also create a custom Type (ie. struct/class) and read that in in one go.

Edmundito

  • Mittens Serf
  • Just tween it.
    • Best Innovation Award Winner 2014, for 'Tween Module'
    • Edmundito worked on one or more games that won an AGS Award!
    •  
    • Edmundito worked on one or more games that was nominated for an AGS Award!
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #131 on: 30 Apr 2004, 21:00 »
Yo,

If anyone is experienced enough with VB.net and wants to convert the code given by Pumaman to that, send me  a message because I'm unable to figure that out.

Love,

netmonkey
The Tween Module now supports AGS 3.5.0!

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #132 on: 30 Apr 2004, 21:46 »
I just had a play with VB .net and I have managed to create a working AGS plugin with it.

The only snag is, it won't work with the beta 6 AGS Editor (I've had to modify the editor a bit so that it recognises .net plugins). Therefore, in the next beta you should be able to do it.

Edmundito

  • Mittens Serf
  • Just tween it.
    • Best Innovation Award Winner 2014, for 'Tween Module'
    • Edmundito worked on one or more games that won an AGS Award!
    •  
    • Edmundito worked on one or more games that was nominated for an AGS Award!
Re:AGS 2.61 Beta 6 - Automation edition
« Reply #133 on: 01 May 2004, 00:59 »
I just had a play with VB .net and I have managed to create a working AGS plugin with it.

The only snag is, it won't work with the beta 6 AGS Editor (I've had to modify the editor a bit so that it recognises .net plugins). Therefore, in the next beta you should be able to do it.

Yay! *makes out with Pumaman*
The Tween Module now supports AGS 3.5.0!

Re: AGS 2.61 Beta 6 - Automation edition
« Reply #134 on: 02 May 2004, 22:41 »
Quote
Dim i as Integer
Dim l as Long

Open "filename.dat" for Binary As #1
Get #1, , i   ' read 2 bytes into i
Get #1, , l   ' read 4 bytes into l
Close #1

Dim i as Integer
Dim l as Long

FileOpen(1, "blargh.txt", OpenMode.Binary, OpenAccess.Read)
FileGet(1, i)
FileGet(1, l)
FileClose(1)

There is also the streamreader/writer way.  VB.Net has a bunch of new features that you should check out if you don't want to end up doing QuickBasic style programming.

And I'm pretty sure that an integer holds 4 bytes, while a long holds 8.  A short (word) holds 2 bytes.

Or maybe it's just in VB.Net.

Edit: I'm a pretty good VB.Net programmer, if anyone needs me.
« Last Edit: 02 May 2004, 22:43 by Robert Eric »
  

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 RC 1 - Jaffa edition
« Reply #135 on: 03 May 2004, 16:59 »
Robert Eric: yep, it's different in .net. In VB6, Integer = 2 bytes and Long = 4 bytes; in VB .net, Integer = 4 bytes and Long = 8 bytes.

Anyway, RC1 is now up which supports .net plugins. It's messy though, and I really wouldn't recommend using them. If you have a copy of VB6, use that instead.

Anyway, I've added a note to the bottom of the COM Plugins page on how to make a .net plugin work.
« Last Edit: 26 Aug 2005, 00:15 by strazer »

Re: AGS 2.61 RC 1 - Jaffa edition
« Reply #136 on: 03 May 2004, 17:55 »
In my game, there is a mouse in the room and when the player clicks on it, EGO tries to catch it, but the mouse gets away all the time. If you click anywhere else, EGO stops chasing the mouse. After 4 tries he stops himself and says, "It's too quick for me.".

With the new RC 1, if I tell my player character stop following the mouse with FollowCharacter(EGO, -1);, the game quits with the error message:

(Room 1 script line 25)
Error: FollowCharacterEx: you cannot tell the player character to follow a character in another room

Additionally, if, during the chase, EGO happens to step on a region requesting a room change, the game now quits with

Error: A room change has been requested, but the player character is currently following another character who is not in the new room. Either stop the player from following before he leaves the room, or move the shepherd character to the new room as well.

as you wrote in your release note. However, I really think that's inappropriate.

I'd rather have EGO either ignore the NewRoom command completely or perform the room change and quit following the mouse automatically.
I don't think it's necessary to quit the game with an error message?

Edit: Oh yeah, and the additions rock, GP_FRAMEIMAGE especially. Thank you!
Any chance I could check for and RawDraw flipped frames?
« Last Edit: 03 May 2004, 17:57 by strazer »

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 RC 1 - Jaffa edition
« Reply #137 on: 03 May 2004, 18:53 »
With the new RC 1, if I tell my player character stop following the mouse with FollowCharacter(EGO, -1);, the game quits with the error message:

Er oops, sorry about that. I'll fix it for the next version.

Quote
I really think that's inappropriate.

I'd rather have EGO either ignore the NewRoom command completely or perform the room change and quit following the mouse automatically.
I don't think it's necessary to quit the game with an error message?

Well, if he ignored the NewRoom command we'd get people posting "BUG!!! NEWROOM IS BROKEN!!" so I thought that wasn't a good idea. Stopping the following automatically is another possibility - but I think the error message is the best way, since then you are alerted to the problem, and you have to decide what action you want to take. If it just stopped the following I can imagine there'd be people wondering why their following had suddenly broken.

Quote
Any chance I could check for and RawDraw flipped frames?

Well, that'd need some sort of GP_ISFRAMEFLIPPED as well as a RawDrawImageFlipped, so I'll add them to my list. Or would a RawDrawViewFrame(x,y,view,loop,frame) be better?

Re: AGS 2.61 RC 1 - Jaffa edition
« Reply #138 on: 03 May 2004, 19:19 »
But imagine my mouse could be in any of the rooms, then I would have to check before EVERY NewRoom(EGO, x) command in my game if my character is following the mouse or not (is that even possible?), and only then transport the mouse to the new room in advance.

To me, it makes perfect sense that the following is aborted if the sheperd is not put in the new room in advance.
Well, it's your call.

Edit:

Quote
Well, that'd need some sort of GP_ISFRAMEFLIPPED as well as a RawDrawImageFlipped, so I'll add them to my list. Or would a RawDrawViewFrame(x,y,view,loop,frame) be better?

RawDrawViewFrame is a great idea, that would solve all my problems and is future-proof if you decide to implement vertical flips someday (I'm not asking for it here!).
Personally I wouldn't need the other functions then. Thank you! :)
« Last Edit: 03 May 2004, 19:26 by strazer »

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on one or more games that won an AGS Award!
    •  
    • SSH worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 RC 1 - Jaffa edition
« Reply #139 on: 03 May 2004, 19:37 »
strazer: So make a function called NewRoomF that does the check and just find/replace!

Here's the two possible actions, of course, there would probably need to be "Ex" versions of each. It would be a bit simpler if CJ made the following state visible via global var or function

int following; // would need array if we have m,ulitple player chars

function MyFollowChar (int lamb, int chartofollow) {
  following = chartofollow;
  FollowCharacter(lamb, chartofollow);
}

function NewRoomF (int room) {
  if (following>=0) {
    if (stop_on_newroom) {
      following = -1;
      FollowCharacter(GetP{layerCharacter(), -1);
    } else {
      character[following].room = room;
      NewRoom(room);
    }
  } else {
    NewRoom(room);
  }
}


and just so Pumaman knows what I'd like to see in the editor plugin API:

  • Script Editor plugin that lets me semi-automatically-add an import to the script header
  • Script editor plugin that lets me add a #define and commented-out import to get the completer fooled, while editing a different file
  • plugin that automatically generates room #defines based on room name
  • plugin that can add a bunch of run-script interactions very quickly to a hotspot/object/inv item/char
  • plugin that is activated by a right-click and handles Marks in the room editor (using #defines, probably)

probably a bunch more...
« Last Edit: 03 May 2004, 20:11 by SSH »